bi-components-library 1.0.10 → 1.0.11
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 +1472 -1433
- 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 De, { useState as Y, useRef as G, useMemo as Ve, useCallback as H, useEffect as ne, useLayoutEffect as Me } from "react";
|
|
2
|
+
import { Button as he, Card as Se, Modal as Ge, Table as qe, Flex as $e, Spin as Fe, Empty as ze, Select as Ae, Form as ve, Input as Pe, Space as He, Dropdown as We, Tooltip as Ue, Progress as Xe, Pagination as Ye, theme as Je } from "antd";
|
|
3
|
+
import { createFromIconfontCN as Ke, LeftOutlined as Qe, SearchOutlined as Ze, ReloadOutlined as et, InfoCircleOutlined as tt, SendOutlined as nt, PauseCircleOutlined as rt, PlayCircleOutlined as at } from "@ant-design/icons";
|
|
4
|
+
import { createPortal as ot } from "react-dom";
|
|
5
|
+
var we = { exports: {} }, be = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -12,29 +12,29 @@ var he = { exports: {} }, me = {};
|
|
|
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
|
|
21
|
-
var
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
for (var
|
|
25
|
-
|
|
26
|
-
} else
|
|
27
|
-
return
|
|
15
|
+
var _e;
|
|
16
|
+
function st() {
|
|
17
|
+
if (_e) return be;
|
|
18
|
+
_e = 1;
|
|
19
|
+
var t = Symbol.for("react.transitional.element"), p = Symbol.for("react.fragment");
|
|
20
|
+
function o(r, a, m) {
|
|
21
|
+
var C = null;
|
|
22
|
+
if (m !== void 0 && (C = "" + m), a.key !== void 0 && (C = "" + a.key), "key" in a) {
|
|
23
|
+
m = {};
|
|
24
|
+
for (var g in a)
|
|
25
|
+
g !== "key" && (m[g] = a[g]);
|
|
26
|
+
} else m = a;
|
|
27
|
+
return a = m.ref, {
|
|
28
28
|
$$typeof: t,
|
|
29
|
-
type:
|
|
30
|
-
key:
|
|
31
|
-
ref:
|
|
32
|
-
props:
|
|
29
|
+
type: r,
|
|
30
|
+
key: C,
|
|
31
|
+
ref: a !== void 0 ? a : null,
|
|
32
|
+
props: m
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return be.Fragment = p, be.jsx = o, be.jsxs = o, be;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var xe = {};
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-jsx-runtime.development.js
|
|
@@ -44,252 +44,252 @@ var ye = {};
|
|
|
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
|
|
50
|
-
function t(
|
|
51
|
-
if (
|
|
52
|
-
if (typeof
|
|
53
|
-
return
|
|
54
|
-
if (typeof
|
|
55
|
-
switch (
|
|
56
|
-
case
|
|
47
|
+
var Re;
|
|
48
|
+
function lt() {
|
|
49
|
+
return Re || (Re = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
+
function t(s) {
|
|
51
|
+
if (s == null) return null;
|
|
52
|
+
if (typeof s == "function")
|
|
53
|
+
return s.$$typeof === W ? null : s.displayName || s.name || null;
|
|
54
|
+
if (typeof s == "string") return s;
|
|
55
|
+
switch (s) {
|
|
56
|
+
case T:
|
|
57
57
|
return "Fragment";
|
|
58
|
-
case
|
|
58
|
+
case v:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case c:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case R:
|
|
63
63
|
return "Suspense";
|
|
64
|
-
case
|
|
64
|
+
case q:
|
|
65
65
|
return "SuspenseList";
|
|
66
|
-
case
|
|
66
|
+
case P:
|
|
67
67
|
return "Activity";
|
|
68
68
|
}
|
|
69
|
-
if (typeof
|
|
70
|
-
switch (typeof
|
|
69
|
+
if (typeof s == "object")
|
|
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
|
-
),
|
|
73
|
-
case
|
|
72
|
+
), s.$$typeof) {
|
|
73
|
+
case i:
|
|
74
74
|
return "Portal";
|
|
75
|
+
case S:
|
|
76
|
+
return (s.displayName || "Context") + ".Provider";
|
|
77
|
+
case w:
|
|
78
|
+
return (s._context.displayName || "Context") + ".Consumer";
|
|
75
79
|
case h:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
case P:
|
|
83
|
-
return R = u.displayName || null, R !== null ? R : t(u.type) || "Memo";
|
|
84
|
-
case B:
|
|
85
|
-
R = u._payload, u = u._init;
|
|
80
|
+
var I = s.render;
|
|
81
|
+
return s = s.displayName, s || (s = I.displayName || I.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
|
82
|
+
case L:
|
|
83
|
+
return I = s.displayName || null, I !== null ? I : t(s.type) || "Memo";
|
|
84
|
+
case D:
|
|
85
|
+
I = s._payload, s = s._init;
|
|
86
86
|
try {
|
|
87
|
-
return t(
|
|
87
|
+
return t(s(I));
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
return null;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return "" +
|
|
93
|
+
function p(s) {
|
|
94
|
+
return "" + s;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function o(s) {
|
|
97
97
|
try {
|
|
98
|
-
|
|
99
|
-
var
|
|
98
|
+
p(s);
|
|
99
|
+
var I = !1;
|
|
100
100
|
} catch {
|
|
101
|
-
|
|
101
|
+
I = !0;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
return
|
|
107
|
-
|
|
103
|
+
if (I) {
|
|
104
|
+
I = console;
|
|
105
|
+
var X = I.error, ee = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
106
|
+
return X.call(
|
|
107
|
+
I,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
-
|
|
110
|
-
),
|
|
109
|
+
ee
|
|
110
|
+
), p(s);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function s
|
|
114
|
-
if (
|
|
115
|
-
if (typeof
|
|
113
|
+
function r(s) {
|
|
114
|
+
if (s === T) return "<>";
|
|
115
|
+
if (typeof s == "object" && s !== null && s.$$typeof === D)
|
|
116
116
|
return "<...>";
|
|
117
117
|
try {
|
|
118
|
-
var
|
|
119
|
-
return
|
|
118
|
+
var I = t(s);
|
|
119
|
+
return I ? "<" + I + ">" : "<...>";
|
|
120
120
|
} catch {
|
|
121
121
|
return "<...>";
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
var
|
|
126
|
-
return
|
|
124
|
+
function a() {
|
|
125
|
+
var s = F.A;
|
|
126
|
+
return s === null ? null : s.getOwner();
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function m() {
|
|
129
129
|
return Error("react-stack-top-frame");
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
if (
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
131
|
+
function C(s) {
|
|
132
|
+
if (U.call(s, "key")) {
|
|
133
|
+
var I = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
134
|
+
if (I && I.isReactWarning) return !1;
|
|
135
135
|
}
|
|
136
|
-
return
|
|
136
|
+
return s.key !== void 0;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
function
|
|
138
|
+
function g(s, I) {
|
|
139
|
+
function X() {
|
|
140
140
|
_ || (_ = !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
|
+
I
|
|
143
143
|
));
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
get:
|
|
145
|
+
X.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
146
|
+
get: X,
|
|
147
147
|
configurable: !0
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
var
|
|
152
|
-
return
|
|
150
|
+
function l() {
|
|
151
|
+
var s = t(this.type);
|
|
152
|
+
return J[s] || (J[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
|
-
)),
|
|
155
|
-
}
|
|
156
|
-
function
|
|
157
|
-
return
|
|
158
|
-
$$typeof:
|
|
159
|
-
type:
|
|
160
|
-
key:
|
|
161
|
-
props:
|
|
162
|
-
_owner:
|
|
163
|
-
}, (
|
|
154
|
+
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
155
|
+
}
|
|
156
|
+
function e(s, I, X, ee, ue, re, ye, O) {
|
|
157
|
+
return X = re.ref, s = {
|
|
158
|
+
$$typeof: d,
|
|
159
|
+
type: s,
|
|
160
|
+
key: I,
|
|
161
|
+
props: re,
|
|
162
|
+
_owner: ue
|
|
163
|
+
}, (X !== void 0 ? X : null) !== null ? Object.defineProperty(s, "ref", {
|
|
164
164
|
enumerable: !1,
|
|
165
|
-
get:
|
|
166
|
-
}) : Object.defineProperty(
|
|
165
|
+
get: l
|
|
166
|
+
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
167
167
|
configurable: !1,
|
|
168
168
|
enumerable: !1,
|
|
169
169
|
writable: !0,
|
|
170
170
|
value: 0
|
|
171
|
-
}), Object.defineProperty(
|
|
171
|
+
}), Object.defineProperty(s, "_debugInfo", {
|
|
172
172
|
configurable: !1,
|
|
173
173
|
enumerable: !1,
|
|
174
174
|
writable: !0,
|
|
175
175
|
value: null
|
|
176
|
-
}), Object.defineProperty(
|
|
176
|
+
}), Object.defineProperty(s, "_debugStack", {
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
|
-
value:
|
|
181
|
-
}), Object.defineProperty(
|
|
180
|
+
value: ye
|
|
181
|
+
}), Object.defineProperty(s, "_debugTask", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
|
-
value:
|
|
186
|
-
}), Object.freeze && (Object.freeze(
|
|
187
|
-
}
|
|
188
|
-
function
|
|
189
|
-
var
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
if (Z(
|
|
193
|
-
for (
|
|
194
|
-
|
|
195
|
-
Object.freeze && Object.freeze(
|
|
185
|
+
value: O
|
|
186
|
+
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
187
|
+
}
|
|
188
|
+
function x(s, I, X, ee, ue, re, ye, O) {
|
|
189
|
+
var M = I.children;
|
|
190
|
+
if (M !== void 0)
|
|
191
|
+
if (ee)
|
|
192
|
+
if (Z(M)) {
|
|
193
|
+
for (ee = 0; ee < M.length; ee++)
|
|
194
|
+
u(M[ee]);
|
|
195
|
+
Object.freeze && Object.freeze(M);
|
|
196
196
|
} else
|
|
197
197
|
console.error(
|
|
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
|
-
else
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
var
|
|
204
|
-
return
|
|
200
|
+
else u(M);
|
|
201
|
+
if (U.call(I, "key")) {
|
|
202
|
+
M = t(s);
|
|
203
|
+
var ae = Object.keys(I).filter(function(Ee) {
|
|
204
|
+
return Ee !== "key";
|
|
205
205
|
});
|
|
206
|
-
|
|
206
|
+
ee = 0 < ae.length ? "{key: someKey, " + ae.join(": ..., ") + ": ...}" : "{key: someKey}", de[M + ee] || (ae = 0 < ae.length ? "{" + ae.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} />
|
|
210
210
|
React keys must be passed directly to JSX without using spread:
|
|
211
211
|
let props = %s;
|
|
212
212
|
<%s key={someKey} {...props} />`,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
),
|
|
213
|
+
ee,
|
|
214
|
+
M,
|
|
215
|
+
ae,
|
|
216
|
+
M
|
|
217
|
+
), de[M + ee] = !0);
|
|
218
218
|
}
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
for (var
|
|
222
|
-
|
|
223
|
-
} else
|
|
224
|
-
return
|
|
225
|
-
|
|
226
|
-
typeof
|
|
227
|
-
),
|
|
228
|
-
|
|
229
|
-
i,
|
|
230
|
-
ee,
|
|
231
|
-
se,
|
|
232
|
-
l(),
|
|
219
|
+
if (M = null, X !== void 0 && (o(X), M = "" + X), C(I) && (o(I.key), M = "" + I.key), "key" in I) {
|
|
220
|
+
X = {};
|
|
221
|
+
for (var fe in I)
|
|
222
|
+
fe !== "key" && (X[fe] = I[fe]);
|
|
223
|
+
} else X = I;
|
|
224
|
+
return M && g(
|
|
225
|
+
X,
|
|
226
|
+
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
227
|
+
), e(
|
|
228
|
+
s,
|
|
233
229
|
M,
|
|
234
|
-
|
|
235
|
-
|
|
230
|
+
re,
|
|
231
|
+
ue,
|
|
232
|
+
a(),
|
|
233
|
+
X,
|
|
234
|
+
ye,
|
|
235
|
+
O
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
typeof
|
|
238
|
+
function u(s) {
|
|
239
|
+
typeof s == "object" && s !== null && s.$$typeof === d && s._store && (s._store.validated = 1);
|
|
240
240
|
}
|
|
241
|
-
var N =
|
|
241
|
+
var N = De, d = Symbol.for("react.transitional.element"), i = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), S = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), W = Symbol.for("react.client.reference"), F = N.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, Z = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
244
|
N = {
|
|
245
|
-
react_stack_bottom_frame: function(
|
|
246
|
-
return
|
|
245
|
+
react_stack_bottom_frame: function(s) {
|
|
246
|
+
return s();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var _,
|
|
249
|
+
var _, J = {}, Q = N.react_stack_bottom_frame.bind(
|
|
250
250
|
N,
|
|
251
|
-
|
|
252
|
-
)(),
|
|
253
|
-
|
|
254
|
-
var
|
|
255
|
-
return
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
251
|
+
m
|
|
252
|
+
)(), ie = k(r(m)), de = {};
|
|
253
|
+
xe.Fragment = T, xe.jsx = function(s, I, X, ee, ue) {
|
|
254
|
+
var re = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
255
|
+
return x(
|
|
256
|
+
s,
|
|
257
|
+
I,
|
|
258
|
+
X,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
260
|
+
ee,
|
|
261
|
+
ue,
|
|
262
|
+
re ? Error("react-stack-top-frame") : Q,
|
|
263
|
+
re ? k(r(s)) : ie
|
|
264
264
|
);
|
|
265
|
-
},
|
|
266
|
-
var
|
|
267
|
-
return
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
265
|
+
}, xe.jsxs = function(s, I, X, ee, ue) {
|
|
266
|
+
var re = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
267
|
+
return x(
|
|
268
|
+
s,
|
|
269
|
+
I,
|
|
270
|
+
X,
|
|
271
271
|
!0,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
ee,
|
|
273
|
+
ue,
|
|
274
|
+
re ? Error("react-stack-top-frame") : Q,
|
|
275
|
+
re ? k(r(s)) : ie
|
|
276
276
|
);
|
|
277
277
|
};
|
|
278
|
-
}()),
|
|
278
|
+
}()), xe;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
return
|
|
280
|
+
var Ie;
|
|
281
|
+
function it() {
|
|
282
|
+
return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? we.exports = st() : we.exports = lt()), we.exports;
|
|
283
283
|
}
|
|
284
|
-
var
|
|
285
|
-
const
|
|
284
|
+
var n = it();
|
|
285
|
+
const ct = ({
|
|
286
286
|
variant: t = "primary",
|
|
287
|
-
loading:
|
|
288
|
-
children:
|
|
289
|
-
...
|
|
287
|
+
loading: p = !1,
|
|
288
|
+
children: o,
|
|
289
|
+
...r
|
|
290
290
|
}) => {
|
|
291
|
-
const
|
|
292
|
-
switch (
|
|
291
|
+
const a = (m) => {
|
|
292
|
+
switch (m) {
|
|
293
293
|
case "primary":
|
|
294
294
|
return "primary";
|
|
295
295
|
case "ghost":
|
|
@@ -304,18 +304,18 @@ const tt = ({
|
|
|
304
304
|
return "primary";
|
|
305
305
|
}
|
|
306
306
|
};
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
|
|
307
|
+
return /* @__PURE__ */ n.jsx(
|
|
308
|
+
he,
|
|
309
309
|
{
|
|
310
|
-
...
|
|
311
|
-
type:
|
|
312
|
-
loading:
|
|
310
|
+
...r,
|
|
311
|
+
type: a(t),
|
|
312
|
+
loading: p,
|
|
313
313
|
ghost: t === "ghost",
|
|
314
|
-
children:
|
|
314
|
+
children: o
|
|
315
315
|
}
|
|
316
316
|
);
|
|
317
317
|
};
|
|
318
|
-
|
|
318
|
+
ct.__docgenInfo = {
|
|
319
319
|
displayName: "Button",
|
|
320
320
|
description: "基础按钮,用于触发操作",
|
|
321
321
|
props: {
|
|
@@ -359,25 +359,25 @@ tt.__docgenInfo = {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
|
-
const
|
|
362
|
+
const ut = ({
|
|
363
363
|
title: t,
|
|
364
|
-
children:
|
|
365
|
-
bordered:
|
|
366
|
-
hoverable:
|
|
367
|
-
size:
|
|
368
|
-
...
|
|
369
|
-
}) => /* @__PURE__ */
|
|
370
|
-
|
|
364
|
+
children: p,
|
|
365
|
+
bordered: o = !0,
|
|
366
|
+
hoverable: r = !1,
|
|
367
|
+
size: a = "default",
|
|
368
|
+
...m
|
|
369
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
370
|
+
Se,
|
|
371
371
|
{
|
|
372
|
-
...
|
|
372
|
+
...m,
|
|
373
373
|
title: t,
|
|
374
|
-
bordered:
|
|
375
|
-
hoverable:
|
|
376
|
-
size:
|
|
377
|
-
children:
|
|
374
|
+
bordered: o,
|
|
375
|
+
hoverable: r,
|
|
376
|
+
size: a,
|
|
377
|
+
children: p
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
|
-
|
|
380
|
+
ut.__docgenInfo = {
|
|
381
381
|
displayName: "Card",
|
|
382
382
|
description: "卡片容器,用于分组内容",
|
|
383
383
|
props: {
|
|
@@ -428,23 +428,23 @@ nt.__docgenInfo = {
|
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
|
-
const
|
|
431
|
+
const dt = ({
|
|
432
432
|
showDefaultFooter: t = !0,
|
|
433
|
-
...
|
|
433
|
+
...p
|
|
434
434
|
}) => {
|
|
435
|
-
const
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
-
/* @__PURE__ */
|
|
435
|
+
const o = p.footer !== void 0 ? p.footer : t ? (r, { OkBtn: a, CancelBtn: m }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
436
|
+
/* @__PURE__ */ n.jsx(a, {}),
|
|
437
|
+
/* @__PURE__ */ n.jsx(m, {})
|
|
438
438
|
] }) : null;
|
|
439
|
-
return /* @__PURE__ */
|
|
440
|
-
|
|
439
|
+
return /* @__PURE__ */ n.jsx(
|
|
440
|
+
Ge,
|
|
441
441
|
{
|
|
442
|
-
...
|
|
443
|
-
footer:
|
|
442
|
+
...p,
|
|
443
|
+
footer: o
|
|
444
444
|
}
|
|
445
445
|
);
|
|
446
446
|
};
|
|
447
|
-
|
|
447
|
+
dt.__docgenInfo = {
|
|
448
448
|
displayName: "AppModal",
|
|
449
449
|
description: "应用级模态框组件,基于 Ant Design Modal 封装",
|
|
450
450
|
props: {
|
|
@@ -505,29 +505,29 @@ at.__docgenInfo = {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
};
|
|
508
|
-
const
|
|
508
|
+
const pt = ({
|
|
509
509
|
scrollX: t,
|
|
510
|
-
showPagination:
|
|
511
|
-
defaultPageSize:
|
|
512
|
-
...
|
|
513
|
-
}) => /* @__PURE__ */
|
|
514
|
-
|
|
510
|
+
showPagination: p = !0,
|
|
511
|
+
defaultPageSize: o = 10,
|
|
512
|
+
...r
|
|
513
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
514
|
+
qe,
|
|
515
515
|
{
|
|
516
|
-
...
|
|
516
|
+
...r,
|
|
517
517
|
scroll: {
|
|
518
518
|
x: t || "max-content",
|
|
519
519
|
y: "50vh"
|
|
520
520
|
},
|
|
521
|
-
pagination:
|
|
521
|
+
pagination: p ? {
|
|
522
522
|
hideOnSinglePage: !0,
|
|
523
523
|
showSizeChanger: !0,
|
|
524
524
|
showQuickJumper: !0,
|
|
525
|
-
defaultPageSize:
|
|
526
|
-
...
|
|
525
|
+
defaultPageSize: o,
|
|
526
|
+
...r.pagination
|
|
527
527
|
} : !1
|
|
528
528
|
}
|
|
529
529
|
);
|
|
530
|
-
|
|
530
|
+
pt.__docgenInfo = {
|
|
531
531
|
displayName: "PageTable",
|
|
532
532
|
description: "页面级表格组件,高度铺满容器,自动滚动",
|
|
533
533
|
props: {
|
|
@@ -577,30 +577,30 @@ rt.__docgenInfo = {
|
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
|
-
const
|
|
580
|
+
const ft = Ke({
|
|
581
581
|
scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
|
|
582
|
-
}),
|
|
582
|
+
}), mt = ({
|
|
583
583
|
name: t,
|
|
584
|
-
size:
|
|
585
|
-
color:
|
|
586
|
-
style:
|
|
587
|
-
...
|
|
584
|
+
size: p,
|
|
585
|
+
color: o,
|
|
586
|
+
style: r,
|
|
587
|
+
...a
|
|
588
588
|
}) => {
|
|
589
|
-
const
|
|
590
|
-
fontSize:
|
|
591
|
-
color:
|
|
592
|
-
...
|
|
589
|
+
const m = {
|
|
590
|
+
fontSize: p,
|
|
591
|
+
color: o,
|
|
592
|
+
...r
|
|
593
593
|
};
|
|
594
|
-
return /* @__PURE__ */
|
|
595
|
-
|
|
594
|
+
return /* @__PURE__ */ n.jsx(
|
|
595
|
+
ft,
|
|
596
596
|
{
|
|
597
|
-
...
|
|
597
|
+
...a,
|
|
598
598
|
type: t,
|
|
599
|
-
style:
|
|
599
|
+
style: m
|
|
600
600
|
}
|
|
601
601
|
);
|
|
602
602
|
};
|
|
603
|
-
|
|
603
|
+
mt.__docgenInfo = {
|
|
604
604
|
displayName: "XcIcon",
|
|
605
605
|
description: "自定义图标组件,基于 iconfont",
|
|
606
606
|
props: {
|
|
@@ -636,43 +636,43 @@ st.__docgenInfo = {
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
};
|
|
639
|
-
const
|
|
639
|
+
const yt = ({
|
|
640
640
|
loading: t,
|
|
641
|
-
description:
|
|
642
|
-
className:
|
|
643
|
-
emptyChildren:
|
|
644
|
-
loadingText:
|
|
645
|
-
emptyImage:
|
|
646
|
-
}) => t ? /* @__PURE__ */
|
|
647
|
-
|
|
641
|
+
description: p = "暂无数据",
|
|
642
|
+
className: o,
|
|
643
|
+
emptyChildren: r,
|
|
644
|
+
loadingText: a,
|
|
645
|
+
emptyImage: m
|
|
646
|
+
}) => t ? /* @__PURE__ */ n.jsxs(
|
|
647
|
+
$e,
|
|
648
648
|
{
|
|
649
|
-
className: `pt-10 w-full ${
|
|
649
|
+
className: `pt-10 w-full ${o || ""}`,
|
|
650
650
|
align: "center",
|
|
651
651
|
justify: "center",
|
|
652
652
|
vertical: !0,
|
|
653
653
|
children: [
|
|
654
|
-
/* @__PURE__ */
|
|
655
|
-
|
|
654
|
+
/* @__PURE__ */ n.jsx(Fe, { size: "large" }),
|
|
655
|
+
a && /* @__PURE__ */ n.jsx("div", { className: "mt-4 text-gray-500", children: a })
|
|
656
656
|
]
|
|
657
657
|
}
|
|
658
|
-
) : /* @__PURE__ */
|
|
659
|
-
|
|
658
|
+
) : /* @__PURE__ */ n.jsx(
|
|
659
|
+
$e,
|
|
660
660
|
{
|
|
661
|
-
className: `pt-10 w-full ${
|
|
661
|
+
className: `pt-10 w-full ${o || ""}`,
|
|
662
662
|
align: "center",
|
|
663
663
|
justify: "center",
|
|
664
|
-
children: /* @__PURE__ */
|
|
665
|
-
|
|
664
|
+
children: /* @__PURE__ */ n.jsx(
|
|
665
|
+
ze,
|
|
666
666
|
{
|
|
667
|
-
image:
|
|
668
|
-
description:
|
|
667
|
+
image: m,
|
|
668
|
+
description: p,
|
|
669
669
|
imageStyle: { height: 180 },
|
|
670
|
-
children:
|
|
670
|
+
children: r
|
|
671
671
|
}
|
|
672
672
|
)
|
|
673
673
|
}
|
|
674
674
|
);
|
|
675
|
-
|
|
675
|
+
yt.__docgenInfo = {
|
|
676
676
|
displayName: "EmptyAndSpin",
|
|
677
677
|
description: "空状态和加载状态组合组件",
|
|
678
678
|
props: {
|
|
@@ -715,24 +715,24 @@ lt.__docgenInfo = {
|
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
};
|
|
718
|
-
const
|
|
718
|
+
const gt = ({
|
|
719
719
|
onClick: t,
|
|
720
|
-
showText:
|
|
721
|
-
className:
|
|
722
|
-
size:
|
|
723
|
-
type:
|
|
724
|
-
}) => /* @__PURE__ */
|
|
725
|
-
|
|
720
|
+
showText: p = !1,
|
|
721
|
+
className: o,
|
|
722
|
+
size: r = "small",
|
|
723
|
+
type: a = "default"
|
|
724
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
725
|
+
he,
|
|
726
726
|
{
|
|
727
|
-
size:
|
|
728
|
-
type:
|
|
729
|
-
icon: /* @__PURE__ */
|
|
730
|
-
className: `cursor-pointer ${
|
|
727
|
+
size: r,
|
|
728
|
+
type: a,
|
|
729
|
+
icon: /* @__PURE__ */ n.jsx(Qe, {}),
|
|
730
|
+
className: `cursor-pointer ${o || ""}`,
|
|
731
731
|
onClick: t,
|
|
732
|
-
children:
|
|
732
|
+
children: p && "返回"
|
|
733
733
|
}
|
|
734
734
|
);
|
|
735
|
-
|
|
735
|
+
gt.__docgenInfo = {
|
|
736
736
|
displayName: "BackButton",
|
|
737
737
|
description: "返回按钮组件",
|
|
738
738
|
props: {
|
|
@@ -771,23 +771,23 @@ it.__docgenInfo = {
|
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
|
-
const
|
|
774
|
+
const ht = ({
|
|
775
775
|
removePadding: t = !0,
|
|
776
|
-
className:
|
|
777
|
-
...
|
|
776
|
+
className: p,
|
|
777
|
+
...o
|
|
778
778
|
}) => {
|
|
779
|
-
const
|
|
780
|
-
return /* @__PURE__ */
|
|
781
|
-
|
|
779
|
+
const r = t ? `px-0 h-auto ${p || ""}` : p;
|
|
780
|
+
return /* @__PURE__ */ n.jsx(
|
|
781
|
+
he,
|
|
782
782
|
{
|
|
783
783
|
type: "link",
|
|
784
|
-
...
|
|
785
|
-
className:
|
|
786
|
-
children:
|
|
784
|
+
...o,
|
|
785
|
+
className: r,
|
|
786
|
+
children: o.children
|
|
787
787
|
}
|
|
788
788
|
);
|
|
789
789
|
};
|
|
790
|
-
|
|
790
|
+
ht.__docgenInfo = {
|
|
791
791
|
displayName: "LinkButton",
|
|
792
792
|
description: "链接样式按钮组件,适用于表格操作列",
|
|
793
793
|
props: {
|
|
@@ -824,121 +824,121 @@ ct.__docgenInfo = {
|
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
|
-
const { Option:
|
|
827
|
+
const { Option: bt } = Ae, xt = ({
|
|
828
828
|
columns: t,
|
|
829
|
-
request:
|
|
830
|
-
searchFields:
|
|
831
|
-
showSearch:
|
|
832
|
-
showRefresh:
|
|
833
|
-
defaultPageSize:
|
|
834
|
-
pageSizeOptions:
|
|
835
|
-
autoLoad:
|
|
836
|
-
externalParams:
|
|
837
|
-
...
|
|
829
|
+
request: p,
|
|
830
|
+
searchFields: o = [],
|
|
831
|
+
showSearch: r = !0,
|
|
832
|
+
showRefresh: a = !0,
|
|
833
|
+
defaultPageSize: m = 10,
|
|
834
|
+
pageSizeOptions: C = ["10", "20", "50", "100"],
|
|
835
|
+
autoLoad: g = !0,
|
|
836
|
+
externalParams: l = {},
|
|
837
|
+
...e
|
|
838
838
|
}) => {
|
|
839
|
-
const [
|
|
839
|
+
const [x, u] = Y([]), [N, d] = Y(!1), [i, T] = Y({
|
|
840
840
|
current: 1,
|
|
841
|
-
pageSize:
|
|
841
|
+
pageSize: m,
|
|
842
842
|
total: 0
|
|
843
|
-
}), [
|
|
844
|
-
|
|
845
|
-
const
|
|
846
|
-
|
|
847
|
-
const
|
|
848
|
-
const { sortable: _, render:
|
|
843
|
+
}), [c, v] = Y({}), [w, S] = Y({}), [h] = ve.useForm(), R = G(i);
|
|
844
|
+
R.current = i;
|
|
845
|
+
const q = G(l);
|
|
846
|
+
q.current = l;
|
|
847
|
+
const L = G(!1), D = Ve(() => t.map((k) => {
|
|
848
|
+
const { sortable: _, render: J, ...Q } = k;
|
|
849
849
|
return {
|
|
850
|
-
...
|
|
850
|
+
...Q,
|
|
851
851
|
sorter: _ ? !0 : void 0,
|
|
852
|
-
render:
|
|
852
|
+
render: J || ((ie) => ie)
|
|
853
853
|
};
|
|
854
|
-
}), [t]),
|
|
855
|
-
if (
|
|
856
|
-
|
|
854
|
+
}), [t]), P = H(async (k = {}) => {
|
|
855
|
+
if (p) {
|
|
856
|
+
d(!0);
|
|
857
857
|
try {
|
|
858
858
|
const _ = {
|
|
859
|
-
page:
|
|
860
|
-
pageSize:
|
|
861
|
-
sortField:
|
|
862
|
-
sortOrder:
|
|
863
|
-
searchParams: { ...
|
|
864
|
-
...
|
|
865
|
-
},
|
|
866
|
-
|
|
867
|
-
...
|
|
868
|
-
total:
|
|
869
|
-
current: _.page ||
|
|
859
|
+
page: R.current.current,
|
|
860
|
+
pageSize: R.current.pageSize,
|
|
861
|
+
sortField: w.field,
|
|
862
|
+
sortOrder: w.order,
|
|
863
|
+
searchParams: { ...c, ...q.current },
|
|
864
|
+
...k
|
|
865
|
+
}, J = await p(_);
|
|
866
|
+
J.success && (u(J.data), T((Q) => ({
|
|
867
|
+
...Q,
|
|
868
|
+
total: J.total,
|
|
869
|
+
current: _.page || Q.current
|
|
870
870
|
})));
|
|
871
871
|
} catch (_) {
|
|
872
872
|
console.error("加载数据失败:", _);
|
|
873
873
|
} finally {
|
|
874
|
-
|
|
874
|
+
d(!1);
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
|
-
}, [
|
|
878
|
-
|
|
879
|
-
}, []),
|
|
880
|
-
|
|
881
|
-
}, [
|
|
882
|
-
|
|
883
|
-
}, [
|
|
884
|
-
const
|
|
885
|
-
current:
|
|
886
|
-
pageSize:
|
|
887
|
-
total:
|
|
888
|
-
},
|
|
889
|
-
field:
|
|
890
|
-
order:
|
|
877
|
+
}, [p, w, c]), W = H((k) => {
|
|
878
|
+
v(k), T((_) => ({ ..._, current: 1 }));
|
|
879
|
+
}, []), F = H(() => {
|
|
880
|
+
h.resetFields(), v({}), T((k) => ({ ...k, current: 1 }));
|
|
881
|
+
}, [h]), U = H(() => {
|
|
882
|
+
P();
|
|
883
|
+
}, [P]), Z = H((k, _, J) => {
|
|
884
|
+
const Q = {
|
|
885
|
+
current: k.current || 1,
|
|
886
|
+
pageSize: k.pageSize || m,
|
|
887
|
+
total: k.total || 0
|
|
888
|
+
}, ie = {
|
|
889
|
+
field: J?.field,
|
|
890
|
+
order: J?.order
|
|
891
891
|
};
|
|
892
|
-
|
|
893
|
-
}, [
|
|
894
|
-
return
|
|
895
|
-
const
|
|
896
|
-
(
|
|
897
|
-
}, [
|
|
898
|
-
|
|
899
|
-
|
|
892
|
+
T(Q), S(ie);
|
|
893
|
+
}, [m]);
|
|
894
|
+
return ne(() => {
|
|
895
|
+
const k = Object.keys(l).length > 0;
|
|
896
|
+
(g && !L.current || k) && (P(), L.current = !0);
|
|
897
|
+
}, [g, l, P]), /* @__PURE__ */ n.jsxs("div", { children: [
|
|
898
|
+
r && o.length > 0 && /* @__PURE__ */ n.jsx(Se, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ n.jsxs(
|
|
899
|
+
ve,
|
|
900
900
|
{
|
|
901
|
-
form:
|
|
901
|
+
form: h,
|
|
902
902
|
layout: "inline",
|
|
903
|
-
onFinish:
|
|
904
|
-
initialValues:
|
|
903
|
+
onFinish: W,
|
|
904
|
+
initialValues: o.reduce((k, _) => (_.defaultValue !== void 0 && (k[_.key] = _.defaultValue), k), {}),
|
|
905
905
|
children: [
|
|
906
|
-
|
|
907
|
-
|
|
906
|
+
o.map((k) => /* @__PURE__ */ n.jsx(ve.Item, { name: k.key, label: k.label, children: k.type === "input" ? /* @__PURE__ */ n.jsx(
|
|
907
|
+
Pe,
|
|
908
908
|
{
|
|
909
|
-
placeholder:
|
|
909
|
+
placeholder: k.placeholder || `请输入${k.label}`,
|
|
910
910
|
style: { width: 200 }
|
|
911
911
|
}
|
|
912
|
-
) : /* @__PURE__ */
|
|
913
|
-
|
|
912
|
+
) : /* @__PURE__ */ n.jsx(
|
|
913
|
+
Ae,
|
|
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((_) => /* @__PURE__ */ n.jsx(bt, { value: _.value, children: _.label }, _.value))
|
|
919
919
|
}
|
|
920
|
-
) },
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
/* @__PURE__ */
|
|
924
|
-
|
|
920
|
+
) }, k.key)),
|
|
921
|
+
/* @__PURE__ */ n.jsx(ve.Item, { children: /* @__PURE__ */ n.jsxs(He, { children: [
|
|
922
|
+
/* @__PURE__ */ n.jsx(he, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ n.jsx(Ze, {}), children: "查询" }),
|
|
923
|
+
/* @__PURE__ */ n.jsx(he, { onClick: F, children: "重置" }),
|
|
924
|
+
a && /* @__PURE__ */ n.jsx(he, { icon: /* @__PURE__ */ n.jsx(et, {}), onClick: U, children: "刷新" })
|
|
925
925
|
] }) })
|
|
926
926
|
]
|
|
927
927
|
}
|
|
928
928
|
) }),
|
|
929
|
-
/* @__PURE__ */
|
|
930
|
-
|
|
929
|
+
/* @__PURE__ */ n.jsx(
|
|
930
|
+
qe,
|
|
931
931
|
{
|
|
932
|
-
...
|
|
933
|
-
columns:
|
|
934
|
-
dataSource:
|
|
932
|
+
...e,
|
|
933
|
+
columns: D,
|
|
934
|
+
dataSource: x,
|
|
935
935
|
loading: N,
|
|
936
936
|
pagination: {
|
|
937
|
-
...
|
|
937
|
+
...i,
|
|
938
938
|
showSizeChanger: !0,
|
|
939
939
|
showQuickJumper: !0,
|
|
940
|
-
showTotal: (
|
|
941
|
-
pageSizeOptions:
|
|
940
|
+
showTotal: (k, _) => `第 ${_[0]}-${_[1]} 条/共 ${k} 条`,
|
|
941
|
+
pageSizeOptions: C
|
|
942
942
|
},
|
|
943
943
|
onChange: Z,
|
|
944
944
|
scroll: { x: "max-content", y: "50vh" }
|
|
@@ -946,7 +946,7 @@ const { Option: ut } = Te, dt = ({
|
|
|
946
946
|
)
|
|
947
947
|
] });
|
|
948
948
|
};
|
|
949
|
-
|
|
949
|
+
xt.__docgenInfo = {
|
|
950
950
|
displayName: "AdvancedTable",
|
|
951
951
|
description: "高阶表格组件,支持异步请求、搜索、排序等功能",
|
|
952
952
|
props: {
|
|
@@ -1013,574 +1013,613 @@ dt.__docgenInfo = {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
1015
|
};
|
|
1016
|
-
function
|
|
1016
|
+
function Ne(t, p, o) {
|
|
1017
1017
|
if (!t.current) return;
|
|
1018
|
-
const
|
|
1019
|
-
for (const
|
|
1020
|
-
|
|
1021
|
-
type:
|
|
1022
|
-
key:
|
|
1023
|
-
exclusionGroup:
|
|
1018
|
+
const r = /* @__PURE__ */ new Set(), a = {};
|
|
1019
|
+
for (const u of p)
|
|
1020
|
+
u.exclusionGroup && u.exclusionGroup !== "separator" && (r.add(u.exclusionGroup), a[u.exclusionGroup] || (a[u.exclusionGroup] = []), a[u.exclusionGroup].push({
|
|
1021
|
+
type: u.type,
|
|
1022
|
+
key: u.key,
|
|
1023
|
+
exclusionGroup: u.exclusionGroup
|
|
1024
1024
|
}));
|
|
1025
|
-
const
|
|
1026
|
-
for (const
|
|
1027
|
-
|
|
1028
|
-
for (const N of
|
|
1025
|
+
const m = {};
|
|
1026
|
+
for (const u of r) {
|
|
1027
|
+
m[u] = !1;
|
|
1028
|
+
for (const N of a[u])
|
|
1029
1029
|
if (N.type === "upload" && N.key) {
|
|
1030
|
-
if (
|
|
1031
|
-
|
|
1030
|
+
if (o[N.key] !== null && o[N.key] !== void 0) {
|
|
1031
|
+
m[u] = !0;
|
|
1032
1032
|
break;
|
|
1033
1033
|
}
|
|
1034
1034
|
} else if (N.type === "variable" && N.key) {
|
|
1035
|
-
const
|
|
1035
|
+
const d = t.current.querySelector(
|
|
1036
1036
|
`[data-type="variable"][data-key="${N.key}"]`
|
|
1037
1037
|
);
|
|
1038
|
-
if (
|
|
1039
|
-
|
|
1038
|
+
if (d && d.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1039
|
+
m[u] = !0;
|
|
1040
1040
|
break;
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
1043
|
}
|
|
1044
|
-
const
|
|
1045
|
-
(
|
|
1044
|
+
const C = p.some((u) => u.exclusionGroup === "separator"), l = Object.keys(m).filter(
|
|
1045
|
+
(u) => m[u]
|
|
1046
1046
|
).length > 0;
|
|
1047
|
-
let
|
|
1048
|
-
if (
|
|
1049
|
-
for (const
|
|
1050
|
-
if (
|
|
1051
|
-
|
|
1047
|
+
let e = null;
|
|
1048
|
+
if (l && C) {
|
|
1049
|
+
for (const u of p)
|
|
1050
|
+
if (u.exclusionGroup && u.exclusionGroup !== "separator" && m[u.exclusionGroup]) {
|
|
1051
|
+
e = u.exclusionGroup;
|
|
1052
1052
|
break;
|
|
1053
1053
|
}
|
|
1054
1054
|
}
|
|
1055
|
-
for (const
|
|
1055
|
+
for (const u of r) {
|
|
1056
1056
|
const N = t.current.querySelectorAll(
|
|
1057
|
-
`[data-group="${
|
|
1057
|
+
`[data-group="${u}"]`
|
|
1058
1058
|
);
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
}) : N.forEach((
|
|
1062
|
-
|
|
1063
|
-
}) : N.forEach((
|
|
1064
|
-
|
|
1059
|
+
C && l && e ? u === e ? N.forEach((d) => {
|
|
1060
|
+
d.classList.contains("required-upload-group") ? d.style.setProperty("display", "inline-flex", "important") : (d.classList.contains("exclusion-wrapper"), d.style.setProperty("display", "inline-block", "important"));
|
|
1061
|
+
}) : N.forEach((d) => {
|
|
1062
|
+
d.style.display = "none", d.style.setProperty("display", "none", "important");
|
|
1063
|
+
}) : N.forEach((d) => {
|
|
1064
|
+
d.classList.contains("required-upload-group") ? d.style.setProperty("display", "inline-flex", "important") : (d.classList.contains("exclusion-wrapper"), d.style.setProperty("display", "inline-block", "important"));
|
|
1065
1065
|
});
|
|
1066
1066
|
}
|
|
1067
1067
|
t.current.querySelectorAll(
|
|
1068
1068
|
'[data-group="separator"]'
|
|
1069
|
-
).forEach((
|
|
1070
|
-
|
|
1069
|
+
).forEach((u) => {
|
|
1070
|
+
u.style.display = l ? "none" : "inline";
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function Ce(t, p, o, r) {
|
|
1074
1074
|
if (!t.current) {
|
|
1075
|
-
|
|
1075
|
+
r(!1);
|
|
1076
1076
|
return;
|
|
1077
1077
|
}
|
|
1078
|
-
const
|
|
1079
|
-
for (let
|
|
1080
|
-
const
|
|
1081
|
-
if ((
|
|
1082
|
-
|
|
1083
|
-
exclusionGroup:
|
|
1084
|
-
key:
|
|
1085
|
-
type:
|
|
1086
|
-
isMultiVariable:
|
|
1078
|
+
const a = [];
|
|
1079
|
+
for (let l = 0; l < p.length; l++) {
|
|
1080
|
+
const e = p[l];
|
|
1081
|
+
if ((e.type === "variable" || e.type === "upload" || e.type === "multi-variable") && e.required && e.key) {
|
|
1082
|
+
a.push({
|
|
1083
|
+
exclusionGroup: e.exclusionGroup || "",
|
|
1084
|
+
key: e.key,
|
|
1085
|
+
type: e.type === "multi-variable" ? "variable" : e.type,
|
|
1086
|
+
isMultiVariable: e.type === "multi-variable"
|
|
1087
1087
|
});
|
|
1088
1088
|
continue;
|
|
1089
1089
|
}
|
|
1090
|
-
if (
|
|
1091
|
-
for (let
|
|
1092
|
-
const
|
|
1093
|
-
if (
|
|
1094
|
-
|
|
1095
|
-
exclusionGroup:
|
|
1096
|
-
key:
|
|
1097
|
-
type:
|
|
1090
|
+
if (e.type === "text" && e.className?.includes("rte-text-required") && e.exclusionGroup)
|
|
1091
|
+
for (let x = l + 1; x < p.length; x++) {
|
|
1092
|
+
const u = p[x];
|
|
1093
|
+
if (u.exclusionGroup === e.exclusionGroup && (u.type === "variable" || u.type === "upload") && u.key) {
|
|
1094
|
+
a.push({
|
|
1095
|
+
exclusionGroup: e.exclusionGroup,
|
|
1096
|
+
key: u.key,
|
|
1097
|
+
type: u.type
|
|
1098
1098
|
});
|
|
1099
1099
|
break;
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
|
-
const
|
|
1104
|
-
let
|
|
1105
|
-
if (
|
|
1106
|
-
const
|
|
1107
|
-
(
|
|
1108
|
-
) <
|
|
1109
|
-
(
|
|
1110
|
-
) >
|
|
1111
|
-
|
|
1103
|
+
const m = p.some((l) => l.exclusionGroup === "separator");
|
|
1104
|
+
let C = !1;
|
|
1105
|
+
if (m && a.length > 1) {
|
|
1106
|
+
const l = p.findIndex((u) => u.exclusionGroup === "separator"), e = a.filter((u) => p.findIndex(
|
|
1107
|
+
(d) => (d.type === "variable" || d.type === "upload") && d.key === u.key && d.exclusionGroup === u.exclusionGroup
|
|
1108
|
+
) < l), x = a.filter((u) => p.findIndex(
|
|
1109
|
+
(d) => (d.type === "variable" || d.type === "upload") && d.key === u.key && d.exclusionGroup === u.exclusionGroup
|
|
1110
|
+
) > l);
|
|
1111
|
+
C = e.length > 0 && x.length > 0;
|
|
1112
1112
|
}
|
|
1113
|
-
if (
|
|
1114
|
-
if (
|
|
1113
|
+
if (a.length === 0) {
|
|
1114
|
+
if (p.length === 0) {
|
|
1115
1115
|
if (!t.current) {
|
|
1116
|
-
|
|
1116
|
+
r(!1);
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
const
|
|
1120
|
-
|
|
1119
|
+
const l = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
1120
|
+
r(l.length > 0);
|
|
1121
1121
|
return;
|
|
1122
1122
|
}
|
|
1123
|
-
|
|
1123
|
+
r(!0);
|
|
1124
1124
|
return;
|
|
1125
1125
|
}
|
|
1126
|
-
const
|
|
1126
|
+
const g = a.filter((l) => {
|
|
1127
1127
|
if (!t.current) return !1;
|
|
1128
|
-
const
|
|
1129
|
-
`[data-group="${
|
|
1128
|
+
const e = t.current.querySelectorAll(
|
|
1129
|
+
`[data-group="${l.exclusionGroup}"]`
|
|
1130
1130
|
);
|
|
1131
|
-
return
|
|
1131
|
+
return e.length === 0 ? !1 : e[0].style.display !== "none";
|
|
1132
1132
|
});
|
|
1133
|
-
if (
|
|
1134
|
-
|
|
1133
|
+
if (g.length === 0) {
|
|
1134
|
+
r(!0);
|
|
1135
1135
|
return;
|
|
1136
1136
|
}
|
|
1137
|
-
if (
|
|
1138
|
-
let
|
|
1139
|
-
for (const
|
|
1140
|
-
if (
|
|
1141
|
-
if (
|
|
1142
|
-
|
|
1137
|
+
if (C) {
|
|
1138
|
+
let l = !1;
|
|
1139
|
+
for (const e of g)
|
|
1140
|
+
if (e.type === "upload" && e.key) {
|
|
1141
|
+
if (o[e.key] !== null && o[e.key] !== void 0) {
|
|
1142
|
+
l = !0;
|
|
1143
1143
|
break;
|
|
1144
1144
|
}
|
|
1145
|
-
} else if (
|
|
1146
|
-
if (
|
|
1147
|
-
const
|
|
1148
|
-
`[data-type="variable"][data-multi-key="${
|
|
1145
|
+
} else if (e.type === "variable" && e.key)
|
|
1146
|
+
if (e.isMultiVariable) {
|
|
1147
|
+
const x = t.current.querySelectorAll(
|
|
1148
|
+
`[data-type="variable"][data-multi-key="${e.key}"]`
|
|
1149
1149
|
);
|
|
1150
|
-
let
|
|
1151
|
-
for (const N of Array.from(
|
|
1150
|
+
let u = !1;
|
|
1151
|
+
for (const N of Array.from(x))
|
|
1152
1152
|
if (N.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1153
|
-
|
|
1153
|
+
u = !0;
|
|
1154
1154
|
break;
|
|
1155
1155
|
}
|
|
1156
|
-
if (
|
|
1157
|
-
|
|
1156
|
+
if (u) {
|
|
1157
|
+
l = !0;
|
|
1158
1158
|
break;
|
|
1159
1159
|
}
|
|
1160
1160
|
} else {
|
|
1161
|
-
const
|
|
1162
|
-
`[data-type="variable"][data-key="${
|
|
1161
|
+
const x = t.current.querySelector(
|
|
1162
|
+
`[data-type="variable"][data-key="${e.key}"]`
|
|
1163
1163
|
);
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1164
|
+
if (x && x.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1165
|
+
l = !0;
|
|
1166
1166
|
break;
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
|
|
1169
|
+
r(l);
|
|
1170
1170
|
} else {
|
|
1171
|
-
let
|
|
1172
|
-
for (const
|
|
1173
|
-
if (
|
|
1174
|
-
if (
|
|
1175
|
-
|
|
1171
|
+
let l = !0;
|
|
1172
|
+
for (const e of g)
|
|
1173
|
+
if (e.type === "upload" && e.key) {
|
|
1174
|
+
if (o[e.key] === null || o[e.key] === void 0) {
|
|
1175
|
+
l = !1;
|
|
1176
1176
|
break;
|
|
1177
1177
|
}
|
|
1178
|
-
} else if (
|
|
1179
|
-
if (
|
|
1180
|
-
const
|
|
1181
|
-
`[data-type="variable"][data-multi-key="${
|
|
1178
|
+
} else if (e.type === "variable" && e.key)
|
|
1179
|
+
if (e.isMultiVariable) {
|
|
1180
|
+
const x = t.current.querySelectorAll(
|
|
1181
|
+
`[data-type="variable"][data-multi-key="${e.key}"]`
|
|
1182
1182
|
);
|
|
1183
|
-
let
|
|
1184
|
-
for (const N of Array.from(
|
|
1183
|
+
let u = !1;
|
|
1184
|
+
for (const N of Array.from(x))
|
|
1185
1185
|
if (N.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1186
|
-
|
|
1186
|
+
u = !0;
|
|
1187
1187
|
break;
|
|
1188
1188
|
}
|
|
1189
|
-
if (!
|
|
1190
|
-
|
|
1189
|
+
if (!u) {
|
|
1190
|
+
l = !1;
|
|
1191
1191
|
break;
|
|
1192
1192
|
}
|
|
1193
1193
|
} else {
|
|
1194
|
-
const
|
|
1195
|
-
`[data-type="variable"][data-key="${
|
|
1194
|
+
const x = t.current.querySelector(
|
|
1195
|
+
`[data-type="variable"][data-key="${e.key}"]`
|
|
1196
1196
|
);
|
|
1197
|
-
if (!
|
|
1198
|
-
|
|
1197
|
+
if (!x) {
|
|
1198
|
+
l = !1;
|
|
1199
1199
|
break;
|
|
1200
1200
|
}
|
|
1201
|
-
if (
|
|
1202
|
-
|
|
1201
|
+
if (x.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
|
|
1202
|
+
l = !1;
|
|
1203
1203
|
break;
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
|
-
|
|
1206
|
+
r(l);
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1209
|
+
function Te(t, p) {
|
|
1210
1210
|
if (!t.current) return;
|
|
1211
|
-
t.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1211
|
+
t.current.querySelectorAll('[data-type="variable"]').forEach((r) => {
|
|
1212
|
+
const a = r.innerText.replace(/\n/g, "");
|
|
1213
|
+
a.replace(/\u200B/g, "") ? r.classList.remove("show-placeholder") : (a !== "" && (r.innerText = ""), r.classList.add("show-placeholder"));
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function vt(t, p, o, r, a, m = {}, C) {
|
|
1217
1217
|
if (!t.current) return;
|
|
1218
|
-
let
|
|
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
|
|
1225
|
-
let
|
|
1226
|
-
e.className ?
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1218
|
+
let g = "", l = 0;
|
|
1219
|
+
for (; l < p.length; ) {
|
|
1220
|
+
const e = p[l], x = l + 1 < p.length ? p[l + 1] : null;
|
|
1221
|
+
if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && x) {
|
|
1222
|
+
const c = x.type === "upload" && x.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === x.exclusionGroup, v = x.type === "variable" && x.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === x.exclusionGroup;
|
|
1223
|
+
if (c) {
|
|
1224
|
+
const S = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, h = "</span>";
|
|
1225
|
+
let R = "";
|
|
1226
|
+
e.className ? R = `<span class="${e.className}">${e.text ?? ""}</span>` : R = e.text ?? "";
|
|
1227
|
+
const q = x, L = o[q.key] !== null && o[q.key] !== void 0, D = L ? o[q.key]?.name : q.text, P = L ? "" : "hidden", W = q.tooltip && !L ? "" : "hidden", F = L ? "has-file" : "", U = L && D ? ` data-file-name="${D.replace(/"/g, """)}"` : "", Z = `<span contenteditable="false" data-type="upload" data-key="${q.key}" class="upload-chip"><span class="upload-inner-wrapper ${F}"><span class="upload-icon">${L ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${U}>${D || q.text}</span>${q.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${W}" data-upload-key="${q.key}" data-tooltip="${q.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${P}" title="移除文件">×</span></span></span>`;
|
|
1228
|
+
g += S + R + Z + h, l += 2;
|
|
1229
1229
|
continue;
|
|
1230
1230
|
}
|
|
1231
|
-
if (
|
|
1232
|
-
const
|
|
1233
|
-
let
|
|
1234
|
-
e.className ?
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1231
|
+
if (v) {
|
|
1232
|
+
const S = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, h = "</span>";
|
|
1233
|
+
let R = "";
|
|
1234
|
+
e.className ? R = `<span class="${e.className}">${e.text ?? ""}</span>` : R = e.text ?? "";
|
|
1235
|
+
const q = x, D = (q.key ? a[q.key] : void 0) || q.text || "", P = !D, W = P ? "" : D, F = P ? "show-placeholder" : "", U = q.exclusionGroup ? ` data-group="${q.exclusionGroup}"` : "", Z = q.tooltip ? ` data-tooltip="${q.tooltip.replace(/"/g, """)}" data-variable-key="${q.key || ""}"` : "", k = q.tooltip && P ? "" : "hidden", _ = `<span contenteditable="true" data-type="variable" data-key="${q.key}" data-placeholder="${q.placeholder || ""}"${U}${Z} class="variable-chip ${F}">${W}${q.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${k}" data-variable-key="${q.key}" data-tooltip="${q.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1236
|
+
g += S + R + _ + h, l += 2;
|
|
1237
1237
|
continue;
|
|
1238
1238
|
}
|
|
1239
1239
|
}
|
|
1240
|
-
const
|
|
1241
|
-
let
|
|
1240
|
+
const N = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", d = e.exclusionGroup ? `<span ${N} class="exclusion-wrapper">` : "", i = e.exclusionGroup ? "</span>" : "";
|
|
1241
|
+
let T = "";
|
|
1242
1242
|
if (e.type === "tag") {
|
|
1243
|
-
const
|
|
1244
|
-
|
|
1243
|
+
const v = r || C === "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>', w = r ? ' data-locked="true"' : "", S = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-tag-key="${e.key || ""}"` : "";
|
|
1244
|
+
T = `<span contenteditable="false" class="tag-node group"${w}${S}><span class="tag-label">${e.text}</span>${v}</span>`;
|
|
1245
1245
|
} else if (e.type === "text") {
|
|
1246
|
-
const
|
|
1247
|
-
e.className ?
|
|
1246
|
+
const c = r ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"';
|
|
1247
|
+
e.className ? T = `<span class="${e.className}"${c}>${e.text ?? ""}</span>` : T = r ? `<span${c}>${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 v = a[e.key] || e.text || "", w = !v, S = w ? "" : v, h = w ? "show-placeholder" : "", R = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", q = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", L = e.tooltip && w ? "" : "hidden", D = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${R}${q} class="variable-chip ${h}">${S}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${L}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1250
|
+
e.required ? T = `<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>` : T = D;
|
|
1251
1251
|
} else if (e.type === "upload" && e.key) {
|
|
1252
|
-
const
|
|
1253
|
-
e.required ?
|
|
1252
|
+
const c = o[e.key] !== null && o[e.key] !== void 0, v = c ? o[e.key]?.name : e.text, w = c ? "" : "hidden", S = e.tooltip && !c ? "" : "hidden", h = c ? "has-file" : "", R = c && v ? ` data-file-name="${v.replace(/"/g, """)}"` : "", q = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${h}"><span class="upload-icon">${c ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${R}>${v || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${S}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${w}" title="移除文件">×</span></span></span>`;
|
|
1253
|
+
e.required ? T = `<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>${q}</span>` : T = q;
|
|
1254
1254
|
} else if (e.type === "multi-variable" && e.key) {
|
|
1255
|
-
const
|
|
1256
|
-
let
|
|
1257
|
-
for (let h = 0; h <
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1255
|
+
const c = e.maxCount || 9, v = m[e.key] || 1, w = Math.min(v, c);
|
|
1256
|
+
let S = "";
|
|
1257
|
+
for (let h = 0; h < w; h++) {
|
|
1258
|
+
const R = `${e.key}_${h}`, q = a[R] || "", L = !q, D = L ? "" : q, P = L ? "show-placeholder" : "", W = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", F = e.tooltip && L ? "" : "hidden", U = `<span contenteditable="true" data-type="variable" data-key="${R}" data-multi-key="${e.key}" data-index="${h}" data-placeholder="${e.placeholder || ""}"${W} class="variable-chip ${P}">${D}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${F}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1259
|
+
S += U;
|
|
1260
1260
|
}
|
|
1261
|
-
e.required ?
|
|
1261
|
+
e.required ? T = `<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>${S}</span>` : T = S;
|
|
1262
1262
|
}
|
|
1263
|
-
|
|
1263
|
+
g += d + T + i, l++;
|
|
1264
1264
|
}
|
|
1265
|
-
t.current && (t.current.innerHTML =
|
|
1265
|
+
t.current && (t.current.innerHTML = g, setTimeout(() => {
|
|
1266
1266
|
if (!t.current) return;
|
|
1267
|
-
t.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1267
|
+
t.current.querySelectorAll('[data-type="variable"]').forEach((x) => {
|
|
1268
|
+
const u = x.innerText.replace(/\n/g, "");
|
|
1269
|
+
u.replace(/\u200B/g, "") ? x.classList.remove("show-placeholder") : (u !== "" && (x.innerText = ""), x.classList.add("show-placeholder"));
|
|
1270
1270
|
});
|
|
1271
1271
|
}, 0));
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1274
|
-
const
|
|
1273
|
+
function wt(t, p, o, r, a = {}, m, C, g) {
|
|
1274
|
+
const l = H(() => {
|
|
1275
1275
|
if (!t.current) return;
|
|
1276
|
-
if (
|
|
1276
|
+
if (p.length === 0) {
|
|
1277
1277
|
t.current.innerHTML = "";
|
|
1278
1278
|
return;
|
|
1279
1279
|
}
|
|
1280
1280
|
let e = {};
|
|
1281
|
-
const
|
|
1282
|
-
if (
|
|
1281
|
+
const u = t.current.__tempVariableValues;
|
|
1282
|
+
if (u ? (e = u, setTimeout(() => {
|
|
1283
|
+
if (t.current) {
|
|
1284
|
+
const N = t.current;
|
|
1285
|
+
N.__tempVariableValues === u && delete N.__tempVariableValues;
|
|
1286
|
+
}
|
|
1287
|
+
}, 100)) : t.current.querySelectorAll(
|
|
1283
1288
|
'[data-type="variable"]'
|
|
1284
|
-
).forEach((
|
|
1285
|
-
const
|
|
1286
|
-
if (
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
+
).forEach((d) => {
|
|
1290
|
+
const i = d.dataset.key;
|
|
1291
|
+
if (i) {
|
|
1292
|
+
const T = d.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1293
|
+
T && (e[i] = T);
|
|
1289
1294
|
}
|
|
1290
|
-
}),
|
|
1291
|
-
const { key:
|
|
1295
|
+
}), vt(t, p, o, r, e, a, g), m?.current) {
|
|
1296
|
+
const { key: N, offset: d } = m.current;
|
|
1292
1297
|
setTimeout(() => {
|
|
1293
1298
|
if (!t.current) return;
|
|
1294
|
-
const
|
|
1295
|
-
`[data-type="variable"][data-key="${
|
|
1299
|
+
const i = t.current.querySelector(
|
|
1300
|
+
`[data-type="variable"][data-key="${N}"]`
|
|
1296
1301
|
);
|
|
1297
|
-
if (
|
|
1302
|
+
if (i) {
|
|
1298
1303
|
try {
|
|
1299
|
-
const
|
|
1300
|
-
|
|
1304
|
+
const T = document.createRange(), c = document.createTreeWalker(
|
|
1305
|
+
i,
|
|
1301
1306
|
NodeFilter.SHOW_TEXT,
|
|
1302
1307
|
null
|
|
1303
1308
|
);
|
|
1304
|
-
let
|
|
1305
|
-
for (;
|
|
1306
|
-
const h =
|
|
1307
|
-
if (
|
|
1308
|
-
|
|
1309
|
+
let v = 0, w = null, S = 0;
|
|
1310
|
+
for (; c.nextNode(); ) {
|
|
1311
|
+
const h = c.currentNode, R = h.textContent?.length || 0;
|
|
1312
|
+
if (v + R >= d) {
|
|
1313
|
+
w = h, S = d - v;
|
|
1309
1314
|
break;
|
|
1310
1315
|
}
|
|
1311
|
-
|
|
1316
|
+
v += R;
|
|
1312
1317
|
}
|
|
1313
|
-
if (
|
|
1314
|
-
|
|
1318
|
+
if (w) {
|
|
1319
|
+
T.setStart(w, Math.min(S, w.textContent?.length || 0)), T.collapse(!0);
|
|
1315
1320
|
const h = window.getSelection();
|
|
1316
|
-
h && (h.removeAllRanges(), h.addRange(
|
|
1321
|
+
h && (h.removeAllRanges(), h.addRange(T), i.focus());
|
|
1317
1322
|
} else {
|
|
1318
|
-
|
|
1323
|
+
T.selectNodeContents(i), T.collapse(!1);
|
|
1319
1324
|
const h = window.getSelection();
|
|
1320
|
-
h && (h.removeAllRanges(), h.addRange(
|
|
1325
|
+
h && (h.removeAllRanges(), h.addRange(T), i.focus());
|
|
1321
1326
|
}
|
|
1322
1327
|
} catch {
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1328
|
+
const T = document.createRange();
|
|
1329
|
+
T.selectNodeContents(i), T.collapse(!1);
|
|
1330
|
+
const c = window.getSelection();
|
|
1331
|
+
c && (c.removeAllRanges(), c.addRange(T), i.focus());
|
|
1327
1332
|
}
|
|
1328
|
-
|
|
1333
|
+
m.current = null;
|
|
1329
1334
|
}
|
|
1330
1335
|
}, 0);
|
|
1331
1336
|
}
|
|
1332
|
-
}, [
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
}, [
|
|
1337
|
+
}, [p, o, r, t, a, m, C, g]);
|
|
1338
|
+
ne(() => {
|
|
1339
|
+
l();
|
|
1340
|
+
}, [l]);
|
|
1336
1341
|
}
|
|
1337
|
-
function
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1340
|
-
if (!
|
|
1341
|
-
const
|
|
1342
|
-
const
|
|
1343
|
-
if (
|
|
1344
|
-
const
|
|
1345
|
-
|
|
1342
|
+
function Et(t, p, o, r) {
|
|
1343
|
+
ne(() => {
|
|
1344
|
+
const a = t.current;
|
|
1345
|
+
if (!a) return;
|
|
1346
|
+
const m = (g) => {
|
|
1347
|
+
const l = g.target?.closest(".upload-info-icon");
|
|
1348
|
+
if (l && l.classList.contains("upload-info-icon")) {
|
|
1349
|
+
const e = l.dataset.uploadKey;
|
|
1350
|
+
e && r({ key: e, anchorEl: l, type: "upload" });
|
|
1346
1351
|
}
|
|
1347
|
-
},
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1352
|
+
}, C = (g) => {
|
|
1353
|
+
const l = g.target?.closest(".upload-info-icon"), e = g.relatedTarget;
|
|
1354
|
+
l && l.classList.contains("upload-info-icon") && (!e || !a.contains(e) ? r(null) : e.closest(".upload-info-icon") || r(null));
|
|
1350
1355
|
};
|
|
1351
|
-
return
|
|
1352
|
-
|
|
1356
|
+
return a.addEventListener("mouseover", m, !0), a.addEventListener("mouseout", C, !0), () => {
|
|
1357
|
+
a.removeEventListener("mouseover", m, !0), a.removeEventListener("mouseout", C, !0);
|
|
1353
1358
|
};
|
|
1354
|
-
}, [
|
|
1359
|
+
}, [p, o, t, r]);
|
|
1355
1360
|
}
|
|
1356
|
-
function
|
|
1357
|
-
|
|
1361
|
+
function kt(t, p, o, r) {
|
|
1362
|
+
ne(() => {
|
|
1358
1363
|
if (!t.current) return;
|
|
1359
|
-
const
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
+
const a = (l) => {
|
|
1365
|
+
if (r === "hideTagClose")
|
|
1366
|
+
return;
|
|
1367
|
+
const e = l.currentTarget, x = e.dataset.tooltip, u = e.dataset.tagKey || "";
|
|
1368
|
+
x && o({ key: u, anchorEl: e, type: "tag" });
|
|
1369
|
+
}, m = () => {
|
|
1370
|
+
o(null);
|
|
1364
1371
|
};
|
|
1365
|
-
let
|
|
1366
|
-
const
|
|
1372
|
+
let C;
|
|
1373
|
+
const g = () => {
|
|
1367
1374
|
if (!t.current) return;
|
|
1368
1375
|
t.current.querySelectorAll(
|
|
1369
1376
|
".tag-node[data-tooltip]"
|
|
1370
1377
|
).forEach((e) => {
|
|
1371
|
-
e.addEventListener("mouseenter",
|
|
1378
|
+
e.addEventListener("mouseenter", a), e.addEventListener("mouseleave", m);
|
|
1372
1379
|
});
|
|
1373
1380
|
};
|
|
1374
|
-
return
|
|
1375
|
-
|
|
1381
|
+
return C = requestAnimationFrame(() => {
|
|
1382
|
+
C = requestAnimationFrame(g);
|
|
1376
1383
|
}), () => {
|
|
1377
|
-
cancelAnimationFrame(
|
|
1384
|
+
cancelAnimationFrame(C), t.current && t.current.querySelectorAll(
|
|
1378
1385
|
".tag-node[data-tooltip]"
|
|
1379
1386
|
).forEach((e) => {
|
|
1380
|
-
e.removeEventListener("mouseenter",
|
|
1387
|
+
e.removeEventListener("mouseenter", a), e.removeEventListener("mouseleave", m);
|
|
1381
1388
|
});
|
|
1382
1389
|
};
|
|
1383
|
-
}, [
|
|
1390
|
+
}, [p, t, o, r]);
|
|
1384
1391
|
}
|
|
1385
|
-
function
|
|
1386
|
-
|
|
1387
|
-
const
|
|
1388
|
-
if (!
|
|
1389
|
-
const
|
|
1390
|
-
const
|
|
1391
|
-
if (
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1392
|
+
function Tt(t, p, o) {
|
|
1393
|
+
ne(() => {
|
|
1394
|
+
const r = t.current;
|
|
1395
|
+
if (!r) return;
|
|
1396
|
+
const a = (C) => {
|
|
1397
|
+
const g = C.target?.closest(".variable-info-icon");
|
|
1398
|
+
if (g && g.classList.contains("variable-info-icon")) {
|
|
1399
|
+
const l = g.dataset.variableKey;
|
|
1400
|
+
l && o({ key: l, anchorEl: g, type: "variable" });
|
|
1394
1401
|
}
|
|
1395
|
-
},
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1402
|
+
}, m = (C) => {
|
|
1403
|
+
const g = C.target?.closest(".variable-info-icon"), l = C.relatedTarget;
|
|
1404
|
+
g && g.classList.contains("variable-info-icon") && (!l || !r.contains(l) ? o(null) : l.closest(".variable-info-icon") || o(null));
|
|
1398
1405
|
};
|
|
1399
|
-
return
|
|
1400
|
-
|
|
1406
|
+
return r.addEventListener("mouseover", a, !0), r.addEventListener("mouseout", m, !0), () => {
|
|
1407
|
+
r.removeEventListener("mouseover", a, !0), r.removeEventListener("mouseout", m, !0);
|
|
1401
1408
|
};
|
|
1402
|
-
}, [
|
|
1409
|
+
}, [p, t, o]);
|
|
1403
1410
|
}
|
|
1404
|
-
function
|
|
1405
|
-
|
|
1411
|
+
function Nt(t, p, o, r) {
|
|
1412
|
+
ne(() => {
|
|
1406
1413
|
if (!t.current) return;
|
|
1407
|
-
const
|
|
1408
|
-
const
|
|
1409
|
-
|
|
1410
|
-
},
|
|
1411
|
-
|
|
1414
|
+
const a = (l) => {
|
|
1415
|
+
const e = l.currentTarget;
|
|
1416
|
+
e.dataset.fileName && r({ key: "", anchorEl: e, type: "upload-label" });
|
|
1417
|
+
}, m = () => {
|
|
1418
|
+
r(null);
|
|
1412
1419
|
};
|
|
1413
|
-
let
|
|
1414
|
-
const
|
|
1420
|
+
let C;
|
|
1421
|
+
const g = () => {
|
|
1415
1422
|
if (!t.current) return;
|
|
1416
1423
|
t.current.querySelectorAll(
|
|
1417
1424
|
".upload-label[data-file-name]"
|
|
1418
|
-
).forEach((
|
|
1419
|
-
|
|
1425
|
+
).forEach((e) => {
|
|
1426
|
+
e.addEventListener("mouseenter", a), e.addEventListener("mouseleave", m);
|
|
1420
1427
|
});
|
|
1421
1428
|
};
|
|
1422
|
-
return
|
|
1423
|
-
|
|
1429
|
+
return C = requestAnimationFrame(() => {
|
|
1430
|
+
C = requestAnimationFrame(g);
|
|
1424
1431
|
}), () => {
|
|
1425
|
-
cancelAnimationFrame(
|
|
1432
|
+
cancelAnimationFrame(C), t.current && t.current.querySelectorAll(
|
|
1426
1433
|
".upload-label[data-file-name]"
|
|
1427
|
-
).forEach((
|
|
1428
|
-
|
|
1434
|
+
).forEach((e) => {
|
|
1435
|
+
e.removeEventListener("mouseenter", a), e.removeEventListener("mouseleave", m);
|
|
1429
1436
|
});
|
|
1430
1437
|
};
|
|
1431
|
-
}, [
|
|
1438
|
+
}, [p, o, t, r]);
|
|
1432
1439
|
}
|
|
1433
|
-
function
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
}, [
|
|
1440
|
+
function Ct(t, p, o, r) {
|
|
1441
|
+
ne(() => {
|
|
1442
|
+
Ne(t, p, o), Ce(t, p, o, r);
|
|
1443
|
+
}, [o, p, t, r]);
|
|
1437
1444
|
}
|
|
1438
|
-
function
|
|
1439
|
-
|
|
1445
|
+
function St(t, p) {
|
|
1446
|
+
ne(() => {
|
|
1440
1447
|
if (!t.current) return;
|
|
1441
|
-
let
|
|
1442
|
-
const
|
|
1443
|
-
|
|
1444
|
-
},
|
|
1445
|
-
|
|
1448
|
+
let o = !1, r = 0;
|
|
1449
|
+
const a = () => {
|
|
1450
|
+
o = !0;
|
|
1451
|
+
}, m = () => {
|
|
1452
|
+
o = !1, r = Date.now();
|
|
1446
1453
|
};
|
|
1447
|
-
let
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1450
|
-
},
|
|
1451
|
-
|
|
1452
|
-
},
|
|
1453
|
-
|
|
1454
|
-
},
|
|
1454
|
+
let C = !1, g = 0;
|
|
1455
|
+
const l = () => {
|
|
1456
|
+
C = !0;
|
|
1457
|
+
}, e = () => {
|
|
1458
|
+
C = !1, g = Date.now();
|
|
1459
|
+
}, x = () => {
|
|
1460
|
+
g = Date.now();
|
|
1461
|
+
}, u = () => {
|
|
1455
1462
|
if (!t.current) return;
|
|
1456
|
-
const
|
|
1457
|
-
if (!
|
|
1463
|
+
const d = window.getSelection();
|
|
1464
|
+
if (!d || d.rangeCount === 0 || p.current || o || C || Date.now() - g < 500)
|
|
1458
1465
|
return;
|
|
1459
|
-
const
|
|
1460
|
-
if (!
|
|
1461
|
-
t.current.contains(
|
|
1466
|
+
const i = d.getRangeAt(0);
|
|
1467
|
+
if (!i.collapsed) {
|
|
1468
|
+
t.current.contains(i.commonAncestorContainer) || d.removeAllRanges();
|
|
1462
1469
|
return;
|
|
1463
1470
|
}
|
|
1464
|
-
const
|
|
1465
|
-
if (!
|
|
1466
|
-
if (!t.current.contains(
|
|
1467
|
-
|
|
1471
|
+
const T = d.anchorNode;
|
|
1472
|
+
if (!T) return;
|
|
1473
|
+
if (!t.current.contains(T)) {
|
|
1474
|
+
d.removeAllRanges();
|
|
1468
1475
|
return;
|
|
1469
1476
|
}
|
|
1470
|
-
let
|
|
1471
|
-
if (
|
|
1472
|
-
if (Date.now() -
|
|
1477
|
+
let c = null;
|
|
1478
|
+
if (T.nodeType === Node.ELEMENT_NODE ? c = T.closest('[data-type="variable"]') : T.nodeType === Node.TEXT_NODE && T.parentElement && (c = T.parentElement.closest('[data-type="variable"]')), !c) {
|
|
1479
|
+
if (Date.now() - r > 500)
|
|
1473
1480
|
return;
|
|
1474
|
-
const
|
|
1475
|
-
if (
|
|
1476
|
-
let
|
|
1477
|
-
for (const
|
|
1478
|
-
if (
|
|
1479
|
-
|
|
1481
|
+
const v = t.current.querySelectorAll('[data-type="variable"]');
|
|
1482
|
+
if (v.length > 0) {
|
|
1483
|
+
let w = null;
|
|
1484
|
+
for (const S of Array.from(v))
|
|
1485
|
+
if (S.style.display !== "none") {
|
|
1486
|
+
w = S;
|
|
1480
1487
|
break;
|
|
1481
1488
|
}
|
|
1482
|
-
if (!
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1489
|
+
if (!w && v.length > 0 && (w = v[0]), w) {
|
|
1490
|
+
const S = document.createRange();
|
|
1491
|
+
S.selectNodeContents(w), S.collapse(!1), d.removeAllRanges(), d.addRange(S), w.focus();
|
|
1485
1492
|
} else
|
|
1486
|
-
|
|
1493
|
+
d.removeAllRanges();
|
|
1487
1494
|
} else
|
|
1488
|
-
|
|
1495
|
+
d.removeAllRanges();
|
|
1489
1496
|
}
|
|
1490
1497
|
}, N = t.current;
|
|
1491
|
-
return N && (N.addEventListener("compositionstart",
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1498
|
+
return N && (N.addEventListener("compositionstart", l), N.addEventListener("compositionend", e), N.addEventListener("input", x)), document.addEventListener("mousedown", a), document.addEventListener("mouseup", m), document.addEventListener("selectionchange", u), () => {
|
|
1499
|
+
const d = t.current;
|
|
1500
|
+
d && (d.removeEventListener("compositionstart", l), d.removeEventListener("compositionend", e), d.removeEventListener("input", x)), document.removeEventListener("mousedown", a), document.removeEventListener("mouseup", m), document.removeEventListener("selectionchange", u);
|
|
1494
1501
|
};
|
|
1495
|
-
}, [t,
|
|
1502
|
+
}, [t, p]);
|
|
1496
1503
|
}
|
|
1497
|
-
const
|
|
1504
|
+
const qt = ({
|
|
1498
1505
|
config: t,
|
|
1499
|
-
onSend:
|
|
1500
|
-
isProcessing:
|
|
1501
|
-
disabled:
|
|
1502
|
-
width:
|
|
1503
|
-
lockStructure:
|
|
1504
|
-
agentOptions:
|
|
1505
|
-
onAgentSelect:
|
|
1506
|
-
onAgentExit:
|
|
1507
|
-
loading:
|
|
1508
|
-
placeholder:
|
|
1509
|
-
border:
|
|
1510
|
-
background: N = "transparent"
|
|
1506
|
+
onSend: p,
|
|
1507
|
+
isProcessing: o = !1,
|
|
1508
|
+
disabled: r = !1,
|
|
1509
|
+
width: a,
|
|
1510
|
+
lockStructure: m = !1,
|
|
1511
|
+
agentOptions: C = [],
|
|
1512
|
+
onAgentSelect: g,
|
|
1513
|
+
onAgentExit: l,
|
|
1514
|
+
loading: e = !1,
|
|
1515
|
+
placeholder: x,
|
|
1516
|
+
border: u,
|
|
1517
|
+
background: N = "transparent",
|
|
1518
|
+
hideButtons: d
|
|
1511
1519
|
}) => {
|
|
1512
|
-
const
|
|
1513
|
-
const
|
|
1514
|
-
return t.forEach((
|
|
1515
|
-
|
|
1516
|
-
}),
|
|
1517
|
-
});
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1520
|
+
const i = G(null), T = G(null), [c, v] = Y({}), [w, S] = Y(null), [h, R] = Y(null), q = G(!1), L = G(null), [D, P] = Y(!1), W = G(null), [F, U] = Y(!0), [Z, k] = Y(() => {
|
|
1521
|
+
const f = {};
|
|
1522
|
+
return t.forEach((y) => {
|
|
1523
|
+
y.type === "multi-variable" && y.key && (f[y.key] = 1);
|
|
1524
|
+
}), f;
|
|
1525
|
+
}), _ = G({}), J = G({}), Q = G({});
|
|
1526
|
+
ne(() => {
|
|
1527
|
+
J.current = c;
|
|
1528
|
+
}, [c]), ne(() => {
|
|
1529
|
+
Q.current = Z;
|
|
1530
|
+
}, [Z]);
|
|
1531
|
+
const ie = H((f) => f.find((b) => b.type === "tag")?.text || null, []), de = G(t), s = G(null);
|
|
1532
|
+
ne(() => {
|
|
1533
|
+
const f = ie(de.current), y = ie(t);
|
|
1534
|
+
if (f && f !== y && i.current) {
|
|
1535
|
+
const b = {};
|
|
1536
|
+
i.current.querySelectorAll('[data-type="variable"]').forEach((E) => {
|
|
1537
|
+
const A = E.dataset.key;
|
|
1538
|
+
if (A) {
|
|
1539
|
+
const j = E.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1540
|
+
j && (b[A] = j);
|
|
1541
|
+
}
|
|
1542
|
+
}), _.current[f] = {
|
|
1543
|
+
variableValues: b,
|
|
1544
|
+
files: { ...J.current },
|
|
1545
|
+
multiVariableCounts: { ...Q.current }
|
|
1546
|
+
};
|
|
1547
|
+
}
|
|
1548
|
+
if (y && _.current[y]) {
|
|
1549
|
+
const b = _.current[y];
|
|
1550
|
+
s.current = b, v(b.files), k(b.multiVariableCounts);
|
|
1551
|
+
} else if (y) {
|
|
1552
|
+
s.current = null;
|
|
1553
|
+
const b = {};
|
|
1554
|
+
t.forEach(($) => {
|
|
1555
|
+
$.type === "multi-variable" && $.key && (b[$.key] = 1);
|
|
1556
|
+
}), k(b), v({});
|
|
1557
|
+
} else
|
|
1558
|
+
s.current = null, k({}), v({});
|
|
1559
|
+
de.current = t;
|
|
1560
|
+
}, [t, ie]), Me(() => {
|
|
1561
|
+
s.current && i.current && (i.current.__tempVariableValues = s.current.variableValues, setTimeout(() => {
|
|
1562
|
+
s.current && (s.current = null);
|
|
1563
|
+
}, 0));
|
|
1564
|
+
}), wt(i, t, c, m, Z, W, void 0, d), Et(i, t, c, R), kt(i, t, R, d), Nt(i, t, c, R), Tt(i, t, R), Ct(i, t, c, P), St(i, q), ne(() => {
|
|
1526
1565
|
if (t.length > 0) {
|
|
1527
|
-
|
|
1566
|
+
U(!1);
|
|
1528
1567
|
return;
|
|
1529
1568
|
}
|
|
1530
|
-
const
|
|
1531
|
-
if (!
|
|
1532
|
-
|
|
1569
|
+
const f = () => {
|
|
1570
|
+
if (!i.current) {
|
|
1571
|
+
U(!0);
|
|
1533
1572
|
return;
|
|
1534
1573
|
}
|
|
1535
|
-
const
|
|
1536
|
-
let
|
|
1537
|
-
|
|
1538
|
-
(
|
|
1539
|
-
}),
|
|
1540
|
-
|
|
1574
|
+
const b = i.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", $ = i.current.querySelectorAll('[data-type="variable"]'), E = i.current.querySelectorAll('[data-type="upload"]');
|
|
1575
|
+
let A = !1;
|
|
1576
|
+
$.forEach((B) => {
|
|
1577
|
+
(B.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (A = !0);
|
|
1578
|
+
}), E.forEach((B) => {
|
|
1579
|
+
B.querySelector(".upload-inner-wrapper.has-file") && (A = !0);
|
|
1541
1580
|
});
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1581
|
+
const j = !b && !A;
|
|
1582
|
+
U(j), t.length === 0 && P(!j);
|
|
1544
1583
|
};
|
|
1545
|
-
|
|
1546
|
-
const
|
|
1547
|
-
return
|
|
1584
|
+
f();
|
|
1585
|
+
const y = new MutationObserver(f);
|
|
1586
|
+
return i.current && y.observe(i.current, {
|
|
1548
1587
|
childList: !0,
|
|
1549
1588
|
subtree: !0,
|
|
1550
1589
|
characterData: !0
|
|
1551
1590
|
}), () => {
|
|
1552
|
-
|
|
1591
|
+
y.disconnect();
|
|
1553
1592
|
};
|
|
1554
1593
|
}, [t]);
|
|
1555
|
-
const
|
|
1556
|
-
if (
|
|
1557
|
-
|
|
1594
|
+
const I = (f) => {
|
|
1595
|
+
if (r) {
|
|
1596
|
+
f.preventDefault();
|
|
1558
1597
|
return;
|
|
1559
1598
|
}
|
|
1560
|
-
|
|
1561
|
-
const
|
|
1562
|
-
if (
|
|
1563
|
-
const
|
|
1564
|
-
if (
|
|
1565
|
-
let
|
|
1566
|
-
if (
|
|
1567
|
-
const
|
|
1568
|
-
if (
|
|
1569
|
-
const
|
|
1570
|
-
if (
|
|
1571
|
-
const
|
|
1572
|
-
|
|
1573
|
-
...
|
|
1574
|
-
[
|
|
1599
|
+
f.preventDefault();
|
|
1600
|
+
const y = f.clipboardData.getData("text/plain"), b = window.getSelection();
|
|
1601
|
+
if (b && b.rangeCount > 0) {
|
|
1602
|
+
const $ = b.anchorNode;
|
|
1603
|
+
if ($) {
|
|
1604
|
+
let E = null;
|
|
1605
|
+
if ($.nodeType === Node.ELEMENT_NODE ? E = $.closest('[data-type="variable"]') : $.nodeType === Node.TEXT_NODE && $.parentElement && (E = $.parentElement.closest('[data-type="variable"]')), E) {
|
|
1606
|
+
const A = E.dataset.multiKey;
|
|
1607
|
+
if (A) {
|
|
1608
|
+
const j = y.split(/[,\n\r\t]+/).map((B) => B.trim()).filter((B) => B.length > 0);
|
|
1609
|
+
if (j.length > 1) {
|
|
1610
|
+
const B = parseInt(E.dataset.index || "0", 10), V = t.find((se) => se.type === "multi-variable" && se.key === A)?.maxCount || 9, z = Z[A] || 1, oe = Math.min(B + j.length, V);
|
|
1611
|
+
oe > z && k((te) => ({
|
|
1612
|
+
...te,
|
|
1613
|
+
[A]: oe
|
|
1575
1614
|
})), setTimeout(() => {
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
if (
|
|
1579
|
-
const
|
|
1580
|
-
`[data-type="variable"][data-key="${
|
|
1615
|
+
i.current && (j.forEach((te, se) => {
|
|
1616
|
+
const ce = B + se;
|
|
1617
|
+
if (ce >= V) return;
|
|
1618
|
+
const K = `${A}_${ce}`, le = i.current.querySelector(
|
|
1619
|
+
`[data-type="variable"][data-key="${K}"]`
|
|
1581
1620
|
);
|
|
1582
|
-
|
|
1583
|
-
}),
|
|
1621
|
+
le && (le.innerText = te, le.classList.remove("show-placeholder"));
|
|
1622
|
+
}), ae());
|
|
1584
1623
|
}, 0);
|
|
1585
1624
|
return;
|
|
1586
1625
|
}
|
|
@@ -1588,461 +1627,461 @@ const vt = ({
|
|
|
1588
1627
|
}
|
|
1589
1628
|
}
|
|
1590
1629
|
}
|
|
1591
|
-
document.execCommand("insertText", !1,
|
|
1592
|
-
},
|
|
1593
|
-
if (
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
},
|
|
1599
|
-
|
|
1600
|
-
const
|
|
1601
|
-
return delete
|
|
1630
|
+
document.execCommand("insertText", !1, y), ae();
|
|
1631
|
+
}, X = (f) => {
|
|
1632
|
+
if (f.target.files && f.target.files[0] && w) {
|
|
1633
|
+
const y = f.target.files[0], b = w;
|
|
1634
|
+
v(($) => ({ ...$, [b]: y }));
|
|
1635
|
+
}
|
|
1636
|
+
f.target && (f.target.value = ""), S(null);
|
|
1637
|
+
}, ee = (f) => {
|
|
1638
|
+
v((y) => {
|
|
1639
|
+
const b = { ...y };
|
|
1640
|
+
return delete b[f], b;
|
|
1602
1641
|
});
|
|
1603
|
-
},
|
|
1604
|
-
const
|
|
1605
|
-
if (
|
|
1606
|
-
if (
|
|
1642
|
+
}, ue = (f) => {
|
|
1643
|
+
const y = f.target;
|
|
1644
|
+
if (y.closest(".tag-close-btn")) {
|
|
1645
|
+
if (f.preventDefault(), f.stopPropagation(), m)
|
|
1607
1646
|
return;
|
|
1608
|
-
|
|
1647
|
+
R(null), l ? l() : i.current && (i.current.innerHTML = "", i.current.focus());
|
|
1609
1648
|
return;
|
|
1610
1649
|
}
|
|
1611
|
-
if (
|
|
1612
|
-
const
|
|
1613
|
-
if (
|
|
1614
|
-
|
|
1615
|
-
const
|
|
1616
|
-
|
|
1650
|
+
if (m) {
|
|
1651
|
+
const E = y.closest(".tag-node"), A = y.closest('[data-type="text"]');
|
|
1652
|
+
if (E || A) {
|
|
1653
|
+
f.preventDefault(), f.stopPropagation();
|
|
1654
|
+
const j = window.getSelection();
|
|
1655
|
+
j && j.removeAllRanges();
|
|
1617
1656
|
return;
|
|
1618
1657
|
}
|
|
1619
1658
|
}
|
|
1620
|
-
|
|
1621
|
-
},
|
|
1622
|
-
if (!
|
|
1623
|
-
const
|
|
1624
|
-
(
|
|
1659
|
+
y.closest('[data-type="variable"]') || (L.current = { x: f.clientX, y: f.clientY }, q.current = !1, y.closest(".file-remove-btn") && (f.preventDefault(), f.stopPropagation()));
|
|
1660
|
+
}, re = (f) => {
|
|
1661
|
+
if (!f.target.closest('[data-type="variable"]') && L.current) {
|
|
1662
|
+
const $ = Math.abs(f.clientX - L.current.x), E = Math.abs(f.clientY - L.current.y);
|
|
1663
|
+
($ > 3 || E > 3) && (q.current = !0);
|
|
1625
1664
|
}
|
|
1626
|
-
},
|
|
1627
|
-
if (
|
|
1628
|
-
L.current = null,
|
|
1665
|
+
}, ye = (f) => {
|
|
1666
|
+
if (f.target.closest('[data-type="variable"]')) {
|
|
1667
|
+
L.current = null, q.current = !1;
|
|
1629
1668
|
return;
|
|
1630
1669
|
}
|
|
1631
|
-
L.current = null,
|
|
1632
|
-
},
|
|
1633
|
-
if (
|
|
1670
|
+
L.current = null, q.current = !1;
|
|
1671
|
+
}, O = (f) => {
|
|
1672
|
+
if (r)
|
|
1634
1673
|
return;
|
|
1635
|
-
const
|
|
1636
|
-
if (
|
|
1637
|
-
|
|
1674
|
+
const y = f.target;
|
|
1675
|
+
if (y.closest(".tag-close-btn")) {
|
|
1676
|
+
f.preventDefault(), f.stopPropagation();
|
|
1638
1677
|
return;
|
|
1639
1678
|
}
|
|
1640
1679
|
if (t.length === 0)
|
|
1641
1680
|
return;
|
|
1642
|
-
if (
|
|
1643
|
-
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1681
|
+
if (y.closest('[data-type="text"]')) {
|
|
1682
|
+
f.preventDefault(), f.stopPropagation();
|
|
1683
|
+
const B = window.getSelection();
|
|
1684
|
+
B && B.removeAllRanges();
|
|
1646
1685
|
return;
|
|
1647
1686
|
}
|
|
1648
|
-
if (
|
|
1649
|
-
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1687
|
+
if (m && y.closest(".tag-node")) {
|
|
1688
|
+
f.preventDefault(), f.stopPropagation();
|
|
1689
|
+
const V = window.getSelection();
|
|
1690
|
+
V && V.removeAllRanges();
|
|
1652
1691
|
return;
|
|
1653
1692
|
}
|
|
1654
|
-
if (
|
|
1655
|
-
if (
|
|
1693
|
+
if (y.closest('[data-type="variable"]')) {
|
|
1694
|
+
if (q.current)
|
|
1656
1695
|
return;
|
|
1657
1696
|
setTimeout(() => {
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1697
|
+
const B = window.getSelection();
|
|
1698
|
+
B && !B.isCollapsed || Te(i);
|
|
1660
1699
|
}, 10);
|
|
1661
1700
|
return;
|
|
1662
1701
|
}
|
|
1663
|
-
const
|
|
1664
|
-
if (
|
|
1665
|
-
|
|
1666
|
-
const
|
|
1667
|
-
|
|
1702
|
+
const A = y.closest(".file-remove-btn");
|
|
1703
|
+
if (A) {
|
|
1704
|
+
f.preventDefault(), f.stopPropagation();
|
|
1705
|
+
const V = A.closest('[data-type="upload"]')?.dataset.key;
|
|
1706
|
+
V && ee(V);
|
|
1668
1707
|
return;
|
|
1669
1708
|
}
|
|
1670
|
-
const
|
|
1671
|
-
if (
|
|
1672
|
-
const
|
|
1673
|
-
|
|
1709
|
+
const j = y.closest('[data-type="upload"]');
|
|
1710
|
+
if (j) {
|
|
1711
|
+
const B = j.dataset.key;
|
|
1712
|
+
B && (S(B), T.current?.click());
|
|
1674
1713
|
return;
|
|
1675
1714
|
}
|
|
1676
|
-
},
|
|
1677
|
-
const
|
|
1678
|
-
if (
|
|
1679
|
-
const
|
|
1680
|
-
if (
|
|
1681
|
-
const
|
|
1682
|
-
if (
|
|
1683
|
-
let
|
|
1684
|
-
|
|
1685
|
-
const
|
|
1686
|
-
|
|
1715
|
+
}, M = (f) => {
|
|
1716
|
+
const b = f.target.closest('[data-type="variable"]');
|
|
1717
|
+
if (b) {
|
|
1718
|
+
const $ = window.getSelection();
|
|
1719
|
+
if ($) {
|
|
1720
|
+
const E = document.createRange(), A = b.textContent || "";
|
|
1721
|
+
if (A.replace(/\u200B/g, "")) {
|
|
1722
|
+
let B = 0, V = A.length;
|
|
1723
|
+
A.startsWith("") && (B = 1), A.endsWith("") && A.length > 1 && (V = A.length - 1);
|
|
1724
|
+
const z = b.firstChild;
|
|
1725
|
+
z && z.nodeType === Node.TEXT_NODE ? (E.setStart(z, B), E.setEnd(z, V)) : E.selectNodeContents(b);
|
|
1687
1726
|
} else
|
|
1688
|
-
|
|
1689
|
-
|
|
1727
|
+
E.selectNodeContents(b), E.collapse(!0);
|
|
1728
|
+
$.removeAllRanges(), $.addRange(E);
|
|
1690
1729
|
}
|
|
1691
1730
|
}
|
|
1692
|
-
},
|
|
1731
|
+
}, ae = () => {
|
|
1693
1732
|
if (t.length === 0) {
|
|
1694
|
-
if (
|
|
1695
|
-
const
|
|
1696
|
-
|
|
1733
|
+
if (i.current) {
|
|
1734
|
+
const b = !(i.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
|
|
1735
|
+
U(b), P(!b);
|
|
1697
1736
|
}
|
|
1698
1737
|
return;
|
|
1699
1738
|
}
|
|
1700
|
-
if (
|
|
1701
|
-
const
|
|
1702
|
-
if (
|
|
1703
|
-
let
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1739
|
+
if (Te(i), i.current && i.current.querySelectorAll('[data-type="variable"]').forEach((b) => {
|
|
1740
|
+
const $ = b.querySelector(".variable-info-icon");
|
|
1741
|
+
if ($) {
|
|
1742
|
+
let E = !1;
|
|
1743
|
+
const A = document.createTreeWalker(
|
|
1744
|
+
b,
|
|
1706
1745
|
NodeFilter.SHOW_TEXT,
|
|
1707
1746
|
{
|
|
1708
|
-
acceptNode: (
|
|
1747
|
+
acceptNode: (j) => $.contains(j) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
1709
1748
|
}
|
|
1710
1749
|
);
|
|
1711
|
-
for (;
|
|
1712
|
-
if (
|
|
1713
|
-
|
|
1750
|
+
for (; A.nextNode(); )
|
|
1751
|
+
if (A.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
|
|
1752
|
+
E = !0;
|
|
1714
1753
|
break;
|
|
1715
1754
|
}
|
|
1716
|
-
|
|
1755
|
+
E ? $.classList.add("hidden") : $.classList.remove("hidden");
|
|
1717
1756
|
}
|
|
1718
|
-
}),
|
|
1719
|
-
t.filter((
|
|
1720
|
-
if (!
|
|
1721
|
-
const
|
|
1722
|
-
for (let
|
|
1723
|
-
const
|
|
1724
|
-
`[data-type="variable"][data-key="${
|
|
1757
|
+
}), Ne(i, t, c), Ce(i, t, c, P), !i.current) return;
|
|
1758
|
+
t.filter((y) => y.type === "multi-variable" && y.key).forEach((y) => {
|
|
1759
|
+
if (!y.key) return;
|
|
1760
|
+
const b = y.maxCount || 9, $ = Z[y.key] || 1, E = [];
|
|
1761
|
+
for (let z = 0; z < $; z++) {
|
|
1762
|
+
const oe = `${y.key}_${z}`, te = i.current.querySelector(
|
|
1763
|
+
`[data-type="variable"][data-key="${oe}"][data-multi-key="${y.key}"]`
|
|
1725
1764
|
);
|
|
1726
|
-
if (
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1765
|
+
if (te) {
|
|
1766
|
+
const se = te.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1767
|
+
E.push(se);
|
|
1729
1768
|
}
|
|
1730
1769
|
}
|
|
1731
|
-
const
|
|
1732
|
-
let
|
|
1733
|
-
for (let
|
|
1734
|
-
if (
|
|
1735
|
-
|
|
1770
|
+
const j = (E[E.length - 1] || "") === "";
|
|
1771
|
+
let B = !1, V = -1;
|
|
1772
|
+
for (let z = 0; z < E.length - 1; z++)
|
|
1773
|
+
if (E[z] === "") {
|
|
1774
|
+
B = !0, V = z;
|
|
1736
1775
|
break;
|
|
1737
1776
|
}
|
|
1738
|
-
if (
|
|
1739
|
-
const
|
|
1740
|
-
if (
|
|
1741
|
-
const
|
|
1742
|
-
if (
|
|
1743
|
-
const
|
|
1744
|
-
if (
|
|
1745
|
-
const
|
|
1746
|
-
|
|
1747
|
-
const
|
|
1748
|
-
|
|
1777
|
+
if (B && V >= 0) {
|
|
1778
|
+
const z = window.getSelection();
|
|
1779
|
+
if (z && z.rangeCount > 0) {
|
|
1780
|
+
const K = z.getRangeAt(0), le = K.startContainer, pe = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
1781
|
+
if (pe) {
|
|
1782
|
+
const me = pe.dataset.key;
|
|
1783
|
+
if (me) {
|
|
1784
|
+
const ge = document.createRange();
|
|
1785
|
+
ge.setStartBefore(pe), ge.setEnd(K.startContainer, K.startOffset);
|
|
1786
|
+
const ke = ge.toString().length;
|
|
1787
|
+
W.current = { key: me, offset: ke };
|
|
1749
1788
|
}
|
|
1750
1789
|
}
|
|
1751
1790
|
}
|
|
1752
|
-
const
|
|
1753
|
-
for (let
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
const
|
|
1757
|
-
|
|
1758
|
-
|
|
1791
|
+
const oe = [...E];
|
|
1792
|
+
for (let K = V; K < oe.length - 1; K++)
|
|
1793
|
+
oe[K] = oe[K + 1];
|
|
1794
|
+
oe.pop();
|
|
1795
|
+
const te = {};
|
|
1796
|
+
oe.forEach((K, le) => {
|
|
1797
|
+
K && (te[`${y.key}_${le}`] = K);
|
|
1759
1798
|
});
|
|
1760
|
-
const
|
|
1761
|
-
|
|
1799
|
+
const se = Math.max(j ? oe.length : oe.length + 1, 1);
|
|
1800
|
+
i.current.querySelectorAll(
|
|
1762
1801
|
'[data-type="variable"]'
|
|
1763
|
-
).forEach((
|
|
1764
|
-
const
|
|
1765
|
-
if (
|
|
1766
|
-
const
|
|
1767
|
-
|
|
1802
|
+
).forEach((K) => {
|
|
1803
|
+
const le = K.dataset.key, pe = K.dataset.multiKey;
|
|
1804
|
+
if (le && pe !== y.key) {
|
|
1805
|
+
const me = K.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1806
|
+
me && (te[le] = me);
|
|
1768
1807
|
}
|
|
1769
|
-
}),
|
|
1770
|
-
...
|
|
1771
|
-
[
|
|
1808
|
+
}), i.current.__tempVariableValues = te, k((K) => ({
|
|
1809
|
+
...K,
|
|
1810
|
+
[y.key]: se
|
|
1772
1811
|
}));
|
|
1773
1812
|
return;
|
|
1774
1813
|
}
|
|
1775
|
-
if (
|
|
1776
|
-
const
|
|
1777
|
-
`[data-type="variable"][data-key="${
|
|
1814
|
+
if (!j) {
|
|
1815
|
+
const z = $ - 1, oe = `${y.key}_${z}`, te = i.current.querySelector(
|
|
1816
|
+
`[data-type="variable"][data-key="${oe}"][data-multi-key="${y.key}"]`
|
|
1778
1817
|
);
|
|
1779
|
-
if (
|
|
1780
|
-
const
|
|
1781
|
-
if (
|
|
1782
|
-
const
|
|
1783
|
-
if (
|
|
1784
|
-
const
|
|
1785
|
-
if (
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1788
|
-
const
|
|
1789
|
-
|
|
1818
|
+
if (te && te.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && $ < b) {
|
|
1819
|
+
const ce = window.getSelection();
|
|
1820
|
+
if (ce && ce.rangeCount > 0) {
|
|
1821
|
+
const K = ce.getRangeAt(0), le = K.startContainer, pe = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
1822
|
+
if (pe) {
|
|
1823
|
+
const me = pe.dataset.key;
|
|
1824
|
+
if (me) {
|
|
1825
|
+
const ge = document.createRange();
|
|
1826
|
+
ge.setStartBefore(pe), ge.setEnd(K.startContainer, K.startOffset);
|
|
1827
|
+
const ke = ge.toString().length;
|
|
1828
|
+
W.current = { key: me, offset: ke };
|
|
1790
1829
|
}
|
|
1791
1830
|
}
|
|
1792
1831
|
}
|
|
1793
|
-
|
|
1794
|
-
...
|
|
1795
|
-
[
|
|
1832
|
+
k((K) => ({
|
|
1833
|
+
...K,
|
|
1834
|
+
[y.key]: $ + 1
|
|
1796
1835
|
}));
|
|
1797
1836
|
}
|
|
1798
1837
|
}
|
|
1799
1838
|
});
|
|
1800
|
-
},
|
|
1801
|
-
if (
|
|
1839
|
+
}, fe = () => {
|
|
1840
|
+
if (i.current) {
|
|
1802
1841
|
if (t.length === 0) {
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1842
|
+
const f = i.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
1843
|
+
P(f.length > 0);
|
|
1805
1844
|
return;
|
|
1806
1845
|
}
|
|
1807
|
-
|
|
1846
|
+
Te(i), Ne(i, t, c), Ce(i, t, c, P);
|
|
1808
1847
|
}
|
|
1809
|
-
},
|
|
1810
|
-
if (
|
|
1811
|
-
|
|
1848
|
+
}, Ee = (f) => {
|
|
1849
|
+
if (r) {
|
|
1850
|
+
f.preventDefault();
|
|
1812
1851
|
return;
|
|
1813
1852
|
}
|
|
1814
|
-
const
|
|
1815
|
-
if (
|
|
1816
|
-
const
|
|
1817
|
-
let
|
|
1818
|
-
if (
|
|
1819
|
-
if (
|
|
1820
|
-
const
|
|
1853
|
+
const y = window.getSelection();
|
|
1854
|
+
if (y && y.rangeCount > 0) {
|
|
1855
|
+
const b = y.anchorNode;
|
|
1856
|
+
let $ = null;
|
|
1857
|
+
if (b && (b.nodeType === Node.ELEMENT_NODE ? $ = b.closest('[data-type="text"]') : b.nodeType === Node.TEXT_NODE && b.parentElement && ($ = b.parentElement.closest('[data-type="text"]'))), $) {
|
|
1858
|
+
if (f.preventDefault(), f.stopPropagation(), i.current) {
|
|
1859
|
+
const E = i.current.querySelector(
|
|
1821
1860
|
'[data-type="variable"], [data-type="upload"]'
|
|
1822
1861
|
);
|
|
1823
|
-
|
|
1862
|
+
E && E.focus();
|
|
1824
1863
|
}
|
|
1825
1864
|
return;
|
|
1826
1865
|
}
|
|
1827
1866
|
}
|
|
1828
|
-
if (
|
|
1829
|
-
const
|
|
1830
|
-
let
|
|
1831
|
-
if (
|
|
1832
|
-
if (
|
|
1833
|
-
const
|
|
1867
|
+
if (m && y && y.rangeCount > 0) {
|
|
1868
|
+
const b = y.anchorNode;
|
|
1869
|
+
let $ = null;
|
|
1870
|
+
if (b && (b.nodeType === Node.ELEMENT_NODE ? $ = b.closest(".tag-node") : b.nodeType === Node.TEXT_NODE && b.parentElement && ($ = b.parentElement.closest(".tag-node"))), $) {
|
|
1871
|
+
if (f.preventDefault(), f.stopPropagation(), i.current) {
|
|
1872
|
+
const E = i.current.querySelector(
|
|
1834
1873
|
'[data-type="variable"], [data-type="upload"]'
|
|
1835
1874
|
);
|
|
1836
|
-
|
|
1875
|
+
E && E.focus();
|
|
1837
1876
|
}
|
|
1838
1877
|
return;
|
|
1839
1878
|
}
|
|
1840
1879
|
}
|
|
1841
|
-
if (
|
|
1842
|
-
if (
|
|
1843
|
-
|
|
1880
|
+
if (f.key === "Enter" && !f.shiftKey && (f.preventDefault(), je()), f.key === "Escape" && i.current) {
|
|
1881
|
+
if (m) {
|
|
1882
|
+
f.preventDefault();
|
|
1844
1883
|
return;
|
|
1845
1884
|
}
|
|
1846
|
-
|
|
1847
|
-
}
|
|
1848
|
-
if (
|
|
1849
|
-
const
|
|
1850
|
-
if (
|
|
1851
|
-
const
|
|
1852
|
-
if (
|
|
1853
|
-
let
|
|
1854
|
-
if (
|
|
1855
|
-
|
|
1885
|
+
i.current.innerHTML = "", i.current.focus();
|
|
1886
|
+
}
|
|
1887
|
+
if (f.key === "Backspace") {
|
|
1888
|
+
const b = window.getSelection();
|
|
1889
|
+
if (b && b.rangeCount > 0) {
|
|
1890
|
+
const $ = b.getRangeAt(0), E = b.anchorNode;
|
|
1891
|
+
if (m) {
|
|
1892
|
+
let j = null, B = null;
|
|
1893
|
+
if (E && (E.nodeType === Node.ELEMENT_NODE ? (j = E.closest(".tag-node"), B = E.closest('[data-type="text"]')) : E.nodeType === Node.TEXT_NODE && E.parentElement && (j = E.parentElement.closest(".tag-node"), B = E.parentElement.closest('[data-type="text"]'))), (j || B) && $.collapsed && $.startOffset === 0) {
|
|
1894
|
+
f.preventDefault();
|
|
1856
1895
|
return;
|
|
1857
1896
|
}
|
|
1858
1897
|
}
|
|
1859
|
-
let
|
|
1860
|
-
if (
|
|
1898
|
+
let A = null;
|
|
1899
|
+
if (E && (E.nodeType === Node.ELEMENT_NODE ? A = E.closest(
|
|
1861
1900
|
'[data-type="variable"]'
|
|
1862
|
-
) :
|
|
1901
|
+
) : E.nodeType === Node.TEXT_NODE && E.parentElement && (A = E.parentElement.closest(
|
|
1863
1902
|
'[data-type="variable"]'
|
|
1864
|
-
))),
|
|
1865
|
-
if (
|
|
1903
|
+
))), A) {
|
|
1904
|
+
if (!$.collapsed)
|
|
1866
1905
|
return;
|
|
1867
|
-
const
|
|
1868
|
-
if (
|
|
1869
|
-
|
|
1906
|
+
const j = A.innerText;
|
|
1907
|
+
if (j === "" || j === "") {
|
|
1908
|
+
f.preventDefault();
|
|
1870
1909
|
return;
|
|
1871
1910
|
}
|
|
1872
|
-
if (
|
|
1873
|
-
|
|
1911
|
+
if ($.startOffset === 0) {
|
|
1912
|
+
f.preventDefault();
|
|
1874
1913
|
return;
|
|
1875
1914
|
}
|
|
1876
|
-
if (
|
|
1877
|
-
|
|
1915
|
+
if (j.startsWith("") && $.startOffset === 1) {
|
|
1916
|
+
f.preventDefault();
|
|
1878
1917
|
return;
|
|
1879
1918
|
}
|
|
1880
1919
|
}
|
|
1881
1920
|
}
|
|
1882
1921
|
}
|
|
1883
|
-
},
|
|
1884
|
-
if (
|
|
1922
|
+
}, je = () => {
|
|
1923
|
+
if (o || r || e || !D || !i.current) return;
|
|
1885
1924
|
if (t.length === 0) {
|
|
1886
|
-
const
|
|
1887
|
-
if (!
|
|
1888
|
-
|
|
1925
|
+
const A = i.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
1926
|
+
if (!A) return;
|
|
1927
|
+
p(A, A);
|
|
1889
1928
|
return;
|
|
1890
1929
|
}
|
|
1891
|
-
const
|
|
1892
|
-
let
|
|
1893
|
-
const
|
|
1894
|
-
if (!(
|
|
1895
|
-
if (
|
|
1896
|
-
|
|
1897
|
-
else if (
|
|
1898
|
-
const
|
|
1899
|
-
if (
|
|
1900
|
-
let
|
|
1901
|
-
const
|
|
1902
|
-
|
|
1930
|
+
const f = i.current;
|
|
1931
|
+
let y = "";
|
|
1932
|
+
const b = {}, $ = (A) => {
|
|
1933
|
+
if (!(A.nodeType === Node.ELEMENT_NODE && A.style.display === "none")) {
|
|
1934
|
+
if (A.nodeType === Node.TEXT_NODE)
|
|
1935
|
+
y += (A.textContent || "").replace(/\u200B/g, "");
|
|
1936
|
+
else if (A.nodeType === Node.ELEMENT_NODE) {
|
|
1937
|
+
const j = A, B = j.dataset.type, V = j.dataset.key;
|
|
1938
|
+
if (B === "variable" && V) {
|
|
1939
|
+
let z = "";
|
|
1940
|
+
const oe = document.createTreeWalker(
|
|
1941
|
+
j,
|
|
1903
1942
|
NodeFilter.SHOW_TEXT,
|
|
1904
1943
|
{
|
|
1905
|
-
acceptNode: (
|
|
1906
|
-
const
|
|
1907
|
-
return
|
|
1944
|
+
acceptNode: (se) => {
|
|
1945
|
+
const ce = j.querySelector(".variable-info-icon");
|
|
1946
|
+
return ce && ce.contains(se) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
1908
1947
|
}
|
|
1909
1948
|
}
|
|
1910
1949
|
);
|
|
1911
|
-
for (;
|
|
1912
|
-
|
|
1913
|
-
const
|
|
1914
|
-
if (
|
|
1915
|
-
const
|
|
1916
|
-
if (
|
|
1917
|
-
(!
|
|
1918
|
-
const
|
|
1919
|
-
|
|
1950
|
+
for (; oe.nextNode(); )
|
|
1951
|
+
z += oe.currentNode.textContent || "";
|
|
1952
|
+
const te = z.replace(/[\u200B\n]/g, "").trim();
|
|
1953
|
+
if (te) {
|
|
1954
|
+
const se = j.dataset.multiKey;
|
|
1955
|
+
if (se) {
|
|
1956
|
+
(!b[se] || !Array.isArray(b[se])) && (b[se] = []);
|
|
1957
|
+
const ce = b[se];
|
|
1958
|
+
ce.push(te), ce.length > 1 && (y += " "), y += te;
|
|
1920
1959
|
} else
|
|
1921
|
-
|
|
1960
|
+
b[V] = te, y += te;
|
|
1922
1961
|
}
|
|
1923
|
-
} else if (
|
|
1924
|
-
|
|
1962
|
+
} else if (B === "upload" && V)
|
|
1963
|
+
b[V] = c[V] ?? null, c[V] && (y += ` [附带文件: ${c[V]?.name}] `);
|
|
1925
1964
|
else {
|
|
1926
|
-
if (
|
|
1927
|
-
|
|
1965
|
+
if (j.classList.contains("tag-close-btn") || j.classList.contains("file-remove-btn")) return;
|
|
1966
|
+
j.getAttribute("contenteditable") === "false" && !B && j.classList.contains("tag-node") ? y += j.innerText : j.childNodes.forEach($);
|
|
1928
1967
|
}
|
|
1929
1968
|
}
|
|
1930
1969
|
}
|
|
1931
1970
|
};
|
|
1932
|
-
if (
|
|
1933
|
-
const
|
|
1934
|
-
|
|
1935
|
-
const
|
|
1936
|
-
|
|
1937
|
-
(
|
|
1938
|
-
) ?
|
|
1939
|
-
|
|
1940
|
-
}) :
|
|
1941
|
-
|
|
1942
|
-
}) : typeof
|
|
1943
|
-
}),
|
|
1944
|
-
},
|
|
1945
|
-
...
|
|
1946
|
-
...
|
|
1971
|
+
if (f.childNodes.forEach($), y = y.trim(), !y) return;
|
|
1972
|
+
const E = new FormData();
|
|
1973
|
+
E.append("fullPrompt", y), Object.keys(b).forEach((A) => {
|
|
1974
|
+
const j = b[A];
|
|
1975
|
+
j != null && (j instanceof File ? E.append(A, j) : Array.isArray(j) ? t.some(
|
|
1976
|
+
(V) => V.type === "multi-variable" && V.key === A
|
|
1977
|
+
) ? j.forEach((V) => {
|
|
1978
|
+
V != null && V !== "" && E.append(A, String(V));
|
|
1979
|
+
}) : j.forEach((V, z) => {
|
|
1980
|
+
V != null && (V instanceof File ? E.append(`${A}[${z}]`, V) : typeof V == "string" ? E.append(`${A}[${z}]`, V) : E.append(`${A}[${z}]`, String(V)));
|
|
1981
|
+
}) : typeof j == "string" ? E.append(A, j) : E.append(A, String(j)));
|
|
1982
|
+
}), p(E, y);
|
|
1983
|
+
}, Be = {
|
|
1984
|
+
...a ? { width: typeof a == "number" ? `${a}px` : a } : {},
|
|
1985
|
+
...u ? { border: u } : {},
|
|
1947
1986
|
...N ? { background: N } : {}
|
|
1948
1987
|
};
|
|
1949
|
-
return /* @__PURE__ */
|
|
1988
|
+
return /* @__PURE__ */ n.jsxs(
|
|
1950
1989
|
"div",
|
|
1951
1990
|
{
|
|
1952
1991
|
className: "rich-text-editor",
|
|
1953
|
-
style:
|
|
1954
|
-
"data-disabled":
|
|
1992
|
+
style: Be,
|
|
1993
|
+
"data-disabled": r,
|
|
1955
1994
|
children: [
|
|
1956
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ n.jsx(
|
|
1957
1996
|
"div",
|
|
1958
1997
|
{
|
|
1959
|
-
ref:
|
|
1960
|
-
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${
|
|
1998
|
+
ref: i,
|
|
1999
|
+
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${F && x ? "rte-editor-empty" : ""}`,
|
|
1961
2000
|
contentEditable: t.length === 0,
|
|
1962
2001
|
suppressContentEditableWarning: !0,
|
|
1963
|
-
"data-placeholder":
|
|
1964
|
-
onMouseDown:
|
|
1965
|
-
onMouseMove:
|
|
1966
|
-
onMouseUp:
|
|
1967
|
-
onClick:
|
|
1968
|
-
onDoubleClick:
|
|
1969
|
-
onInput:
|
|
1970
|
-
onKeyDown:
|
|
1971
|
-
onPaste:
|
|
1972
|
-
onBlur:
|
|
2002
|
+
"data-placeholder": x,
|
|
2003
|
+
onMouseDown: ue,
|
|
2004
|
+
onMouseMove: re,
|
|
2005
|
+
onMouseUp: ye,
|
|
2006
|
+
onClick: O,
|
|
2007
|
+
onDoubleClick: M,
|
|
2008
|
+
onInput: ae,
|
|
2009
|
+
onKeyDown: Ee,
|
|
2010
|
+
onPaste: I,
|
|
2011
|
+
onBlur: fe
|
|
1973
2012
|
}
|
|
1974
2013
|
),
|
|
1975
|
-
/* @__PURE__ */
|
|
2014
|
+
/* @__PURE__ */ n.jsx(
|
|
1976
2015
|
"input",
|
|
1977
2016
|
{
|
|
1978
2017
|
type: "file",
|
|
1979
|
-
ref:
|
|
2018
|
+
ref: T,
|
|
1980
2019
|
className: "rte-file-input",
|
|
1981
2020
|
accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
|
|
1982
|
-
onChange:
|
|
2021
|
+
onChange: X
|
|
1983
2022
|
}
|
|
1984
2023
|
),
|
|
1985
|
-
/* @__PURE__ */
|
|
1986
|
-
/* @__PURE__ */
|
|
1987
|
-
/* @__PURE__ */
|
|
1988
|
-
/* @__PURE__ */
|
|
1989
|
-
/* @__PURE__ */
|
|
2024
|
+
/* @__PURE__ */ n.jsxs("div", { className: "rich-text-editor-footer", children: [
|
|
2025
|
+
/* @__PURE__ */ n.jsx("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ n.jsxs("div", { className: "rich-text-editor-brand", children: [
|
|
2026
|
+
/* @__PURE__ */ n.jsxs("div", { className: "rte-brand-badge", children: [
|
|
2027
|
+
/* @__PURE__ */ n.jsx("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
|
|
2028
|
+
/* @__PURE__ */ n.jsx("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
|
|
1990
2029
|
] }),
|
|
1991
|
-
/* @__PURE__ */
|
|
1992
|
-
|
|
2030
|
+
d !== "hideAgent" && /* @__PURE__ */ n.jsx(
|
|
2031
|
+
We,
|
|
1993
2032
|
{
|
|
1994
2033
|
placement: "top",
|
|
1995
2034
|
menu: {
|
|
1996
|
-
items:
|
|
1997
|
-
key:
|
|
1998
|
-
label: /* @__PURE__ */
|
|
1999
|
-
|
|
2000
|
-
/* @__PURE__ */
|
|
2035
|
+
items: C.map((f) => ({
|
|
2036
|
+
key: f.key,
|
|
2037
|
+
label: /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2038
|
+
f.icon && /* @__PURE__ */ n.jsx("i", { className: f.icon }),
|
|
2039
|
+
/* @__PURE__ */ n.jsx("span", { children: f.label })
|
|
2001
2040
|
] }),
|
|
2002
2041
|
onClick: () => {
|
|
2003
|
-
|
|
2042
|
+
g?.(f);
|
|
2004
2043
|
}
|
|
2005
2044
|
}))
|
|
2006
2045
|
},
|
|
2007
2046
|
trigger: ["click"],
|
|
2008
|
-
disabled:
|
|
2009
|
-
children: /* @__PURE__ */
|
|
2010
|
-
/* @__PURE__ */
|
|
2011
|
-
/* @__PURE__ */
|
|
2047
|
+
disabled: r || o,
|
|
2048
|
+
children: /* @__PURE__ */ n.jsxs("div", { className: "rte-agent-badge", style: { cursor: C.length > 0 ? "pointer" : "default" }, children: [
|
|
2049
|
+
/* @__PURE__ */ n.jsx("i", { className: "iconfont icon-zhinengti" }),
|
|
2050
|
+
/* @__PURE__ */ n.jsx("span", { className: "rte-agent-text", children: "智能体" })
|
|
2012
2051
|
] })
|
|
2013
2052
|
}
|
|
2014
2053
|
)
|
|
2015
2054
|
] }) }),
|
|
2016
|
-
/* @__PURE__ */
|
|
2055
|
+
/* @__PURE__ */ n.jsx(
|
|
2017
2056
|
"button",
|
|
2018
2057
|
{
|
|
2019
2058
|
type: "button",
|
|
2020
|
-
onClick:
|
|
2021
|
-
disabled:
|
|
2059
|
+
onClick: je,
|
|
2060
|
+
disabled: o || r || e || !D,
|
|
2022
2061
|
className: "rich-text-editor-send-button",
|
|
2023
|
-
children:
|
|
2062
|
+
children: o || e ? /* @__PURE__ */ n.jsx("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ n.jsx("i", { className: "iconfont icon-fasong" })
|
|
2024
2063
|
}
|
|
2025
2064
|
)
|
|
2026
2065
|
] }),
|
|
2027
2066
|
h?.anchorEl && (() => {
|
|
2028
2067
|
if (!document.body.contains(h.anchorEl))
|
|
2029
2068
|
return null;
|
|
2030
|
-
let
|
|
2031
|
-
return h.type === "upload" ?
|
|
2032
|
-
(
|
|
2033
|
-
)?.tooltip || "" : h.type === "tag" ?
|
|
2034
|
-
/* @__PURE__ */
|
|
2035
|
-
|
|
2069
|
+
let f = "";
|
|
2070
|
+
return h.type === "upload" ? f = t.find(
|
|
2071
|
+
(b) => b.type === "upload" && b.key === h.key
|
|
2072
|
+
)?.tooltip || "" : h.type === "tag" ? f = h.anchorEl.dataset.tooltip || "" : h.type === "upload-label" ? f = h.anchorEl.dataset.fileName || "" : h.type === "variable" && (f = h.anchorEl.dataset.tooltip || ""), ot(
|
|
2073
|
+
/* @__PURE__ */ n.jsx(
|
|
2074
|
+
Ue,
|
|
2036
2075
|
{
|
|
2037
2076
|
arrow: !1,
|
|
2038
|
-
title: /* @__PURE__ */
|
|
2077
|
+
title: /* @__PURE__ */ n.jsx("div", { style: { maxWidth: "200px", fontSize: "12px", color: "#fff" }, children: f }),
|
|
2039
2078
|
open: !0,
|
|
2040
2079
|
placement: "top",
|
|
2041
2080
|
getPopupContainer: () => document.body,
|
|
2042
2081
|
overlayInnerStyle: {
|
|
2043
2082
|
background: "var(--neutral-800, #262626)"
|
|
2044
2083
|
},
|
|
2045
|
-
children: /* @__PURE__ */
|
|
2084
|
+
children: /* @__PURE__ */ n.jsx(
|
|
2046
2085
|
"div",
|
|
2047
2086
|
{
|
|
2048
2087
|
style: {
|
|
@@ -2064,7 +2103,7 @@ const vt = ({
|
|
|
2064
2103
|
}
|
|
2065
2104
|
);
|
|
2066
2105
|
};
|
|
2067
|
-
|
|
2106
|
+
qt.__docgenInfo = {
|
|
2068
2107
|
displayName: "RichTextEditor",
|
|
2069
2108
|
description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
|
|
2070
2109
|
props: {
|
|
@@ -2092,43 +2131,43 @@ vt.__docgenInfo = {
|
|
|
2092
2131
|
}
|
|
2093
2132
|
}
|
|
2094
2133
|
};
|
|
2095
|
-
const
|
|
2134
|
+
const Le = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", At = [
|
|
2096
2135
|
{ label: "5页", value: 5 },
|
|
2097
2136
|
{ label: "10页", value: 10 },
|
|
2098
2137
|
{ label: "15页", value: 15 },
|
|
2099
2138
|
{ label: "30页", value: 30 }
|
|
2100
|
-
],
|
|
2139
|
+
], jt = ({
|
|
2101
2140
|
autoLoading: t,
|
|
2102
|
-
batchSize:
|
|
2103
|
-
loadingProgress:
|
|
2104
|
-
loadIcon:
|
|
2105
|
-
onBatchSizeChange:
|
|
2106
|
-
onLoadNextPage:
|
|
2107
|
-
onStartAutoLoad:
|
|
2108
|
-
onStopLoad:
|
|
2109
|
-
}) => t &&
|
|
2110
|
-
|
|
2111
|
-
/* @__PURE__ */
|
|
2141
|
+
batchSize: p,
|
|
2142
|
+
loadingProgress: o,
|
|
2143
|
+
loadIcon: r,
|
|
2144
|
+
onBatchSizeChange: a,
|
|
2145
|
+
onLoadNextPage: m,
|
|
2146
|
+
onStartAutoLoad: C,
|
|
2147
|
+
onStopLoad: g
|
|
2148
|
+
}) => t && o ? /* @__PURE__ */ n.jsxs("div", { className: "auto_load_progress", children: [
|
|
2149
|
+
r || /* @__PURE__ */ n.jsx("img", { src: Le, alt: "自动加载", width: 14, height: 14 }),
|
|
2150
|
+
/* @__PURE__ */ n.jsxs("span", { children: [
|
|
2112
2151
|
"正在加载第",
|
|
2113
|
-
|
|
2152
|
+
o.currentPage,
|
|
2114
2153
|
"/",
|
|
2115
|
-
|
|
2154
|
+
o.totalPages,
|
|
2116
2155
|
"页"
|
|
2117
2156
|
] }),
|
|
2118
|
-
/* @__PURE__ */
|
|
2119
|
-
|
|
2157
|
+
/* @__PURE__ */ n.jsx(
|
|
2158
|
+
Xe,
|
|
2120
2159
|
{
|
|
2121
|
-
percent:
|
|
2160
|
+
percent: o.percentage,
|
|
2122
2161
|
type: "line",
|
|
2123
2162
|
size: [160, 8]
|
|
2124
2163
|
}
|
|
2125
2164
|
),
|
|
2126
|
-
/* @__PURE__ */
|
|
2127
|
-
] }) : /* @__PURE__ */
|
|
2128
|
-
/* @__PURE__ */
|
|
2165
|
+
/* @__PURE__ */ n.jsx("span", { onClick: g, className: "auto_load_stop_btn", children: "停止加载" })
|
|
2166
|
+
] }) : /* @__PURE__ */ n.jsxs("div", { className: "auto_load_container", children: [
|
|
2167
|
+
/* @__PURE__ */ n.jsx(
|
|
2129
2168
|
"div",
|
|
2130
2169
|
{
|
|
2131
|
-
onClick:
|
|
2170
|
+
onClick: m,
|
|
2132
2171
|
className: "auto_load_next_btn",
|
|
2133
2172
|
style: {
|
|
2134
2173
|
backgroundColor: t ? "#f5f5f5" : "#2563eb"
|
|
@@ -2136,7 +2175,7 @@ const Ae = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2136
2175
|
children: "加载下一页"
|
|
2137
2176
|
}
|
|
2138
2177
|
),
|
|
2139
|
-
/* @__PURE__ */
|
|
2178
|
+
/* @__PURE__ */ n.jsxs(
|
|
2140
2179
|
"div",
|
|
2141
2180
|
{
|
|
2142
2181
|
className: "right_control_wrap",
|
|
@@ -2144,23 +2183,23 @@ const Ae = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2144
2183
|
backgroundColor: t ? "#f5f5f5" : "#2563eb"
|
|
2145
2184
|
},
|
|
2146
2185
|
children: [
|
|
2147
|
-
/* @__PURE__ */
|
|
2186
|
+
/* @__PURE__ */ n.jsxs(
|
|
2148
2187
|
"div",
|
|
2149
2188
|
{
|
|
2150
2189
|
className: "auto_load_btn",
|
|
2151
|
-
onClick: t ? void 0 :
|
|
2190
|
+
onClick: t ? void 0 : C,
|
|
2152
2191
|
children: [
|
|
2153
|
-
|
|
2154
|
-
/* @__PURE__ */
|
|
2192
|
+
r || /* @__PURE__ */ n.jsx("img", { src: Le, alt: "自动加载", width: 14, height: 14 }),
|
|
2193
|
+
/* @__PURE__ */ n.jsx("span", { children: "自动加载" })
|
|
2155
2194
|
]
|
|
2156
2195
|
}
|
|
2157
2196
|
),
|
|
2158
|
-
/* @__PURE__ */
|
|
2159
|
-
|
|
2197
|
+
/* @__PURE__ */ n.jsx(
|
|
2198
|
+
Ae,
|
|
2160
2199
|
{
|
|
2161
|
-
value:
|
|
2162
|
-
onChange:
|
|
2163
|
-
options:
|
|
2200
|
+
value: p,
|
|
2201
|
+
onChange: a,
|
|
2202
|
+
options: At,
|
|
2164
2203
|
disabled: t,
|
|
2165
2204
|
size: "small",
|
|
2166
2205
|
className: "auto_load_select",
|
|
@@ -2170,143 +2209,143 @@ const Ae = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
2170
2209
|
]
|
|
2171
2210
|
}
|
|
2172
2211
|
)
|
|
2173
|
-
] }),
|
|
2212
|
+
] }), $t = ({
|
|
2174
2213
|
current: t,
|
|
2175
|
-
loadIcon:
|
|
2176
|
-
pageSize:
|
|
2177
|
-
total:
|
|
2178
|
-
cachedPages:
|
|
2179
|
-
loadedCount:
|
|
2180
|
-
autoLoading:
|
|
2181
|
-
loadingProgress:
|
|
2182
|
-
onChange:
|
|
2183
|
-
onLoadNextPage:
|
|
2184
|
-
onStartAutoLoad:
|
|
2185
|
-
onStopLoading:
|
|
2214
|
+
loadIcon: p,
|
|
2215
|
+
pageSize: o,
|
|
2216
|
+
total: r,
|
|
2217
|
+
cachedPages: a,
|
|
2218
|
+
loadedCount: m,
|
|
2219
|
+
autoLoading: C = !1,
|
|
2220
|
+
loadingProgress: g,
|
|
2221
|
+
onChange: l,
|
|
2222
|
+
onLoadNextPage: e,
|
|
2223
|
+
onStartAutoLoad: x,
|
|
2224
|
+
onStopLoading: u
|
|
2186
2225
|
}) => {
|
|
2187
|
-
const [N,
|
|
2188
|
-
{ length:
|
|
2189
|
-
(
|
|
2190
|
-
).filter((
|
|
2191
|
-
const
|
|
2192
|
-
return
|
|
2226
|
+
const [N, d] = Y(5), i = Math.ceil(r / o), T = Ve(() => a.length >= i, [a, i]), c = () => Array.from(
|
|
2227
|
+
{ length: i },
|
|
2228
|
+
(S, h) => h + 1
|
|
2229
|
+
).filter((S) => !a.includes(S)).slice(0, N), v = (w, S, h) => {
|
|
2230
|
+
const R = a.includes(w);
|
|
2231
|
+
return S === "prev" || S === "next" || S === "jump-prev" || S === "jump-next" ? /* @__PURE__ */ n.jsx("div", { className: "pageBox", children: h }) : /* @__PURE__ */ n.jsxs(
|
|
2193
2232
|
"div",
|
|
2194
2233
|
{
|
|
2195
2234
|
className: "pageBox",
|
|
2196
2235
|
style: {
|
|
2197
|
-
backgroundColor: t ===
|
|
2198
|
-
color: t ===
|
|
2236
|
+
backgroundColor: t === w ? "#2563EB" : "#f5f5f5",
|
|
2237
|
+
color: t === w ? "#fff" : R ? "#171717" : "#a3a3a3"
|
|
2199
2238
|
},
|
|
2200
2239
|
children: [
|
|
2201
|
-
|
|
2202
|
-
!
|
|
2240
|
+
w,
|
|
2241
|
+
!R && /* @__PURE__ */ n.jsx("span", { className: "unload_spot" })
|
|
2203
2242
|
]
|
|
2204
2243
|
}
|
|
2205
2244
|
);
|
|
2206
2245
|
};
|
|
2207
|
-
return /* @__PURE__ */
|
|
2208
|
-
/* @__PURE__ */
|
|
2209
|
-
/* @__PURE__ */
|
|
2210
|
-
/* @__PURE__ */
|
|
2211
|
-
|
|
2246
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "pagination_footer", children: [
|
|
2247
|
+
/* @__PURE__ */ n.jsxs("div", { className: "pagination_leftWrap", children: [
|
|
2248
|
+
/* @__PURE__ */ n.jsxs("span", { className: "pagination_total", children: [
|
|
2249
|
+
/* @__PURE__ */ n.jsx(
|
|
2250
|
+
tt,
|
|
2212
2251
|
{
|
|
2213
2252
|
style: { color: "#2563EB", marginRight: "4px" }
|
|
2214
2253
|
}
|
|
2215
2254
|
),
|
|
2216
2255
|
"已加载: ",
|
|
2217
|
-
|
|
2256
|
+
m,
|
|
2218
2257
|
"/",
|
|
2219
|
-
|
|
2258
|
+
r,
|
|
2220
2259
|
"条数据"
|
|
2221
2260
|
] }),
|
|
2222
|
-
!
|
|
2223
|
-
|
|
2261
|
+
!T && /* @__PURE__ */ n.jsx(
|
|
2262
|
+
jt,
|
|
2224
2263
|
{
|
|
2225
|
-
loadIcon:
|
|
2226
|
-
autoLoading:
|
|
2264
|
+
loadIcon: p || void 0,
|
|
2265
|
+
autoLoading: C,
|
|
2227
2266
|
batchSize: N,
|
|
2228
|
-
loadingProgress:
|
|
2229
|
-
disabled: !
|
|
2230
|
-
onBatchSizeChange:
|
|
2231
|
-
onLoadNextPage: () =>
|
|
2267
|
+
loadingProgress: g,
|
|
2268
|
+
disabled: !e || !x,
|
|
2269
|
+
onBatchSizeChange: d,
|
|
2270
|
+
onLoadNextPage: () => e?.(),
|
|
2232
2271
|
onStartAutoLoad: () => {
|
|
2233
|
-
const
|
|
2234
|
-
|
|
2272
|
+
const w = c();
|
|
2273
|
+
x?.(w);
|
|
2235
2274
|
},
|
|
2236
|
-
onStopLoad: () =>
|
|
2275
|
+
onStopLoad: () => u?.()
|
|
2237
2276
|
}
|
|
2238
2277
|
)
|
|
2239
2278
|
] }),
|
|
2240
|
-
/* @__PURE__ */
|
|
2241
|
-
|
|
2279
|
+
/* @__PURE__ */ n.jsx(
|
|
2280
|
+
Ye,
|
|
2242
2281
|
{
|
|
2243
2282
|
current: t,
|
|
2244
|
-
pageSize:
|
|
2245
|
-
total:
|
|
2246
|
-
onChange: (
|
|
2283
|
+
pageSize: o,
|
|
2284
|
+
total: r,
|
|
2285
|
+
onChange: (w) => l(w),
|
|
2247
2286
|
showSizeChanger: !1,
|
|
2248
2287
|
showQuickJumper: !1,
|
|
2249
|
-
showTotal: (
|
|
2250
|
-
itemRender:
|
|
2288
|
+
showTotal: (w, S) => "",
|
|
2289
|
+
itemRender: v
|
|
2251
2290
|
}
|
|
2252
2291
|
)
|
|
2253
2292
|
] });
|
|
2254
|
-
},
|
|
2293
|
+
}, _t = (t) => {
|
|
2255
2294
|
const {
|
|
2256
|
-
loading:
|
|
2257
|
-
autoLoading:
|
|
2258
|
-
loadingProgress:
|
|
2259
|
-
columns:
|
|
2260
|
-
dataSource:
|
|
2261
|
-
total:
|
|
2262
|
-
current:
|
|
2263
|
-
pageSize:
|
|
2264
|
-
cachedPages:
|
|
2265
|
-
onChangePage:
|
|
2266
|
-
onLoadNextPage:
|
|
2295
|
+
loading: p,
|
|
2296
|
+
autoLoading: o,
|
|
2297
|
+
loadingProgress: r,
|
|
2298
|
+
columns: a = [],
|
|
2299
|
+
dataSource: m = [],
|
|
2300
|
+
total: C,
|
|
2301
|
+
current: g,
|
|
2302
|
+
pageSize: l,
|
|
2303
|
+
cachedPages: e,
|
|
2304
|
+
onChangePage: x,
|
|
2305
|
+
onLoadNextPage: u,
|
|
2267
2306
|
onStartAutoLoad: N,
|
|
2268
|
-
onStopLoading:
|
|
2269
|
-
...
|
|
2270
|
-
} = t,
|
|
2271
|
-
(
|
|
2272
|
-
|
|
2273
|
-
key: `${(
|
|
2307
|
+
onStopLoading: d,
|
|
2308
|
+
...i
|
|
2309
|
+
} = t, T = G(null), c = H(
|
|
2310
|
+
(v) => {
|
|
2311
|
+
x(v), e.includes(v) && T.current?.scrollTo({
|
|
2312
|
+
key: `${(v - 1) * l + 1}`
|
|
2274
2313
|
});
|
|
2275
2314
|
},
|
|
2276
|
-
[
|
|
2315
|
+
[g]
|
|
2277
2316
|
);
|
|
2278
|
-
return /* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */
|
|
2280
|
-
|
|
2317
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col", children: [
|
|
2318
|
+
/* @__PURE__ */ n.jsx(
|
|
2319
|
+
qe,
|
|
2281
2320
|
{
|
|
2282
|
-
ref:
|
|
2283
|
-
...
|
|
2284
|
-
columns:
|
|
2285
|
-
dataSource:
|
|
2321
|
+
ref: T,
|
|
2322
|
+
...i,
|
|
2323
|
+
columns: a,
|
|
2324
|
+
dataSource: m,
|
|
2286
2325
|
pagination: !1,
|
|
2287
2326
|
virtual: !0
|
|
2288
2327
|
}
|
|
2289
2328
|
),
|
|
2290
|
-
/* @__PURE__ */
|
|
2291
|
-
|
|
2329
|
+
/* @__PURE__ */ n.jsx(
|
|
2330
|
+
$t,
|
|
2292
2331
|
{
|
|
2293
|
-
loading:
|
|
2294
|
-
autoLoading:
|
|
2295
|
-
loadingProgress:
|
|
2296
|
-
current:
|
|
2297
|
-
pageSize:
|
|
2298
|
-
total:
|
|
2299
|
-
loadedCount:
|
|
2300
|
-
cachedPages:
|
|
2301
|
-
onChange:
|
|
2302
|
-
onLoadNextPage:
|
|
2332
|
+
loading: p,
|
|
2333
|
+
autoLoading: o,
|
|
2334
|
+
loadingProgress: r,
|
|
2335
|
+
current: g,
|
|
2336
|
+
pageSize: l,
|
|
2337
|
+
total: C,
|
|
2338
|
+
loadedCount: m.length,
|
|
2339
|
+
cachedPages: e,
|
|
2340
|
+
onChange: c,
|
|
2341
|
+
onLoadNextPage: u,
|
|
2303
2342
|
onStartAutoLoad: N,
|
|
2304
|
-
onStopLoading:
|
|
2343
|
+
onStopLoading: d
|
|
2305
2344
|
}
|
|
2306
2345
|
)
|
|
2307
2346
|
] });
|
|
2308
2347
|
};
|
|
2309
|
-
|
|
2348
|
+
_t.__docgenInfo = {
|
|
2310
2349
|
displayName: "VirtualTable",
|
|
2311
2350
|
description: "虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",
|
|
2312
2351
|
props: {
|
|
@@ -2413,79 +2452,79 @@ Tt.__docgenInfo = {
|
|
|
2413
2452
|
}
|
|
2414
2453
|
}
|
|
2415
2454
|
};
|
|
2416
|
-
const
|
|
2455
|
+
const Rt = ({
|
|
2417
2456
|
texts: t = [],
|
|
2418
|
-
placeholder:
|
|
2419
|
-
animationSpeed:
|
|
2420
|
-
autoPlay:
|
|
2421
|
-
value:
|
|
2422
|
-
onChange:
|
|
2423
|
-
...
|
|
2457
|
+
placeholder: p = "请输入内容",
|
|
2458
|
+
animationSpeed: o = 100,
|
|
2459
|
+
autoPlay: r = !0,
|
|
2460
|
+
value: a,
|
|
2461
|
+
onChange: m,
|
|
2462
|
+
...C
|
|
2424
2463
|
}) => {
|
|
2425
|
-
const [
|
|
2426
|
-
|
|
2427
|
-
|
|
2464
|
+
const [g, l] = Y(""), [e, x] = Y(0), [u, N] = Y(!1), [d, i] = Y(!1), [T, c] = Y(!1), v = G(void 0), w = G(void 0), S = G(t), h = G(e), R = G(d), q = G(g);
|
|
2465
|
+
ne(() => {
|
|
2466
|
+
S.current = t, h.current = e, R.current = d, q.current = g;
|
|
2428
2467
|
});
|
|
2429
|
-
const
|
|
2430
|
-
let
|
|
2431
|
-
|
|
2468
|
+
const L = H((k, _) => {
|
|
2469
|
+
let J = 0;
|
|
2470
|
+
c(!0);
|
|
2471
|
+
const Q = () => {
|
|
2472
|
+
J < k.length ? (l(k.slice(0, J + 1)), J++, w.current = window.setTimeout(Q, o)) : (c(!1), _?.());
|
|
2473
|
+
};
|
|
2474
|
+
Q();
|
|
2475
|
+
}, [o]), D = H((k) => {
|
|
2476
|
+
let _ = q.current.length;
|
|
2432
2477
|
const J = () => {
|
|
2433
|
-
|
|
2478
|
+
_ > 0 ? (l(q.current.slice(0, _ - 1)), _--, w.current = window.setTimeout(J, o / 2)) : k?.();
|
|
2434
2479
|
};
|
|
2435
2480
|
J();
|
|
2436
|
-
}, [
|
|
2437
|
-
|
|
2438
|
-
const Y = () => {
|
|
2439
|
-
_ > 0 ? (e(L.current.slice(0, _ - 1)), _--, v.current = window.setTimeout(Y, c / 2)) : q?.();
|
|
2440
|
-
};
|
|
2441
|
-
Y();
|
|
2442
|
-
}, [c]), O = F(() => {
|
|
2443
|
-
if (h.current.length === 0 || k.current) return;
|
|
2481
|
+
}, [o]), P = H(() => {
|
|
2482
|
+
if (S.current.length === 0 || R.current) return;
|
|
2444
2483
|
N(!0);
|
|
2445
|
-
const
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2484
|
+
const k = S.current[h.current];
|
|
2485
|
+
q.current ? D(() => {
|
|
2486
|
+
L(k, () => {
|
|
2487
|
+
v.current = window.setTimeout(() => {
|
|
2488
|
+
x((_) => (_ + 1) % S.current.length), N(!1);
|
|
2450
2489
|
}, 2e3);
|
|
2451
2490
|
});
|
|
2452
|
-
}) :
|
|
2453
|
-
|
|
2454
|
-
|
|
2491
|
+
}) : L(k, () => {
|
|
2492
|
+
v.current = window.setTimeout(() => {
|
|
2493
|
+
x((_) => (_ + 1) % S.current.length), N(!1);
|
|
2455
2494
|
}, 2e3);
|
|
2456
2495
|
});
|
|
2457
|
-
}, [
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
}), [
|
|
2461
|
-
!
|
|
2462
|
-
}, [
|
|
2463
|
-
const
|
|
2464
|
-
|
|
2465
|
-
},
|
|
2466
|
-
|
|
2467
|
-
},
|
|
2468
|
-
|
|
2469
|
-
}, Z = () =>
|
|
2470
|
-
return /* @__PURE__ */
|
|
2471
|
-
/* @__PURE__ */
|
|
2472
|
-
|
|
2496
|
+
}, [D, L]);
|
|
2497
|
+
ne(() => (r && t.length > 0 && !d && P(), () => {
|
|
2498
|
+
v.current && window.clearTimeout(v.current), w.current && window.clearTimeout(w.current);
|
|
2499
|
+
}), [e, d, r, t.length, P]), ne(() => {
|
|
2500
|
+
!u && r && t.length > 0 && !d && P();
|
|
2501
|
+
}, [e, u, r, t.length, d, P]);
|
|
2502
|
+
const W = (k) => {
|
|
2503
|
+
i(!0), v.current && window.clearTimeout(v.current), w.current && window.clearTimeout(w.current), N(!1), c(!1), C.onFocus?.(k);
|
|
2504
|
+
}, F = (k) => {
|
|
2505
|
+
i(!1), !a && t.length > 0 && (l(""), x(0)), C.onBlur?.(k);
|
|
2506
|
+
}, U = (k) => {
|
|
2507
|
+
m?.(k.target.value), C.onChange?.(k);
|
|
2508
|
+
}, Z = () => d || a ? p : g || p;
|
|
2509
|
+
return /* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
2510
|
+
/* @__PURE__ */ n.jsx(
|
|
2511
|
+
Pe,
|
|
2473
2512
|
{
|
|
2474
|
-
...
|
|
2475
|
-
value:
|
|
2476
|
-
onChange:
|
|
2477
|
-
onFocus:
|
|
2478
|
-
onBlur:
|
|
2513
|
+
...C,
|
|
2514
|
+
value: a,
|
|
2515
|
+
onChange: U,
|
|
2516
|
+
onFocus: W,
|
|
2517
|
+
onBlur: F,
|
|
2479
2518
|
placeholder: Z(),
|
|
2480
2519
|
style: {
|
|
2481
2520
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2482
|
-
...
|
|
2521
|
+
...C.style,
|
|
2483
2522
|
position: "relative",
|
|
2484
2523
|
zIndex: 1
|
|
2485
2524
|
}
|
|
2486
2525
|
}
|
|
2487
2526
|
),
|
|
2488
|
-
!
|
|
2527
|
+
!d && !a && g && /* @__PURE__ */ n.jsxs(
|
|
2489
2528
|
"div",
|
|
2490
2529
|
{
|
|
2491
2530
|
style: {
|
|
@@ -2505,8 +2544,8 @@ const Nt = ({
|
|
|
2505
2544
|
fontFamily: "inherit"
|
|
2506
2545
|
},
|
|
2507
2546
|
children: [
|
|
2508
|
-
/* @__PURE__ */
|
|
2509
|
-
|
|
2547
|
+
/* @__PURE__ */ n.jsx("span", { children: g }),
|
|
2548
|
+
T && /* @__PURE__ */ n.jsx(
|
|
2510
2549
|
"span",
|
|
2511
2550
|
{
|
|
2512
2551
|
style: {
|
|
@@ -2522,7 +2561,7 @@ const Nt = ({
|
|
|
2522
2561
|
]
|
|
2523
2562
|
}
|
|
2524
2563
|
),
|
|
2525
|
-
/* @__PURE__ */
|
|
2564
|
+
/* @__PURE__ */ n.jsx("style", { children: `
|
|
2526
2565
|
@keyframes blink {
|
|
2527
2566
|
0%, 50% { opacity: 1; }
|
|
2528
2567
|
51%, 100% { opacity: 0; }
|
|
@@ -2530,7 +2569,7 @@ const Nt = ({
|
|
|
2530
2569
|
` })
|
|
2531
2570
|
] });
|
|
2532
2571
|
};
|
|
2533
|
-
|
|
2572
|
+
Rt.__docgenInfo = {
|
|
2534
2573
|
displayName: "DynamicInput",
|
|
2535
2574
|
description: "动态文案输入框组件,支持流式文字动画效果",
|
|
2536
2575
|
props: {
|
|
@@ -2575,109 +2614,109 @@ Nt.__docgenInfo = {
|
|
|
2575
2614
|
}
|
|
2576
2615
|
}
|
|
2577
2616
|
};
|
|
2578
|
-
const
|
|
2617
|
+
const It = ({
|
|
2579
2618
|
texts: t = [],
|
|
2580
2619
|
// 动态文案数组,默认为空数组
|
|
2581
|
-
placeholder:
|
|
2620
|
+
placeholder: p = "请输入内容",
|
|
2582
2621
|
// 占位符文本
|
|
2583
|
-
animationSpeed:
|
|
2622
|
+
animationSpeed: o = 100,
|
|
2584
2623
|
// 打字机动画速度,毫秒
|
|
2585
|
-
autoPlay:
|
|
2624
|
+
autoPlay: r = !0,
|
|
2586
2625
|
// 是否自动播放动画
|
|
2587
|
-
value:
|
|
2626
|
+
value: a = "",
|
|
2588
2627
|
// 受控模式的值
|
|
2589
|
-
onChange:
|
|
2628
|
+
onChange: m,
|
|
2590
2629
|
// 受控模式的变化回调
|
|
2591
|
-
onSubmit:
|
|
2630
|
+
onSubmit: C,
|
|
2592
2631
|
// 提交回调
|
|
2593
|
-
maxLength:
|
|
2632
|
+
maxLength: g = 500,
|
|
2594
2633
|
// 最大字符数限制
|
|
2595
|
-
showCount:
|
|
2634
|
+
showCount: l = !0,
|
|
2596
2635
|
// 是否显示字数统计
|
|
2597
|
-
submitText:
|
|
2636
|
+
submitText: e = "发送",
|
|
2598
2637
|
// 提交按钮文本
|
|
2599
|
-
disabled:
|
|
2638
|
+
disabled: x = !1,
|
|
2600
2639
|
// 是否禁用组件
|
|
2601
|
-
rows:
|
|
2640
|
+
rows: u = 4,
|
|
2602
2641
|
// 文本域行数
|
|
2603
2642
|
style: N,
|
|
2604
2643
|
// 自定义样式
|
|
2605
|
-
...
|
|
2644
|
+
...d
|
|
2606
2645
|
// 其他原生属性
|
|
2607
2646
|
}) => {
|
|
2608
|
-
const [
|
|
2609
|
-
|
|
2610
|
-
|
|
2647
|
+
const [i, T] = Y(""), [c, v] = Y(0), [w, S] = Y(!1), [h, R] = Y(!1), [q, L] = Y(!1), [D, P] = Y(a || ""), W = G(void 0), F = G(void 0), U = G(t), Z = G(c), k = G(h), _ = G(i), J = G(null);
|
|
2648
|
+
ne(() => {
|
|
2649
|
+
U.current = t, Z.current = c, k.current = h, _.current = i;
|
|
2611
2650
|
});
|
|
2612
|
-
const
|
|
2613
|
-
let
|
|
2614
|
-
|
|
2615
|
-
const
|
|
2616
|
-
|
|
2651
|
+
const Q = H((O, M) => {
|
|
2652
|
+
let ae = 0;
|
|
2653
|
+
L(!0);
|
|
2654
|
+
const fe = () => {
|
|
2655
|
+
ae < O.length ? (T(O.slice(0, ae + 1)), ae++, F.current = window.setTimeout(fe, o)) : (L(!1), M?.());
|
|
2617
2656
|
};
|
|
2618
|
-
|
|
2619
|
-
}, [
|
|
2620
|
-
let
|
|
2621
|
-
const
|
|
2622
|
-
|
|
2657
|
+
fe();
|
|
2658
|
+
}, [o]), ie = H((O) => {
|
|
2659
|
+
let M = _.current.length;
|
|
2660
|
+
const ae = () => {
|
|
2661
|
+
M > 0 ? (T(_.current.slice(0, M - 1)), M--, F.current = window.setTimeout(ae, o / 2)) : O?.();
|
|
2623
2662
|
};
|
|
2624
|
-
|
|
2625
|
-
}, [
|
|
2626
|
-
if (
|
|
2627
|
-
|
|
2628
|
-
const
|
|
2629
|
-
_.current ?
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2663
|
+
ae();
|
|
2664
|
+
}, [o]), de = H(() => {
|
|
2665
|
+
if (U.current.length === 0 || k.current) return;
|
|
2666
|
+
S(!0);
|
|
2667
|
+
const O = U.current[Z.current];
|
|
2668
|
+
_.current ? ie(() => {
|
|
2669
|
+
Q(O, () => {
|
|
2670
|
+
W.current = window.setTimeout(() => {
|
|
2671
|
+
v((M) => (M + 1) % U.current.length), S(!1);
|
|
2633
2672
|
}, 2e3);
|
|
2634
2673
|
});
|
|
2635
|
-
}) :
|
|
2636
|
-
|
|
2637
|
-
|
|
2674
|
+
}) : Q(O, () => {
|
|
2675
|
+
W.current = window.setTimeout(() => {
|
|
2676
|
+
v((M) => (M + 1) % U.current.length), S(!1);
|
|
2638
2677
|
}, 2e3);
|
|
2639
2678
|
});
|
|
2640
|
-
}, [
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
}), [
|
|
2644
|
-
!
|
|
2645
|
-
}, [
|
|
2646
|
-
const
|
|
2647
|
-
|
|
2648
|
-
},
|
|
2649
|
-
|
|
2650
|
-
},
|
|
2651
|
-
const
|
|
2652
|
-
|
|
2653
|
-
},
|
|
2654
|
-
const
|
|
2655
|
-
|
|
2656
|
-
},
|
|
2657
|
-
(
|
|
2658
|
-
},
|
|
2659
|
-
return /* @__PURE__ */
|
|
2660
|
-
/* @__PURE__ */
|
|
2661
|
-
/* @__PURE__ */
|
|
2679
|
+
}, [ie, Q]);
|
|
2680
|
+
ne(() => (r && t.length > 0 && !h && de(), () => {
|
|
2681
|
+
W.current && window.clearTimeout(W.current), F.current && window.clearTimeout(F.current);
|
|
2682
|
+
}), [c, h, r, t.length, de]), ne(() => {
|
|
2683
|
+
!w && r && t.length > 0 && !h && de();
|
|
2684
|
+
}, [c, w, r, t.length, h, de]);
|
|
2685
|
+
const s = (O) => {
|
|
2686
|
+
R(!0), W.current && window.clearTimeout(W.current), F.current && window.clearTimeout(F.current), S(!1), L(!1), d.onFocus?.(O);
|
|
2687
|
+
}, I = (O) => {
|
|
2688
|
+
R(!1), !a && t.length > 0 && (T(""), v(0)), d.onBlur?.(O);
|
|
2689
|
+
}, X = (O) => {
|
|
2690
|
+
const M = O.target.value;
|
|
2691
|
+
g && M.length > g || (m ? m(M) : P(M), d.onChange?.(O));
|
|
2692
|
+
}, ee = () => {
|
|
2693
|
+
const O = m ? a : D;
|
|
2694
|
+
O.trim() && !x && (C?.(O), m || P(""));
|
|
2695
|
+
}, ue = (O) => {
|
|
2696
|
+
(O.ctrlKey || O.metaKey) && O.key === "Enter" && (O.preventDefault(), ee()), d.onKeyDown?.(O);
|
|
2697
|
+
}, re = m ? a : D, ye = x || !re.trim() || (g ? re.length > g : !1);
|
|
2698
|
+
return /* @__PURE__ */ n.jsxs("div", { style: { position: "relative", ...N }, children: [
|
|
2699
|
+
/* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
|
|
2700
|
+
/* @__PURE__ */ n.jsx(
|
|
2662
2701
|
"textarea",
|
|
2663
2702
|
{
|
|
2664
|
-
ref:
|
|
2665
|
-
value:
|
|
2666
|
-
onChange:
|
|
2667
|
-
onFocus: (
|
|
2668
|
-
|
|
2703
|
+
ref: J,
|
|
2704
|
+
value: m ? a : D,
|
|
2705
|
+
onChange: X,
|
|
2706
|
+
onFocus: (O) => {
|
|
2707
|
+
O.target.style.borderColor = "#1890ff", O.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", s(O);
|
|
2669
2708
|
},
|
|
2670
|
-
onBlur: (
|
|
2671
|
-
|
|
2709
|
+
onBlur: (O) => {
|
|
2710
|
+
O.target.style.borderColor = "#d9d9d9", O.target.style.boxShadow = "none", I(O);
|
|
2672
2711
|
},
|
|
2673
|
-
onKeyDown:
|
|
2674
|
-
placeholder:
|
|
2675
|
-
maxLength:
|
|
2676
|
-
rows:
|
|
2677
|
-
disabled:
|
|
2712
|
+
onKeyDown: ue,
|
|
2713
|
+
placeholder: h || re ? p : "",
|
|
2714
|
+
maxLength: g,
|
|
2715
|
+
rows: u,
|
|
2716
|
+
disabled: x,
|
|
2678
2717
|
style: {
|
|
2679
2718
|
width: "100%",
|
|
2680
|
-
minHeight: `${
|
|
2719
|
+
minHeight: `${u * 24 + 16}px`,
|
|
2681
2720
|
padding: "8px 60px 8px 12px",
|
|
2682
2721
|
// 右侧留出按钮空间
|
|
2683
2722
|
border: "1px solid #d9d9d9",
|
|
@@ -2690,12 +2729,12 @@ const Ct = ({
|
|
|
2690
2729
|
transition: "border-color 0.3s, box-shadow 0.3s",
|
|
2691
2730
|
backgroundColor: "#fff",
|
|
2692
2731
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2693
|
-
...
|
|
2732
|
+
...d.style
|
|
2694
2733
|
},
|
|
2695
|
-
...
|
|
2734
|
+
...d
|
|
2696
2735
|
}
|
|
2697
2736
|
),
|
|
2698
|
-
!
|
|
2737
|
+
!h && !re && i && /* @__PURE__ */ n.jsxs(
|
|
2699
2738
|
"div",
|
|
2700
2739
|
{
|
|
2701
2740
|
style: {
|
|
@@ -2717,8 +2756,8 @@ const Ct = ({
|
|
|
2717
2756
|
lineHeight: "1.5"
|
|
2718
2757
|
},
|
|
2719
2758
|
children: [
|
|
2720
|
-
/* @__PURE__ */
|
|
2721
|
-
|
|
2759
|
+
/* @__PURE__ */ n.jsx("span", { children: i }),
|
|
2760
|
+
q && /* @__PURE__ */ n.jsx(
|
|
2722
2761
|
"span",
|
|
2723
2762
|
{
|
|
2724
2763
|
style: {
|
|
@@ -2734,7 +2773,7 @@ const Ct = ({
|
|
|
2734
2773
|
]
|
|
2735
2774
|
}
|
|
2736
2775
|
),
|
|
2737
|
-
/* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ n.jsx(
|
|
2738
2777
|
"div",
|
|
2739
2778
|
{
|
|
2740
2779
|
style: {
|
|
@@ -2743,14 +2782,14 @@ const Ct = ({
|
|
|
2743
2782
|
right: 8,
|
|
2744
2783
|
zIndex: 3
|
|
2745
2784
|
},
|
|
2746
|
-
children: /* @__PURE__ */
|
|
2747
|
-
|
|
2785
|
+
children: /* @__PURE__ */ n.jsx(
|
|
2786
|
+
he,
|
|
2748
2787
|
{
|
|
2749
2788
|
type: "primary",
|
|
2750
2789
|
size: "small",
|
|
2751
|
-
icon: /* @__PURE__ */
|
|
2752
|
-
onClick:
|
|
2753
|
-
disabled:
|
|
2790
|
+
icon: /* @__PURE__ */ n.jsx(nt, {}),
|
|
2791
|
+
onClick: ee,
|
|
2792
|
+
disabled: ye,
|
|
2754
2793
|
style: {
|
|
2755
2794
|
borderRadius: 6,
|
|
2756
2795
|
minWidth: 32,
|
|
@@ -2759,13 +2798,13 @@ const Ct = ({
|
|
|
2759
2798
|
alignItems: "center",
|
|
2760
2799
|
justifyContent: "center"
|
|
2761
2800
|
},
|
|
2762
|
-
children:
|
|
2801
|
+
children: e
|
|
2763
2802
|
}
|
|
2764
2803
|
)
|
|
2765
2804
|
}
|
|
2766
2805
|
)
|
|
2767
2806
|
] }),
|
|
2768
|
-
|
|
2807
|
+
l && /* @__PURE__ */ n.jsxs(
|
|
2769
2808
|
"div",
|
|
2770
2809
|
{
|
|
2771
2810
|
style: {
|
|
@@ -2775,13 +2814,13 @@ const Ct = ({
|
|
|
2775
2814
|
color: "#999"
|
|
2776
2815
|
},
|
|
2777
2816
|
children: [
|
|
2778
|
-
|
|
2817
|
+
re.length,
|
|
2779
2818
|
"/",
|
|
2780
|
-
|
|
2819
|
+
g
|
|
2781
2820
|
]
|
|
2782
2821
|
}
|
|
2783
2822
|
),
|
|
2784
|
-
/* @__PURE__ */
|
|
2823
|
+
/* @__PURE__ */ n.jsx("style", { children: `
|
|
2785
2824
|
@keyframes blink {
|
|
2786
2825
|
0%, 50% { opacity: 1; }
|
|
2787
2826
|
51%, 100% { opacity: 0; }
|
|
@@ -2789,7 +2828,7 @@ const Ct = ({
|
|
|
2789
2828
|
` })
|
|
2790
2829
|
] });
|
|
2791
2830
|
};
|
|
2792
|
-
|
|
2831
|
+
It.__docgenInfo = {
|
|
2793
2832
|
displayName: "DynamicTextArea",
|
|
2794
2833
|
description: "动态文案文本域组件,支持流式文字动画效果",
|
|
2795
2834
|
props: {
|
|
@@ -2875,96 +2914,96 @@ Ct.__docgenInfo = {
|
|
|
2875
2914
|
}
|
|
2876
2915
|
}
|
|
2877
2916
|
};
|
|
2878
|
-
const
|
|
2917
|
+
const Oe = ({
|
|
2879
2918
|
src: t,
|
|
2880
|
-
poster:
|
|
2881
|
-
width:
|
|
2882
|
-
height:
|
|
2883
|
-
videoWidth:
|
|
2919
|
+
poster: p,
|
|
2920
|
+
width: o = 300,
|
|
2921
|
+
height: r,
|
|
2922
|
+
videoWidth: a,
|
|
2884
2923
|
// 参数保留但不使用,由CSS控制
|
|
2885
|
-
videoHeight:
|
|
2924
|
+
videoHeight: m,
|
|
2886
2925
|
// 参数保留但不使用,由CSS控制
|
|
2887
|
-
showPlayButton:
|
|
2888
|
-
autoPlayOnHover:
|
|
2889
|
-
onClick:
|
|
2890
|
-
onVideoLoaded:
|
|
2891
|
-
onVideoPlay:
|
|
2892
|
-
onVideoPause:
|
|
2926
|
+
showPlayButton: C = !0,
|
|
2927
|
+
autoPlayOnHover: g = !0,
|
|
2928
|
+
onClick: l,
|
|
2929
|
+
onVideoLoaded: e,
|
|
2930
|
+
onVideoPlay: x,
|
|
2931
|
+
onVideoPause: u,
|
|
2893
2932
|
onVideoEnded: N,
|
|
2894
|
-
className:
|
|
2895
|
-
style:
|
|
2896
|
-
...
|
|
2933
|
+
className: d,
|
|
2934
|
+
style: i,
|
|
2935
|
+
...T
|
|
2897
2936
|
}) => {
|
|
2898
|
-
const
|
|
2899
|
-
|
|
2900
|
-
}, [
|
|
2901
|
-
|
|
2902
|
-
}, [
|
|
2903
|
-
|
|
2904
|
-
}, [
|
|
2905
|
-
|
|
2906
|
-
}, [
|
|
2907
|
-
|
|
2908
|
-
}, [
|
|
2909
|
-
|
|
2910
|
-
}, [
|
|
2911
|
-
|
|
2912
|
-
}, [
|
|
2913
|
-
|
|
2914
|
-
}, [
|
|
2915
|
-
|
|
2916
|
-
}, [N]),
|
|
2917
|
-
|
|
2918
|
-
}, [
|
|
2919
|
-
return /* @__PURE__ */
|
|
2920
|
-
|
|
2937
|
+
const c = G(null), [v, w] = Y(!1), [S, h] = Y(!1), [R, q] = Y(!1), L = H(() => {
|
|
2938
|
+
c.current && (c.current.play(), w(!0), x?.());
|
|
2939
|
+
}, [x]), D = H(() => {
|
|
2940
|
+
c.current && (c.current.pause(), w(!1), u?.());
|
|
2941
|
+
}, [u]), P = H((Q) => {
|
|
2942
|
+
Q.stopPropagation(), v ? D() : L();
|
|
2943
|
+
}, [v, L, D]), W = H(() => {
|
|
2944
|
+
h(!0), g && !v && L();
|
|
2945
|
+
}, [g, v, L]), F = H(() => {
|
|
2946
|
+
h(!1), g && v && D();
|
|
2947
|
+
}, [g, v, D]), U = H(() => {
|
|
2948
|
+
q(!0), e?.();
|
|
2949
|
+
}, [e]), Z = H(() => {
|
|
2950
|
+
w(!0), x?.();
|
|
2951
|
+
}, [x]), k = H(() => {
|
|
2952
|
+
w(!1), u?.();
|
|
2953
|
+
}, [u]), _ = H(() => {
|
|
2954
|
+
w(!1), N?.();
|
|
2955
|
+
}, [N]), J = H((Q) => {
|
|
2956
|
+
l?.(Q);
|
|
2957
|
+
}, [l]);
|
|
2958
|
+
return /* @__PURE__ */ n.jsx(
|
|
2959
|
+
Se,
|
|
2921
2960
|
{
|
|
2922
|
-
...
|
|
2923
|
-
className: `video-card ${
|
|
2961
|
+
...T,
|
|
2962
|
+
className: `video-card ${d || ""}`,
|
|
2924
2963
|
style: {
|
|
2925
|
-
width:
|
|
2926
|
-
height:
|
|
2964
|
+
width: o,
|
|
2965
|
+
height: r,
|
|
2927
2966
|
padding: 0,
|
|
2928
2967
|
overflow: "hidden",
|
|
2929
|
-
cursor:
|
|
2968
|
+
cursor: l ? "pointer" : "default",
|
|
2930
2969
|
border: "none",
|
|
2931
2970
|
borderRadius: 0,
|
|
2932
|
-
...
|
|
2971
|
+
...i
|
|
2933
2972
|
},
|
|
2934
2973
|
bordered: !1,
|
|
2935
|
-
onMouseEnter:
|
|
2936
|
-
onMouseLeave:
|
|
2937
|
-
onClick:
|
|
2938
|
-
children: /* @__PURE__ */
|
|
2939
|
-
/* @__PURE__ */
|
|
2974
|
+
onMouseEnter: W,
|
|
2975
|
+
onMouseLeave: F,
|
|
2976
|
+
onClick: J,
|
|
2977
|
+
children: /* @__PURE__ */ n.jsxs("div", { className: "video-card-container", children: [
|
|
2978
|
+
/* @__PURE__ */ n.jsx(
|
|
2940
2979
|
"video",
|
|
2941
2980
|
{
|
|
2942
|
-
ref:
|
|
2981
|
+
ref: c,
|
|
2943
2982
|
src: t,
|
|
2944
|
-
poster:
|
|
2983
|
+
poster: p,
|
|
2945
2984
|
preload: "metadata",
|
|
2946
|
-
onLoadedData:
|
|
2985
|
+
onLoadedData: U,
|
|
2947
2986
|
onPlay: Z,
|
|
2948
|
-
onPause:
|
|
2987
|
+
onPause: k,
|
|
2949
2988
|
onEnded: _,
|
|
2950
2989
|
muted: !0,
|
|
2951
2990
|
loop: !0
|
|
2952
2991
|
}
|
|
2953
2992
|
),
|
|
2954
|
-
|
|
2993
|
+
C && /* @__PURE__ */ n.jsx(
|
|
2955
2994
|
"div",
|
|
2956
2995
|
{
|
|
2957
|
-
className: `video-play-button ${
|
|
2958
|
-
onClick:
|
|
2959
|
-
children:
|
|
2996
|
+
className: `video-play-button ${S ? "hovered" : ""}`,
|
|
2997
|
+
onClick: P,
|
|
2998
|
+
children: v ? /* @__PURE__ */ n.jsx(rt, { className: "play-icon" }) : /* @__PURE__ */ n.jsx(at, { className: "play-icon" })
|
|
2960
2999
|
}
|
|
2961
3000
|
),
|
|
2962
|
-
!
|
|
3001
|
+
!R && /* @__PURE__ */ n.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ n.jsx("div", { className: "loading-spinner" }) })
|
|
2963
3002
|
] })
|
|
2964
3003
|
}
|
|
2965
3004
|
);
|
|
2966
3005
|
};
|
|
2967
|
-
|
|
3006
|
+
Oe.__docgenInfo = {
|
|
2968
3007
|
displayName: "VideoCard",
|
|
2969
3008
|
description: "视频卡片组件,支持鼠标悬浮播放控制",
|
|
2970
3009
|
props: {
|
|
@@ -3065,12 +3104,12 @@ _e.__docgenInfo = {
|
|
|
3065
3104
|
}
|
|
3066
3105
|
}
|
|
3067
3106
|
};
|
|
3068
|
-
const
|
|
3107
|
+
const Lt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((o) => t.toLowerCase().includes(o)), Vt = (t) => t.type ? t.type : Lt(t.url) ? "video" : "image", Pt = ({
|
|
3069
3108
|
items: t,
|
|
3070
|
-
columns:
|
|
3071
|
-
gap:
|
|
3072
|
-
responsive:
|
|
3073
|
-
breakpoints:
|
|
3109
|
+
columns: p,
|
|
3110
|
+
gap: o = 0,
|
|
3111
|
+
responsive: r = !0,
|
|
3112
|
+
breakpoints: a = {
|
|
3074
3113
|
xs: 1,
|
|
3075
3114
|
sm: 2,
|
|
3076
3115
|
md: 3,
|
|
@@ -3078,108 +3117,108 @@ const St = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
3078
3117
|
xl: 5,
|
|
3079
3118
|
xxl: 6
|
|
3080
3119
|
},
|
|
3081
|
-
className:
|
|
3082
|
-
style:
|
|
3083
|
-
onClick:
|
|
3120
|
+
className: m,
|
|
3121
|
+
style: C,
|
|
3122
|
+
onClick: g
|
|
3084
3123
|
}) => {
|
|
3085
|
-
const
|
|
3086
|
-
if (!
|
|
3087
|
-
return
|
|
3088
|
-
const
|
|
3089
|
-
return
|
|
3090
|
-
}, [
|
|
3091
|
-
if (!
|
|
3092
|
-
const
|
|
3093
|
-
t.forEach((
|
|
3094
|
-
const
|
|
3095
|
-
if (!
|
|
3096
|
-
const
|
|
3097
|
-
|
|
3124
|
+
const l = G(null), [e, x] = Y(p || a.md || 3), u = G(/* @__PURE__ */ new Map()), N = H(() => {
|
|
3125
|
+
if (!r || p)
|
|
3126
|
+
return p || a.md || 3;
|
|
3127
|
+
const c = window.innerWidth;
|
|
3128
|
+
return c < 576 ? a.xs || 1 : c < 768 ? a.sm || 2 : c < 992 ? a.md || 3 : c < 1200 ? a.lg || 4 : c < 1600 ? a.xl || 5 : a.xxl || 6;
|
|
3129
|
+
}, [r, p, a]), d = H(() => {
|
|
3130
|
+
if (!l.current) return;
|
|
3131
|
+
const c = e, v = l.current, S = (v.offsetWidth - o * (c - 1)) / c, h = new Array(c).fill(0);
|
|
3132
|
+
t.forEach((q, L) => {
|
|
3133
|
+
const D = q.id || L, P = u.current.get(D);
|
|
3134
|
+
if (!P) return;
|
|
3135
|
+
const W = Math.min(...h), F = h.indexOf(W), U = F * (S + o), Z = h[F];
|
|
3136
|
+
P.style.position = "absolute", P.style.left = `${U}px`, P.style.top = `${Z}px`, P.style.width = `${S}px`, h[F] += P.offsetHeight + o;
|
|
3098
3137
|
});
|
|
3099
|
-
const
|
|
3100
|
-
|
|
3101
|
-
}, [t,
|
|
3102
|
-
|
|
3103
|
-
const
|
|
3104
|
-
const
|
|
3105
|
-
|
|
3138
|
+
const R = Math.max(...h);
|
|
3139
|
+
v.style.height = `${R}px`;
|
|
3140
|
+
}, [t, e, o]);
|
|
3141
|
+
ne(() => {
|
|
3142
|
+
const c = () => {
|
|
3143
|
+
const v = N();
|
|
3144
|
+
v !== e && x(v);
|
|
3106
3145
|
};
|
|
3107
|
-
if (
|
|
3108
|
-
return window.addEventListener("resize",
|
|
3109
|
-
}, [
|
|
3110
|
-
const
|
|
3111
|
-
|
|
3146
|
+
if (r)
|
|
3147
|
+
return window.addEventListener("resize", c), c(), () => window.removeEventListener("resize", c);
|
|
3148
|
+
}, [r, N, e]), ne(() => {
|
|
3149
|
+
const c = setTimeout(() => {
|
|
3150
|
+
d();
|
|
3112
3151
|
}, 100);
|
|
3113
|
-
return () => clearTimeout(
|
|
3114
|
-
}, [t,
|
|
3115
|
-
const
|
|
3116
|
-
|
|
3117
|
-
}, [
|
|
3118
|
-
|
|
3119
|
-
}, [
|
|
3120
|
-
return /* @__PURE__ */
|
|
3152
|
+
return () => clearTimeout(c);
|
|
3153
|
+
}, [t, e, d]);
|
|
3154
|
+
const i = H(() => {
|
|
3155
|
+
d();
|
|
3156
|
+
}, [d]), T = H((c) => {
|
|
3157
|
+
g && g(c), c.onClick?.(c);
|
|
3158
|
+
}, [g]);
|
|
3159
|
+
return /* @__PURE__ */ n.jsx(
|
|
3121
3160
|
"div",
|
|
3122
3161
|
{
|
|
3123
|
-
ref:
|
|
3124
|
-
className: `waterfall-container ${
|
|
3162
|
+
ref: l,
|
|
3163
|
+
className: `waterfall-container ${m || ""}`,
|
|
3125
3164
|
style: {
|
|
3126
3165
|
position: "relative",
|
|
3127
3166
|
width: "100%",
|
|
3128
|
-
...
|
|
3167
|
+
...C
|
|
3129
3168
|
},
|
|
3130
|
-
children: t.map((
|
|
3131
|
-
const
|
|
3132
|
-
return /* @__PURE__ */
|
|
3169
|
+
children: t.map((c, v) => {
|
|
3170
|
+
const w = c.id || v, S = Vt(c);
|
|
3171
|
+
return /* @__PURE__ */ n.jsx(
|
|
3133
3172
|
"div",
|
|
3134
3173
|
{
|
|
3135
|
-
ref: (
|
|
3136
|
-
|
|
3174
|
+
ref: (h) => {
|
|
3175
|
+
h ? u.current.set(w, h) : u.current.delete(w);
|
|
3137
3176
|
},
|
|
3138
3177
|
className: "waterfall-item",
|
|
3139
|
-
children:
|
|
3178
|
+
children: S === "video" ? /* @__PURE__ */ n.jsx("div", { style: {
|
|
3140
3179
|
width: "100%",
|
|
3141
3180
|
position: "relative",
|
|
3142
3181
|
paddingBottom: "56.25%",
|
|
3143
|
-
cursor:
|
|
3144
|
-
}, children: /* @__PURE__ */
|
|
3145
|
-
|
|
3182
|
+
cursor: g || c.onClick ? "pointer" : "default"
|
|
3183
|
+
}, children: /* @__PURE__ */ n.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ n.jsx(
|
|
3184
|
+
Oe,
|
|
3146
3185
|
{
|
|
3147
|
-
src:
|
|
3148
|
-
poster:
|
|
3186
|
+
src: c.url,
|
|
3187
|
+
poster: c.poster,
|
|
3149
3188
|
width: "100%",
|
|
3150
3189
|
height: "100%",
|
|
3151
|
-
onClick: () =>
|
|
3152
|
-
onVideoLoaded:
|
|
3190
|
+
onClick: () => T(c),
|
|
3191
|
+
onVideoLoaded: i,
|
|
3153
3192
|
autoPlayOnHover: !0,
|
|
3154
3193
|
showPlayButton: !1
|
|
3155
3194
|
}
|
|
3156
|
-
) }) }) : /* @__PURE__ */
|
|
3195
|
+
) }) }) : /* @__PURE__ */ n.jsx(
|
|
3157
3196
|
"div",
|
|
3158
3197
|
{
|
|
3159
3198
|
className: "waterfall-image-wrapper",
|
|
3160
|
-
onClick: () =>
|
|
3161
|
-
style: { cursor:
|
|
3162
|
-
children: /* @__PURE__ */
|
|
3199
|
+
onClick: () => T(c),
|
|
3200
|
+
style: { cursor: g || c.onClick ? "pointer" : "default" },
|
|
3201
|
+
children: /* @__PURE__ */ n.jsx(
|
|
3163
3202
|
"img",
|
|
3164
3203
|
{
|
|
3165
|
-
src:
|
|
3166
|
-
alt: `瀑布流图片 ${
|
|
3204
|
+
src: c.url,
|
|
3205
|
+
alt: `瀑布流图片 ${v + 1}`,
|
|
3167
3206
|
className: "waterfall-image",
|
|
3168
|
-
onLoad:
|
|
3169
|
-
onError:
|
|
3207
|
+
onLoad: i,
|
|
3208
|
+
onError: i,
|
|
3170
3209
|
style: { display: "block", width: "100%", height: "auto" }
|
|
3171
3210
|
}
|
|
3172
3211
|
)
|
|
3173
3212
|
}
|
|
3174
3213
|
)
|
|
3175
3214
|
},
|
|
3176
|
-
|
|
3215
|
+
w
|
|
3177
3216
|
);
|
|
3178
3217
|
})
|
|
3179
3218
|
}
|
|
3180
3219
|
);
|
|
3181
3220
|
};
|
|
3182
|
-
|
|
3221
|
+
Pt.__docgenInfo = {
|
|
3183
3222
|
displayName: "Waterfall",
|
|
3184
3223
|
description: "瀑布流布局组件,支持图片和视频混合展示",
|
|
3185
3224
|
props: {
|
|
@@ -3235,8 +3274,8 @@ At.__docgenInfo = {
|
|
|
3235
3274
|
}
|
|
3236
3275
|
}
|
|
3237
3276
|
};
|
|
3238
|
-
const
|
|
3239
|
-
algorithm:
|
|
3277
|
+
const Gt = {
|
|
3278
|
+
algorithm: Je.defaultAlgorithm,
|
|
3240
3279
|
token: {
|
|
3241
3280
|
// 主色
|
|
3242
3281
|
colorPrimary: "#3b82f6",
|
|
@@ -3302,21 +3341,21 @@ const It = {
|
|
|
3302
3341
|
}
|
|
3303
3342
|
};
|
|
3304
3343
|
export {
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3344
|
+
xt as AdvancedTable,
|
|
3345
|
+
dt as AppModal,
|
|
3346
|
+
gt as BackButton,
|
|
3347
|
+
ct as Button,
|
|
3348
|
+
ut as Card,
|
|
3349
|
+
Rt as DynamicInput,
|
|
3350
|
+
It as DynamicTextArea,
|
|
3351
|
+
yt as EmptyAndSpin,
|
|
3352
|
+
ht as LinkButton,
|
|
3353
|
+
pt as PageTable,
|
|
3354
|
+
qt as RichTextEditor,
|
|
3355
|
+
Oe as VideoCard,
|
|
3356
|
+
_t as VirtualTable,
|
|
3357
|
+
Pt as Waterfall,
|
|
3358
|
+
mt as XcIcon,
|
|
3359
|
+
Gt as lightTheme
|
|
3321
3360
|
};
|
|
3322
3361
|
//# sourceMappingURL=index.es.js.map
|