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