@gx-design-vue/pro-layout-components 0.1.0-alpha.3 → 0.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RightContent/Search/Panel.js +9 -12
- package/dist/RightContent/Search/index.js +10 -6
- package/dist/RightContent/index.js +12 -8
- package/dist/RightContent/themeOptions.js +5 -3
- package/dist/pro-layout-components.esm.js +261 -738
- package/dist/pro-layout-components.js +1 -1
- package/package.json +10 -12
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import { Fragment as e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Avatar as
|
|
7
|
-
import { useBaseConfig as
|
|
8
|
-
import
|
|
9
|
-
import { GProModal as
|
|
10
|
-
import {
|
|
11
|
-
import { useRouter as
|
|
12
|
-
import { proGenStyleHooks as me } from "@gx-design-vue/pro-provider";
|
|
1
|
+
import { Fragment as e, computed as t, createTextVNode as n, createVNode as r, defineComponent as i, h as a, mergeProps as o, nextTick as s, onMounted as c, ref as l, unref as u, watch as d } from "vue";
|
|
2
|
+
import { useThemeContext as f } from "@gx-design-vue/context";
|
|
3
|
+
import { GIcon as p } from "@gx-design-vue/icon";
|
|
4
|
+
import { useInjectLayoutContext as m } from "@gx-design-vue/pro-layout";
|
|
5
|
+
import { onKeyStroke as h, useElementSize as g, useFullscreen as _, useLocalStorage as v, useMagicKeys as y, useThrottleFn as b, whenever as x } from "@vueuse/core";
|
|
6
|
+
import { Avatar as S, Dropdown as C, Empty as w, Input as T } from "antdv-next";
|
|
7
|
+
import { useBaseConfig as E } from "antdv-next/config-provider/context";
|
|
8
|
+
import D from "antdv-next/config-provider/hooks/useCSSVarCls";
|
|
9
|
+
import { GProModal as O } from "@gx-design-vue/pro-modal";
|
|
10
|
+
import { proGenStyleHooks as k, useProConfigContext as A } from "@gx-design-vue/pro-provider";
|
|
11
|
+
import { useRouter as j } from "vue-router";
|
|
13
12
|
//#region ../pro-utils/dist/is/device.js
|
|
14
|
-
function
|
|
13
|
+
function M() {
|
|
15
14
|
return typeof navigator > "u" ? !1 : /windows|win32/i.test(navigator.userAgent);
|
|
16
15
|
}
|
|
17
16
|
//#endregion
|
|
18
17
|
//#region ../pro-utils/dist/is/type.js
|
|
19
|
-
function
|
|
18
|
+
function N(e, t) {
|
|
20
19
|
return Object.prototype.toString.call(e) === `[object ${t}]`;
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function P(e) {
|
|
23
22
|
return Array.isArray === void 0 ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
|
|
24
23
|
}
|
|
25
|
-
function
|
|
26
|
-
return e !== null &&
|
|
24
|
+
function F(e) {
|
|
25
|
+
return e !== null && N(e, "Object");
|
|
27
26
|
}
|
|
28
|
-
function
|
|
27
|
+
function I(e) {
|
|
29
28
|
return typeof e == "string";
|
|
30
29
|
}
|
|
31
30
|
//#endregion
|
|
32
31
|
//#region ../pro-utils/dist/is/url.js
|
|
33
|
-
function
|
|
32
|
+
function L(e) {
|
|
34
33
|
if (!e || !e.startsWith("http")) return !1;
|
|
35
34
|
try {
|
|
36
35
|
return !!new URL(e);
|
|
@@ -40,524 +39,38 @@ function ve(e) {
|
|
|
40
39
|
}
|
|
41
40
|
//#endregion
|
|
42
41
|
//#region ../pro-utils/dist/array/tree.js
|
|
43
|
-
function
|
|
42
|
+
function R(e, t = "children") {
|
|
44
43
|
let n = [];
|
|
45
44
|
return e.forEach((e) => {
|
|
46
|
-
n.push(e),
|
|
45
|
+
n.push(e), P(e[t]) && e[t].length > 0 && (n = n.concat(R(e[t], t)));
|
|
47
46
|
}), n;
|
|
48
47
|
}
|
|
49
48
|
//#endregion
|
|
50
49
|
//#region ../pro-utils/dist/class/prefix.js
|
|
51
|
-
function
|
|
50
|
+
function z({ suffixCls: e, customizePrefixCls: t, isPro: n, className: r }) {
|
|
52
51
|
let i = r || (n ? "gx-pro" : "gx");
|
|
53
52
|
return t || (e ? `${i}-${e}` : i);
|
|
54
53
|
}
|
|
55
54
|
//#endregion
|
|
56
55
|
//#region ../pro-utils/dist/object/classNames.js
|
|
57
|
-
function
|
|
56
|
+
function B(...e) {
|
|
58
57
|
let t = [];
|
|
59
58
|
for (let n = 0; n < e.length; n++) {
|
|
60
59
|
let r = e[n];
|
|
61
60
|
if (r) {
|
|
62
|
-
if (
|
|
63
|
-
else if (
|
|
64
|
-
let n =
|
|
61
|
+
if (I(r)) t.push(r);
|
|
62
|
+
else if (P(r)) for (let e = 0; e < r.length; e++) {
|
|
63
|
+
let n = B(r[e]);
|
|
65
64
|
n && t.push(n);
|
|
66
65
|
}
|
|
67
|
-
else if (
|
|
66
|
+
else if (F(r)) for (let e in r) r[e] && t.push(e);
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
return t.filter((e) => e).join(" ");
|
|
71
70
|
}
|
|
72
71
|
//#endregion
|
|
73
|
-
//#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.27_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
74
|
-
function L(e, t) {
|
|
75
|
-
return c() ? (m(e, t), !0) : !1;
|
|
76
|
-
}
|
|
77
|
-
var R = typeof window < "u" && typeof document < "u";
|
|
78
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
79
|
-
var be = Object.prototype.toString, xe = (e) => be.call(e) === "[object Object]", z = () => {};
|
|
80
|
-
function Se(...e) {
|
|
81
|
-
if (e.length !== 1) return b(...e);
|
|
82
|
-
let t = e[0];
|
|
83
|
-
return typeof t == "function" ? g(a(() => ({
|
|
84
|
-
get: t,
|
|
85
|
-
set: z
|
|
86
|
-
}))) : _(t);
|
|
87
|
-
}
|
|
88
|
-
function Ce(e, t) {
|
|
89
|
-
function n(...n) {
|
|
90
|
-
return new Promise((r, i) => {
|
|
91
|
-
Promise.resolve(e(() => t.apply(this, n), {
|
|
92
|
-
fn: t,
|
|
93
|
-
thisArg: this,
|
|
94
|
-
args: n
|
|
95
|
-
})).then(r).catch(i);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
return n;
|
|
99
|
-
}
|
|
100
|
-
var we = (e) => e();
|
|
101
|
-
function Te(...e) {
|
|
102
|
-
let t = 0, n, r = !0, i = z, a, o, s, c, l;
|
|
103
|
-
!u(e[0]) && typeof e[0] == "object" ? {delay: o, trailing: s = !0, leading: c = !0, rejectOnCancel: l = !1} = e[0] : [o, s = !0, c = !0, l = !1] = e;
|
|
104
|
-
let d = () => {
|
|
105
|
-
n && (clearTimeout(n), n = void 0, i(), i = z);
|
|
106
|
-
};
|
|
107
|
-
return (e) => {
|
|
108
|
-
let u = x(o), f = Date.now() - t, p = () => a = e();
|
|
109
|
-
return d(), u <= 0 ? (t = Date.now(), p()) : (f > u ? (t = Date.now(), (c || !r) && p()) : s && (a = new Promise((e, a) => {
|
|
110
|
-
i = l ? a : e, n = setTimeout(() => {
|
|
111
|
-
t = Date.now(), r = !0, e(p()), d();
|
|
112
|
-
}, Math.max(0, u - f));
|
|
113
|
-
})), !c && !n && (n = setTimeout(() => r = !0, u)), r = !1, a);
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function Ee(e = we, t = {}) {
|
|
117
|
-
let { initialState: n = "active" } = t, r = Se(n === "active");
|
|
118
|
-
function i() {
|
|
119
|
-
r.value = !1;
|
|
120
|
-
}
|
|
121
|
-
function a() {
|
|
122
|
-
r.value = !0;
|
|
123
|
-
}
|
|
124
|
-
return {
|
|
125
|
-
isActive: v(r),
|
|
126
|
-
pause: i,
|
|
127
|
-
resume: a,
|
|
128
|
-
eventFilter: (...t) => {
|
|
129
|
-
r.value && e(...t);
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
function B(e) {
|
|
134
|
-
return Array.isArray(e) ? e : [e];
|
|
135
|
-
}
|
|
136
|
-
function De(e) {
|
|
137
|
-
return e || s();
|
|
138
|
-
}
|
|
139
|
-
function Oe(e, t = 200, n = !1, r = !0, i = !1) {
|
|
140
|
-
return Ce(Te(t, n, r, i), e);
|
|
141
|
-
}
|
|
142
|
-
function ke(e, t, n = {}) {
|
|
143
|
-
let { eventFilter: r = we, ...i } = n;
|
|
144
|
-
return C(e, Ce(r, t), i);
|
|
145
|
-
}
|
|
146
|
-
function Ae(e, t, n = {}) {
|
|
147
|
-
let { eventFilter: r, initialState: i = "active", ...a } = n, { eventFilter: o, pause: s, resume: c, isActive: l } = Ee(r, { initialState: i });
|
|
148
|
-
return {
|
|
149
|
-
stop: ke(e, t, {
|
|
150
|
-
...a,
|
|
151
|
-
eventFilter: o
|
|
152
|
-
}),
|
|
153
|
-
pause: s,
|
|
154
|
-
resume: c,
|
|
155
|
-
isActive: l
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function V(e, t = !0, n) {
|
|
159
|
-
De(n) ? p(e, n) : t ? e() : f(e);
|
|
160
|
-
}
|
|
161
|
-
function je(e, t, n) {
|
|
162
|
-
return C(e, t, {
|
|
163
|
-
...n,
|
|
164
|
-
immediate: !0
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
function Me(e, t, n) {
|
|
168
|
-
let r = C(e, (e, i, a) => {
|
|
169
|
-
e && (n?.once && f(() => r()), t(e, i, a));
|
|
170
|
-
}, {
|
|
171
|
-
...n,
|
|
172
|
-
once: !1
|
|
173
|
-
});
|
|
174
|
-
return r;
|
|
175
|
-
}
|
|
176
|
-
//#endregion
|
|
177
|
-
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.27_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
178
|
-
var H = R ? window : void 0, Ne = R ? window.document : void 0;
|
|
179
|
-
R && window.navigator, R && window.location;
|
|
180
|
-
function U(e) {
|
|
181
|
-
let t = x(e);
|
|
182
|
-
return t?.$el ?? t;
|
|
183
|
-
}
|
|
184
|
-
function W(...e) {
|
|
185
|
-
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = n(() => {
|
|
186
|
-
let t = B(x(e[0])).filter((e) => e != null);
|
|
187
|
-
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
188
|
-
});
|
|
189
|
-
return je(() => [
|
|
190
|
-
r.value?.map((e) => U(e)) ?? [H].filter((e) => e != null),
|
|
191
|
-
B(x(r.value ? e[1] : e[0])),
|
|
192
|
-
B(S(r.value ? e[2] : e[1])),
|
|
193
|
-
x(r.value ? e[3] : e[2])
|
|
194
|
-
], ([e, n, r, i], a, o) => {
|
|
195
|
-
if (!e?.length || !n?.length || !r?.length) return;
|
|
196
|
-
let s = xe(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
197
|
-
o(() => {
|
|
198
|
-
c.forEach((e) => e());
|
|
199
|
-
});
|
|
200
|
-
}, { flush: "post" });
|
|
201
|
-
}
|
|
202
|
-
function Pe() {
|
|
203
|
-
let e = y(!1), t = s();
|
|
204
|
-
return t && p(() => {
|
|
205
|
-
e.value = !0;
|
|
206
|
-
}, t), e;
|
|
207
|
-
}
|
|
208
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
209
|
-
function G(e) {
|
|
210
|
-
let t = Pe();
|
|
211
|
-
return n(() => (t.value, !!e()));
|
|
212
|
-
}
|
|
213
|
-
function Fe(e) {
|
|
214
|
-
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
215
|
-
}
|
|
216
|
-
function K(...e) {
|
|
217
|
-
let t, n, r = {};
|
|
218
|
-
e.length === 3 ? (t = e[0], n = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], r = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
|
|
219
|
-
let { target: i = H, eventName: a = "keydown", passive: o = !1, dedupe: s = !1 } = r, c = Fe(t);
|
|
220
|
-
return W(i, a, (e) => {
|
|
221
|
-
e.repeat && x(s) || c(e) && n(e);
|
|
222
|
-
}, o);
|
|
223
|
-
}
|
|
224
|
-
var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, J = "__vueuse_ssr_handlers__", Ie = /* @__PURE__ */ Le();
|
|
225
|
-
function Le() {
|
|
226
|
-
return J in q || (q[J] = q[J] || {}), q[J];
|
|
227
|
-
}
|
|
228
|
-
function Re(e, t) {
|
|
229
|
-
return Ie[e] || t;
|
|
230
|
-
}
|
|
231
|
-
function ze(e) {
|
|
232
|
-
return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
|
|
233
|
-
}
|
|
234
|
-
var Be = {
|
|
235
|
-
boolean: {
|
|
236
|
-
read: (e) => e === "true",
|
|
237
|
-
write: (e) => String(e)
|
|
238
|
-
},
|
|
239
|
-
object: {
|
|
240
|
-
read: (e) => JSON.parse(e),
|
|
241
|
-
write: (e) => JSON.stringify(e)
|
|
242
|
-
},
|
|
243
|
-
number: {
|
|
244
|
-
read: (e) => Number.parseFloat(e),
|
|
245
|
-
write: (e) => String(e)
|
|
246
|
-
},
|
|
247
|
-
any: {
|
|
248
|
-
read: (e) => e,
|
|
249
|
-
write: (e) => String(e)
|
|
250
|
-
},
|
|
251
|
-
string: {
|
|
252
|
-
read: (e) => e,
|
|
253
|
-
write: (e) => String(e)
|
|
254
|
-
},
|
|
255
|
-
map: {
|
|
256
|
-
read: (e) => new Map(JSON.parse(e)),
|
|
257
|
-
write: (e) => JSON.stringify(Array.from(e.entries()))
|
|
258
|
-
},
|
|
259
|
-
set: {
|
|
260
|
-
read: (e) => new Set(JSON.parse(e)),
|
|
261
|
-
write: (e) => JSON.stringify(Array.from(e))
|
|
262
|
-
},
|
|
263
|
-
date: {
|
|
264
|
-
read: (e) => new Date(e),
|
|
265
|
-
write: (e) => e.toISOString()
|
|
266
|
-
}
|
|
267
|
-
}, Ve = "vueuse-storage";
|
|
268
|
-
function He(e, t, r, i = {}) {
|
|
269
|
-
let { flush: a = "pre", deep: o = !0, listenToStorageChanges: s = !0, writeDefaults: c = !0, mergeDefaults: l = !1, shallow: u, window: d = H, eventFilter: p, onError: m = (e) => {
|
|
270
|
-
console.error(e);
|
|
271
|
-
}, initOnMounted: h } = i, g = (u ? y : _)(typeof t == "function" ? t() : t), v = n(() => x(e));
|
|
272
|
-
if (!r) try {
|
|
273
|
-
r = Re("getDefaultStorage", () => H?.localStorage)();
|
|
274
|
-
} catch (e) {
|
|
275
|
-
m(e);
|
|
276
|
-
}
|
|
277
|
-
if (!r) return g;
|
|
278
|
-
let b = x(t), S = ze(b), w = i.serializer ?? Be[S], { pause: T, resume: E } = Ae(g, (e) => ee(e), {
|
|
279
|
-
flush: a,
|
|
280
|
-
deep: o,
|
|
281
|
-
eventFilter: p
|
|
282
|
-
});
|
|
283
|
-
C(v, () => k(), { flush: a });
|
|
284
|
-
let D = !1;
|
|
285
|
-
d && s && (r instanceof Storage ? W(d, "storage", (e) => {
|
|
286
|
-
h && !D || k(e);
|
|
287
|
-
}, { passive: !0 }) : W(d, Ve, (e) => {
|
|
288
|
-
h && !D || A(e);
|
|
289
|
-
})), h ? V(() => {
|
|
290
|
-
D = !0, k();
|
|
291
|
-
}) : k();
|
|
292
|
-
function O(e, t) {
|
|
293
|
-
if (d) {
|
|
294
|
-
let n = {
|
|
295
|
-
key: v.value,
|
|
296
|
-
oldValue: e,
|
|
297
|
-
newValue: t,
|
|
298
|
-
storageArea: r
|
|
299
|
-
};
|
|
300
|
-
d.dispatchEvent(r instanceof Storage ? new StorageEvent("storage", n) : new CustomEvent(Ve, { detail: n }));
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
function ee(e) {
|
|
304
|
-
try {
|
|
305
|
-
let t = r.getItem(v.value);
|
|
306
|
-
if (e == null) O(t, null), r.removeItem(v.value);
|
|
307
|
-
else {
|
|
308
|
-
let n = w.write(e);
|
|
309
|
-
t !== n && (r.setItem(v.value, n), O(t, n));
|
|
310
|
-
}
|
|
311
|
-
} catch (e) {
|
|
312
|
-
m(e);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
function te(e) {
|
|
316
|
-
let t = e ? e.newValue : r.getItem(v.value);
|
|
317
|
-
if (t == null) return c && b != null && r.setItem(v.value, w.write(b)), b;
|
|
318
|
-
if (!e && l) {
|
|
319
|
-
let e = w.read(t);
|
|
320
|
-
return typeof l == "function" ? l(e, b) : S === "object" && !Array.isArray(e) ? {
|
|
321
|
-
...b,
|
|
322
|
-
...e
|
|
323
|
-
} : e;
|
|
324
|
-
} else if (typeof t != "string") return t;
|
|
325
|
-
else return w.read(t);
|
|
326
|
-
}
|
|
327
|
-
function k(e) {
|
|
328
|
-
if (!(e && e.storageArea !== r)) {
|
|
329
|
-
if (e && e.key == null) {
|
|
330
|
-
g.value = b;
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
if (!(e && e.key !== v.value)) {
|
|
334
|
-
T();
|
|
335
|
-
try {
|
|
336
|
-
let t = w.write(g.value);
|
|
337
|
-
(e === void 0 || e?.newValue !== t) && (g.value = te(e));
|
|
338
|
-
} catch (e) {
|
|
339
|
-
m(e);
|
|
340
|
-
} finally {
|
|
341
|
-
e ? f(E) : E();
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
function A(e) {
|
|
347
|
-
k(e.detail);
|
|
348
|
-
}
|
|
349
|
-
return g;
|
|
350
|
-
}
|
|
351
|
-
function Ue(e, t, r = {}) {
|
|
352
|
-
let { window: i = H, ...a } = r, o, s = /* @__PURE__ */ G(() => i && "ResizeObserver" in i), c = () => {
|
|
353
|
-
o &&= (o.disconnect(), void 0);
|
|
354
|
-
}, l = C(n(() => {
|
|
355
|
-
let t = x(e);
|
|
356
|
-
return Array.isArray(t) ? t.map((e) => U(e)) : [U(t)];
|
|
357
|
-
}), (e) => {
|
|
358
|
-
if (c(), s.value && i) {
|
|
359
|
-
o = new ResizeObserver(t);
|
|
360
|
-
for (let t of e) t && o.observe(t, a);
|
|
361
|
-
}
|
|
362
|
-
}, {
|
|
363
|
-
immediate: !0,
|
|
364
|
-
flush: "post"
|
|
365
|
-
}), u = () => {
|
|
366
|
-
c(), l();
|
|
367
|
-
};
|
|
368
|
-
return L(u), {
|
|
369
|
-
isSupported: s,
|
|
370
|
-
stop: u
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
function We(e, t = {
|
|
374
|
-
width: 0,
|
|
375
|
-
height: 0
|
|
376
|
-
}, r = {}) {
|
|
377
|
-
let { window: i = H, box: a = "content-box" } = r, o = n(() => {
|
|
378
|
-
var t;
|
|
379
|
-
return (t = U(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
|
|
380
|
-
}), s = y(t.width), c = y(t.height), { stop: l } = Ue(e, ([t]) => {
|
|
381
|
-
let n = a === "border-box" ? t.borderBoxSize : a === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
382
|
-
if (i && o.value) {
|
|
383
|
-
let t = U(e);
|
|
384
|
-
if (t) {
|
|
385
|
-
let e = t.getBoundingClientRect();
|
|
386
|
-
s.value = e.width, c.value = e.height;
|
|
387
|
-
}
|
|
388
|
-
} else if (n) {
|
|
389
|
-
let e = B(n);
|
|
390
|
-
s.value = e.reduce((e, { inlineSize: t }) => e + t, 0), c.value = e.reduce((e, { blockSize: t }) => e + t, 0);
|
|
391
|
-
} else s.value = t.contentRect.width, c.value = t.contentRect.height;
|
|
392
|
-
}, r);
|
|
393
|
-
V(() => {
|
|
394
|
-
let n = U(e);
|
|
395
|
-
n && (s.value = "offsetWidth" in n ? n.offsetWidth : t.width, c.value = "offsetHeight" in n ? n.offsetHeight : t.height);
|
|
396
|
-
});
|
|
397
|
-
let u = C(() => U(e), (e) => {
|
|
398
|
-
s.value = e ? t.width : 0, c.value = e ? t.height : 0;
|
|
399
|
-
});
|
|
400
|
-
function d() {
|
|
401
|
-
l(), u();
|
|
402
|
-
}
|
|
403
|
-
return {
|
|
404
|
-
width: s,
|
|
405
|
-
height: c,
|
|
406
|
-
stop: d
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
var Ge = [
|
|
410
|
-
"fullscreenchange",
|
|
411
|
-
"webkitfullscreenchange",
|
|
412
|
-
"webkitendfullscreen",
|
|
413
|
-
"mozfullscreenchange",
|
|
414
|
-
"MSFullscreenChange"
|
|
415
|
-
];
|
|
416
|
-
function Ke(e, t = {}) {
|
|
417
|
-
let { document: r = Ne, autoExit: i = !1 } = t, a = n(() => U(e) ?? r?.documentElement), o = y(!1), s = n(() => [
|
|
418
|
-
"requestFullscreen",
|
|
419
|
-
"webkitRequestFullscreen",
|
|
420
|
-
"webkitEnterFullscreen",
|
|
421
|
-
"webkitEnterFullScreen",
|
|
422
|
-
"webkitRequestFullScreen",
|
|
423
|
-
"mozRequestFullScreen",
|
|
424
|
-
"msRequestFullscreen"
|
|
425
|
-
].find((e) => r && e in r || a.value && e in a.value)), c = n(() => [
|
|
426
|
-
"exitFullscreen",
|
|
427
|
-
"webkitExitFullscreen",
|
|
428
|
-
"webkitExitFullScreen",
|
|
429
|
-
"webkitCancelFullScreen",
|
|
430
|
-
"mozCancelFullScreen",
|
|
431
|
-
"msExitFullscreen"
|
|
432
|
-
].find((e) => r && e in r || a.value && e in a.value)), l = n(() => [
|
|
433
|
-
"fullScreen",
|
|
434
|
-
"webkitIsFullScreen",
|
|
435
|
-
"webkitDisplayingFullscreen",
|
|
436
|
-
"mozFullScreen",
|
|
437
|
-
"msFullscreenElement"
|
|
438
|
-
].find((e) => r && e in r || a.value && e in a.value)), u = [
|
|
439
|
-
"fullscreenElement",
|
|
440
|
-
"webkitFullscreenElement",
|
|
441
|
-
"mozFullScreenElement",
|
|
442
|
-
"msFullscreenElement"
|
|
443
|
-
].find((e) => r && e in r), d = /* @__PURE__ */ G(() => a.value && r && s.value !== void 0 && c.value !== void 0 && l.value !== void 0), f = () => u ? r?.[u] === a.value : !1, p = () => {
|
|
444
|
-
if (l.value) {
|
|
445
|
-
if (r && r[l.value] != null) return r[l.value];
|
|
446
|
-
{
|
|
447
|
-
let e = a.value;
|
|
448
|
-
if (e?.[l.value] != null) return !!e[l.value];
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
return !1;
|
|
452
|
-
};
|
|
453
|
-
async function m() {
|
|
454
|
-
if (!(!d.value || !o.value)) {
|
|
455
|
-
if (c.value) if (r?.[c.value] != null) await r[c.value]();
|
|
456
|
-
else {
|
|
457
|
-
let e = a.value;
|
|
458
|
-
e?.[c.value] != null && await e[c.value]();
|
|
459
|
-
}
|
|
460
|
-
o.value = !1;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
async function h() {
|
|
464
|
-
if (!d.value || o.value) return;
|
|
465
|
-
p() && await m();
|
|
466
|
-
let e = a.value;
|
|
467
|
-
s.value && e?.[s.value] != null && (await e[s.value](), o.value = !0);
|
|
468
|
-
}
|
|
469
|
-
async function g() {
|
|
470
|
-
await (o.value ? m() : h());
|
|
471
|
-
}
|
|
472
|
-
let _ = () => {
|
|
473
|
-
let e = p();
|
|
474
|
-
(!e || e && f()) && (o.value = e);
|
|
475
|
-
}, v = {
|
|
476
|
-
capture: !1,
|
|
477
|
-
passive: !0
|
|
478
|
-
};
|
|
479
|
-
return W(r, Ge, _, v), W(() => U(a), Ge, _, v), V(_, !1), i && L(m), {
|
|
480
|
-
isSupported: d,
|
|
481
|
-
isFullscreen: o,
|
|
482
|
-
enter: h,
|
|
483
|
-
exit: m,
|
|
484
|
-
toggle: g
|
|
485
|
-
};
|
|
486
|
-
}
|
|
487
|
-
function qe(e, t, n = {}) {
|
|
488
|
-
let { window: r = H } = n;
|
|
489
|
-
return He(e, t, r?.localStorage, n);
|
|
490
|
-
}
|
|
491
|
-
var Je = {
|
|
492
|
-
ctrl: "control",
|
|
493
|
-
command: "meta",
|
|
494
|
-
cmd: "meta",
|
|
495
|
-
option: "alt",
|
|
496
|
-
up: "arrowup",
|
|
497
|
-
down: "arrowdown",
|
|
498
|
-
left: "arrowleft",
|
|
499
|
-
right: "arrowright"
|
|
500
|
-
};
|
|
501
|
-
function Ye(e = {}) {
|
|
502
|
-
let { reactive: t = !1, target: r = H, aliasMap: i = Je, passive: a = !0, onEventFired: o = z } = e, s = h(/* @__PURE__ */ new Set()), c = {
|
|
503
|
-
toJSON() {
|
|
504
|
-
return {};
|
|
505
|
-
},
|
|
506
|
-
current: s
|
|
507
|
-
}, l = t ? h(c) : c, u = /* @__PURE__ */ new Set(), d = new Map([
|
|
508
|
-
["Meta", u],
|
|
509
|
-
["Shift", /* @__PURE__ */ new Set()],
|
|
510
|
-
["Alt", /* @__PURE__ */ new Set()]
|
|
511
|
-
]), f = /* @__PURE__ */ new Set();
|
|
512
|
-
function p(e, n) {
|
|
513
|
-
e in l && (t ? l[e] = n : l[e].value = n);
|
|
514
|
-
}
|
|
515
|
-
function m() {
|
|
516
|
-
s.clear();
|
|
517
|
-
for (let e of f) p(e, !1);
|
|
518
|
-
}
|
|
519
|
-
function g(e, t, n) {
|
|
520
|
-
if (!(!e || typeof t.getModifierState != "function")) {
|
|
521
|
-
for (let [e, r] of d) if (t.getModifierState(e)) {
|
|
522
|
-
n.forEach((e) => r.add(e));
|
|
523
|
-
break;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
function _(e, t) {
|
|
528
|
-
if (e) return;
|
|
529
|
-
let n = `${t[0].toUpperCase()}${t.slice(1)}`, r = d.get(n);
|
|
530
|
-
if (!["shift", "alt"].includes(t) || !r) return;
|
|
531
|
-
let i = Array.from(r), a = i.indexOf(t);
|
|
532
|
-
i.forEach((e, t) => {
|
|
533
|
-
t >= a && (s.delete(e), p(e, !1));
|
|
534
|
-
}), r.clear();
|
|
535
|
-
}
|
|
536
|
-
function v(e, t) {
|
|
537
|
-
let n = e.key?.toLowerCase(), r = [e.code?.toLowerCase(), n].filter(Boolean);
|
|
538
|
-
if (n) {
|
|
539
|
-
n && (t ? s.add(n) : s.delete(n));
|
|
540
|
-
for (let e of r) f.add(e), p(e, t);
|
|
541
|
-
g(t, e, [...s, ...r]), _(t, n), n === "meta" && !t && (u.forEach((e) => {
|
|
542
|
-
s.delete(e), p(e, !1);
|
|
543
|
-
}), u.clear());
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
W(r, "keydown", (e) => (v(e, !0), o(e)), { passive: a }), W(r, "keyup", (e) => (v(e, !1), o(e)), { passive: a }), W("blur", m, { passive: a }), W("focus", m, { passive: a });
|
|
547
|
-
let b = new Proxy(l, { get(e, r, a) {
|
|
548
|
-
if (typeof r != "string") return Reflect.get(e, r, a);
|
|
549
|
-
if (r = r.toLowerCase(), r in i && (r = i[r]), !(r in l)) if (/[+_-]/.test(r)) {
|
|
550
|
-
let e = r.split(/[+_-]/g).map((e) => e.trim());
|
|
551
|
-
l[r] = n(() => e.map((e) => x(b[e])).every(Boolean));
|
|
552
|
-
} else l[r] = y(!1);
|
|
553
|
-
let o = Reflect.get(e, r, a);
|
|
554
|
-
return t ? x(o) : o;
|
|
555
|
-
} });
|
|
556
|
-
return b;
|
|
557
|
-
}
|
|
558
|
-
//#endregion
|
|
559
72
|
//#region src/RightContent/locale.ts
|
|
560
|
-
var
|
|
73
|
+
var ee = {
|
|
561
74
|
searchPlaceholder: "搜索导航菜单",
|
|
562
75
|
searchLabel: "搜索",
|
|
563
76
|
searchShortcutLabel: "⌘ K",
|
|
@@ -574,38 +87,38 @@ var Xe = {
|
|
|
574
87
|
};
|
|
575
88
|
//#endregion
|
|
576
89
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
577
|
-
function
|
|
90
|
+
function V(e) {
|
|
578
91
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
579
92
|
}
|
|
580
93
|
//#endregion
|
|
581
94
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
582
|
-
function
|
|
95
|
+
function H(e) {
|
|
583
96
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
584
97
|
}
|
|
585
98
|
//#endregion
|
|
586
99
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
587
|
-
function
|
|
100
|
+
function te(e) {
|
|
588
101
|
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
589
102
|
}
|
|
590
103
|
//#endregion
|
|
591
104
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
592
|
-
function
|
|
105
|
+
function ne(e) {
|
|
593
106
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
594
107
|
}
|
|
595
108
|
//#endregion
|
|
596
109
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
597
|
-
var
|
|
110
|
+
var re = "[object RegExp]", ie = "[object String]", ae = "[object Number]", oe = "[object Boolean]", U = "[object Arguments]", W = "[object Symbol]", G = "[object Date]", K = "[object Map]", q = "[object Set]", se = "[object Array]", ce = "[object ArrayBuffer]", le = "[object Object]", ue = "[object DataView]", de = "[object Uint8Array]", fe = "[object Uint8ClampedArray]", pe = "[object Uint16Array]", me = "[object Uint32Array]", he = "[object Int8Array]", ge = "[object Int16Array]", _e = "[object Int32Array]", ve = "[object Float32Array]", ye = "[object Float64Array]";
|
|
598
111
|
//#endregion
|
|
599
112
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
600
|
-
function
|
|
113
|
+
function J(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
601
114
|
let a = i?.(e, t, n, r);
|
|
602
115
|
if (a !== void 0) return a;
|
|
603
|
-
if (
|
|
116
|
+
if (V(e)) return e;
|
|
604
117
|
if (r.has(e)) return r.get(e);
|
|
605
118
|
if (Array.isArray(e)) {
|
|
606
119
|
let t = Array(e.length);
|
|
607
120
|
r.set(e, t);
|
|
608
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
121
|
+
for (let a = 0; a < e.length; a++) t[a] = J(e[a], a, n, r, i);
|
|
609
122
|
return Object.hasOwn(e, "index") && (t.index = e.index), Object.hasOwn(e, "input") && (t.input = e.input), t;
|
|
610
123
|
}
|
|
611
124
|
if (e instanceof Date) return new Date(e.getTime());
|
|
@@ -616,196 +129,193 @@ function Y(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
616
129
|
if (e instanceof Map) {
|
|
617
130
|
let t = /* @__PURE__ */ new Map();
|
|
618
131
|
r.set(e, t);
|
|
619
|
-
for (let [a, o] of e) t.set(a,
|
|
132
|
+
for (let [a, o] of e) t.set(a, J(o, a, n, r, i));
|
|
620
133
|
return t;
|
|
621
134
|
}
|
|
622
135
|
if (e instanceof Set) {
|
|
623
136
|
let t = /* @__PURE__ */ new Set();
|
|
624
137
|
r.set(e, t);
|
|
625
|
-
for (let a of e) t.add(
|
|
138
|
+
for (let a of e) t.add(J(a, void 0, n, r, i));
|
|
626
139
|
return t;
|
|
627
140
|
}
|
|
628
141
|
if (typeof Buffer < "u" && Buffer.isBuffer(e)) return e.subarray();
|
|
629
|
-
if (
|
|
142
|
+
if (H(e)) {
|
|
630
143
|
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
631
144
|
r.set(e, t);
|
|
632
|
-
for (let a = 0; a < e.length; a++) t[a] =
|
|
145
|
+
for (let a = 0; a < e.length; a++) t[a] = J(e[a], a, n, r, i);
|
|
633
146
|
return t;
|
|
634
147
|
}
|
|
635
148
|
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
636
149
|
if (e instanceof DataView) {
|
|
637
150
|
let t = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
|
|
638
|
-
return r.set(e, t),
|
|
151
|
+
return r.set(e, t), Y(t, e, n, r, i), t;
|
|
639
152
|
}
|
|
640
153
|
if (typeof File < "u" && e instanceof File) {
|
|
641
154
|
let t = new File([e], e.name, { type: e.type });
|
|
642
|
-
return r.set(e, t),
|
|
155
|
+
return r.set(e, t), Y(t, e, n, r, i), t;
|
|
643
156
|
}
|
|
644
157
|
if (typeof Blob < "u" && e instanceof Blob) {
|
|
645
158
|
let t = new Blob([e], { type: e.type });
|
|
646
|
-
return r.set(e, t),
|
|
159
|
+
return r.set(e, t), Y(t, e, n, r, i), t;
|
|
647
160
|
}
|
|
648
161
|
if (e instanceof Error) {
|
|
649
162
|
let t = new e.constructor();
|
|
650
|
-
return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause,
|
|
163
|
+
return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause, Y(t, e, n, r, i), t;
|
|
651
164
|
}
|
|
652
165
|
if (e instanceof Boolean) {
|
|
653
166
|
let t = new Boolean(e.valueOf());
|
|
654
|
-
return r.set(e, t),
|
|
167
|
+
return r.set(e, t), Y(t, e, n, r, i), t;
|
|
655
168
|
}
|
|
656
169
|
if (e instanceof Number) {
|
|
657
170
|
let t = new Number(e.valueOf());
|
|
658
|
-
return r.set(e, t),
|
|
171
|
+
return r.set(e, t), Y(t, e, n, r, i), t;
|
|
659
172
|
}
|
|
660
173
|
if (e instanceof String) {
|
|
661
174
|
let t = new String(e.valueOf());
|
|
662
|
-
return r.set(e, t),
|
|
175
|
+
return r.set(e, t), Y(t, e, n, r, i), t;
|
|
663
176
|
}
|
|
664
|
-
if (typeof e == "object" &&
|
|
177
|
+
if (typeof e == "object" && be(e)) {
|
|
665
178
|
let t = Object.create(Object.getPrototypeOf(e));
|
|
666
|
-
return r.set(e, t),
|
|
179
|
+
return r.set(e, t), Y(t, e, n, r, i), t;
|
|
667
180
|
}
|
|
668
181
|
return e;
|
|
669
182
|
}
|
|
670
|
-
function
|
|
671
|
-
let a = [...Object.keys(t),
|
|
183
|
+
function Y(e, t, n = e, r, i) {
|
|
184
|
+
let a = [...Object.keys(t), ...te(t)];
|
|
672
185
|
for (let o = 0; o < a.length; o++) {
|
|
673
186
|
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
|
|
674
|
-
(c == null || c.writable) && (e[s] =
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
function
|
|
678
|
-
switch (
|
|
679
|
-
case
|
|
680
|
-
case
|
|
681
|
-
case
|
|
682
|
-
case
|
|
683
|
-
case
|
|
684
|
-
case
|
|
685
|
-
case
|
|
686
|
-
case
|
|
687
|
-
case
|
|
688
|
-
case
|
|
689
|
-
case
|
|
690
|
-
case
|
|
691
|
-
case
|
|
692
|
-
case
|
|
693
|
-
case
|
|
694
|
-
case
|
|
695
|
-
case
|
|
696
|
-
case
|
|
697
|
-
case
|
|
698
|
-
case
|
|
699
|
-
case
|
|
700
|
-
case
|
|
187
|
+
(c == null || c.writable) && (e[s] = J(t[s], s, n, r, i));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
function be(e) {
|
|
191
|
+
switch (ne(e)) {
|
|
192
|
+
case U:
|
|
193
|
+
case se:
|
|
194
|
+
case ce:
|
|
195
|
+
case ue:
|
|
196
|
+
case oe:
|
|
197
|
+
case G:
|
|
198
|
+
case ve:
|
|
199
|
+
case ye:
|
|
200
|
+
case he:
|
|
201
|
+
case ge:
|
|
202
|
+
case _e:
|
|
203
|
+
case K:
|
|
204
|
+
case ae:
|
|
205
|
+
case le:
|
|
206
|
+
case re:
|
|
207
|
+
case q:
|
|
208
|
+
case ie:
|
|
209
|
+
case W:
|
|
210
|
+
case de:
|
|
211
|
+
case fe:
|
|
212
|
+
case pe:
|
|
213
|
+
case me: return !0;
|
|
701
214
|
default: return !1;
|
|
702
215
|
}
|
|
703
216
|
}
|
|
704
217
|
//#endregion
|
|
705
218
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
|
|
706
|
-
function
|
|
707
|
-
return
|
|
219
|
+
function X(e) {
|
|
220
|
+
return J(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
|
|
708
221
|
}
|
|
709
222
|
//#endregion
|
|
710
223
|
//#region src/RightContent/utils.ts
|
|
711
|
-
function
|
|
224
|
+
function xe(e, t) {
|
|
712
225
|
let n = /* @__PURE__ */ new Map();
|
|
713
226
|
return e.filter((e) => {
|
|
714
227
|
let r = e[t];
|
|
715
228
|
return n.has(r) ? !1 : (n.set(r, e), !0);
|
|
716
229
|
});
|
|
717
230
|
}
|
|
718
|
-
var
|
|
719
|
-
function
|
|
231
|
+
var Se = "ABCDEFGHJKLMNOPQRSTWXYZ", Ce = "阿八嚓哒鹅发旮哈讥咔垃妈拿噢啪七日撒他挖昔压匝";
|
|
232
|
+
function we(e) {
|
|
720
233
|
let t = e.codePointAt(0);
|
|
721
234
|
if (t >= 65 && t <= 90) return e;
|
|
722
235
|
if (t >= 97 && t <= 122) return e.toUpperCase();
|
|
723
236
|
if (t < 19968 || t > 40959) return "";
|
|
724
|
-
for (let t = 22; t >= 0; t--) if (e.localeCompare(
|
|
237
|
+
for (let t = 22; t >= 0; t--) if (e.localeCompare(Ce[t], "zh-CN") >= 0) return Se[t];
|
|
725
238
|
return "";
|
|
726
239
|
}
|
|
727
|
-
function
|
|
240
|
+
function Te(e) {
|
|
728
241
|
let t = "";
|
|
729
|
-
for (let n of e) t +=
|
|
242
|
+
for (let n of e) t += we(n);
|
|
730
243
|
return t;
|
|
731
244
|
}
|
|
732
|
-
function
|
|
245
|
+
function Ee(e, t) {
|
|
733
246
|
if (!t) return !1;
|
|
734
247
|
let n = t.trim().toLowerCase();
|
|
735
|
-
return !!(e.toLowerCase().includes(n) ||
|
|
248
|
+
return !!(e.toLowerCase().includes(n) || Te(e).toLowerCase().includes(n));
|
|
736
249
|
}
|
|
737
|
-
function
|
|
250
|
+
function De(e, t) {
|
|
738
251
|
let n = t.trim();
|
|
739
252
|
if (!n) return [];
|
|
740
253
|
let r = [];
|
|
741
|
-
for (let t of e) t.meta?.hideInMenu ||
|
|
254
|
+
for (let t of e) t.meta?.hideInMenu || Ee(t.meta?.title || (typeof t.name == "string" ? t.name : "") || "", n) && r.push(t);
|
|
742
255
|
return r;
|
|
743
256
|
}
|
|
744
257
|
//#endregion
|
|
745
258
|
//#region src/RightContent/Search/Panel.tsx
|
|
746
|
-
var
|
|
747
|
-
image:
|
|
259
|
+
var Oe = ({ className: e, value: t, locale: n }) => t ? r(w, {
|
|
260
|
+
image: w.PRESENTED_IMAGE_SIMPLE,
|
|
748
261
|
description: n.noResult?.(t)
|
|
749
|
-
}, null) :
|
|
750
|
-
let
|
|
262
|
+
}, null) : r("div", { class: e }, [n.noHistory]), ke = /* @__PURE__ */ i((t) => {
|
|
263
|
+
let n = j(), { renderEmpty: i } = A(), a = v(t.historyKey || z({
|
|
751
264
|
suffixCls: "search-history",
|
|
752
265
|
isPro: !0
|
|
753
|
-
}), []),
|
|
754
|
-
let
|
|
755
|
-
if (!
|
|
756
|
-
|
|
266
|
+
}), []), o = l(0), f = l(X(u(a))), m = b((e) => {
|
|
267
|
+
let n = e.trim();
|
|
268
|
+
if (!n) {
|
|
269
|
+
f.value = [];
|
|
757
270
|
return;
|
|
758
271
|
}
|
|
759
|
-
|
|
272
|
+
f.value = De(t.dataSource ?? [], n), o.value = 0;
|
|
760
273
|
}, 200);
|
|
761
|
-
|
|
762
|
-
e ?
|
|
274
|
+
d(() => t.keyword, (e) => {
|
|
275
|
+
e ? m(e) : f.value = X(u(a));
|
|
763
276
|
});
|
|
764
|
-
function
|
|
765
|
-
document.querySelector(`[data-search-item="${
|
|
277
|
+
function g() {
|
|
278
|
+
document.querySelector(`[data-search-item="${o.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
766
279
|
}
|
|
767
|
-
async function
|
|
768
|
-
if (
|
|
769
|
-
let e =
|
|
280
|
+
async function _() {
|
|
281
|
+
if (f.value.length === 0) return;
|
|
282
|
+
let e = o.value;
|
|
770
283
|
if (e < 0) return;
|
|
771
|
-
let
|
|
772
|
-
if (!
|
|
773
|
-
let i =
|
|
774
|
-
|
|
284
|
+
let r = f.value[e];
|
|
285
|
+
if (!r) return;
|
|
286
|
+
let i = I(r.redirect) ? r.redirect : r.path || "", c = r.meta?.link || "", l = L(c);
|
|
287
|
+
a.value.every((e) => e.name !== r.name) && a.value.push(X(r)), t.onClose?.(!0), await s(), l && c && r.meta?.linkStatus === 1 ? window.open(c, "_blank") : n.push({ path: i });
|
|
775
288
|
}
|
|
776
|
-
function
|
|
777
|
-
|
|
289
|
+
function y() {
|
|
290
|
+
f.value.length !== 0 && (t.onBlur?.(), o.value--, o.value < 0 && (o.value = f.value.length - 1), g());
|
|
778
291
|
}
|
|
779
|
-
function
|
|
780
|
-
|
|
292
|
+
function x() {
|
|
293
|
+
f.value.length !== 0 && (t.onBlur?.(), o.value++, o.value > f.value.length - 1 && (o.value = 0), g());
|
|
781
294
|
}
|
|
782
|
-
|
|
783
|
-
|
|
295
|
+
c(() => {
|
|
296
|
+
h("Enter", _), h("ArrowUp", y), h("ArrowDown", x);
|
|
784
297
|
});
|
|
785
|
-
function
|
|
786
|
-
|
|
787
|
-
}
|
|
788
|
-
function
|
|
789
|
-
e.stopPropagation(),
|
|
790
|
-
}
|
|
791
|
-
let
|
|
792
|
-
return () => {
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
locale: n.locale
|
|
807
|
-
}, null)]);
|
|
808
|
-
};
|
|
298
|
+
function S(e) {
|
|
299
|
+
o.value = e;
|
|
300
|
+
}
|
|
301
|
+
function C(e, t) {
|
|
302
|
+
e.stopPropagation(), f.value = f.value.filter((e) => e.name !== t.name), a.value = a.value.filter((e) => e.name !== t.name), o.value = o.value - 1 >= 0 ? o.value - 1 : 0, g();
|
|
303
|
+
}
|
|
304
|
+
let w = (e) => B(`${t.className}${e ? `-${e}` : ""}`, t.hashId);
|
|
305
|
+
return () => r(e, null, [f.value.length > 0 ? r(e, null, [a.value.length > 0 && !t.keyword && r("div", { class: w("panel-title") }, [t.locale.searchHistory]), r("div", { class: w("panel-list") }, [xe(f.value, "name").map((e, n) => r("div", {
|
|
306
|
+
key: e.name,
|
|
307
|
+
class: w(B("panel-item", n === o.value && "active")),
|
|
308
|
+
"data-search-item": n,
|
|
309
|
+
onClick: () => _(),
|
|
310
|
+
onMouseenter: () => S(n)
|
|
311
|
+
}, [r("div", { class: w("panel-item-left") }, [e.meta?.title]), a.value.length > 0 && !t.keyword && r(p, {
|
|
312
|
+
type: "CloseOutlined",
|
|
313
|
+
onClick: (t) => C(t, e)
|
|
314
|
+
}, null)]))])]) : i.value?.() || r(Oe, {
|
|
315
|
+
className: w("result"),
|
|
316
|
+
value: t.keyword,
|
|
317
|
+
locale: t.locale
|
|
318
|
+
}, null)]);
|
|
809
319
|
}, {
|
|
810
320
|
props: {
|
|
811
321
|
className: {
|
|
@@ -847,7 +357,7 @@ var jt = ({ className: e, value: t, locale: n }) => t ? i(M, {
|
|
|
847
357
|
},
|
|
848
358
|
name: "GSearchPanel",
|
|
849
359
|
inheritAttrs: !1
|
|
850
|
-
}),
|
|
360
|
+
}), Z = k("ProRightSearch", (e) => {
|
|
851
361
|
let t = e.menuItemIconSize || e.fontSize, n = e.calc(e.borderRadiusLG).mul(2).equal(), r = e.calc(e.paddingXXS).div(2).equal();
|
|
852
362
|
return { [e.componentCls]: {
|
|
853
363
|
display: "flex",
|
|
@@ -935,42 +445,45 @@ var jt = ({ className: e, value: t, locale: n }) => t ? i(M, {
|
|
|
935
445
|
color: e.colorTextQuaternary
|
|
936
446
|
}
|
|
937
447
|
} };
|
|
938
|
-
}),
|
|
939
|
-
|
|
940
|
-
|
|
448
|
+
}), Ae = ({ className: e, hashId: t, locale: n }) => r("div", { class: B(`${e}-footer`, t) }, [r("div", { class: B(`${e}-footer-icon`, t) }, [r(p, { type: "EnterOutlined" }, null), n.selectLabel]), r("div", { class: B(`${e}-footer-icon`, t) }, [
|
|
449
|
+
r(p, { type: "ArrowUpOutlined" }, null),
|
|
450
|
+
r(p, {
|
|
451
|
+
type: "ArrowUpOutlined",
|
|
452
|
+
rotate: 180
|
|
453
|
+
}, null),
|
|
941
454
|
n.navigateLabel
|
|
942
|
-
])]),
|
|
943
|
-
let a =
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
}),
|
|
947
|
-
|
|
948
|
-
|
|
455
|
+
])]), je = /* @__PURE__ */ i((i) => {
|
|
456
|
+
let a = m(), { prefixCls: c } = E("pro-right-search"), u = D(c), [d, f] = Z(c, u), h = l(""), g = l(!1), _ = y(), v = M() ? _["ctrl+k"] : _["cmd+k"], b = l(), S = t(() => i.dataSource?.length ? R(i.dataSource) : a?.menuState?.flatMenus ? a.menuState.flatMenus.value : []);
|
|
457
|
+
x(v, () => {
|
|
458
|
+
i.disabledShortKey || (g.value = !0);
|
|
459
|
+
}), x(() => g.value, () => {
|
|
460
|
+
s(() => {
|
|
461
|
+
b.value?.focus?.();
|
|
949
462
|
});
|
|
950
463
|
});
|
|
951
|
-
function
|
|
952
|
-
|
|
464
|
+
function C(e) {
|
|
465
|
+
g.value = !1, e && (h.value = "");
|
|
953
466
|
}
|
|
954
467
|
return () => {
|
|
955
|
-
let
|
|
956
|
-
className:
|
|
957
|
-
hashId:
|
|
958
|
-
}, a = `${
|
|
959
|
-
return
|
|
960
|
-
class:
|
|
468
|
+
let t = {
|
|
469
|
+
className: c.value,
|
|
470
|
+
hashId: d.value
|
|
471
|
+
}, a = `${c.value}-modal`;
|
|
472
|
+
return r(e, null, [r("div", {
|
|
473
|
+
class: B(c.value, d.value, f.value, u.value),
|
|
961
474
|
onClick: () => {
|
|
962
|
-
|
|
475
|
+
g.value = !0;
|
|
963
476
|
}
|
|
964
477
|
}, [
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
478
|
+
r(p, { type: "SearchOutlined" }, null),
|
|
479
|
+
r("span", { class: B(`${c.value}-word`, d.value) }, [i.locale.searchLabel]),
|
|
480
|
+
r("span", { class: B(`${c.value}-word-icon`, d.value) }, [
|
|
481
|
+
n("⌘"),
|
|
969
482
|
" ",
|
|
970
|
-
|
|
483
|
+
r("kbd", null, [n("K")])
|
|
971
484
|
])
|
|
972
|
-
]),
|
|
973
|
-
wrapClassName:
|
|
485
|
+
]), r(O, {
|
|
486
|
+
wrapClassName: B(a, d.value),
|
|
974
487
|
width: 600,
|
|
975
488
|
scrollProps: {
|
|
976
489
|
maxHeight: 400,
|
|
@@ -978,34 +491,35 @@ var jt = ({ className: e, value: t, locale: n }) => t ? i(M, {
|
|
|
978
491
|
},
|
|
979
492
|
centered: !1,
|
|
980
493
|
destroyOnHidden: !1,
|
|
981
|
-
title:
|
|
494
|
+
title: r(T, {
|
|
982
495
|
style: {
|
|
983
496
|
width: `${600 * .8}px`,
|
|
984
497
|
padding: 0
|
|
985
498
|
},
|
|
986
|
-
ref:
|
|
499
|
+
ref: b,
|
|
987
500
|
bordered: !1,
|
|
988
501
|
size: "large",
|
|
989
|
-
placeholder:
|
|
990
|
-
value:
|
|
502
|
+
placeholder: i.locale.searchPlaceholder,
|
|
503
|
+
value: h.value,
|
|
504
|
+
prefix: r(p, { type: "SearchOutlined" }, null),
|
|
991
505
|
"onUpdate:value": (e) => {
|
|
992
|
-
|
|
506
|
+
h.value = e;
|
|
993
507
|
}
|
|
994
|
-
},
|
|
995
|
-
open:
|
|
996
|
-
footer:
|
|
508
|
+
}, null),
|
|
509
|
+
open: g.value,
|
|
510
|
+
footer: r(Ae, {
|
|
997
511
|
className: a,
|
|
998
|
-
hashId:
|
|
999
|
-
locale:
|
|
512
|
+
hashId: d.value,
|
|
513
|
+
locale: i.locale
|
|
1000
514
|
}, null),
|
|
1001
|
-
onCancel: () =>
|
|
1002
|
-
}, { default: () => [
|
|
1003
|
-
emptyProps:
|
|
1004
|
-
keyword:
|
|
1005
|
-
dataSource:
|
|
1006
|
-
historyKey:
|
|
1007
|
-
locale:
|
|
1008
|
-
onClose:
|
|
515
|
+
onCancel: () => C()
|
|
516
|
+
}, { default: () => [r(ke, o(t, {
|
|
517
|
+
emptyProps: i.emptyProps,
|
|
518
|
+
keyword: h.value,
|
|
519
|
+
dataSource: S.value,
|
|
520
|
+
historyKey: i.searchHistoryKey,
|
|
521
|
+
locale: i.locale,
|
|
522
|
+
onClose: C
|
|
1009
523
|
}), null)] })]);
|
|
1010
524
|
};
|
|
1011
525
|
}, {
|
|
@@ -1037,10 +551,10 @@ var jt = ({ className: e, value: t, locale: n }) => t ? i(M, {
|
|
|
1037
551
|
});
|
|
1038
552
|
//#endregion
|
|
1039
553
|
//#region src/RightContent/style.ts
|
|
1040
|
-
function
|
|
554
|
+
function Me(e, t) {
|
|
1041
555
|
return `color-mix(in srgb, ${e} ${t * 100}%, transparent)`;
|
|
1042
556
|
}
|
|
1043
|
-
var
|
|
557
|
+
var Ne = k("ProRightContent", (e) => ({ [e.componentCls]: {
|
|
1044
558
|
height: "100%",
|
|
1045
559
|
"&-header-actions": {
|
|
1046
560
|
display: "flex",
|
|
@@ -1089,7 +603,7 @@ var Lt = me("ProRightContent", (e) => ({ [e.componentCls]: {
|
|
|
1089
603
|
height: 44,
|
|
1090
604
|
lineHeight: "44px",
|
|
1091
605
|
borderRadius: e.borderRadius,
|
|
1092
|
-
"&:hover": { backgroundColor:
|
|
606
|
+
"&:hover": { backgroundColor: Me(e.colorTextBase, .03) }
|
|
1093
607
|
},
|
|
1094
608
|
"&-avatar": {
|
|
1095
609
|
display: "inline-flex",
|
|
@@ -1105,119 +619,128 @@ var Lt = me("ProRightContent", (e) => ({ [e.componentCls]: {
|
|
|
1105
619
|
}
|
|
1106
620
|
} })), Q = { fontSize: "15px" };
|
|
1107
621
|
function $(e, t) {
|
|
1108
|
-
return () =>
|
|
622
|
+
return () => r("div", { style: {
|
|
1109
623
|
display: "flex",
|
|
1110
624
|
alignItems: "center",
|
|
1111
625
|
gap: "6px"
|
|
1112
626
|
} }, [typeof e == "function" ? e() : e, t]);
|
|
1113
627
|
}
|
|
1114
|
-
var
|
|
628
|
+
var Pe = [
|
|
1115
629
|
{
|
|
1116
630
|
value: "light",
|
|
1117
|
-
label: $(
|
|
631
|
+
label: $(a(p, {
|
|
1118
632
|
type: "Moon",
|
|
1119
633
|
style: Q
|
|
1120
634
|
}), "亮色")
|
|
1121
635
|
},
|
|
1122
636
|
{
|
|
1123
637
|
value: "dark",
|
|
1124
|
-
label: $(
|
|
1125
|
-
type: "
|
|
638
|
+
label: $(a(p, {
|
|
639
|
+
type: "Sun",
|
|
1126
640
|
style: Q
|
|
1127
641
|
}), "深色")
|
|
1128
642
|
},
|
|
1129
643
|
{
|
|
1130
644
|
value: "system",
|
|
1131
|
-
label: $(
|
|
645
|
+
label: $(a(p, {
|
|
646
|
+
type: "DesktopOutlined",
|
|
647
|
+
style: Q
|
|
648
|
+
}), "自动")
|
|
1132
649
|
}
|
|
1133
|
-
],
|
|
1134
|
-
let { isFullscreen:
|
|
1135
|
-
|
|
1136
|
-
|
|
650
|
+
], Fe = /* @__PURE__ */ i((n, { emit: i, slots: a }) => {
|
|
651
|
+
let { isFullscreen: s, toggle: c } = _(), u = m(), { setTheme: h, isDark: v, theme: y } = f(), { prefixCls: b } = E("pro-right-content"), x = D(b), [w, T] = Ne(b, x), O = t(() => u?.isMobile.value ?? !1), k = l(), { width: A } = g(k), j = l("auto"), M = l();
|
|
652
|
+
d(A, (e) => {
|
|
653
|
+
j.value = e > 0 ? e : "auto";
|
|
1137
654
|
});
|
|
1138
|
-
let
|
|
1139
|
-
...
|
|
1140
|
-
...
|
|
1141
|
-
})),
|
|
655
|
+
let N = l(!1), P = t(() => ({
|
|
656
|
+
...ee,
|
|
657
|
+
...n.locale
|
|
658
|
+
})), F = t(() => n.actions === !1 ? {} : {
|
|
1142
659
|
lock: !0,
|
|
1143
660
|
theme: !0,
|
|
1144
661
|
search: !0,
|
|
1145
662
|
themeEditor: !0,
|
|
1146
663
|
fullScreen: !0,
|
|
1147
|
-
...
|
|
1148
|
-
}),
|
|
664
|
+
...n.actions
|
|
665
|
+
}), I = t(() => (n.themeOptions || Pe).map((e) => ({
|
|
1149
666
|
key: e.value,
|
|
1150
667
|
label: e.label()
|
|
1151
668
|
})));
|
|
1152
|
-
function
|
|
669
|
+
function L(e) {
|
|
1153
670
|
let t = e.key;
|
|
1154
|
-
|
|
671
|
+
h(t);
|
|
1155
672
|
}
|
|
1156
|
-
let
|
|
673
|
+
let R = t(() => {
|
|
1157
674
|
let e = [];
|
|
1158
|
-
return
|
|
675
|
+
return F.value.lock && a.lock && (e.push({
|
|
1159
676
|
key: "lock",
|
|
1160
|
-
icon: () =>
|
|
1161
|
-
label:
|
|
677
|
+
icon: () => r(p, { type: "LockOutlined" }, null),
|
|
678
|
+
label: P.value.lockScreen
|
|
1162
679
|
}), e.push({ type: "divider" })), e.push({
|
|
1163
680
|
key: "logout",
|
|
1164
|
-
icon: () =>
|
|
1165
|
-
label:
|
|
681
|
+
icon: () => r(p, { type: "LogoutOutlined" }, null),
|
|
682
|
+
label: P.value.logout
|
|
1166
683
|
}), e;
|
|
1167
684
|
});
|
|
1168
|
-
function
|
|
1169
|
-
e.key === "lock" ?
|
|
685
|
+
function z(e) {
|
|
686
|
+
e.key === "lock" ? N.value = !0 : e.key === "logout" && i("logout");
|
|
1170
687
|
}
|
|
1171
|
-
function
|
|
1172
|
-
|
|
688
|
+
function V(e) {
|
|
689
|
+
i("actionClick", e);
|
|
1173
690
|
}
|
|
1174
|
-
function
|
|
1175
|
-
|
|
691
|
+
function H(e) {
|
|
692
|
+
N.value = e;
|
|
1176
693
|
}
|
|
1177
694
|
return () => {
|
|
1178
|
-
let
|
|
1179
|
-
return
|
|
1180
|
-
ref:
|
|
1181
|
-
class:
|
|
695
|
+
let t = [`${b.value}-header-actions-item`, w.value];
|
|
696
|
+
return r("div", {
|
|
697
|
+
ref: k,
|
|
698
|
+
class: B(b.value, w.value, T.value, x.value),
|
|
1182
699
|
style: {
|
|
1183
|
-
minWidth:
|
|
700
|
+
minWidth: j.value,
|
|
1184
701
|
height: "100%"
|
|
1185
702
|
}
|
|
1186
|
-
}, [
|
|
1187
|
-
|
|
1188
|
-
dataSource:
|
|
1189
|
-
disabledShortKey:
|
|
1190
|
-
searchHistoryKey:
|
|
1191
|
-
emptyProps:
|
|
1192
|
-
locale:
|
|
703
|
+
}, [r("div", { style: { height: "100%" } }, [r("div", { class: B(`${b.value}-header-actions`, w.value) }, [a.default ? a.default() : r(e, null, [
|
|
704
|
+
F.value.search && !O.value && r(je, {
|
|
705
|
+
dataSource: n.searchConfig?.dataSource,
|
|
706
|
+
disabledShortKey: n.searchConfig?.disabledShortKey,
|
|
707
|
+
searchHistoryKey: n.searchConfig?.historyKey,
|
|
708
|
+
emptyProps: n.searchConfig?.emptyProps,
|
|
709
|
+
locale: P.value
|
|
1193
710
|
}, null),
|
|
1194
|
-
|
|
1195
|
-
ref:
|
|
1196
|
-
class:
|
|
1197
|
-
}, [
|
|
711
|
+
F.value.theme && r("div", {
|
|
712
|
+
ref: M,
|
|
713
|
+
class: B(`${b.value}-header-actions-item`, `${b.value}-header-actions-theme`, w.value)
|
|
714
|
+
}, [r(C, {
|
|
1198
715
|
trigger: ["click"],
|
|
1199
716
|
placement: "bottomRight",
|
|
1200
717
|
menu: {
|
|
1201
|
-
items:
|
|
1202
|
-
onClick:
|
|
1203
|
-
selectedKeys: [
|
|
718
|
+
items: I.value,
|
|
719
|
+
onClick: L,
|
|
720
|
+
selectedKeys: [y.value]
|
|
1204
721
|
}
|
|
1205
|
-
}, { default: () => [
|
|
1206
|
-
class:
|
|
1207
|
-
type:
|
|
722
|
+
}, { default: () => [r(p, {
|
|
723
|
+
class: B(`${b.value}-header-actions-icon`, w.value),
|
|
724
|
+
type: v.value ? "Moon" : "Sun"
|
|
1208
725
|
}, null)] })]),
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
726
|
+
F.value.themeEditor && !O.value && r("div", { class: B(t) }, [r(p, {
|
|
727
|
+
type: "SettingOutlined",
|
|
728
|
+
onClick: () => V("themeEditor")
|
|
729
|
+
}, null)]),
|
|
730
|
+
F.value.fullScreen && !O.value && r("div", { class: B(t) }, [r(p, {
|
|
731
|
+
type: s.value ? "CompressOutlined" : "ExpandOutlined",
|
|
732
|
+
onClick: () => c()
|
|
733
|
+
}, null)]),
|
|
734
|
+
a.actionsRender?.(t)
|
|
735
|
+
]), r(C, o({ placement: "bottomRight" }, n.dropdownProps, { menu: a.dropdownMenu ? void 0 : {
|
|
736
|
+
items: R.value,
|
|
737
|
+
onClick: z
|
|
738
|
+
} }), { default: () => [a.dropdownTrigger ? a.dropdownTrigger() : r("div", { class: B(`${b.value}-header-actions-avatar`, w.value) }, [r(S, {
|
|
1216
739
|
size: 28,
|
|
1217
|
-
icon:
|
|
1218
|
-
}, null),
|
|
1219
|
-
open:
|
|
1220
|
-
onOpenChange:
|
|
740
|
+
icon: r(p, { type: "UserOutlined" }, null)
|
|
741
|
+
}, null), n.name && r("span", { class: B(`${b.value}-header-actions-name`, w.value) }, [n.name])])] })])]), a.lock?.({
|
|
742
|
+
open: N.value,
|
|
743
|
+
onOpenChange: H
|
|
1221
744
|
})]);
|
|
1222
745
|
};
|
|
1223
746
|
}, {
|
|
@@ -1257,4 +780,4 @@ var Rt = [
|
|
|
1257
780
|
inheritAttrs: !1
|
|
1258
781
|
});
|
|
1259
782
|
//#endregion
|
|
1260
|
-
export {
|
|
783
|
+
export { Fe as RightContent };
|