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