bi-components-library 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bi-components-library.css +1 -1
- package/dist/index.es.js +1639 -644
- 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 +9 -15
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Button as
|
|
3
|
-
import { createFromIconfontCN as
|
|
4
|
-
|
|
1
|
+
import Ne, { useState as z, useRef as W, useMemo as Ce, useCallback as B, useEffect as J } from "react";
|
|
2
|
+
import { Button as le, Card as he, Modal as qe, Table as we, Flex as ge, Spin as Se, Empty as $e, Select as Ee, Form as ue, Input as ke, Space as Re, Dropdown as Ae, Tooltip as _e, theme as je } from "antd";
|
|
3
|
+
import { createFromIconfontCN as Ie, LeftOutlined as Le, SearchOutlined as Ve, ReloadOutlined as Oe, SendOutlined as Pe, PauseCircleOutlined as Me, PlayCircleOutlined as De } from "@ant-design/icons";
|
|
4
|
+
import { createPortal as Ge } from "react-dom";
|
|
5
|
+
var de = { exports: {} }, ie = {};
|
|
5
6
|
/**
|
|
6
7
|
* @license React
|
|
7
8
|
* react-jsx-runtime.production.js
|
|
@@ -11,29 +12,29 @@ var ne = { exports: {} }, Z = {};
|
|
|
11
12
|
* This source code is licensed under the MIT license found in the
|
|
12
13
|
* LICENSE file in the root directory of this source tree.
|
|
13
14
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
var n = Symbol.for("react.transitional.element"),
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
for (var
|
|
24
|
-
|
|
25
|
-
} else
|
|
26
|
-
return o =
|
|
15
|
+
var be;
|
|
16
|
+
function Fe() {
|
|
17
|
+
if (be) return ie;
|
|
18
|
+
be = 1;
|
|
19
|
+
var n = Symbol.for("react.transitional.element"), m = Symbol.for("react.fragment");
|
|
20
|
+
function c(a, o, h) {
|
|
21
|
+
var q = null;
|
|
22
|
+
if (h !== void 0 && (q = "" + h), o.key !== void 0 && (q = "" + o.key), "key" in o) {
|
|
23
|
+
h = {};
|
|
24
|
+
for (var p in o)
|
|
25
|
+
p !== "key" && (h[p] = o[p]);
|
|
26
|
+
} else h = o;
|
|
27
|
+
return o = h.ref, {
|
|
27
28
|
$$typeof: n,
|
|
28
|
-
type:
|
|
29
|
-
key:
|
|
29
|
+
type: a,
|
|
30
|
+
key: q,
|
|
30
31
|
ref: o !== void 0 ? o : null,
|
|
31
|
-
props:
|
|
32
|
+
props: h
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
|
-
return
|
|
35
|
+
return ie.Fragment = m, ie.jsx = c, ie.jsxs = c, ie;
|
|
35
36
|
}
|
|
36
|
-
var
|
|
37
|
+
var ce = {};
|
|
37
38
|
/**
|
|
38
39
|
* @license React
|
|
39
40
|
* react-jsx-runtime.development.js
|
|
@@ -43,252 +44,252 @@ var ee = {};
|
|
|
43
44
|
* This source code is licensed under the MIT license found in the
|
|
44
45
|
* LICENSE file in the root directory of this source tree.
|
|
45
46
|
*/
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
return
|
|
49
|
-
function n(
|
|
50
|
-
if (
|
|
51
|
-
if (typeof
|
|
52
|
-
return
|
|
53
|
-
if (typeof
|
|
54
|
-
switch (
|
|
55
|
-
case
|
|
47
|
+
var xe;
|
|
48
|
+
function Be() {
|
|
49
|
+
return xe || (xe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
+
function n(l) {
|
|
51
|
+
if (l == null) return null;
|
|
52
|
+
if (typeof l == "function")
|
|
53
|
+
return l.$$typeof === H ? null : l.displayName || l.name || null;
|
|
54
|
+
if (typeof l == "string") return l;
|
|
55
|
+
switch (l) {
|
|
56
|
+
case v:
|
|
56
57
|
return "Fragment";
|
|
57
|
-
case
|
|
58
|
+
case w:
|
|
58
59
|
return "Profiler";
|
|
59
|
-
case
|
|
60
|
+
case x:
|
|
60
61
|
return "StrictMode";
|
|
61
|
-
case
|
|
62
|
+
case C:
|
|
62
63
|
return "Suspense";
|
|
63
|
-
case
|
|
64
|
+
case O:
|
|
64
65
|
return "SuspenseList";
|
|
65
|
-
case
|
|
66
|
+
case P:
|
|
66
67
|
return "Activity";
|
|
67
68
|
}
|
|
68
|
-
if (typeof
|
|
69
|
-
switch (typeof
|
|
69
|
+
if (typeof l == "object")
|
|
70
|
+
switch (typeof l.tag == "number" && console.error(
|
|
70
71
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
71
|
-
),
|
|
72
|
-
case
|
|
72
|
+
), l.$$typeof) {
|
|
73
|
+
case R:
|
|
73
74
|
return "Portal";
|
|
74
|
-
case
|
|
75
|
-
return (
|
|
76
|
-
case b:
|
|
77
|
-
return (e._context.displayName || "Context") + ".Consumer";
|
|
78
|
-
case g:
|
|
79
|
-
var u = e.render;
|
|
80
|
-
return e = e.displayName, e || (e = u.displayName || u.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
75
|
+
case $:
|
|
76
|
+
return (l.displayName || "Context") + ".Provider";
|
|
81
77
|
case A:
|
|
82
|
-
return
|
|
83
|
-
case
|
|
84
|
-
|
|
78
|
+
return (l._context.displayName || "Context") + ".Consumer";
|
|
79
|
+
case S:
|
|
80
|
+
var r = l.render;
|
|
81
|
+
return l = l.displayName, l || (l = r.displayName || r.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
82
|
+
case I:
|
|
83
|
+
return r = l.displayName || null, r !== null ? r : n(l.type) || "Memo";
|
|
84
|
+
case D:
|
|
85
|
+
r = l._payload, l = l._init;
|
|
85
86
|
try {
|
|
86
|
-
return n(
|
|
87
|
+
return n(l(r));
|
|
87
88
|
} catch {
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
91
|
return null;
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
return "" +
|
|
93
|
+
function m(l) {
|
|
94
|
+
return "" + l;
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
+
function c(l) {
|
|
96
97
|
try {
|
|
97
|
-
|
|
98
|
-
var
|
|
98
|
+
m(l);
|
|
99
|
+
var r = !1;
|
|
99
100
|
} catch {
|
|
100
|
-
|
|
101
|
+
r = !0;
|
|
101
102
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
return
|
|
106
|
-
|
|
103
|
+
if (r) {
|
|
104
|
+
r = console;
|
|
105
|
+
var i = r.error, y = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
106
|
+
return i.call(
|
|
107
|
+
r,
|
|
107
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
|
-
|
|
109
|
-
),
|
|
109
|
+
y
|
|
110
|
+
), m(l);
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
function l
|
|
113
|
-
if (
|
|
114
|
-
if (typeof
|
|
113
|
+
function a(l) {
|
|
114
|
+
if (l === v) return "<>";
|
|
115
|
+
if (typeof l == "object" && l !== null && l.$$typeof === D)
|
|
115
116
|
return "<...>";
|
|
116
117
|
try {
|
|
117
|
-
var
|
|
118
|
-
return
|
|
118
|
+
var r = n(l);
|
|
119
|
+
return r ? "<" + r + ">" : "<...>";
|
|
119
120
|
} catch {
|
|
120
121
|
return "<...>";
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
124
|
function o() {
|
|
124
|
-
var
|
|
125
|
-
return
|
|
125
|
+
var l = G.A;
|
|
126
|
+
return l === null ? null : l.getOwner();
|
|
126
127
|
}
|
|
127
|
-
function
|
|
128
|
+
function h() {
|
|
128
129
|
return Error("react-stack-top-frame");
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
132
|
-
var
|
|
133
|
-
if (
|
|
131
|
+
function q(l) {
|
|
132
|
+
if (K.call(l, "key")) {
|
|
133
|
+
var r = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
134
|
+
if (r && r.isReactWarning) return !1;
|
|
134
135
|
}
|
|
135
|
-
return
|
|
136
|
+
return l.key !== void 0;
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
-
function
|
|
139
|
-
|
|
138
|
+
function p(l, r) {
|
|
139
|
+
function i() {
|
|
140
|
+
_ || (_ = !0, console.error(
|
|
140
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)",
|
|
141
|
-
|
|
142
|
+
r
|
|
142
143
|
));
|
|
143
144
|
}
|
|
144
|
-
|
|
145
|
-
get:
|
|
145
|
+
i.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
146
|
+
get: i,
|
|
146
147
|
configurable: !0
|
|
147
148
|
});
|
|
148
149
|
}
|
|
149
|
-
function
|
|
150
|
-
var
|
|
151
|
-
return
|
|
150
|
+
function e() {
|
|
151
|
+
var l = n(this.type);
|
|
152
|
+
return F[l] || (F[l] = !0, console.error(
|
|
152
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."
|
|
153
|
-
)),
|
|
154
|
+
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
-
return
|
|
157
|
-
$$typeof:
|
|
158
|
-
type:
|
|
159
|
-
key:
|
|
160
|
-
props:
|
|
161
|
-
_owner:
|
|
162
|
-
}, (
|
|
156
|
+
function t(l, r, i, y, T, g, L, f) {
|
|
157
|
+
return i = g.ref, l = {
|
|
158
|
+
$$typeof: d,
|
|
159
|
+
type: l,
|
|
160
|
+
key: r,
|
|
161
|
+
props: g,
|
|
162
|
+
_owner: T
|
|
163
|
+
}, (i !== void 0 ? i : null) !== null ? Object.defineProperty(l, "ref", {
|
|
163
164
|
enumerable: !1,
|
|
164
|
-
get:
|
|
165
|
-
}) : Object.defineProperty(
|
|
165
|
+
get: e
|
|
166
|
+
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
166
167
|
configurable: !1,
|
|
167
168
|
enumerable: !1,
|
|
168
169
|
writable: !0,
|
|
169
170
|
value: 0
|
|
170
|
-
}), Object.defineProperty(
|
|
171
|
+
}), Object.defineProperty(l, "_debugInfo", {
|
|
171
172
|
configurable: !1,
|
|
172
173
|
enumerable: !1,
|
|
173
174
|
writable: !0,
|
|
174
175
|
value: null
|
|
175
|
-
}), Object.defineProperty(
|
|
176
|
+
}), Object.defineProperty(l, "_debugStack", {
|
|
176
177
|
configurable: !1,
|
|
177
178
|
enumerable: !1,
|
|
178
179
|
writable: !0,
|
|
179
|
-
value:
|
|
180
|
-
}), Object.defineProperty(
|
|
180
|
+
value: L
|
|
181
|
+
}), Object.defineProperty(l, "_debugTask", {
|
|
181
182
|
configurable: !1,
|
|
182
183
|
enumerable: !1,
|
|
183
184
|
writable: !0,
|
|
184
185
|
value: f
|
|
185
|
-
}), Object.freeze && (Object.freeze(
|
|
186
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
186
187
|
}
|
|
187
|
-
function
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
for (
|
|
193
|
-
|
|
194
|
-
Object.freeze && Object.freeze(
|
|
188
|
+
function N(l, r, i, y, T, g, L, f) {
|
|
189
|
+
var b = r.children;
|
|
190
|
+
if (b !== void 0)
|
|
191
|
+
if (y)
|
|
192
|
+
if (Q(b)) {
|
|
193
|
+
for (y = 0; y < b.length; y++)
|
|
194
|
+
s(b[y]);
|
|
195
|
+
Object.freeze && Object.freeze(b);
|
|
195
196
|
} else
|
|
196
197
|
console.error(
|
|
197
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."
|
|
198
199
|
);
|
|
199
|
-
else
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
return
|
|
200
|
+
else s(b);
|
|
201
|
+
if (K.call(r, "key")) {
|
|
202
|
+
b = n(l);
|
|
203
|
+
var V = Object.keys(r).filter(function(Y) {
|
|
204
|
+
return Y !== "key";
|
|
204
205
|
});
|
|
205
|
-
|
|
206
|
+
y = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", re[b + y] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
207
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
208
|
let props = %s;
|
|
208
209
|
<%s {...props} />
|
|
209
210
|
React keys must be passed directly to JSX without using spread:
|
|
210
211
|
let props = %s;
|
|
211
212
|
<%s key={someKey} {...props} />`,
|
|
212
|
-
O,
|
|
213
213
|
y,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
b,
|
|
215
|
+
V,
|
|
216
|
+
b
|
|
217
|
+
), re[b + y] = !0);
|
|
217
218
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
for (var
|
|
221
|
-
|
|
222
|
-
} else
|
|
223
|
-
return
|
|
224
|
-
|
|
225
|
-
typeof
|
|
226
|
-
),
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
219
|
+
if (b = null, i !== void 0 && (c(i), b = "" + i), q(r) && (c(r.key), b = "" + r.key), "key" in r) {
|
|
220
|
+
i = {};
|
|
221
|
+
for (var j in r)
|
|
222
|
+
j !== "key" && (i[j] = r[j]);
|
|
223
|
+
} else i = r;
|
|
224
|
+
return b && p(
|
|
225
|
+
i,
|
|
226
|
+
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
227
|
+
), t(
|
|
228
|
+
l,
|
|
229
|
+
b,
|
|
230
|
+
g,
|
|
231
|
+
T,
|
|
231
232
|
o(),
|
|
232
|
-
|
|
233
|
-
|
|
233
|
+
i,
|
|
234
|
+
L,
|
|
234
235
|
f
|
|
235
236
|
);
|
|
236
237
|
}
|
|
237
|
-
function
|
|
238
|
-
typeof
|
|
238
|
+
function s(l) {
|
|
239
|
+
typeof l == "object" && l !== null && l.$$typeof === d && l._store && (l._store.validated = 1);
|
|
239
240
|
}
|
|
240
|
-
var
|
|
241
|
+
var k = Ne, d = Symbol.for("react.transitional.element"), R = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), G = k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, Q = Array.isArray, E = console.createTask ? console.createTask : function() {
|
|
241
242
|
return null;
|
|
242
243
|
};
|
|
243
|
-
|
|
244
|
-
react_stack_bottom_frame: function(
|
|
245
|
-
return
|
|
244
|
+
k = {
|
|
245
|
+
react_stack_bottom_frame: function(l) {
|
|
246
|
+
return l();
|
|
246
247
|
}
|
|
247
248
|
};
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)(),
|
|
252
|
-
|
|
253
|
-
var
|
|
254
|
-
return
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
249
|
+
var _, F = {}, X = k.react_stack_bottom_frame.bind(
|
|
250
|
+
k,
|
|
251
|
+
h
|
|
252
|
+
)(), ne = E(a(h)), re = {};
|
|
253
|
+
ce.Fragment = v, ce.jsx = function(l, r, i, y, T) {
|
|
254
|
+
var g = 1e4 > G.recentlyCreatedOwnerStacks++;
|
|
255
|
+
return N(
|
|
256
|
+
l,
|
|
257
|
+
r,
|
|
258
|
+
i,
|
|
258
259
|
!1,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
y,
|
|
261
|
+
T,
|
|
262
|
+
g ? Error("react-stack-top-frame") : X,
|
|
263
|
+
g ? E(a(l)) : ne
|
|
263
264
|
);
|
|
264
|
-
},
|
|
265
|
-
var
|
|
266
|
-
return
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
265
|
+
}, ce.jsxs = function(l, r, i, y, T) {
|
|
266
|
+
var g = 1e4 > G.recentlyCreatedOwnerStacks++;
|
|
267
|
+
return N(
|
|
268
|
+
l,
|
|
269
|
+
r,
|
|
270
|
+
i,
|
|
270
271
|
!0,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
y,
|
|
273
|
+
T,
|
|
274
|
+
g ? Error("react-stack-top-frame") : X,
|
|
275
|
+
g ? E(a(l)) : ne
|
|
275
276
|
);
|
|
276
277
|
};
|
|
277
|
-
}()),
|
|
278
|
+
}()), ce;
|
|
278
279
|
}
|
|
279
|
-
var
|
|
280
|
-
function
|
|
281
|
-
return
|
|
280
|
+
var ve;
|
|
281
|
+
function ze() {
|
|
282
|
+
return ve || (ve = 1, process.env.NODE_ENV === "production" ? de.exports = Fe() : de.exports = Be()), de.exports;
|
|
282
283
|
}
|
|
283
|
-
var
|
|
284
|
-
const
|
|
284
|
+
var u = ze();
|
|
285
|
+
const He = ({
|
|
285
286
|
variant: n = "primary",
|
|
286
|
-
loading:
|
|
287
|
-
children:
|
|
288
|
-
...
|
|
287
|
+
loading: m = !1,
|
|
288
|
+
children: c,
|
|
289
|
+
...a
|
|
289
290
|
}) => {
|
|
290
|
-
const o = (
|
|
291
|
-
switch (
|
|
291
|
+
const o = (h) => {
|
|
292
|
+
switch (h) {
|
|
292
293
|
case "primary":
|
|
293
294
|
return "primary";
|
|
294
295
|
case "ghost":
|
|
@@ -303,18 +304,18 @@ const ke = ({
|
|
|
303
304
|
return "primary";
|
|
304
305
|
}
|
|
305
306
|
};
|
|
306
|
-
return /* @__PURE__ */
|
|
307
|
-
|
|
307
|
+
return /* @__PURE__ */ u.jsx(
|
|
308
|
+
le,
|
|
308
309
|
{
|
|
309
|
-
...
|
|
310
|
+
...a,
|
|
310
311
|
type: o(n),
|
|
311
|
-
loading:
|
|
312
|
+
loading: m,
|
|
312
313
|
ghost: n === "ghost",
|
|
313
|
-
children:
|
|
314
|
+
children: c
|
|
314
315
|
}
|
|
315
316
|
);
|
|
316
317
|
};
|
|
317
|
-
|
|
318
|
+
He.__docgenInfo = {
|
|
318
319
|
displayName: "Button",
|
|
319
320
|
description: "基础按钮,用于触发操作",
|
|
320
321
|
props: {
|
|
@@ -358,25 +359,25 @@ ke.__docgenInfo = {
|
|
|
358
359
|
}
|
|
359
360
|
}
|
|
360
361
|
};
|
|
361
|
-
const
|
|
362
|
+
const We = ({
|
|
362
363
|
title: n,
|
|
363
|
-
children:
|
|
364
|
-
bordered:
|
|
365
|
-
hoverable:
|
|
364
|
+
children: m,
|
|
365
|
+
bordered: c = !0,
|
|
366
|
+
hoverable: a = !1,
|
|
366
367
|
size: o = "default",
|
|
367
|
-
...
|
|
368
|
-
}) => /* @__PURE__ */
|
|
369
|
-
|
|
368
|
+
...h
|
|
369
|
+
}) => /* @__PURE__ */ u.jsx(
|
|
370
|
+
he,
|
|
370
371
|
{
|
|
371
|
-
...
|
|
372
|
+
...h,
|
|
372
373
|
title: n,
|
|
373
|
-
bordered:
|
|
374
|
-
hoverable:
|
|
374
|
+
bordered: c,
|
|
375
|
+
hoverable: a,
|
|
375
376
|
size: o,
|
|
376
|
-
children:
|
|
377
|
+
children: m
|
|
377
378
|
}
|
|
378
379
|
);
|
|
379
|
-
|
|
380
|
+
We.__docgenInfo = {
|
|
380
381
|
displayName: "Card",
|
|
381
382
|
description: "卡片容器,用于分组内容",
|
|
382
383
|
props: {
|
|
@@ -427,23 +428,23 @@ Ne.__docgenInfo = {
|
|
|
427
428
|
}
|
|
428
429
|
}
|
|
429
430
|
};
|
|
430
|
-
const
|
|
431
|
+
const Ke = ({
|
|
431
432
|
showDefaultFooter: n = !0,
|
|
432
|
-
...
|
|
433
|
+
...m
|
|
433
434
|
}) => {
|
|
434
|
-
const
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
435
|
+
const c = m.footer !== void 0 ? m.footer : n ? (a, { OkBtn: o, CancelBtn: h }) => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
436
|
+
/* @__PURE__ */ u.jsx(o, {}),
|
|
437
|
+
/* @__PURE__ */ u.jsx(h, {})
|
|
437
438
|
] }) : null;
|
|
438
|
-
return /* @__PURE__ */
|
|
439
|
-
|
|
439
|
+
return /* @__PURE__ */ u.jsx(
|
|
440
|
+
qe,
|
|
440
441
|
{
|
|
441
|
-
...
|
|
442
|
-
footer:
|
|
442
|
+
...m,
|
|
443
|
+
footer: c
|
|
443
444
|
}
|
|
444
445
|
);
|
|
445
446
|
};
|
|
446
|
-
|
|
447
|
+
Ke.__docgenInfo = {
|
|
447
448
|
displayName: "AppModal",
|
|
448
449
|
description: "应用级模态框组件,基于 Ant Design Modal 封装",
|
|
449
450
|
props: {
|
|
@@ -504,29 +505,29 @@ Ie.__docgenInfo = {
|
|
|
504
505
|
}
|
|
505
506
|
}
|
|
506
507
|
};
|
|
507
|
-
const
|
|
508
|
+
const Xe = ({
|
|
508
509
|
scrollX: n,
|
|
509
|
-
showPagination:
|
|
510
|
-
defaultPageSize:
|
|
511
|
-
...
|
|
512
|
-
}) => /* @__PURE__ */
|
|
513
|
-
|
|
510
|
+
showPagination: m = !0,
|
|
511
|
+
defaultPageSize: c = 10,
|
|
512
|
+
...a
|
|
513
|
+
}) => /* @__PURE__ */ u.jsx(
|
|
514
|
+
we,
|
|
514
515
|
{
|
|
515
|
-
...
|
|
516
|
+
...a,
|
|
516
517
|
scroll: {
|
|
517
518
|
x: n || "max-content",
|
|
518
519
|
y: "50vh"
|
|
519
520
|
},
|
|
520
|
-
pagination:
|
|
521
|
+
pagination: m ? {
|
|
521
522
|
hideOnSinglePage: !0,
|
|
522
523
|
showSizeChanger: !0,
|
|
523
524
|
showQuickJumper: !0,
|
|
524
|
-
defaultPageSize:
|
|
525
|
-
...
|
|
525
|
+
defaultPageSize: c,
|
|
526
|
+
...a.pagination
|
|
526
527
|
} : !1
|
|
527
528
|
}
|
|
528
529
|
);
|
|
529
|
-
|
|
530
|
+
Xe.__docgenInfo = {
|
|
530
531
|
displayName: "PageTable",
|
|
531
532
|
description: "页面级表格组件,高度铺满容器,自动滚动",
|
|
532
533
|
props: {
|
|
@@ -576,30 +577,30 @@ Pe.__docgenInfo = {
|
|
|
576
577
|
}
|
|
577
578
|
}
|
|
578
579
|
};
|
|
579
|
-
const
|
|
580
|
+
const Ye = Ie({
|
|
580
581
|
scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
|
|
581
|
-
}),
|
|
582
|
+
}), Ue = ({
|
|
582
583
|
name: n,
|
|
583
|
-
size:
|
|
584
|
-
color:
|
|
585
|
-
style:
|
|
584
|
+
size: m,
|
|
585
|
+
color: c,
|
|
586
|
+
style: a,
|
|
586
587
|
...o
|
|
587
588
|
}) => {
|
|
588
|
-
const
|
|
589
|
-
fontSize:
|
|
590
|
-
color:
|
|
591
|
-
...
|
|
589
|
+
const h = {
|
|
590
|
+
fontSize: m,
|
|
591
|
+
color: c,
|
|
592
|
+
...a
|
|
592
593
|
};
|
|
593
|
-
return /* @__PURE__ */
|
|
594
|
-
|
|
594
|
+
return /* @__PURE__ */ u.jsx(
|
|
595
|
+
Ye,
|
|
595
596
|
{
|
|
596
597
|
...o,
|
|
597
598
|
type: n,
|
|
598
|
-
style:
|
|
599
|
+
style: h
|
|
599
600
|
}
|
|
600
601
|
);
|
|
601
602
|
};
|
|
602
|
-
|
|
603
|
+
Ue.__docgenInfo = {
|
|
603
604
|
displayName: "XcIcon",
|
|
604
605
|
description: "自定义图标组件,基于 iconfont",
|
|
605
606
|
props: {
|
|
@@ -635,43 +636,43 @@ Ae.__docgenInfo = {
|
|
|
635
636
|
}
|
|
636
637
|
}
|
|
637
638
|
};
|
|
638
|
-
const
|
|
639
|
+
const Je = ({
|
|
639
640
|
loading: n,
|
|
640
|
-
description:
|
|
641
|
-
className:
|
|
642
|
-
emptyChildren:
|
|
641
|
+
description: m = "暂无数据",
|
|
642
|
+
className: c,
|
|
643
|
+
emptyChildren: a,
|
|
643
644
|
loadingText: o,
|
|
644
|
-
emptyImage:
|
|
645
|
-
}) => n ? /* @__PURE__ */
|
|
646
|
-
|
|
645
|
+
emptyImage: h
|
|
646
|
+
}) => n ? /* @__PURE__ */ u.jsxs(
|
|
647
|
+
ge,
|
|
647
648
|
{
|
|
648
|
-
className: `pt-10 w-full ${
|
|
649
|
+
className: `pt-10 w-full ${c || ""}`,
|
|
649
650
|
align: "center",
|
|
650
651
|
justify: "center",
|
|
651
652
|
vertical: !0,
|
|
652
653
|
children: [
|
|
653
|
-
/* @__PURE__ */
|
|
654
|
-
o && /* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ u.jsx(Se, { size: "large" }),
|
|
655
|
+
o && /* @__PURE__ */ u.jsx("div", { className: "mt-4 text-gray-500", children: o })
|
|
655
656
|
]
|
|
656
657
|
}
|
|
657
|
-
) : /* @__PURE__ */
|
|
658
|
-
|
|
658
|
+
) : /* @__PURE__ */ u.jsx(
|
|
659
|
+
ge,
|
|
659
660
|
{
|
|
660
|
-
className: `pt-10 w-full ${
|
|
661
|
+
className: `pt-10 w-full ${c || ""}`,
|
|
661
662
|
align: "center",
|
|
662
663
|
justify: "center",
|
|
663
|
-
children: /* @__PURE__ */
|
|
664
|
-
|
|
664
|
+
children: /* @__PURE__ */ u.jsx(
|
|
665
|
+
$e,
|
|
665
666
|
{
|
|
666
|
-
image:
|
|
667
|
-
description:
|
|
667
|
+
image: h,
|
|
668
|
+
description: m,
|
|
668
669
|
imageStyle: { height: 180 },
|
|
669
|
-
children:
|
|
670
|
+
children: a
|
|
670
671
|
}
|
|
671
672
|
)
|
|
672
673
|
}
|
|
673
674
|
);
|
|
674
|
-
|
|
675
|
+
Je.__docgenInfo = {
|
|
675
676
|
displayName: "EmptyAndSpin",
|
|
676
677
|
description: "空状态和加载状态组合组件",
|
|
677
678
|
props: {
|
|
@@ -714,24 +715,24 @@ Oe.__docgenInfo = {
|
|
|
714
715
|
}
|
|
715
716
|
}
|
|
716
717
|
};
|
|
717
|
-
const
|
|
718
|
+
const Qe = ({
|
|
718
719
|
onClick: n,
|
|
719
|
-
showText:
|
|
720
|
-
className:
|
|
721
|
-
size:
|
|
720
|
+
showText: m = !1,
|
|
721
|
+
className: c,
|
|
722
|
+
size: a = "small",
|
|
722
723
|
type: o = "default"
|
|
723
|
-
}) => /* @__PURE__ */
|
|
724
|
-
|
|
724
|
+
}) => /* @__PURE__ */ u.jsx(
|
|
725
|
+
le,
|
|
725
726
|
{
|
|
726
|
-
size:
|
|
727
|
+
size: a,
|
|
727
728
|
type: o,
|
|
728
|
-
icon: /* @__PURE__ */
|
|
729
|
-
className: `cursor-pointer ${
|
|
729
|
+
icon: /* @__PURE__ */ u.jsx(Le, {}),
|
|
730
|
+
className: `cursor-pointer ${c || ""}`,
|
|
730
731
|
onClick: n,
|
|
731
|
-
children:
|
|
732
|
+
children: m && "返回"
|
|
732
733
|
}
|
|
733
734
|
);
|
|
734
|
-
|
|
735
|
+
Qe.__docgenInfo = {
|
|
735
736
|
displayName: "BackButton",
|
|
736
737
|
description: "返回按钮组件",
|
|
737
738
|
props: {
|
|
@@ -770,23 +771,23 @@ ze.__docgenInfo = {
|
|
|
770
771
|
}
|
|
771
772
|
}
|
|
772
773
|
};
|
|
773
|
-
const
|
|
774
|
+
const Ze = ({
|
|
774
775
|
removePadding: n = !0,
|
|
775
|
-
className:
|
|
776
|
-
...
|
|
776
|
+
className: m,
|
|
777
|
+
...c
|
|
777
778
|
}) => {
|
|
778
|
-
const
|
|
779
|
-
return /* @__PURE__ */
|
|
780
|
-
|
|
779
|
+
const a = n ? `px-0 h-auto ${m || ""}` : m;
|
|
780
|
+
return /* @__PURE__ */ u.jsx(
|
|
781
|
+
le,
|
|
781
782
|
{
|
|
782
783
|
type: "link",
|
|
783
|
-
...
|
|
784
|
-
className:
|
|
785
|
-
children:
|
|
784
|
+
...c,
|
|
785
|
+
className: a,
|
|
786
|
+
children: c.children
|
|
786
787
|
}
|
|
787
788
|
);
|
|
788
789
|
};
|
|
789
|
-
|
|
790
|
+
Ze.__docgenInfo = {
|
|
790
791
|
displayName: "LinkButton",
|
|
791
792
|
description: "链接样式按钮组件,适用于表格操作列",
|
|
792
793
|
props: {
|
|
@@ -823,129 +824,129 @@ Fe.__docgenInfo = {
|
|
|
823
824
|
}
|
|
824
825
|
}
|
|
825
826
|
};
|
|
826
|
-
const { Option:
|
|
827
|
+
const { Option: et } = Ee, tt = ({
|
|
827
828
|
columns: n,
|
|
828
|
-
request:
|
|
829
|
-
searchFields:
|
|
830
|
-
showSearch:
|
|
829
|
+
request: m,
|
|
830
|
+
searchFields: c = [],
|
|
831
|
+
showSearch: a = !0,
|
|
831
832
|
showRefresh: o = !0,
|
|
832
|
-
defaultPageSize:
|
|
833
|
-
pageSizeOptions:
|
|
834
|
-
autoLoad:
|
|
835
|
-
externalParams:
|
|
836
|
-
...
|
|
833
|
+
defaultPageSize: h = 10,
|
|
834
|
+
pageSizeOptions: q = ["10", "20", "50", "100"],
|
|
835
|
+
autoLoad: p = !0,
|
|
836
|
+
externalParams: e = {},
|
|
837
|
+
...t
|
|
837
838
|
}) => {
|
|
838
|
-
const [
|
|
839
|
+
const [N, s] = z([]), [k, d] = z(!1), [R, v] = z({
|
|
839
840
|
current: 1,
|
|
840
|
-
pageSize:
|
|
841
|
+
pageSize: h,
|
|
841
842
|
total: 0
|
|
842
|
-
}), [
|
|
843
|
-
|
|
844
|
-
const
|
|
845
|
-
|
|
846
|
-
const
|
|
847
|
-
const { sortable:
|
|
843
|
+
}), [x, w] = z({}), [A, $] = z({}), [S] = ue.useForm(), C = W(R);
|
|
844
|
+
C.current = R;
|
|
845
|
+
const O = W(e);
|
|
846
|
+
O.current = e;
|
|
847
|
+
const I = W(!1), D = Ce(() => n.map((E) => {
|
|
848
|
+
const { sortable: _, render: F, ...X } = E;
|
|
848
849
|
return {
|
|
849
|
-
...
|
|
850
|
-
sorter:
|
|
851
|
-
render:
|
|
850
|
+
...X,
|
|
851
|
+
sorter: _ ? !0 : void 0,
|
|
852
|
+
render: F || ((ne) => ne)
|
|
852
853
|
};
|
|
853
|
-
}), [n]),
|
|
854
|
-
if (
|
|
855
|
-
|
|
854
|
+
}), [n]), P = B(async (E = {}) => {
|
|
855
|
+
if (m) {
|
|
856
|
+
d(!0);
|
|
856
857
|
try {
|
|
857
|
-
const
|
|
858
|
-
page:
|
|
859
|
-
pageSize:
|
|
860
|
-
sortField:
|
|
861
|
-
sortOrder:
|
|
862
|
-
searchParams: { ...
|
|
863
|
-
...
|
|
864
|
-
},
|
|
865
|
-
|
|
866
|
-
...
|
|
867
|
-
total:
|
|
868
|
-
current:
|
|
858
|
+
const _ = {
|
|
859
|
+
page: C.current.current,
|
|
860
|
+
pageSize: C.current.pageSize,
|
|
861
|
+
sortField: A.field,
|
|
862
|
+
sortOrder: A.order,
|
|
863
|
+
searchParams: { ...x, ...O.current },
|
|
864
|
+
...E
|
|
865
|
+
}, F = await m(_);
|
|
866
|
+
F.success && (s(F.data), v((X) => ({
|
|
867
|
+
...X,
|
|
868
|
+
total: F.total,
|
|
869
|
+
current: _.page || X.current
|
|
869
870
|
})));
|
|
870
|
-
} catch (
|
|
871
|
-
console.error("加载数据失败:",
|
|
871
|
+
} catch (_) {
|
|
872
|
+
console.error("加载数据失败:", _);
|
|
872
873
|
} finally {
|
|
873
|
-
|
|
874
|
+
d(!1);
|
|
874
875
|
}
|
|
875
876
|
}
|
|
876
|
-
}, [
|
|
877
|
-
|
|
878
|
-
}, []),
|
|
879
|
-
|
|
880
|
-
}, [
|
|
881
|
-
|
|
882
|
-
}, [
|
|
883
|
-
const
|
|
884
|
-
current:
|
|
885
|
-
pageSize:
|
|
886
|
-
total:
|
|
887
|
-
},
|
|
888
|
-
field:
|
|
889
|
-
order:
|
|
877
|
+
}, [m, A, x]), H = B((E) => {
|
|
878
|
+
w(E), v((_) => ({ ..._, current: 1 }));
|
|
879
|
+
}, []), G = B(() => {
|
|
880
|
+
S.resetFields(), w({}), v((E) => ({ ...E, current: 1 }));
|
|
881
|
+
}, [S]), K = B(() => {
|
|
882
|
+
P();
|
|
883
|
+
}, [P]), Q = B((E, _, F) => {
|
|
884
|
+
const X = {
|
|
885
|
+
current: E.current || 1,
|
|
886
|
+
pageSize: E.pageSize || h,
|
|
887
|
+
total: E.total || 0
|
|
888
|
+
}, ne = {
|
|
889
|
+
field: F?.field,
|
|
890
|
+
order: F?.order
|
|
890
891
|
};
|
|
891
|
-
|
|
892
|
-
}, [
|
|
893
|
-
return
|
|
894
|
-
const
|
|
895
|
-
(
|
|
896
|
-
}, [
|
|
897
|
-
|
|
898
|
-
|
|
892
|
+
v(X), $(ne);
|
|
893
|
+
}, [h]);
|
|
894
|
+
return J(() => {
|
|
895
|
+
const E = Object.keys(e).length > 0;
|
|
896
|
+
(p && !I.current || E) && (P(), I.current = !0);
|
|
897
|
+
}, [p, e, P]), /* @__PURE__ */ u.jsxs("div", { children: [
|
|
898
|
+
a && c.length > 0 && /* @__PURE__ */ u.jsx(he, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ u.jsxs(
|
|
899
|
+
ue,
|
|
899
900
|
{
|
|
900
|
-
form:
|
|
901
|
+
form: S,
|
|
901
902
|
layout: "inline",
|
|
902
|
-
onFinish:
|
|
903
|
-
initialValues:
|
|
903
|
+
onFinish: H,
|
|
904
|
+
initialValues: c.reduce((E, _) => (_.defaultValue !== void 0 && (E[_.key] = _.defaultValue), E), {}),
|
|
904
905
|
children: [
|
|
905
|
-
|
|
906
|
-
|
|
906
|
+
c.map((E) => /* @__PURE__ */ u.jsx(ue.Item, { name: E.key, label: E.label, children: E.type === "input" ? /* @__PURE__ */ u.jsx(
|
|
907
|
+
ke,
|
|
907
908
|
{
|
|
908
|
-
placeholder:
|
|
909
|
+
placeholder: E.placeholder || `请输入${E.label}`,
|
|
909
910
|
style: { width: 200 }
|
|
910
911
|
}
|
|
911
|
-
) : /* @__PURE__ */
|
|
912
|
-
|
|
912
|
+
) : /* @__PURE__ */ u.jsx(
|
|
913
|
+
Ee,
|
|
913
914
|
{
|
|
914
|
-
placeholder:
|
|
915
|
+
placeholder: E.placeholder || `请选择${E.label}`,
|
|
915
916
|
style: { width: 200 },
|
|
916
917
|
allowClear: !0,
|
|
917
|
-
children:
|
|
918
|
+
children: E.options?.map((_) => /* @__PURE__ */ u.jsx(et, { value: _.value, children: _.label }, _.value))
|
|
918
919
|
}
|
|
919
|
-
) },
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
o && /* @__PURE__ */
|
|
920
|
+
) }, E.key)),
|
|
921
|
+
/* @__PURE__ */ u.jsx(ue.Item, { children: /* @__PURE__ */ u.jsxs(Re, { children: [
|
|
922
|
+
/* @__PURE__ */ u.jsx(le, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ u.jsx(Ve, {}), children: "查询" }),
|
|
923
|
+
/* @__PURE__ */ u.jsx(le, { onClick: G, children: "重置" }),
|
|
924
|
+
o && /* @__PURE__ */ u.jsx(le, { icon: /* @__PURE__ */ u.jsx(Oe, {}), onClick: K, children: "刷新" })
|
|
924
925
|
] }) })
|
|
925
926
|
]
|
|
926
927
|
}
|
|
927
928
|
) }),
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
|
|
929
|
+
/* @__PURE__ */ u.jsx(
|
|
930
|
+
we,
|
|
930
931
|
{
|
|
931
|
-
...
|
|
932
|
-
columns:
|
|
933
|
-
dataSource:
|
|
934
|
-
loading:
|
|
932
|
+
...t,
|
|
933
|
+
columns: D,
|
|
934
|
+
dataSource: N,
|
|
935
|
+
loading: k,
|
|
935
936
|
pagination: {
|
|
936
|
-
...
|
|
937
|
+
...R,
|
|
937
938
|
showSizeChanger: !0,
|
|
938
939
|
showQuickJumper: !0,
|
|
939
|
-
showTotal: (
|
|
940
|
-
pageSizeOptions:
|
|
940
|
+
showTotal: (E, _) => `第 ${_[0]}-${_[1]} 条/共 ${E} 条`,
|
|
941
|
+
pageSizeOptions: q
|
|
941
942
|
},
|
|
942
|
-
onChange:
|
|
943
|
+
onChange: Q,
|
|
943
944
|
scroll: { x: "max-content", y: "50vh" }
|
|
944
945
|
}
|
|
945
946
|
)
|
|
946
947
|
] });
|
|
947
948
|
};
|
|
948
|
-
|
|
949
|
+
tt.__docgenInfo = {
|
|
949
950
|
displayName: "AdvancedTable",
|
|
950
951
|
description: "高阶表格组件,支持异步请求、搜索、排序等功能",
|
|
951
952
|
props: {
|
|
@@ -1012,79 +1013,1072 @@ Be.__docgenInfo = {
|
|
|
1012
1013
|
}
|
|
1013
1014
|
}
|
|
1014
1015
|
};
|
|
1015
|
-
|
|
1016
|
+
function me(n, m, c) {
|
|
1017
|
+
if (!n.current) return;
|
|
1018
|
+
const a = /* @__PURE__ */ new Set(), o = {};
|
|
1019
|
+
for (const s of m)
|
|
1020
|
+
s.exclusionGroup && s.exclusionGroup !== "separator" && (a.add(s.exclusionGroup), o[s.exclusionGroup] || (o[s.exclusionGroup] = []), o[s.exclusionGroup].push({
|
|
1021
|
+
type: s.type,
|
|
1022
|
+
key: s.key,
|
|
1023
|
+
exclusionGroup: s.exclusionGroup
|
|
1024
|
+
}));
|
|
1025
|
+
const h = {};
|
|
1026
|
+
for (const s of a) {
|
|
1027
|
+
h[s] = !1;
|
|
1028
|
+
for (const k of o[s])
|
|
1029
|
+
if (k.type === "upload" && k.key) {
|
|
1030
|
+
if (c[k.key] !== null && c[k.key] !== void 0) {
|
|
1031
|
+
h[s] = !0;
|
|
1032
|
+
break;
|
|
1033
|
+
}
|
|
1034
|
+
} else if (k.type === "variable" && k.key) {
|
|
1035
|
+
const d = n.current.querySelector(
|
|
1036
|
+
`[data-type="variable"][data-key="${k.key}"]`
|
|
1037
|
+
);
|
|
1038
|
+
if (d && d.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1039
|
+
h[s] = !0;
|
|
1040
|
+
break;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
const q = m.some((s) => s.exclusionGroup === "separator"), e = Object.keys(h).filter(
|
|
1045
|
+
(s) => h[s]
|
|
1046
|
+
).length > 0;
|
|
1047
|
+
let t = null;
|
|
1048
|
+
if (e && q) {
|
|
1049
|
+
for (const s of m)
|
|
1050
|
+
if (s.exclusionGroup && s.exclusionGroup !== "separator" && h[s.exclusionGroup]) {
|
|
1051
|
+
t = s.exclusionGroup;
|
|
1052
|
+
break;
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
for (const s of a) {
|
|
1056
|
+
const k = n.current.querySelectorAll(
|
|
1057
|
+
`[data-group="${s}"]`
|
|
1058
|
+
);
|
|
1059
|
+
q && e && t ? s === t ? k.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
|
+
}) : k.forEach((d) => {
|
|
1062
|
+
d.style.display = "none", d.style.setProperty("display", "none", "important");
|
|
1063
|
+
}) : k.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
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
n.current.querySelectorAll(
|
|
1068
|
+
'[data-group="separator"]'
|
|
1069
|
+
).forEach((s) => {
|
|
1070
|
+
s.style.display = e ? "none" : "inline";
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
function ye(n, m, c, a) {
|
|
1074
|
+
if (!n.current) {
|
|
1075
|
+
a(!1);
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
const o = [];
|
|
1079
|
+
for (let e = 0; e < m.length; e++) {
|
|
1080
|
+
const t = m[e];
|
|
1081
|
+
if ((t.type === "variable" || t.type === "upload" || t.type === "multi-variable") && t.required && t.key) {
|
|
1082
|
+
o.push({
|
|
1083
|
+
exclusionGroup: t.exclusionGroup || "",
|
|
1084
|
+
key: t.key,
|
|
1085
|
+
type: t.type === "multi-variable" ? "variable" : t.type,
|
|
1086
|
+
isMultiVariable: t.type === "multi-variable"
|
|
1087
|
+
});
|
|
1088
|
+
continue;
|
|
1089
|
+
}
|
|
1090
|
+
if (t.type === "text" && t.className?.includes("rte-text-required") && t.exclusionGroup)
|
|
1091
|
+
for (let N = e + 1; N < m.length; N++) {
|
|
1092
|
+
const s = m[N];
|
|
1093
|
+
if (s.exclusionGroup === t.exclusionGroup && (s.type === "variable" || s.type === "upload") && s.key) {
|
|
1094
|
+
o.push({
|
|
1095
|
+
exclusionGroup: t.exclusionGroup,
|
|
1096
|
+
key: s.key,
|
|
1097
|
+
type: s.type
|
|
1098
|
+
});
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
const h = m.some((e) => e.exclusionGroup === "separator");
|
|
1104
|
+
let q = !1;
|
|
1105
|
+
if (h && o.length > 1) {
|
|
1106
|
+
const e = m.findIndex((s) => s.exclusionGroup === "separator"), t = o.filter((s) => m.findIndex(
|
|
1107
|
+
(d) => (d.type === "variable" || d.type === "upload") && d.key === s.key && d.exclusionGroup === s.exclusionGroup
|
|
1108
|
+
) < e), N = o.filter((s) => m.findIndex(
|
|
1109
|
+
(d) => (d.type === "variable" || d.type === "upload") && d.key === s.key && d.exclusionGroup === s.exclusionGroup
|
|
1110
|
+
) > e);
|
|
1111
|
+
q = t.length > 0 && N.length > 0;
|
|
1112
|
+
}
|
|
1113
|
+
if (o.length === 0) {
|
|
1114
|
+
a(!0);
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
const p = o.filter((e) => {
|
|
1118
|
+
if (!n.current) return !1;
|
|
1119
|
+
const t = n.current.querySelectorAll(
|
|
1120
|
+
`[data-group="${e.exclusionGroup}"]`
|
|
1121
|
+
);
|
|
1122
|
+
return t.length === 0 ? !1 : t[0].style.display !== "none";
|
|
1123
|
+
});
|
|
1124
|
+
if (p.length === 0) {
|
|
1125
|
+
a(!0);
|
|
1126
|
+
return;
|
|
1127
|
+
}
|
|
1128
|
+
if (q) {
|
|
1129
|
+
let e = !1;
|
|
1130
|
+
for (const t of p)
|
|
1131
|
+
if (t.type === "upload" && t.key) {
|
|
1132
|
+
if (c[t.key] !== null && c[t.key] !== void 0) {
|
|
1133
|
+
e = !0;
|
|
1134
|
+
break;
|
|
1135
|
+
}
|
|
1136
|
+
} else if (t.type === "variable" && t.key)
|
|
1137
|
+
if (t.isMultiVariable) {
|
|
1138
|
+
const N = n.current.querySelectorAll(
|
|
1139
|
+
`[data-type="variable"][data-multi-key="${t.key}"]`
|
|
1140
|
+
);
|
|
1141
|
+
let s = !1;
|
|
1142
|
+
for (const k of Array.from(N))
|
|
1143
|
+
if (k.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1144
|
+
s = !0;
|
|
1145
|
+
break;
|
|
1146
|
+
}
|
|
1147
|
+
if (s) {
|
|
1148
|
+
e = !0;
|
|
1149
|
+
break;
|
|
1150
|
+
}
|
|
1151
|
+
} else {
|
|
1152
|
+
const N = n.current.querySelector(
|
|
1153
|
+
`[data-type="variable"][data-key="${t.key}"]`
|
|
1154
|
+
);
|
|
1155
|
+
if (N && N.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1156
|
+
e = !0;
|
|
1157
|
+
break;
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
a(e);
|
|
1161
|
+
} else {
|
|
1162
|
+
let e = !0;
|
|
1163
|
+
for (const t of p)
|
|
1164
|
+
if (t.type === "upload" && t.key) {
|
|
1165
|
+
if (c[t.key] === null || c[t.key] === void 0) {
|
|
1166
|
+
e = !1;
|
|
1167
|
+
break;
|
|
1168
|
+
}
|
|
1169
|
+
} else if (t.type === "variable" && t.key)
|
|
1170
|
+
if (t.isMultiVariable) {
|
|
1171
|
+
const N = n.current.querySelectorAll(
|
|
1172
|
+
`[data-type="variable"][data-multi-key="${t.key}"]`
|
|
1173
|
+
);
|
|
1174
|
+
let s = !1;
|
|
1175
|
+
for (const k of Array.from(N))
|
|
1176
|
+
if (k.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
1177
|
+
s = !0;
|
|
1178
|
+
break;
|
|
1179
|
+
}
|
|
1180
|
+
if (!s) {
|
|
1181
|
+
e = !1;
|
|
1182
|
+
break;
|
|
1183
|
+
}
|
|
1184
|
+
} else {
|
|
1185
|
+
const N = n.current.querySelector(
|
|
1186
|
+
`[data-type="variable"][data-key="${t.key}"]`
|
|
1187
|
+
);
|
|
1188
|
+
if (!N) {
|
|
1189
|
+
e = !1;
|
|
1190
|
+
break;
|
|
1191
|
+
}
|
|
1192
|
+
if (N.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
|
|
1193
|
+
e = !1;
|
|
1194
|
+
break;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
a(e);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
function fe(n, m) {
|
|
1201
|
+
if (!n.current) return;
|
|
1202
|
+
n.current.querySelectorAll('[data-type="variable"]').forEach((a) => {
|
|
1203
|
+
const o = a.innerText.replace(/\n/g, "");
|
|
1204
|
+
o.replace(/\u200B/g, "") ? a.classList.remove("show-placeholder") : (o !== "" && (a.innerText = ""), a.classList.add("show-placeholder"));
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
function nt(n, m, c, a, o, h = {}) {
|
|
1208
|
+
if (!n.current) return;
|
|
1209
|
+
let q = "", p = 0;
|
|
1210
|
+
for (; p < m.length; ) {
|
|
1211
|
+
const e = m[p], t = p + 1 < m.length ? m[p + 1] : null;
|
|
1212
|
+
if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && t) {
|
|
1213
|
+
const v = t.type === "upload" && t.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === t.exclusionGroup, x = t.type === "variable" && t.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === t.exclusionGroup;
|
|
1214
|
+
if (v) {
|
|
1215
|
+
const A = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, $ = "</span>";
|
|
1216
|
+
let S = "";
|
|
1217
|
+
e.className ? S = `<span class="${e.className}">${e.text ?? ""}</span>` : S = e.text ?? "";
|
|
1218
|
+
const C = t, O = c[C.key] !== null && c[C.key] !== void 0, I = O ? c[C.key]?.name : C.text, D = O ? "" : "hidden", P = C.tooltip && !O ? "" : "hidden", H = O ? "has-file" : "", G = O && I ? ` data-file-name="${I.replace(/"/g, """)}"` : "", K = `<span contenteditable="false" data-type="upload" data-key="${C.key}" class="upload-chip"><span class="upload-inner-wrapper ${H}"><span class="upload-icon">${O ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${G}>${I || C.text}</span>${C.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${P}" data-upload-key="${C.key}" data-tooltip="${C.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${D}" title="移除文件">×</span></span></span>`;
|
|
1219
|
+
q += A + S + K + $, p += 2;
|
|
1220
|
+
continue;
|
|
1221
|
+
}
|
|
1222
|
+
if (x) {
|
|
1223
|
+
const A = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, $ = "</span>";
|
|
1224
|
+
let S = "";
|
|
1225
|
+
e.className ? S = `<span class="${e.className}">${e.text ?? ""}</span>` : S = e.text ?? "";
|
|
1226
|
+
const C = t, I = (C.key ? o[C.key] : void 0) || C.text || "", D = !I, P = D ? "" : I, H = D ? "show-placeholder" : "", G = C.exclusionGroup ? ` data-group="${C.exclusionGroup}"` : "", K = C.tooltip ? ` data-tooltip="${C.tooltip.replace(/"/g, """)}" data-variable-key="${C.key || ""}"` : "", Q = C.tooltip && D ? "" : "hidden", E = `<span contenteditable="true" data-type="variable" data-key="${C.key}" data-placeholder="${C.placeholder || ""}"${G}${K} class="variable-chip ${H}">${P}${C.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${Q}" data-variable-key="${C.key}" data-tooltip="${C.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1227
|
+
q += A + S + E + $, p += 2;
|
|
1228
|
+
continue;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
const s = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", k = e.exclusionGroup ? `<span ${s} class="exclusion-wrapper">` : "", d = e.exclusionGroup ? "</span>" : "";
|
|
1232
|
+
let R = "";
|
|
1233
|
+
if (e.type === "tag") {
|
|
1234
|
+
const v = a ? "" : '<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>', x = a ? ' data-locked="true"' : "", w = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-tag-key="${e.key || ""}"` : "";
|
|
1235
|
+
R = `<span contenteditable="false" class="tag-node group"${x}${w}><span class="tag-label">${e.text}</span>${v}</span>`;
|
|
1236
|
+
} else if (e.type === "text") {
|
|
1237
|
+
const v = a ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"';
|
|
1238
|
+
e.className ? R = `<span class="${e.className}"${v}>${e.text ?? ""}</span>` : R = a ? `<span${v}>${e.text ?? ""}</span>` : `<span contenteditable="false">${e.text ?? ""}</span>`;
|
|
1239
|
+
} else if (e.type === "variable" && e.key) {
|
|
1240
|
+
const x = o[e.key] || e.text || "", w = !x, A = w ? "" : x, $ = w ? "show-placeholder" : "", S = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", C = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", O = e.tooltip && w ? "" : "hidden", I = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${S}${C} class="variable-chip ${$}">${A}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${O}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1241
|
+
e.required ? R = `<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>${I}</span>` : R = I;
|
|
1242
|
+
} else if (e.type === "upload" && e.key) {
|
|
1243
|
+
const v = c[e.key] !== null && c[e.key] !== void 0, x = v ? c[e.key]?.name : e.text, w = v ? "" : "hidden", A = e.tooltip && !v ? "" : "hidden", $ = v ? "has-file" : "", S = v && x ? ` data-file-name="${x.replace(/"/g, """)}"` : "", C = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${$}"><span class="upload-icon">${v ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${S}>${x || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${A}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${w}" title="移除文件">×</span></span></span>`;
|
|
1244
|
+
e.required ? R = `<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>${C}</span>` : R = C;
|
|
1245
|
+
} else if (e.type === "multi-variable" && e.key) {
|
|
1246
|
+
const v = e.maxCount || 9, x = h[e.key] || 1, w = Math.min(x, v);
|
|
1247
|
+
let A = "";
|
|
1248
|
+
for (let $ = 0; $ < w; $++) {
|
|
1249
|
+
const S = `${e.key}_${$}`, C = o[S] || "", O = !C, I = O ? "" : C, D = O ? "show-placeholder" : "", P = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", H = e.tooltip && O ? "" : "hidden", G = `<span contenteditable="true" data-type="variable" data-key="${S}" data-multi-key="${e.key}" data-index="${$}" data-placeholder="${e.placeholder || ""}"${P} class="variable-chip ${D}">${I}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${H}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" title="提示"></i>` : ""}</span>`;
|
|
1250
|
+
A += G;
|
|
1251
|
+
}
|
|
1252
|
+
e.required ? R = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${A}</span>` : R = A;
|
|
1253
|
+
}
|
|
1254
|
+
q += k + R + d, p++;
|
|
1255
|
+
}
|
|
1256
|
+
n.current && (n.current.innerHTML = q, setTimeout(() => {
|
|
1257
|
+
if (!n.current) return;
|
|
1258
|
+
n.current.querySelectorAll('[data-type="variable"]').forEach((t) => {
|
|
1259
|
+
const N = t.innerText.replace(/\n/g, "");
|
|
1260
|
+
N.replace(/\u200B/g, "") ? t.classList.remove("show-placeholder") : (N !== "" && (t.innerText = ""), t.classList.add("show-placeholder"));
|
|
1261
|
+
});
|
|
1262
|
+
}, 0));
|
|
1263
|
+
}
|
|
1264
|
+
function rt(n, m, c, a, o = {}, h, q) {
|
|
1265
|
+
const p = B(() => {
|
|
1266
|
+
if (!n.current) return;
|
|
1267
|
+
let e = {};
|
|
1268
|
+
const t = n.current, N = t.__tempVariableValues;
|
|
1269
|
+
if (N ? (e = N, delete t.__tempVariableValues) : n.current.querySelectorAll(
|
|
1270
|
+
'[data-type="variable"]'
|
|
1271
|
+
).forEach((k) => {
|
|
1272
|
+
const d = k.dataset.key;
|
|
1273
|
+
if (d) {
|
|
1274
|
+
const R = k.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1275
|
+
R && (e[d] = R);
|
|
1276
|
+
}
|
|
1277
|
+
}), nt(n, m, c, a, e, o), h?.current) {
|
|
1278
|
+
const { key: s, offset: k } = h.current;
|
|
1279
|
+
setTimeout(() => {
|
|
1280
|
+
if (!n.current) return;
|
|
1281
|
+
const d = n.current.querySelector(
|
|
1282
|
+
`[data-type="variable"][data-key="${s}"]`
|
|
1283
|
+
);
|
|
1284
|
+
if (d) {
|
|
1285
|
+
try {
|
|
1286
|
+
const R = document.createRange(), v = document.createTreeWalker(
|
|
1287
|
+
d,
|
|
1288
|
+
NodeFilter.SHOW_TEXT,
|
|
1289
|
+
null
|
|
1290
|
+
);
|
|
1291
|
+
let x = 0, w = null, A = 0;
|
|
1292
|
+
for (; v.nextNode(); ) {
|
|
1293
|
+
const $ = v.currentNode, S = $.textContent?.length || 0;
|
|
1294
|
+
if (x + S >= k) {
|
|
1295
|
+
w = $, A = k - x;
|
|
1296
|
+
break;
|
|
1297
|
+
}
|
|
1298
|
+
x += S;
|
|
1299
|
+
}
|
|
1300
|
+
if (w) {
|
|
1301
|
+
R.setStart(w, Math.min(A, w.textContent?.length || 0)), R.collapse(!0);
|
|
1302
|
+
const $ = window.getSelection();
|
|
1303
|
+
$ && ($.removeAllRanges(), $.addRange(R), d.focus());
|
|
1304
|
+
} else {
|
|
1305
|
+
R.selectNodeContents(d), R.collapse(!1);
|
|
1306
|
+
const $ = window.getSelection();
|
|
1307
|
+
$ && ($.removeAllRanges(), $.addRange(R), d.focus());
|
|
1308
|
+
}
|
|
1309
|
+
} catch {
|
|
1310
|
+
const R = document.createRange();
|
|
1311
|
+
R.selectNodeContents(d), R.collapse(!1);
|
|
1312
|
+
const v = window.getSelection();
|
|
1313
|
+
v && (v.removeAllRanges(), v.addRange(R), d.focus());
|
|
1314
|
+
}
|
|
1315
|
+
h.current = null;
|
|
1316
|
+
}
|
|
1317
|
+
}, 0);
|
|
1318
|
+
}
|
|
1319
|
+
}, [m, c, a, n, o, h, q]);
|
|
1320
|
+
J(() => {
|
|
1321
|
+
p();
|
|
1322
|
+
}, [p]);
|
|
1323
|
+
}
|
|
1324
|
+
function at(n, m, c, a) {
|
|
1325
|
+
J(() => {
|
|
1326
|
+
const o = n.current;
|
|
1327
|
+
if (!o) return;
|
|
1328
|
+
const h = (p) => {
|
|
1329
|
+
const e = p.target?.closest(".upload-info-icon");
|
|
1330
|
+
if (e && e.classList.contains("upload-info-icon")) {
|
|
1331
|
+
const t = e.dataset.uploadKey;
|
|
1332
|
+
t && a({ key: t, anchorEl: e, type: "upload" });
|
|
1333
|
+
}
|
|
1334
|
+
}, q = (p) => {
|
|
1335
|
+
const e = p.target?.closest(".upload-info-icon"), t = p.relatedTarget;
|
|
1336
|
+
e && e.classList.contains("upload-info-icon") && (!t || !o.contains(t) ? a(null) : t.closest(".upload-info-icon") || a(null));
|
|
1337
|
+
};
|
|
1338
|
+
return o.addEventListener("mouseover", h, !0), o.addEventListener("mouseout", q, !0), () => {
|
|
1339
|
+
o.removeEventListener("mouseover", h, !0), o.removeEventListener("mouseout", q, !0);
|
|
1340
|
+
};
|
|
1341
|
+
}, [m, c, n, a]);
|
|
1342
|
+
}
|
|
1343
|
+
function ot(n, m, c) {
|
|
1344
|
+
J(() => {
|
|
1345
|
+
if (!n.current) return;
|
|
1346
|
+
const a = (p) => {
|
|
1347
|
+
const e = p.currentTarget, t = e.dataset.tooltip, N = e.dataset.tagKey || "";
|
|
1348
|
+
t && c({ key: N, anchorEl: e, type: "tag" });
|
|
1349
|
+
}, o = () => {
|
|
1350
|
+
c(null);
|
|
1351
|
+
};
|
|
1352
|
+
let h;
|
|
1353
|
+
const q = () => {
|
|
1354
|
+
if (!n.current) return;
|
|
1355
|
+
n.current.querySelectorAll(
|
|
1356
|
+
".tag-node[data-tooltip]"
|
|
1357
|
+
).forEach((e) => {
|
|
1358
|
+
e.addEventListener("mouseenter", a), e.addEventListener("mouseleave", o);
|
|
1359
|
+
});
|
|
1360
|
+
};
|
|
1361
|
+
return h = requestAnimationFrame(() => {
|
|
1362
|
+
h = requestAnimationFrame(q);
|
|
1363
|
+
}), () => {
|
|
1364
|
+
cancelAnimationFrame(h), n.current && n.current.querySelectorAll(
|
|
1365
|
+
".tag-node[data-tooltip]"
|
|
1366
|
+
).forEach((e) => {
|
|
1367
|
+
e.removeEventListener("mouseenter", a), e.removeEventListener("mouseleave", o);
|
|
1368
|
+
});
|
|
1369
|
+
};
|
|
1370
|
+
}, [m, n, c]);
|
|
1371
|
+
}
|
|
1372
|
+
function st(n, m, c) {
|
|
1373
|
+
J(() => {
|
|
1374
|
+
const a = n.current;
|
|
1375
|
+
if (!a) return;
|
|
1376
|
+
const o = (q) => {
|
|
1377
|
+
const p = q.target?.closest(".variable-info-icon");
|
|
1378
|
+
if (p && p.classList.contains("variable-info-icon")) {
|
|
1379
|
+
const e = p.dataset.variableKey;
|
|
1380
|
+
e && c({ key: e, anchorEl: p, type: "variable" });
|
|
1381
|
+
}
|
|
1382
|
+
}, h = (q) => {
|
|
1383
|
+
const p = q.target?.closest(".variable-info-icon"), e = q.relatedTarget;
|
|
1384
|
+
p && p.classList.contains("variable-info-icon") && (!e || !a.contains(e) ? c(null) : e.closest(".variable-info-icon") || c(null));
|
|
1385
|
+
};
|
|
1386
|
+
return a.addEventListener("mouseover", o, !0), a.addEventListener("mouseout", h, !0), () => {
|
|
1387
|
+
a.removeEventListener("mouseover", o, !0), a.removeEventListener("mouseout", h, !0);
|
|
1388
|
+
};
|
|
1389
|
+
}, [m, n, c]);
|
|
1390
|
+
}
|
|
1391
|
+
function lt(n, m, c, a) {
|
|
1392
|
+
J(() => {
|
|
1393
|
+
if (!n.current) return;
|
|
1394
|
+
const o = (e) => {
|
|
1395
|
+
const t = e.currentTarget;
|
|
1396
|
+
t.dataset.fileName && a({ key: "", anchorEl: t, type: "upload-label" });
|
|
1397
|
+
}, h = () => {
|
|
1398
|
+
a(null);
|
|
1399
|
+
};
|
|
1400
|
+
let q;
|
|
1401
|
+
const p = () => {
|
|
1402
|
+
if (!n.current) return;
|
|
1403
|
+
n.current.querySelectorAll(
|
|
1404
|
+
".upload-label[data-file-name]"
|
|
1405
|
+
).forEach((t) => {
|
|
1406
|
+
t.addEventListener("mouseenter", o), t.addEventListener("mouseleave", h);
|
|
1407
|
+
});
|
|
1408
|
+
};
|
|
1409
|
+
return q = requestAnimationFrame(() => {
|
|
1410
|
+
q = requestAnimationFrame(p);
|
|
1411
|
+
}), () => {
|
|
1412
|
+
cancelAnimationFrame(q), n.current && n.current.querySelectorAll(
|
|
1413
|
+
".upload-label[data-file-name]"
|
|
1414
|
+
).forEach((t) => {
|
|
1415
|
+
t.removeEventListener("mouseenter", o), t.removeEventListener("mouseleave", h);
|
|
1416
|
+
});
|
|
1417
|
+
};
|
|
1418
|
+
}, [m, c, n, a]);
|
|
1419
|
+
}
|
|
1420
|
+
function it(n, m, c, a) {
|
|
1421
|
+
J(() => {
|
|
1422
|
+
me(n, m, c), ye(n, m, c, a);
|
|
1423
|
+
}, [c, m, n, a]);
|
|
1424
|
+
}
|
|
1425
|
+
function ct(n, m) {
|
|
1426
|
+
J(() => {
|
|
1427
|
+
if (!n.current) return;
|
|
1428
|
+
let c = !1, a = 0;
|
|
1429
|
+
const o = () => {
|
|
1430
|
+
c = !0;
|
|
1431
|
+
}, h = () => {
|
|
1432
|
+
c = !1, a = Date.now();
|
|
1433
|
+
}, q = () => {
|
|
1434
|
+
if (!n.current) return;
|
|
1435
|
+
const p = window.getSelection();
|
|
1436
|
+
if (!p || p.rangeCount === 0 || m.current || c)
|
|
1437
|
+
return;
|
|
1438
|
+
const e = p.getRangeAt(0);
|
|
1439
|
+
if (!e.collapsed) {
|
|
1440
|
+
n.current.contains(e.commonAncestorContainer) || p.removeAllRanges();
|
|
1441
|
+
return;
|
|
1442
|
+
}
|
|
1443
|
+
const t = p.anchorNode;
|
|
1444
|
+
if (!t) return;
|
|
1445
|
+
if (!n.current.contains(t)) {
|
|
1446
|
+
p.removeAllRanges();
|
|
1447
|
+
return;
|
|
1448
|
+
}
|
|
1449
|
+
let N = null;
|
|
1450
|
+
if (t.nodeType === Node.ELEMENT_NODE ? N = t.closest('[data-type="variable"]') : t.nodeType === Node.TEXT_NODE && t.parentElement && (N = t.parentElement.closest('[data-type="variable"]')), !N) {
|
|
1451
|
+
if (Date.now() - a > 500)
|
|
1452
|
+
return;
|
|
1453
|
+
const s = n.current.querySelectorAll('[data-type="variable"]');
|
|
1454
|
+
if (s.length > 0) {
|
|
1455
|
+
let k = null;
|
|
1456
|
+
for (const d of Array.from(s))
|
|
1457
|
+
if (d.style.display !== "none") {
|
|
1458
|
+
k = d;
|
|
1459
|
+
break;
|
|
1460
|
+
}
|
|
1461
|
+
if (!k && s.length > 0 && (k = s[0]), k) {
|
|
1462
|
+
const d = document.createRange();
|
|
1463
|
+
d.selectNodeContents(k), d.collapse(!1), p.removeAllRanges(), p.addRange(d), k.focus();
|
|
1464
|
+
} else
|
|
1465
|
+
p.removeAllRanges();
|
|
1466
|
+
} else
|
|
1467
|
+
p.removeAllRanges();
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
return document.addEventListener("mousedown", o), document.addEventListener("mouseup", h), document.addEventListener("selectionchange", q), () => {
|
|
1471
|
+
document.removeEventListener("mousedown", o), document.removeEventListener("mouseup", h), document.removeEventListener("selectionchange", q);
|
|
1472
|
+
};
|
|
1473
|
+
}, [n, m]);
|
|
1474
|
+
}
|
|
1475
|
+
const ut = ({
|
|
1476
|
+
config: n,
|
|
1477
|
+
onSend: m,
|
|
1478
|
+
isProcessing: c = !1,
|
|
1479
|
+
disabled: a = !1,
|
|
1480
|
+
width: o,
|
|
1481
|
+
lockStructure: h = !1,
|
|
1482
|
+
agentOptions: q = [],
|
|
1483
|
+
onAgentSelect: p,
|
|
1484
|
+
loading: e = !1
|
|
1485
|
+
}) => {
|
|
1486
|
+
const t = W(null), N = W(null), [s, k] = z({}), [d, R] = z(null), [v, x] = z(null), w = W(!1), A = W(null), [$, S] = z(!1), C = W(null), [O, I] = z(() => {
|
|
1487
|
+
const r = {};
|
|
1488
|
+
return n.forEach((i) => {
|
|
1489
|
+
i.type === "multi-variable" && i.key && (r[i.key] = 1);
|
|
1490
|
+
}), r;
|
|
1491
|
+
});
|
|
1492
|
+
J(() => {
|
|
1493
|
+
I((r) => {
|
|
1494
|
+
const i = {};
|
|
1495
|
+
return n.forEach((y) => {
|
|
1496
|
+
y.type === "multi-variable" && y.key && (i[y.key] = r[y.key] || 1);
|
|
1497
|
+
}), i;
|
|
1498
|
+
});
|
|
1499
|
+
}, [n]), rt(t, n, s, h, O, C), at(t, n, s, x), ot(t, n, x), lt(t, n, s, x), st(t, n, x), it(t, n, s, S), ct(t, w);
|
|
1500
|
+
const D = (r) => {
|
|
1501
|
+
if (a) {
|
|
1502
|
+
r.preventDefault();
|
|
1503
|
+
return;
|
|
1504
|
+
}
|
|
1505
|
+
r.preventDefault();
|
|
1506
|
+
const i = r.clipboardData.getData("text/plain"), y = window.getSelection();
|
|
1507
|
+
if (y && y.rangeCount > 0) {
|
|
1508
|
+
const T = y.anchorNode;
|
|
1509
|
+
if (T) {
|
|
1510
|
+
let g = null;
|
|
1511
|
+
if (T.nodeType === Node.ELEMENT_NODE ? g = T.closest('[data-type="variable"]') : T.nodeType === Node.TEXT_NODE && T.parentElement && (g = T.parentElement.closest('[data-type="variable"]')), g) {
|
|
1512
|
+
const L = g.dataset.multiKey;
|
|
1513
|
+
if (L) {
|
|
1514
|
+
const f = i.split(/[,\n\r\t]+/).map((b) => b.trim()).filter((b) => b.length > 0);
|
|
1515
|
+
if (f.length > 1) {
|
|
1516
|
+
const b = parseInt(g.dataset.index || "0", 10), V = n.find((ee) => ee.type === "multi-variable" && ee.key === L)?.maxCount || 9, j = O[L] || 1, Y = Math.min(b + f.length, V);
|
|
1517
|
+
Y > j && I((U) => ({
|
|
1518
|
+
...U,
|
|
1519
|
+
[L]: Y
|
|
1520
|
+
})), setTimeout(() => {
|
|
1521
|
+
t.current && (f.forEach((U, ee) => {
|
|
1522
|
+
const te = b + ee;
|
|
1523
|
+
if (te >= V) return;
|
|
1524
|
+
const M = `${L}_${te}`, Z = t.current.querySelector(
|
|
1525
|
+
`[data-type="variable"][data-key="${M}"]`
|
|
1526
|
+
);
|
|
1527
|
+
Z && (Z.innerText = U, Z.classList.remove("show-placeholder"));
|
|
1528
|
+
}), F());
|
|
1529
|
+
}, 0);
|
|
1530
|
+
return;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
document.execCommand("insertText", !1, i), F();
|
|
1537
|
+
}, P = (r) => {
|
|
1538
|
+
if (r.target.files && r.target.files[0] && d) {
|
|
1539
|
+
const i = r.target.files[0], y = d;
|
|
1540
|
+
k((T) => ({ ...T, [y]: i }));
|
|
1541
|
+
}
|
|
1542
|
+
r.target && (r.target.value = ""), R(null);
|
|
1543
|
+
}, H = (r) => {
|
|
1544
|
+
k((i) => {
|
|
1545
|
+
const y = { ...i };
|
|
1546
|
+
return delete y[r], y;
|
|
1547
|
+
});
|
|
1548
|
+
}, G = (r) => {
|
|
1549
|
+
const i = r.target;
|
|
1550
|
+
if (h) {
|
|
1551
|
+
const T = i.closest(".tag-node"), g = i.closest('[data-type="text"]');
|
|
1552
|
+
if (T || g) {
|
|
1553
|
+
r.preventDefault(), r.stopPropagation();
|
|
1554
|
+
const L = window.getSelection();
|
|
1555
|
+
L && L.removeAllRanges();
|
|
1556
|
+
return;
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
i.closest('[data-type="variable"]') || (A.current = { x: r.clientX, y: r.clientY }, w.current = !1, (i.closest(".tag-close-btn") || i.closest(".file-remove-btn")) && (r.preventDefault(), r.stopPropagation()));
|
|
1560
|
+
}, K = (r) => {
|
|
1561
|
+
if (!r.target.closest('[data-type="variable"]') && A.current) {
|
|
1562
|
+
const T = Math.abs(r.clientX - A.current.x), g = Math.abs(r.clientY - A.current.y);
|
|
1563
|
+
(T > 3 || g > 3) && (w.current = !0);
|
|
1564
|
+
}
|
|
1565
|
+
}, Q = (r) => {
|
|
1566
|
+
if (r.target.closest('[data-type="variable"]')) {
|
|
1567
|
+
A.current = null, w.current = !1;
|
|
1568
|
+
return;
|
|
1569
|
+
}
|
|
1570
|
+
A.current = null, w.current = !1;
|
|
1571
|
+
}, E = (r) => {
|
|
1572
|
+
if (a)
|
|
1573
|
+
return;
|
|
1574
|
+
const i = r.target;
|
|
1575
|
+
if (i.closest('[data-type="text"]')) {
|
|
1576
|
+
r.preventDefault(), r.stopPropagation();
|
|
1577
|
+
const f = window.getSelection();
|
|
1578
|
+
f && f.removeAllRanges();
|
|
1579
|
+
return;
|
|
1580
|
+
}
|
|
1581
|
+
if (h && i.closest(".tag-node")) {
|
|
1582
|
+
r.preventDefault(), r.stopPropagation();
|
|
1583
|
+
const b = window.getSelection();
|
|
1584
|
+
b && b.removeAllRanges();
|
|
1585
|
+
return;
|
|
1586
|
+
}
|
|
1587
|
+
if (i.closest('[data-type="variable"]')) {
|
|
1588
|
+
if (w.current)
|
|
1589
|
+
return;
|
|
1590
|
+
setTimeout(() => {
|
|
1591
|
+
const f = window.getSelection();
|
|
1592
|
+
f && !f.isCollapsed || fe(t);
|
|
1593
|
+
}, 10);
|
|
1594
|
+
return;
|
|
1595
|
+
}
|
|
1596
|
+
if (i.closest(".tag-close-btn")) {
|
|
1597
|
+
if (h) {
|
|
1598
|
+
r.preventDefault(), r.stopPropagation();
|
|
1599
|
+
return;
|
|
1600
|
+
}
|
|
1601
|
+
r.preventDefault(), r.stopPropagation(), x(null), t.current && (t.current.innerHTML = "", t.current.focus());
|
|
1602
|
+
return;
|
|
1603
|
+
}
|
|
1604
|
+
const g = i.closest(".file-remove-btn");
|
|
1605
|
+
if (g) {
|
|
1606
|
+
r.preventDefault(), r.stopPropagation();
|
|
1607
|
+
const b = g.closest('[data-type="upload"]')?.dataset.key;
|
|
1608
|
+
b && H(b);
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1611
|
+
const L = i.closest('[data-type="upload"]');
|
|
1612
|
+
if (L) {
|
|
1613
|
+
const f = L.dataset.key;
|
|
1614
|
+
f && (R(f), N.current?.click());
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1617
|
+
}, _ = (r) => {
|
|
1618
|
+
const y = r.target.closest('[data-type="variable"]');
|
|
1619
|
+
if (y) {
|
|
1620
|
+
const T = window.getSelection();
|
|
1621
|
+
if (T) {
|
|
1622
|
+
const g = document.createRange(), L = y.textContent || "";
|
|
1623
|
+
if (L.replace(/\u200B/g, "")) {
|
|
1624
|
+
let b = 0, V = L.length;
|
|
1625
|
+
L.startsWith("") && (b = 1), L.endsWith("") && L.length > 1 && (V = L.length - 1);
|
|
1626
|
+
const j = y.firstChild;
|
|
1627
|
+
j && j.nodeType === Node.TEXT_NODE ? (g.setStart(j, b), g.setEnd(j, V)) : g.selectNodeContents(y);
|
|
1628
|
+
} else
|
|
1629
|
+
g.selectNodeContents(y), g.collapse(!0);
|
|
1630
|
+
T.removeAllRanges(), T.addRange(g);
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
}, F = () => {
|
|
1634
|
+
if (fe(t), t.current && t.current.querySelectorAll('[data-type="variable"]').forEach((y) => {
|
|
1635
|
+
const T = y.querySelector(".variable-info-icon");
|
|
1636
|
+
if (T) {
|
|
1637
|
+
let g = !1;
|
|
1638
|
+
const L = document.createTreeWalker(
|
|
1639
|
+
y,
|
|
1640
|
+
NodeFilter.SHOW_TEXT,
|
|
1641
|
+
{
|
|
1642
|
+
acceptNode: (f) => T.contains(f) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
1643
|
+
}
|
|
1644
|
+
);
|
|
1645
|
+
for (; L.nextNode(); )
|
|
1646
|
+
if (L.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
|
|
1647
|
+
g = !0;
|
|
1648
|
+
break;
|
|
1649
|
+
}
|
|
1650
|
+
g ? T.classList.add("hidden") : T.classList.remove("hidden");
|
|
1651
|
+
}
|
|
1652
|
+
}), me(t, n, s), ye(t, n, s, S), !t.current) return;
|
|
1653
|
+
n.filter((i) => i.type === "multi-variable" && i.key).forEach((i) => {
|
|
1654
|
+
if (!i.key) return;
|
|
1655
|
+
const y = i.maxCount || 9, T = O[i.key] || 1, g = [];
|
|
1656
|
+
for (let j = 0; j < T; j++) {
|
|
1657
|
+
const Y = `${i.key}_${j}`, U = t.current.querySelector(
|
|
1658
|
+
`[data-type="variable"][data-key="${Y}"][data-multi-key="${i.key}"]`
|
|
1659
|
+
);
|
|
1660
|
+
if (U) {
|
|
1661
|
+
const ee = U.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1662
|
+
g.push(ee);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
const f = (g[g.length - 1] || "") === "";
|
|
1666
|
+
let b = !1, V = -1;
|
|
1667
|
+
for (let j = 0; j < g.length - 1; j++)
|
|
1668
|
+
if (g[j] === "") {
|
|
1669
|
+
b = !0, V = j;
|
|
1670
|
+
break;
|
|
1671
|
+
}
|
|
1672
|
+
if (b && V >= 0) {
|
|
1673
|
+
const j = window.getSelection();
|
|
1674
|
+
if (j && j.rangeCount > 0) {
|
|
1675
|
+
const M = j.getRangeAt(0), Z = M.startContainer, ae = Z.nodeType === Node.ELEMENT_NODE ? Z.closest('[data-type="variable"][data-multi-key]') : Z.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
1676
|
+
if (ae) {
|
|
1677
|
+
const oe = ae.dataset.key;
|
|
1678
|
+
if (oe) {
|
|
1679
|
+
const se = document.createRange();
|
|
1680
|
+
se.setStartBefore(ae), se.setEnd(M.startContainer, M.startOffset);
|
|
1681
|
+
const pe = se.toString().length;
|
|
1682
|
+
C.current = { key: oe, offset: pe };
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
const Y = [...g];
|
|
1687
|
+
for (let M = V; M < Y.length - 1; M++)
|
|
1688
|
+
Y[M] = Y[M + 1];
|
|
1689
|
+
Y.pop();
|
|
1690
|
+
const U = {};
|
|
1691
|
+
Y.forEach((M, Z) => {
|
|
1692
|
+
M && (U[`${i.key}_${Z}`] = M);
|
|
1693
|
+
});
|
|
1694
|
+
const ee = Math.max(f ? Y.length : Y.length + 1, 1);
|
|
1695
|
+
t.current.querySelectorAll(
|
|
1696
|
+
'[data-type="variable"]'
|
|
1697
|
+
).forEach((M) => {
|
|
1698
|
+
const Z = M.dataset.key, ae = M.dataset.multiKey;
|
|
1699
|
+
if (Z && ae !== i.key) {
|
|
1700
|
+
const oe = M.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1701
|
+
oe && (U[Z] = oe);
|
|
1702
|
+
}
|
|
1703
|
+
}), t.current.__tempVariableValues = U, I((M) => ({
|
|
1704
|
+
...M,
|
|
1705
|
+
[i.key]: ee
|
|
1706
|
+
}));
|
|
1707
|
+
return;
|
|
1708
|
+
}
|
|
1709
|
+
if (!f) {
|
|
1710
|
+
const j = T - 1, Y = `${i.key}_${j}`, U = t.current.querySelector(
|
|
1711
|
+
`[data-type="variable"][data-key="${Y}"][data-multi-key="${i.key}"]`
|
|
1712
|
+
);
|
|
1713
|
+
if (U && U.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && T < y) {
|
|
1714
|
+
const te = window.getSelection();
|
|
1715
|
+
if (te && te.rangeCount > 0) {
|
|
1716
|
+
const M = te.getRangeAt(0), Z = M.startContainer, ae = Z.nodeType === Node.ELEMENT_NODE ? Z.closest('[data-type="variable"][data-multi-key]') : Z.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
1717
|
+
if (ae) {
|
|
1718
|
+
const oe = ae.dataset.key;
|
|
1719
|
+
if (oe) {
|
|
1720
|
+
const se = document.createRange();
|
|
1721
|
+
se.setStartBefore(ae), se.setEnd(M.startContainer, M.startOffset);
|
|
1722
|
+
const pe = se.toString().length;
|
|
1723
|
+
C.current = { key: oe, offset: pe };
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
I((M) => ({
|
|
1728
|
+
...M,
|
|
1729
|
+
[i.key]: T + 1
|
|
1730
|
+
}));
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
});
|
|
1734
|
+
}, X = () => {
|
|
1735
|
+
t.current && (fe(t), me(t, n, s), ye(t, n, s, S));
|
|
1736
|
+
}, ne = (r) => {
|
|
1737
|
+
if (a) {
|
|
1738
|
+
r.preventDefault();
|
|
1739
|
+
return;
|
|
1740
|
+
}
|
|
1741
|
+
const i = window.getSelection();
|
|
1742
|
+
if (i && i.rangeCount > 0) {
|
|
1743
|
+
const y = i.anchorNode;
|
|
1744
|
+
let T = null;
|
|
1745
|
+
if (y && (y.nodeType === Node.ELEMENT_NODE ? T = y.closest('[data-type="text"]') : y.nodeType === Node.TEXT_NODE && y.parentElement && (T = y.parentElement.closest('[data-type="text"]'))), T) {
|
|
1746
|
+
if (r.preventDefault(), r.stopPropagation(), t.current) {
|
|
1747
|
+
const g = t.current.querySelector(
|
|
1748
|
+
'[data-type="variable"], [data-type="upload"]'
|
|
1749
|
+
);
|
|
1750
|
+
g && g.focus();
|
|
1751
|
+
}
|
|
1752
|
+
return;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
if (h && i && i.rangeCount > 0) {
|
|
1756
|
+
const y = i.anchorNode;
|
|
1757
|
+
let T = null;
|
|
1758
|
+
if (y && (y.nodeType === Node.ELEMENT_NODE ? T = y.closest(".tag-node") : y.nodeType === Node.TEXT_NODE && y.parentElement && (T = y.parentElement.closest(".tag-node"))), T) {
|
|
1759
|
+
if (r.preventDefault(), r.stopPropagation(), t.current) {
|
|
1760
|
+
const g = t.current.querySelector(
|
|
1761
|
+
'[data-type="variable"], [data-type="upload"]'
|
|
1762
|
+
);
|
|
1763
|
+
g && g.focus();
|
|
1764
|
+
}
|
|
1765
|
+
return;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
if (r.key === "Enter" && !r.shiftKey && (r.preventDefault(), re()), r.key === "Escape" && t.current) {
|
|
1769
|
+
if (h) {
|
|
1770
|
+
r.preventDefault();
|
|
1771
|
+
return;
|
|
1772
|
+
}
|
|
1773
|
+
t.current.innerHTML = "", t.current.focus();
|
|
1774
|
+
}
|
|
1775
|
+
if (r.key === "Backspace") {
|
|
1776
|
+
const y = window.getSelection();
|
|
1777
|
+
if (y && y.rangeCount > 0) {
|
|
1778
|
+
const T = y.getRangeAt(0), g = y.anchorNode;
|
|
1779
|
+
if (h) {
|
|
1780
|
+
let f = null, b = null;
|
|
1781
|
+
if (g && (g.nodeType === Node.ELEMENT_NODE ? (f = g.closest(".tag-node"), b = g.closest('[data-type="text"]')) : g.nodeType === Node.TEXT_NODE && g.parentElement && (f = g.parentElement.closest(".tag-node"), b = g.parentElement.closest('[data-type="text"]'))), (f || b) && T.collapsed && T.startOffset === 0) {
|
|
1782
|
+
r.preventDefault();
|
|
1783
|
+
return;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
let L = null;
|
|
1787
|
+
if (g && (g.nodeType === Node.ELEMENT_NODE ? L = g.closest(
|
|
1788
|
+
'[data-type="variable"]'
|
|
1789
|
+
) : g.nodeType === Node.TEXT_NODE && g.parentElement && (L = g.parentElement.closest(
|
|
1790
|
+
'[data-type="variable"]'
|
|
1791
|
+
))), L) {
|
|
1792
|
+
if (!T.collapsed)
|
|
1793
|
+
return;
|
|
1794
|
+
const f = L.innerText;
|
|
1795
|
+
if (f === "" || f === "") {
|
|
1796
|
+
r.preventDefault();
|
|
1797
|
+
return;
|
|
1798
|
+
}
|
|
1799
|
+
if (T.startOffset === 0) {
|
|
1800
|
+
r.preventDefault();
|
|
1801
|
+
return;
|
|
1802
|
+
}
|
|
1803
|
+
if (f.startsWith("") && T.startOffset === 1) {
|
|
1804
|
+
r.preventDefault();
|
|
1805
|
+
return;
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
}, re = () => {
|
|
1811
|
+
if (c || a || e || !$ || !t.current) return;
|
|
1812
|
+
const r = t.current;
|
|
1813
|
+
let i = "";
|
|
1814
|
+
const y = {}, T = (f) => {
|
|
1815
|
+
if (!(f.nodeType === Node.ELEMENT_NODE && f.style.display === "none")) {
|
|
1816
|
+
if (f.nodeType === Node.TEXT_NODE)
|
|
1817
|
+
i += (f.textContent || "").replace(/\u200B/g, "");
|
|
1818
|
+
else if (f.nodeType === Node.ELEMENT_NODE) {
|
|
1819
|
+
const b = f, V = b.dataset.type, j = b.dataset.key;
|
|
1820
|
+
if (V === "variable" && j) {
|
|
1821
|
+
let Y = "";
|
|
1822
|
+
const U = document.createTreeWalker(
|
|
1823
|
+
b,
|
|
1824
|
+
NodeFilter.SHOW_TEXT,
|
|
1825
|
+
{
|
|
1826
|
+
acceptNode: (te) => {
|
|
1827
|
+
const M = b.querySelector(".variable-info-icon");
|
|
1828
|
+
return M && M.contains(te) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
);
|
|
1832
|
+
for (; U.nextNode(); )
|
|
1833
|
+
Y += U.currentNode.textContent || "";
|
|
1834
|
+
const ee = Y.replace(/[\u200B\n]/g, "").trim();
|
|
1835
|
+
if (ee) {
|
|
1836
|
+
const te = b.dataset.multiKey;
|
|
1837
|
+
if (te) {
|
|
1838
|
+
y[te] || (y[te] = []);
|
|
1839
|
+
const M = y[te];
|
|
1840
|
+
M.push(ee), M.length > 1 && (i += " "), i += ee;
|
|
1841
|
+
} else
|
|
1842
|
+
y[j] = ee, i += ee;
|
|
1843
|
+
}
|
|
1844
|
+
} else if (V === "upload" && j)
|
|
1845
|
+
y[j] = s[j] ?? null, s[j] && (i += ` [附带文件: ${s[j]?.name}] `);
|
|
1846
|
+
else {
|
|
1847
|
+
if (b.classList.contains("tag-close-btn") || b.classList.contains("file-remove-btn")) return;
|
|
1848
|
+
b.getAttribute("contenteditable") === "false" && !V && b.classList.contains("tag-node") ? i += b.innerText : b.childNodes.forEach(T);
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
};
|
|
1853
|
+
if (r.childNodes.forEach(T), i = i.trim(), !i) return;
|
|
1854
|
+
const g = new FormData();
|
|
1855
|
+
g.append("fullPrompt", i), Object.keys(y).forEach((f) => {
|
|
1856
|
+
const b = y[f];
|
|
1857
|
+
b != null && (b instanceof File ? g.append(f, b) : Array.isArray(b) ? b.forEach((V, j) => {
|
|
1858
|
+
V != null && (V instanceof File ? g.append(`${f}[${j}]`, V) : typeof V == "string" ? g.append(`${f}[${j}]`, V) : g.append(`${f}[${j}]`, String(V)));
|
|
1859
|
+
}) : typeof b == "string" ? g.append(f, b) : g.append(f, String(b)));
|
|
1860
|
+
}), console.log("dataPayload:", y);
|
|
1861
|
+
const L = Array.from(g.keys());
|
|
1862
|
+
console.log("FormData keys:", L), m(g, i);
|
|
1863
|
+
}, l = o ? { width: typeof o == "number" ? `${o}px` : o } : {};
|
|
1864
|
+
return /* @__PURE__ */ u.jsxs(
|
|
1865
|
+
"div",
|
|
1866
|
+
{
|
|
1867
|
+
className: "rich-text-editor",
|
|
1868
|
+
style: l,
|
|
1869
|
+
"data-disabled": a,
|
|
1870
|
+
children: [
|
|
1871
|
+
/* @__PURE__ */ u.jsx(
|
|
1872
|
+
"div",
|
|
1873
|
+
{
|
|
1874
|
+
ref: t,
|
|
1875
|
+
className: "rte-editor",
|
|
1876
|
+
contentEditable: !1,
|
|
1877
|
+
suppressContentEditableWarning: !0,
|
|
1878
|
+
onMouseDown: G,
|
|
1879
|
+
onMouseMove: K,
|
|
1880
|
+
onMouseUp: Q,
|
|
1881
|
+
onClick: E,
|
|
1882
|
+
onDoubleClick: _,
|
|
1883
|
+
onInput: F,
|
|
1884
|
+
onKeyDown: ne,
|
|
1885
|
+
onPaste: D,
|
|
1886
|
+
onBlur: X
|
|
1887
|
+
}
|
|
1888
|
+
),
|
|
1889
|
+
/* @__PURE__ */ u.jsx(
|
|
1890
|
+
"input",
|
|
1891
|
+
{
|
|
1892
|
+
type: "file",
|
|
1893
|
+
ref: N,
|
|
1894
|
+
className: "rte-file-input",
|
|
1895
|
+
accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
|
|
1896
|
+
onChange: P
|
|
1897
|
+
}
|
|
1898
|
+
),
|
|
1899
|
+
/* @__PURE__ */ u.jsxs("div", { className: "rich-text-editor-footer", children: [
|
|
1900
|
+
/* @__PURE__ */ u.jsx("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ u.jsxs("div", { className: "rich-text-editor-brand", children: [
|
|
1901
|
+
/* @__PURE__ */ u.jsxs("div", { className: "rte-brand-badge", children: [
|
|
1902
|
+
/* @__PURE__ */ u.jsx("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
|
|
1903
|
+
/* @__PURE__ */ u.jsx("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
|
|
1904
|
+
] }),
|
|
1905
|
+
/* @__PURE__ */ u.jsx(
|
|
1906
|
+
Ae,
|
|
1907
|
+
{
|
|
1908
|
+
placement: "top",
|
|
1909
|
+
menu: {
|
|
1910
|
+
items: q.map((r) => ({
|
|
1911
|
+
key: r.key,
|
|
1912
|
+
label: /* @__PURE__ */ u.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1913
|
+
r.icon && /* @__PURE__ */ u.jsx("i", { className: r.icon }),
|
|
1914
|
+
/* @__PURE__ */ u.jsx("span", { children: r.label })
|
|
1915
|
+
] }),
|
|
1916
|
+
onClick: () => {
|
|
1917
|
+
p?.(r);
|
|
1918
|
+
}
|
|
1919
|
+
}))
|
|
1920
|
+
},
|
|
1921
|
+
trigger: ["click"],
|
|
1922
|
+
disabled: a || c,
|
|
1923
|
+
children: /* @__PURE__ */ u.jsxs("div", { className: "rte-agent-badge", style: { cursor: q.length > 0 ? "pointer" : "default" }, children: [
|
|
1924
|
+
/* @__PURE__ */ u.jsx("i", { className: "iconfont icon-zhinengti" }),
|
|
1925
|
+
/* @__PURE__ */ u.jsx("span", { className: "rte-agent-text", children: "智能体" })
|
|
1926
|
+
] })
|
|
1927
|
+
}
|
|
1928
|
+
)
|
|
1929
|
+
] }) }),
|
|
1930
|
+
/* @__PURE__ */ u.jsx(
|
|
1931
|
+
"button",
|
|
1932
|
+
{
|
|
1933
|
+
type: "button",
|
|
1934
|
+
onClick: re,
|
|
1935
|
+
disabled: c || a || e || !$,
|
|
1936
|
+
className: "rich-text-editor-send-button",
|
|
1937
|
+
children: c || e ? /* @__PURE__ */ u.jsx("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ u.jsx("i", { className: "iconfont icon-fasong" })
|
|
1938
|
+
}
|
|
1939
|
+
)
|
|
1940
|
+
] }),
|
|
1941
|
+
v?.anchorEl && (() => {
|
|
1942
|
+
if (!document.body.contains(v.anchorEl))
|
|
1943
|
+
return null;
|
|
1944
|
+
let r = "";
|
|
1945
|
+
return v.type === "upload" ? r = n.find(
|
|
1946
|
+
(y) => y.type === "upload" && y.key === v.key
|
|
1947
|
+
)?.tooltip || "" : v.type === "tag" ? r = v.anchorEl.dataset.tooltip || "" : v.type === "upload-label" ? r = v.anchorEl.dataset.fileName || "" : v.type === "variable" && (r = v.anchorEl.dataset.tooltip || ""), Ge(
|
|
1948
|
+
/* @__PURE__ */ u.jsx(
|
|
1949
|
+
_e,
|
|
1950
|
+
{
|
|
1951
|
+
arrow: !1,
|
|
1952
|
+
title: /* @__PURE__ */ u.jsx("div", { style: { maxWidth: "200px", fontSize: "12px", color: "#fff" }, children: r }),
|
|
1953
|
+
open: !0,
|
|
1954
|
+
placement: "top",
|
|
1955
|
+
getPopupContainer: () => document.body,
|
|
1956
|
+
overlayInnerStyle: {
|
|
1957
|
+
background: "var(--neutral-800, #262626)"
|
|
1958
|
+
},
|
|
1959
|
+
children: /* @__PURE__ */ u.jsx(
|
|
1960
|
+
"div",
|
|
1961
|
+
{
|
|
1962
|
+
style: {
|
|
1963
|
+
position: "fixed",
|
|
1964
|
+
left: `${v.anchorEl.getBoundingClientRect().left}px`,
|
|
1965
|
+
top: `${v.anchorEl.getBoundingClientRect().top}px`,
|
|
1966
|
+
width: `${v.anchorEl.offsetWidth}px`,
|
|
1967
|
+
height: `${v.anchorEl.offsetHeight}px`,
|
|
1968
|
+
pointerEvents: "none"
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
)
|
|
1972
|
+
}
|
|
1973
|
+
),
|
|
1974
|
+
document.body
|
|
1975
|
+
);
|
|
1976
|
+
})()
|
|
1977
|
+
]
|
|
1978
|
+
}
|
|
1979
|
+
);
|
|
1980
|
+
};
|
|
1981
|
+
ut.__docgenInfo = {
|
|
1982
|
+
displayName: "RichTextEditor",
|
|
1983
|
+
description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
|
|
1984
|
+
props: {
|
|
1985
|
+
config: {
|
|
1986
|
+
name: "config",
|
|
1987
|
+
required: !0,
|
|
1988
|
+
description: "结构化输入配置节点数组",
|
|
1989
|
+
type: { name: "InputNode[]", raw: "InputNode[]" }
|
|
1990
|
+
},
|
|
1991
|
+
onSend: {
|
|
1992
|
+
name: "onSend",
|
|
1993
|
+
required: !0,
|
|
1994
|
+
description: "点击发送按钮时的回调,返回数据与拼接后的 Prompt",
|
|
1995
|
+
type: {
|
|
1996
|
+
name: "function",
|
|
1997
|
+
raw: "(data: Record<string, any>, fullPrompt: string) => void"
|
|
1998
|
+
}
|
|
1999
|
+
},
|
|
2000
|
+
isProcessing: {
|
|
2001
|
+
name: "isProcessing",
|
|
2002
|
+
required: !1,
|
|
2003
|
+
description: "是否处于处理状态(禁用输入与发送)",
|
|
2004
|
+
type: { name: "boolean", raw: "boolean" },
|
|
2005
|
+
defaultValue: { value: "false" }
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
};
|
|
2009
|
+
const dt = ({
|
|
1016
2010
|
texts: n = [],
|
|
1017
|
-
placeholder:
|
|
1018
|
-
animationSpeed:
|
|
1019
|
-
autoPlay:
|
|
2011
|
+
placeholder: m = "请输入内容",
|
|
2012
|
+
animationSpeed: c = 100,
|
|
2013
|
+
autoPlay: a = !0,
|
|
1020
2014
|
value: o,
|
|
1021
|
-
onChange:
|
|
1022
|
-
...
|
|
2015
|
+
onChange: h,
|
|
2016
|
+
...q
|
|
1023
2017
|
}) => {
|
|
1024
|
-
const [
|
|
1025
|
-
|
|
1026
|
-
|
|
2018
|
+
const [p, e] = z(""), [t, N] = z(0), [s, k] = z(!1), [d, R] = z(!1), [v, x] = z(!1), w = W(void 0), A = W(void 0), $ = W(n), S = W(t), C = W(d), O = W(p);
|
|
2019
|
+
J(() => {
|
|
2020
|
+
$.current = n, S.current = t, C.current = d, O.current = p;
|
|
1027
2021
|
});
|
|
1028
|
-
const
|
|
1029
|
-
let
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1032
|
-
|
|
2022
|
+
const I = B((E, _) => {
|
|
2023
|
+
let F = 0;
|
|
2024
|
+
x(!0);
|
|
2025
|
+
const X = () => {
|
|
2026
|
+
F < E.length ? (e(E.slice(0, F + 1)), F++, A.current = window.setTimeout(X, c)) : (x(!1), _?.());
|
|
1033
2027
|
};
|
|
1034
|
-
|
|
1035
|
-
}, [
|
|
1036
|
-
let
|
|
1037
|
-
const
|
|
1038
|
-
|
|
2028
|
+
X();
|
|
2029
|
+
}, [c]), D = B((E) => {
|
|
2030
|
+
let _ = O.current.length;
|
|
2031
|
+
const F = () => {
|
|
2032
|
+
_ > 0 ? (e(O.current.slice(0, _ - 1)), _--, A.current = window.setTimeout(F, c / 2)) : E?.();
|
|
1039
2033
|
};
|
|
1040
|
-
|
|
1041
|
-
}, [
|
|
1042
|
-
if (
|
|
1043
|
-
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
2034
|
+
F();
|
|
2035
|
+
}, [c]), P = B(() => {
|
|
2036
|
+
if ($.current.length === 0 || C.current) return;
|
|
2037
|
+
k(!0);
|
|
2038
|
+
const E = $.current[S.current];
|
|
2039
|
+
O.current ? D(() => {
|
|
2040
|
+
I(E, () => {
|
|
2041
|
+
w.current = window.setTimeout(() => {
|
|
2042
|
+
N((_) => (_ + 1) % $.current.length), k(!1);
|
|
1049
2043
|
}, 2e3);
|
|
1050
2044
|
});
|
|
1051
|
-
}) :
|
|
1052
|
-
|
|
1053
|
-
|
|
2045
|
+
}) : I(E, () => {
|
|
2046
|
+
w.current = window.setTimeout(() => {
|
|
2047
|
+
N((_) => (_ + 1) % $.current.length), k(!1);
|
|
1054
2048
|
}, 2e3);
|
|
1055
2049
|
});
|
|
1056
|
-
}, [
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
}), [
|
|
1060
|
-
!
|
|
1061
|
-
}, [
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1064
|
-
},
|
|
1065
|
-
|
|
1066
|
-
},
|
|
1067
|
-
|
|
1068
|
-
},
|
|
1069
|
-
return /* @__PURE__ */
|
|
1070
|
-
/* @__PURE__ */
|
|
1071
|
-
|
|
2050
|
+
}, [D, I]);
|
|
2051
|
+
J(() => (a && n.length > 0 && !d && P(), () => {
|
|
2052
|
+
w.current && window.clearTimeout(w.current), A.current && window.clearTimeout(A.current);
|
|
2053
|
+
}), [t, d, a, n.length, P]), J(() => {
|
|
2054
|
+
!s && a && n.length > 0 && !d && P();
|
|
2055
|
+
}, [t, s, a, n.length, d, P]);
|
|
2056
|
+
const H = (E) => {
|
|
2057
|
+
R(!0), w.current && window.clearTimeout(w.current), A.current && window.clearTimeout(A.current), k(!1), x(!1), q.onFocus?.(E);
|
|
2058
|
+
}, G = (E) => {
|
|
2059
|
+
R(!1), !o && n.length > 0 && (e(""), N(0)), q.onBlur?.(E);
|
|
2060
|
+
}, K = (E) => {
|
|
2061
|
+
h?.(E.target.value), q.onChange?.(E);
|
|
2062
|
+
}, Q = () => d || o ? m : p || m;
|
|
2063
|
+
return /* @__PURE__ */ u.jsxs("div", { style: { position: "relative" }, children: [
|
|
2064
|
+
/* @__PURE__ */ u.jsx(
|
|
2065
|
+
ke,
|
|
1072
2066
|
{
|
|
1073
|
-
...
|
|
2067
|
+
...q,
|
|
1074
2068
|
value: o,
|
|
1075
|
-
onChange:
|
|
1076
|
-
onFocus:
|
|
1077
|
-
onBlur:
|
|
1078
|
-
placeholder:
|
|
2069
|
+
onChange: K,
|
|
2070
|
+
onFocus: H,
|
|
2071
|
+
onBlur: G,
|
|
2072
|
+
placeholder: Q(),
|
|
1079
2073
|
style: {
|
|
1080
2074
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1081
|
-
...
|
|
2075
|
+
...q.style,
|
|
1082
2076
|
position: "relative",
|
|
1083
2077
|
zIndex: 1
|
|
1084
2078
|
}
|
|
1085
2079
|
}
|
|
1086
2080
|
),
|
|
1087
|
-
!
|
|
2081
|
+
!d && !o && p && /* @__PURE__ */ u.jsxs(
|
|
1088
2082
|
"div",
|
|
1089
2083
|
{
|
|
1090
2084
|
style: {
|
|
@@ -1104,8 +2098,8 @@ const Me = ({
|
|
|
1104
2098
|
fontFamily: "inherit"
|
|
1105
2099
|
},
|
|
1106
2100
|
children: [
|
|
1107
|
-
/* @__PURE__ */
|
|
1108
|
-
|
|
2101
|
+
/* @__PURE__ */ u.jsx("span", { children: p }),
|
|
2102
|
+
v && /* @__PURE__ */ u.jsx(
|
|
1109
2103
|
"span",
|
|
1110
2104
|
{
|
|
1111
2105
|
style: {
|
|
@@ -1121,7 +2115,7 @@ const Me = ({
|
|
|
1121
2115
|
]
|
|
1122
2116
|
}
|
|
1123
2117
|
),
|
|
1124
|
-
/* @__PURE__ */
|
|
2118
|
+
/* @__PURE__ */ u.jsx("style", { children: `
|
|
1125
2119
|
@keyframes blink {
|
|
1126
2120
|
0%, 50% { opacity: 1; }
|
|
1127
2121
|
51%, 100% { opacity: 0; }
|
|
@@ -1129,7 +2123,7 @@ const Me = ({
|
|
|
1129
2123
|
` })
|
|
1130
2124
|
] });
|
|
1131
2125
|
};
|
|
1132
|
-
|
|
2126
|
+
dt.__docgenInfo = {
|
|
1133
2127
|
displayName: "DynamicInput",
|
|
1134
2128
|
description: "动态文案输入框组件,支持流式文字动画效果",
|
|
1135
2129
|
props: {
|
|
@@ -1174,109 +2168,109 @@ Me.__docgenInfo = {
|
|
|
1174
2168
|
}
|
|
1175
2169
|
}
|
|
1176
2170
|
};
|
|
1177
|
-
const
|
|
2171
|
+
const pt = ({
|
|
1178
2172
|
texts: n = [],
|
|
1179
2173
|
// 动态文案数组,默认为空数组
|
|
1180
|
-
placeholder:
|
|
2174
|
+
placeholder: m = "请输入内容",
|
|
1181
2175
|
// 占位符文本
|
|
1182
|
-
animationSpeed:
|
|
2176
|
+
animationSpeed: c = 100,
|
|
1183
2177
|
// 打字机动画速度,毫秒
|
|
1184
|
-
autoPlay:
|
|
2178
|
+
autoPlay: a = !0,
|
|
1185
2179
|
// 是否自动播放动画
|
|
1186
2180
|
value: o = "",
|
|
1187
2181
|
// 受控模式的值
|
|
1188
|
-
onChange:
|
|
2182
|
+
onChange: h,
|
|
1189
2183
|
// 受控模式的变化回调
|
|
1190
|
-
onSubmit:
|
|
2184
|
+
onSubmit: q,
|
|
1191
2185
|
// 提交回调
|
|
1192
|
-
maxLength:
|
|
2186
|
+
maxLength: p = 500,
|
|
1193
2187
|
// 最大字符数限制
|
|
1194
|
-
showCount:
|
|
2188
|
+
showCount: e = !0,
|
|
1195
2189
|
// 是否显示字数统计
|
|
1196
|
-
submitText:
|
|
2190
|
+
submitText: t = "发送",
|
|
1197
2191
|
// 提交按钮文本
|
|
1198
|
-
disabled:
|
|
2192
|
+
disabled: N = !1,
|
|
1199
2193
|
// 是否禁用组件
|
|
1200
|
-
rows:
|
|
2194
|
+
rows: s = 4,
|
|
1201
2195
|
// 文本域行数
|
|
1202
|
-
style:
|
|
2196
|
+
style: k,
|
|
1203
2197
|
// 自定义样式
|
|
1204
|
-
...
|
|
2198
|
+
...d
|
|
1205
2199
|
// 其他原生属性
|
|
1206
2200
|
}) => {
|
|
1207
|
-
const [
|
|
1208
|
-
|
|
1209
|
-
|
|
2201
|
+
const [R, v] = z(""), [x, w] = z(0), [A, $] = z(!1), [S, C] = z(!1), [O, I] = z(!1), [D, P] = z(o || ""), H = W(void 0), G = W(void 0), K = W(n), Q = W(x), E = W(S), _ = W(R), F = W(null);
|
|
2202
|
+
J(() => {
|
|
2203
|
+
K.current = n, Q.current = x, E.current = S, _.current = R;
|
|
1210
2204
|
});
|
|
1211
|
-
const
|
|
1212
|
-
let
|
|
1213
|
-
|
|
1214
|
-
const
|
|
1215
|
-
|
|
2205
|
+
const X = B((f, b) => {
|
|
2206
|
+
let V = 0;
|
|
2207
|
+
I(!0);
|
|
2208
|
+
const j = () => {
|
|
2209
|
+
V < f.length ? (v(f.slice(0, V + 1)), V++, G.current = window.setTimeout(j, c)) : (I(!1), b?.());
|
|
1216
2210
|
};
|
|
1217
|
-
|
|
1218
|
-
}, [
|
|
1219
|
-
let
|
|
1220
|
-
const
|
|
1221
|
-
|
|
2211
|
+
j();
|
|
2212
|
+
}, [c]), ne = B((f) => {
|
|
2213
|
+
let b = _.current.length;
|
|
2214
|
+
const V = () => {
|
|
2215
|
+
b > 0 ? (v(_.current.slice(0, b - 1)), b--, G.current = window.setTimeout(V, c / 2)) : f?.();
|
|
1222
2216
|
};
|
|
1223
|
-
|
|
1224
|
-
}, [
|
|
1225
|
-
if (
|
|
1226
|
-
|
|
1227
|
-
const f =
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
2217
|
+
V();
|
|
2218
|
+
}, [c]), re = B(() => {
|
|
2219
|
+
if (K.current.length === 0 || E.current) return;
|
|
2220
|
+
$(!0);
|
|
2221
|
+
const f = K.current[Q.current];
|
|
2222
|
+
_.current ? ne(() => {
|
|
2223
|
+
X(f, () => {
|
|
2224
|
+
H.current = window.setTimeout(() => {
|
|
2225
|
+
w((b) => (b + 1) % K.current.length), $(!1);
|
|
1232
2226
|
}, 2e3);
|
|
1233
2227
|
});
|
|
1234
|
-
}) :
|
|
1235
|
-
|
|
1236
|
-
|
|
2228
|
+
}) : X(f, () => {
|
|
2229
|
+
H.current = window.setTimeout(() => {
|
|
2230
|
+
w((b) => (b + 1) % K.current.length), $(!1);
|
|
1237
2231
|
}, 2e3);
|
|
1238
2232
|
});
|
|
1239
|
-
}, [
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
}), [
|
|
1243
|
-
!
|
|
1244
|
-
}, [
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
},
|
|
1248
|
-
|
|
1249
|
-
},
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1252
|
-
},
|
|
1253
|
-
const f =
|
|
1254
|
-
f.trim() && !
|
|
1255
|
-
},
|
|
1256
|
-
(f.ctrlKey || f.metaKey) && f.key === "Enter" && (f.preventDefault(),
|
|
1257
|
-
},
|
|
1258
|
-
return /* @__PURE__ */
|
|
1259
|
-
/* @__PURE__ */
|
|
1260
|
-
/* @__PURE__ */
|
|
2233
|
+
}, [ne, X]);
|
|
2234
|
+
J(() => (a && n.length > 0 && !S && re(), () => {
|
|
2235
|
+
H.current && window.clearTimeout(H.current), G.current && window.clearTimeout(G.current);
|
|
2236
|
+
}), [x, S, a, n.length, re]), J(() => {
|
|
2237
|
+
!A && a && n.length > 0 && !S && re();
|
|
2238
|
+
}, [x, A, a, n.length, S, re]);
|
|
2239
|
+
const l = (f) => {
|
|
2240
|
+
C(!0), H.current && window.clearTimeout(H.current), G.current && window.clearTimeout(G.current), $(!1), I(!1), d.onFocus?.(f);
|
|
2241
|
+
}, r = (f) => {
|
|
2242
|
+
C(!1), !o && n.length > 0 && (v(""), w(0)), d.onBlur?.(f);
|
|
2243
|
+
}, i = (f) => {
|
|
2244
|
+
const b = f.target.value;
|
|
2245
|
+
p && b.length > p || (h ? h(b) : P(b), d.onChange?.(f));
|
|
2246
|
+
}, y = () => {
|
|
2247
|
+
const f = h ? o : D;
|
|
2248
|
+
f.trim() && !N && (q?.(f), h || P(""));
|
|
2249
|
+
}, T = (f) => {
|
|
2250
|
+
(f.ctrlKey || f.metaKey) && f.key === "Enter" && (f.preventDefault(), y()), d.onKeyDown?.(f);
|
|
2251
|
+
}, g = h ? o : D, L = N || !g.trim() || (p ? g.length > p : !1);
|
|
2252
|
+
return /* @__PURE__ */ u.jsxs("div", { style: { position: "relative", ...k }, children: [
|
|
2253
|
+
/* @__PURE__ */ u.jsxs("div", { style: { position: "relative" }, children: [
|
|
2254
|
+
/* @__PURE__ */ u.jsx(
|
|
1261
2255
|
"textarea",
|
|
1262
2256
|
{
|
|
1263
|
-
ref:
|
|
1264
|
-
value:
|
|
1265
|
-
onChange:
|
|
2257
|
+
ref: F,
|
|
2258
|
+
value: h ? o : D,
|
|
2259
|
+
onChange: i,
|
|
1266
2260
|
onFocus: (f) => {
|
|
1267
|
-
f.target.style.borderColor = "#1890ff", f.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)",
|
|
2261
|
+
f.target.style.borderColor = "#1890ff", f.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", l(f);
|
|
1268
2262
|
},
|
|
1269
2263
|
onBlur: (f) => {
|
|
1270
|
-
f.target.style.borderColor = "#d9d9d9", f.target.style.boxShadow = "none",
|
|
2264
|
+
f.target.style.borderColor = "#d9d9d9", f.target.style.boxShadow = "none", r(f);
|
|
1271
2265
|
},
|
|
1272
|
-
onKeyDown:
|
|
1273
|
-
placeholder:
|
|
1274
|
-
maxLength:
|
|
1275
|
-
rows:
|
|
1276
|
-
disabled:
|
|
2266
|
+
onKeyDown: T,
|
|
2267
|
+
placeholder: S || g ? m : "",
|
|
2268
|
+
maxLength: p,
|
|
2269
|
+
rows: s,
|
|
2270
|
+
disabled: N,
|
|
1277
2271
|
style: {
|
|
1278
2272
|
width: "100%",
|
|
1279
|
-
minHeight: `${
|
|
2273
|
+
minHeight: `${s * 24 + 16}px`,
|
|
1280
2274
|
padding: "8px 60px 8px 12px",
|
|
1281
2275
|
// 右侧留出按钮空间
|
|
1282
2276
|
border: "1px solid #d9d9d9",
|
|
@@ -1289,12 +2283,12 @@ const $e = ({
|
|
|
1289
2283
|
transition: "border-color 0.3s, box-shadow 0.3s",
|
|
1290
2284
|
backgroundColor: "#fff",
|
|
1291
2285
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1292
|
-
...
|
|
2286
|
+
...d.style
|
|
1293
2287
|
},
|
|
1294
|
-
...
|
|
2288
|
+
...d
|
|
1295
2289
|
}
|
|
1296
2290
|
),
|
|
1297
|
-
!
|
|
2291
|
+
!S && !g && R && /* @__PURE__ */ u.jsxs(
|
|
1298
2292
|
"div",
|
|
1299
2293
|
{
|
|
1300
2294
|
style: {
|
|
@@ -1316,8 +2310,8 @@ const $e = ({
|
|
|
1316
2310
|
lineHeight: "1.5"
|
|
1317
2311
|
},
|
|
1318
2312
|
children: [
|
|
1319
|
-
/* @__PURE__ */
|
|
1320
|
-
|
|
2313
|
+
/* @__PURE__ */ u.jsx("span", { children: R }),
|
|
2314
|
+
O && /* @__PURE__ */ u.jsx(
|
|
1321
2315
|
"span",
|
|
1322
2316
|
{
|
|
1323
2317
|
style: {
|
|
@@ -1333,7 +2327,7 @@ const $e = ({
|
|
|
1333
2327
|
]
|
|
1334
2328
|
}
|
|
1335
2329
|
),
|
|
1336
|
-
/* @__PURE__ */
|
|
2330
|
+
/* @__PURE__ */ u.jsx(
|
|
1337
2331
|
"div",
|
|
1338
2332
|
{
|
|
1339
2333
|
style: {
|
|
@@ -1342,14 +2336,14 @@ const $e = ({
|
|
|
1342
2336
|
right: 8,
|
|
1343
2337
|
zIndex: 3
|
|
1344
2338
|
},
|
|
1345
|
-
children: /* @__PURE__ */
|
|
1346
|
-
|
|
2339
|
+
children: /* @__PURE__ */ u.jsx(
|
|
2340
|
+
le,
|
|
1347
2341
|
{
|
|
1348
2342
|
type: "primary",
|
|
1349
2343
|
size: "small",
|
|
1350
|
-
icon: /* @__PURE__ */
|
|
1351
|
-
onClick:
|
|
1352
|
-
disabled:
|
|
2344
|
+
icon: /* @__PURE__ */ u.jsx(Pe, {}),
|
|
2345
|
+
onClick: y,
|
|
2346
|
+
disabled: L,
|
|
1353
2347
|
style: {
|
|
1354
2348
|
borderRadius: 6,
|
|
1355
2349
|
minWidth: 32,
|
|
@@ -1358,13 +2352,13 @@ const $e = ({
|
|
|
1358
2352
|
alignItems: "center",
|
|
1359
2353
|
justifyContent: "center"
|
|
1360
2354
|
},
|
|
1361
|
-
children:
|
|
2355
|
+
children: t
|
|
1362
2356
|
}
|
|
1363
2357
|
)
|
|
1364
2358
|
}
|
|
1365
2359
|
)
|
|
1366
2360
|
] }),
|
|
1367
|
-
|
|
2361
|
+
e && /* @__PURE__ */ u.jsxs(
|
|
1368
2362
|
"div",
|
|
1369
2363
|
{
|
|
1370
2364
|
style: {
|
|
@@ -1374,13 +2368,13 @@ const $e = ({
|
|
|
1374
2368
|
color: "#999"
|
|
1375
2369
|
},
|
|
1376
2370
|
children: [
|
|
1377
|
-
|
|
2371
|
+
g.length,
|
|
1378
2372
|
"/",
|
|
1379
|
-
|
|
2373
|
+
p
|
|
1380
2374
|
]
|
|
1381
2375
|
}
|
|
1382
2376
|
),
|
|
1383
|
-
/* @__PURE__ */
|
|
2377
|
+
/* @__PURE__ */ u.jsx("style", { children: `
|
|
1384
2378
|
@keyframes blink {
|
|
1385
2379
|
0%, 50% { opacity: 1; }
|
|
1386
2380
|
51%, 100% { opacity: 0; }
|
|
@@ -1388,7 +2382,7 @@ const $e = ({
|
|
|
1388
2382
|
` })
|
|
1389
2383
|
] });
|
|
1390
2384
|
};
|
|
1391
|
-
|
|
2385
|
+
pt.__docgenInfo = {
|
|
1392
2386
|
displayName: "DynamicTextArea",
|
|
1393
2387
|
description: "动态文案文本域组件,支持流式文字动画效果",
|
|
1394
2388
|
props: {
|
|
@@ -1474,96 +2468,96 @@ $e.__docgenInfo = {
|
|
|
1474
2468
|
}
|
|
1475
2469
|
}
|
|
1476
2470
|
};
|
|
1477
|
-
const
|
|
2471
|
+
const Te = ({
|
|
1478
2472
|
src: n,
|
|
1479
|
-
poster:
|
|
1480
|
-
width:
|
|
1481
|
-
height:
|
|
2473
|
+
poster: m,
|
|
2474
|
+
width: c = 300,
|
|
2475
|
+
height: a,
|
|
1482
2476
|
videoWidth: o,
|
|
1483
2477
|
// 参数保留但不使用,由CSS控制
|
|
1484
|
-
videoHeight:
|
|
2478
|
+
videoHeight: h,
|
|
1485
2479
|
// 参数保留但不使用,由CSS控制
|
|
1486
|
-
showPlayButton:
|
|
1487
|
-
autoPlayOnHover:
|
|
1488
|
-
onClick:
|
|
1489
|
-
onVideoLoaded:
|
|
1490
|
-
onVideoPlay:
|
|
1491
|
-
onVideoPause:
|
|
1492
|
-
onVideoEnded:
|
|
1493
|
-
className:
|
|
1494
|
-
style:
|
|
1495
|
-
...
|
|
2480
|
+
showPlayButton: q = !0,
|
|
2481
|
+
autoPlayOnHover: p = !0,
|
|
2482
|
+
onClick: e,
|
|
2483
|
+
onVideoLoaded: t,
|
|
2484
|
+
onVideoPlay: N,
|
|
2485
|
+
onVideoPause: s,
|
|
2486
|
+
onVideoEnded: k,
|
|
2487
|
+
className: d,
|
|
2488
|
+
style: R,
|
|
2489
|
+
...v
|
|
1496
2490
|
}) => {
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1499
|
-
}, [
|
|
1500
|
-
|
|
1501
|
-
}, [
|
|
1502
|
-
|
|
1503
|
-
}, [
|
|
1504
|
-
|
|
1505
|
-
}, [
|
|
1506
|
-
|
|
1507
|
-
}, [
|
|
1508
|
-
|
|
1509
|
-
}, [
|
|
1510
|
-
|
|
1511
|
-
}, [
|
|
1512
|
-
|
|
1513
|
-
}, [
|
|
1514
|
-
|
|
1515
|
-
}, [
|
|
1516
|
-
|
|
1517
|
-
}, [
|
|
1518
|
-
return /* @__PURE__ */
|
|
1519
|
-
|
|
2491
|
+
const x = W(null), [w, A] = z(!1), [$, S] = z(!1), [C, O] = z(!1), I = B(() => {
|
|
2492
|
+
x.current && (x.current.play(), A(!0), N?.());
|
|
2493
|
+
}, [N]), D = B(() => {
|
|
2494
|
+
x.current && (x.current.pause(), A(!1), s?.());
|
|
2495
|
+
}, [s]), P = B((X) => {
|
|
2496
|
+
X.stopPropagation(), w ? D() : I();
|
|
2497
|
+
}, [w, I, D]), H = B(() => {
|
|
2498
|
+
S(!0), p && !w && I();
|
|
2499
|
+
}, [p, w, I]), G = B(() => {
|
|
2500
|
+
S(!1), p && w && D();
|
|
2501
|
+
}, [p, w, D]), K = B(() => {
|
|
2502
|
+
O(!0), t?.();
|
|
2503
|
+
}, [t]), Q = B(() => {
|
|
2504
|
+
A(!0), N?.();
|
|
2505
|
+
}, [N]), E = B(() => {
|
|
2506
|
+
A(!1), s?.();
|
|
2507
|
+
}, [s]), _ = B(() => {
|
|
2508
|
+
A(!1), k?.();
|
|
2509
|
+
}, [k]), F = B((X) => {
|
|
2510
|
+
e?.(X);
|
|
2511
|
+
}, [e]);
|
|
2512
|
+
return /* @__PURE__ */ u.jsx(
|
|
2513
|
+
he,
|
|
1520
2514
|
{
|
|
1521
|
-
...
|
|
1522
|
-
className: `video-card ${
|
|
2515
|
+
...v,
|
|
2516
|
+
className: `video-card ${d || ""}`,
|
|
1523
2517
|
style: {
|
|
1524
|
-
width:
|
|
1525
|
-
height:
|
|
2518
|
+
width: c,
|
|
2519
|
+
height: a,
|
|
1526
2520
|
padding: 0,
|
|
1527
2521
|
overflow: "hidden",
|
|
1528
|
-
cursor:
|
|
2522
|
+
cursor: e ? "pointer" : "default",
|
|
1529
2523
|
border: "none",
|
|
1530
2524
|
borderRadius: 0,
|
|
1531
|
-
...
|
|
2525
|
+
...R
|
|
1532
2526
|
},
|
|
1533
2527
|
bordered: !1,
|
|
1534
|
-
onMouseEnter:
|
|
1535
|
-
onMouseLeave:
|
|
1536
|
-
onClick:
|
|
1537
|
-
children: /* @__PURE__ */
|
|
1538
|
-
/* @__PURE__ */
|
|
2528
|
+
onMouseEnter: H,
|
|
2529
|
+
onMouseLeave: G,
|
|
2530
|
+
onClick: F,
|
|
2531
|
+
children: /* @__PURE__ */ u.jsxs("div", { className: "video-card-container", children: [
|
|
2532
|
+
/* @__PURE__ */ u.jsx(
|
|
1539
2533
|
"video",
|
|
1540
2534
|
{
|
|
1541
|
-
ref:
|
|
2535
|
+
ref: x,
|
|
1542
2536
|
src: n,
|
|
1543
|
-
poster:
|
|
2537
|
+
poster: m,
|
|
1544
2538
|
preload: "metadata",
|
|
1545
|
-
onLoadedData:
|
|
1546
|
-
onPlay:
|
|
1547
|
-
onPause:
|
|
1548
|
-
onEnded:
|
|
2539
|
+
onLoadedData: K,
|
|
2540
|
+
onPlay: Q,
|
|
2541
|
+
onPause: E,
|
|
2542
|
+
onEnded: _,
|
|
1549
2543
|
muted: !0,
|
|
1550
2544
|
loop: !0
|
|
1551
2545
|
}
|
|
1552
2546
|
),
|
|
1553
|
-
|
|
2547
|
+
q && /* @__PURE__ */ u.jsx(
|
|
1554
2548
|
"div",
|
|
1555
2549
|
{
|
|
1556
|
-
className: `video-play-button ${
|
|
1557
|
-
onClick:
|
|
1558
|
-
children:
|
|
2550
|
+
className: `video-play-button ${$ ? "hovered" : ""}`,
|
|
2551
|
+
onClick: P,
|
|
2552
|
+
children: w ? /* @__PURE__ */ u.jsx(Me, { className: "play-icon" }) : /* @__PURE__ */ u.jsx(De, { className: "play-icon" })
|
|
1559
2553
|
}
|
|
1560
2554
|
),
|
|
1561
|
-
|
|
2555
|
+
!C && /* @__PURE__ */ u.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ u.jsx("div", { className: "loading-spinner" }) })
|
|
1562
2556
|
] })
|
|
1563
2557
|
}
|
|
1564
2558
|
);
|
|
1565
2559
|
};
|
|
1566
|
-
|
|
2560
|
+
Te.__docgenInfo = {
|
|
1567
2561
|
displayName: "VideoCard",
|
|
1568
2562
|
description: "视频卡片组件,支持鼠标悬浮播放控制",
|
|
1569
2563
|
props: {
|
|
@@ -1664,11 +2658,11 @@ de.__docgenInfo = {
|
|
|
1664
2658
|
}
|
|
1665
2659
|
}
|
|
1666
2660
|
};
|
|
1667
|
-
const
|
|
2661
|
+
const ft = (n) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((c) => n.toLowerCase().includes(c)), mt = (n) => n.type ? n.type : ft(n.url) ? "video" : "image", yt = ({
|
|
1668
2662
|
items: n,
|
|
1669
|
-
columns:
|
|
1670
|
-
gap:
|
|
1671
|
-
responsive:
|
|
2663
|
+
columns: m,
|
|
2664
|
+
gap: c = 0,
|
|
2665
|
+
responsive: a = !0,
|
|
1672
2666
|
breakpoints: o = {
|
|
1673
2667
|
xs: 1,
|
|
1674
2668
|
sm: 2,
|
|
@@ -1677,108 +2671,108 @@ const De = (n) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
1677
2671
|
xl: 5,
|
|
1678
2672
|
xxl: 6
|
|
1679
2673
|
},
|
|
1680
|
-
className:
|
|
1681
|
-
style:
|
|
1682
|
-
onClick:
|
|
2674
|
+
className: h,
|
|
2675
|
+
style: q,
|
|
2676
|
+
onClick: p
|
|
1683
2677
|
}) => {
|
|
1684
|
-
const
|
|
1685
|
-
if (!
|
|
1686
|
-
return
|
|
1687
|
-
const
|
|
1688
|
-
return
|
|
1689
|
-
}, [
|
|
1690
|
-
if (!
|
|
1691
|
-
const
|
|
1692
|
-
n.forEach((
|
|
1693
|
-
const
|
|
1694
|
-
if (!
|
|
1695
|
-
const
|
|
1696
|
-
|
|
2678
|
+
const e = W(null), [t, N] = z(m || o.md || 3), s = W(/* @__PURE__ */ new Map()), k = B(() => {
|
|
2679
|
+
if (!a || m)
|
|
2680
|
+
return m || o.md || 3;
|
|
2681
|
+
const x = window.innerWidth;
|
|
2682
|
+
return x < 576 ? o.xs || 1 : x < 768 ? o.sm || 2 : x < 992 ? o.md || 3 : x < 1200 ? o.lg || 4 : x < 1600 ? o.xl || 5 : o.xxl || 6;
|
|
2683
|
+
}, [a, m, o]), d = B(() => {
|
|
2684
|
+
if (!e.current) return;
|
|
2685
|
+
const x = t, w = e.current, $ = (w.offsetWidth - c * (x - 1)) / x, S = new Array(x).fill(0);
|
|
2686
|
+
n.forEach((O, I) => {
|
|
2687
|
+
const D = O.id || I, P = s.current.get(D);
|
|
2688
|
+
if (!P) return;
|
|
2689
|
+
const H = Math.min(...S), G = S.indexOf(H), K = G * ($ + c), Q = S[G];
|
|
2690
|
+
P.style.position = "absolute", P.style.left = `${K}px`, P.style.top = `${Q}px`, P.style.width = `${$}px`, S[G] += P.offsetHeight + c;
|
|
1697
2691
|
});
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1700
|
-
}, [n,
|
|
1701
|
-
|
|
1702
|
-
const
|
|
1703
|
-
const
|
|
1704
|
-
|
|
2692
|
+
const C = Math.max(...S);
|
|
2693
|
+
w.style.height = `${C}px`;
|
|
2694
|
+
}, [n, t, c]);
|
|
2695
|
+
J(() => {
|
|
2696
|
+
const x = () => {
|
|
2697
|
+
const w = k();
|
|
2698
|
+
w !== t && N(w);
|
|
1705
2699
|
};
|
|
1706
|
-
if (
|
|
1707
|
-
return window.addEventListener("resize",
|
|
1708
|
-
}, [
|
|
1709
|
-
const
|
|
1710
|
-
|
|
2700
|
+
if (a)
|
|
2701
|
+
return window.addEventListener("resize", x), x(), () => window.removeEventListener("resize", x);
|
|
2702
|
+
}, [a, k, t]), J(() => {
|
|
2703
|
+
const x = setTimeout(() => {
|
|
2704
|
+
d();
|
|
1711
2705
|
}, 100);
|
|
1712
|
-
return () => clearTimeout(
|
|
1713
|
-
}, [n,
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1716
|
-
}, [
|
|
1717
|
-
|
|
1718
|
-
}, [
|
|
1719
|
-
return /* @__PURE__ */
|
|
2706
|
+
return () => clearTimeout(x);
|
|
2707
|
+
}, [n, t, d]);
|
|
2708
|
+
const R = B(() => {
|
|
2709
|
+
d();
|
|
2710
|
+
}, [d]), v = B((x) => {
|
|
2711
|
+
p && p(x), x.onClick?.(x);
|
|
2712
|
+
}, [p]);
|
|
2713
|
+
return /* @__PURE__ */ u.jsx(
|
|
1720
2714
|
"div",
|
|
1721
2715
|
{
|
|
1722
|
-
ref:
|
|
1723
|
-
className: `waterfall-container ${
|
|
2716
|
+
ref: e,
|
|
2717
|
+
className: `waterfall-container ${h || ""}`,
|
|
1724
2718
|
style: {
|
|
1725
2719
|
position: "relative",
|
|
1726
2720
|
width: "100%",
|
|
1727
|
-
...
|
|
2721
|
+
...q
|
|
1728
2722
|
},
|
|
1729
|
-
children: n.map((
|
|
1730
|
-
const
|
|
1731
|
-
return /* @__PURE__ */
|
|
2723
|
+
children: n.map((x, w) => {
|
|
2724
|
+
const A = x.id || w, $ = mt(x);
|
|
2725
|
+
return /* @__PURE__ */ u.jsx(
|
|
1732
2726
|
"div",
|
|
1733
2727
|
{
|
|
1734
|
-
ref: (
|
|
1735
|
-
|
|
2728
|
+
ref: (S) => {
|
|
2729
|
+
S ? s.current.set(A, S) : s.current.delete(A);
|
|
1736
2730
|
},
|
|
1737
2731
|
className: "waterfall-item",
|
|
1738
|
-
children:
|
|
2732
|
+
children: $ === "video" ? /* @__PURE__ */ u.jsx("div", { style: {
|
|
1739
2733
|
width: "100%",
|
|
1740
2734
|
position: "relative",
|
|
1741
2735
|
paddingBottom: "56.25%",
|
|
1742
|
-
cursor:
|
|
1743
|
-
}, children: /* @__PURE__ */
|
|
1744
|
-
|
|
2736
|
+
cursor: p || x.onClick ? "pointer" : "default"
|
|
2737
|
+
}, children: /* @__PURE__ */ u.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ u.jsx(
|
|
2738
|
+
Te,
|
|
1745
2739
|
{
|
|
1746
|
-
src:
|
|
1747
|
-
poster:
|
|
2740
|
+
src: x.url,
|
|
2741
|
+
poster: x.poster,
|
|
1748
2742
|
width: "100%",
|
|
1749
2743
|
height: "100%",
|
|
1750
|
-
onClick: () =>
|
|
1751
|
-
onVideoLoaded:
|
|
2744
|
+
onClick: () => v(x),
|
|
2745
|
+
onVideoLoaded: R,
|
|
1752
2746
|
autoPlayOnHover: !0,
|
|
1753
2747
|
showPlayButton: !1
|
|
1754
2748
|
}
|
|
1755
|
-
) }) }) : /* @__PURE__ */
|
|
2749
|
+
) }) }) : /* @__PURE__ */ u.jsx(
|
|
1756
2750
|
"div",
|
|
1757
2751
|
{
|
|
1758
2752
|
className: "waterfall-image-wrapper",
|
|
1759
|
-
onClick: () =>
|
|
1760
|
-
style: { cursor:
|
|
1761
|
-
children: /* @__PURE__ */
|
|
2753
|
+
onClick: () => v(x),
|
|
2754
|
+
style: { cursor: p || x.onClick ? "pointer" : "default" },
|
|
2755
|
+
children: /* @__PURE__ */ u.jsx(
|
|
1762
2756
|
"img",
|
|
1763
2757
|
{
|
|
1764
|
-
src:
|
|
1765
|
-
alt: `瀑布流图片 ${
|
|
2758
|
+
src: x.url,
|
|
2759
|
+
alt: `瀑布流图片 ${w + 1}`,
|
|
1766
2760
|
className: "waterfall-image",
|
|
1767
|
-
onLoad:
|
|
1768
|
-
onError:
|
|
2761
|
+
onLoad: R,
|
|
2762
|
+
onError: R,
|
|
1769
2763
|
style: { display: "block", width: "100%", height: "auto" }
|
|
1770
2764
|
}
|
|
1771
2765
|
)
|
|
1772
2766
|
}
|
|
1773
2767
|
)
|
|
1774
2768
|
},
|
|
1775
|
-
|
|
2769
|
+
A
|
|
1776
2770
|
);
|
|
1777
2771
|
})
|
|
1778
2772
|
}
|
|
1779
2773
|
);
|
|
1780
2774
|
};
|
|
1781
|
-
|
|
2775
|
+
yt.__docgenInfo = {
|
|
1782
2776
|
displayName: "Waterfall",
|
|
1783
2777
|
description: "瀑布流布局组件,支持图片和视频混合展示",
|
|
1784
2778
|
props: {
|
|
@@ -1834,8 +2828,8 @@ He.__docgenInfo = {
|
|
|
1834
2828
|
}
|
|
1835
2829
|
}
|
|
1836
2830
|
};
|
|
1837
|
-
const
|
|
1838
|
-
algorithm:
|
|
2831
|
+
const vt = {
|
|
2832
|
+
algorithm: je.defaultAlgorithm,
|
|
1839
2833
|
token: {
|
|
1840
2834
|
// 主色
|
|
1841
2835
|
colorPrimary: "#3b82f6",
|
|
@@ -1901,19 +2895,20 @@ const Je = {
|
|
|
1901
2895
|
}
|
|
1902
2896
|
};
|
|
1903
2897
|
export {
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
2898
|
+
tt as AdvancedTable,
|
|
2899
|
+
Ke as AppModal,
|
|
2900
|
+
Qe as BackButton,
|
|
2901
|
+
He as Button,
|
|
2902
|
+
We as Card,
|
|
2903
|
+
dt as DynamicInput,
|
|
2904
|
+
pt as DynamicTextArea,
|
|
2905
|
+
Je as EmptyAndSpin,
|
|
2906
|
+
Ze as LinkButton,
|
|
2907
|
+
Xe as PageTable,
|
|
2908
|
+
ut as RichTextEditor,
|
|
2909
|
+
Te as VideoCard,
|
|
2910
|
+
yt as Waterfall,
|
|
2911
|
+
Ue as XcIcon,
|
|
2912
|
+
vt as lightTheme
|
|
1918
2913
|
};
|
|
1919
2914
|
//# sourceMappingURL=index.es.js.map
|