@gx-design-vue/pro-layout-components 0.1.0-alpha.2 → 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.
- package/dist/RightContent/Search/Panel.js +6 -12
- package/dist/pro-layout-components.esm.js +338 -373
- package/dist/pro-layout-components.js +1 -1
- package/global.d.ts +1 -3
- package/package.json +9 -10
|
@@ -1,31 +1,28 @@
|
|
|
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
|
|
5
|
-
import { useInjectLayoutContext as
|
|
6
|
-
import { Avatar as
|
|
7
|
-
import { useBaseConfig as
|
|
8
|
-
import
|
|
9
|
-
import { GProModal as
|
|
10
|
-
import {
|
|
11
|
-
import { useRouter as
|
|
12
|
-
import { proGenStyleHooks as F } from "@gx-design-vue/pro-provider";
|
|
13
|
-
typeof process < "u" && process.versions != null && process.versions.node;
|
|
14
|
-
//#endregion
|
|
4
|
+
import { GIcon as A } from "@gx-design-vue/icon";
|
|
5
|
+
import { useInjectLayoutContext as ae } from "@gx-design-vue/pro-layout";
|
|
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";
|
|
15
12
|
//#region ../pro-utils/dist/is/device.js
|
|
16
|
-
function
|
|
17
|
-
return /windows|win32/i.test(navigator.userAgent);
|
|
13
|
+
function de() {
|
|
14
|
+
return typeof navigator > "u" ? !1 : /windows|win32/i.test(navigator.userAgent);
|
|
18
15
|
}
|
|
19
16
|
//#endregion
|
|
20
17
|
//#region ../pro-utils/dist/is/type.js
|
|
21
|
-
function
|
|
18
|
+
function fe(e, t) {
|
|
22
19
|
return Object.prototype.toString.call(e) === `[object ${t}]`;
|
|
23
20
|
}
|
|
24
|
-
function
|
|
21
|
+
function pe(e) {
|
|
25
22
|
return Array.isArray === void 0 ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
|
|
26
23
|
}
|
|
27
24
|
function me(e) {
|
|
28
|
-
return e !== null &&
|
|
25
|
+
return e !== null && fe(e, "Object");
|
|
29
26
|
}
|
|
30
27
|
function he(e) {
|
|
31
28
|
return typeof e == "string";
|
|
@@ -36,8 +33,8 @@ function ge(e) {
|
|
|
36
33
|
if (!e || !e.startsWith("http")) return !1;
|
|
37
34
|
try {
|
|
38
35
|
return !!new URL(e);
|
|
39
|
-
} catch
|
|
40
|
-
return
|
|
36
|
+
} catch {
|
|
37
|
+
return !1;
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
//#endregion
|
|
@@ -45,51 +42,25 @@ function ge(e) {
|
|
|
45
42
|
function _e(e, t = "children") {
|
|
46
43
|
let n = [];
|
|
47
44
|
return e.forEach((e) => {
|
|
48
|
-
n.push(e),
|
|
45
|
+
n.push(e), pe(e[t]) && e[t].length > 0 && (n = n.concat(_e(e[t], t)));
|
|
49
46
|
}), n;
|
|
50
47
|
}
|
|
51
48
|
//#endregion
|
|
52
49
|
//#region ../pro-utils/dist/class/prefix.js
|
|
53
|
-
function ve({ suffixCls: e, customizePrefixCls: t,
|
|
50
|
+
function ve({ suffixCls: e, customizePrefixCls: t, isPro: n, className: r }) {
|
|
54
51
|
let i = r || (n ? "gx-pro" : "gx");
|
|
55
52
|
return t || (e ? `${i}-${e}` : i);
|
|
56
53
|
}
|
|
57
54
|
//#endregion
|
|
58
|
-
//#region ../pro-utils/dist/dom/raf.js
|
|
59
|
-
var ye = (e) => setTimeout(e, 16), be = (e) => clearTimeout(e);
|
|
60
|
-
typeof window < "u" && "requestAnimationFrame" in window && (ye = (e) => window.requestAnimationFrame(e), be = (e) => window.cancelAnimationFrame(e));
|
|
61
|
-
var xe = 0, L = /* @__PURE__ */ new Map();
|
|
62
|
-
function Se(e) {
|
|
63
|
-
L.delete(e);
|
|
64
|
-
}
|
|
65
|
-
function Ce(e, t = 1) {
|
|
66
|
-
xe += 1;
|
|
67
|
-
let n = xe;
|
|
68
|
-
function r(t) {
|
|
69
|
-
if (t === 0) Se(n), e();
|
|
70
|
-
else {
|
|
71
|
-
let e = ye(() => {
|
|
72
|
-
r(t - 1);
|
|
73
|
-
});
|
|
74
|
-
L.set(n, e);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return r(t), n;
|
|
78
|
-
}
|
|
79
|
-
Ce.cancel = (e) => {
|
|
80
|
-
let t = L.get(e);
|
|
81
|
-
return Se(t), be(t);
|
|
82
|
-
};
|
|
83
|
-
//#endregion
|
|
84
55
|
//#region ../pro-utils/dist/object/classNames.js
|
|
85
|
-
function
|
|
56
|
+
function I(...e) {
|
|
86
57
|
let t = [];
|
|
87
58
|
for (let n = 0; n < e.length; n++) {
|
|
88
59
|
let r = e[n];
|
|
89
60
|
if (r) {
|
|
90
61
|
if (he(r)) t.push(r);
|
|
91
|
-
else if (
|
|
92
|
-
let n =
|
|
62
|
+
else if (pe(r)) for (let e = 0; e < r.length; e++) {
|
|
63
|
+
let n = I(r[e]);
|
|
93
64
|
n && t.push(n);
|
|
94
65
|
}
|
|
95
66
|
else if (me(r)) for (let e in r) r[e] && t.push(e);
|
|
@@ -99,21 +70,21 @@ function R(...e) {
|
|
|
99
70
|
}
|
|
100
71
|
//#endregion
|
|
101
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
|
|
102
|
-
function
|
|
103
|
-
return
|
|
73
|
+
function ye(e, t) {
|
|
74
|
+
return s() ? (p(e, t), !0) : !1;
|
|
104
75
|
}
|
|
105
|
-
var
|
|
76
|
+
var L = typeof window < "u" && typeof document < "u";
|
|
106
77
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
107
|
-
var
|
|
108
|
-
function
|
|
109
|
-
if (e.length !== 1) return
|
|
78
|
+
var be = Object.prototype.toString, xe = (e) => be.call(e) === "[object Object]", R = () => {};
|
|
79
|
+
function Se(...e) {
|
|
80
|
+
if (e.length !== 1) return y(...e);
|
|
110
81
|
let t = e[0];
|
|
111
|
-
return typeof t == "function" ?
|
|
82
|
+
return typeof t == "function" ? h(i(() => ({
|
|
112
83
|
get: t,
|
|
113
|
-
set:
|
|
114
|
-
}))) :
|
|
84
|
+
set: R
|
|
85
|
+
}))) : g(t);
|
|
115
86
|
}
|
|
116
|
-
function
|
|
87
|
+
function Ce(e, t) {
|
|
117
88
|
function n(...n) {
|
|
118
89
|
return new Promise((r, i) => {
|
|
119
90
|
Promise.resolve(e(() => t.apply(this, n), {
|
|
@@ -125,24 +96,24 @@ function Oe(e, t) {
|
|
|
125
96
|
}
|
|
126
97
|
return n;
|
|
127
98
|
}
|
|
128
|
-
var
|
|
129
|
-
function
|
|
130
|
-
let t = 0, n, r = !0, i =
|
|
131
|
-
!
|
|
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;
|
|
132
103
|
let d = () => {
|
|
133
|
-
n && (clearTimeout(n), n = void 0, i(), i =
|
|
104
|
+
n && (clearTimeout(n), n = void 0, i(), i = R);
|
|
134
105
|
};
|
|
135
106
|
return (e) => {
|
|
136
|
-
let
|
|
137
|
-
return d(),
|
|
138
|
-
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(() => {
|
|
139
110
|
t = Date.now(), r = !0, e(p()), d();
|
|
140
|
-
}, Math.max(0,
|
|
141
|
-
})), !c && !n && (n = setTimeout(() => r = !0,
|
|
111
|
+
}, Math.max(0, l - f));
|
|
112
|
+
})), !c && !n && (n = setTimeout(() => r = !0, l)), r = !1, a);
|
|
142
113
|
};
|
|
143
114
|
}
|
|
144
|
-
function
|
|
145
|
-
let { initialState: n = "active" } = t, r =
|
|
115
|
+
function Te(e = z, t = {}) {
|
|
116
|
+
let { initialState: n = "active" } = t, r = Se(n === "active");
|
|
146
117
|
function i() {
|
|
147
118
|
r.value = !1;
|
|
148
119
|
}
|
|
@@ -150,7 +121,7 @@ function je(e = ke, t = {}) {
|
|
|
150
121
|
r.value = !0;
|
|
151
122
|
}
|
|
152
123
|
return {
|
|
153
|
-
isActive:
|
|
124
|
+
isActive: _(r),
|
|
154
125
|
pause: i,
|
|
155
126
|
resume: a,
|
|
156
127
|
eventFilter: (...t) => {
|
|
@@ -158,23 +129,23 @@ function je(e = ke, t = {}) {
|
|
|
158
129
|
}
|
|
159
130
|
};
|
|
160
131
|
}
|
|
161
|
-
function
|
|
132
|
+
function B(e) {
|
|
162
133
|
return Array.isArray(e) ? e : [e];
|
|
163
134
|
}
|
|
164
|
-
function
|
|
165
|
-
return e ||
|
|
135
|
+
function Ee(e) {
|
|
136
|
+
return e || o();
|
|
166
137
|
}
|
|
167
|
-
function
|
|
168
|
-
return
|
|
138
|
+
function De(e, t = 200, n = !1, r = !0, i = !1) {
|
|
139
|
+
return Ce(we(t, n, r, i), e);
|
|
169
140
|
}
|
|
170
|
-
function
|
|
171
|
-
let { eventFilter: r =
|
|
172
|
-
return
|
|
141
|
+
function Oe(e, t, n = {}) {
|
|
142
|
+
let { eventFilter: r = z, ...i } = n;
|
|
143
|
+
return S(e, Ce(r, t), i);
|
|
173
144
|
}
|
|
174
|
-
function
|
|
175
|
-
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 });
|
|
176
147
|
return {
|
|
177
|
-
stop:
|
|
148
|
+
stop: Oe(e, t, {
|
|
178
149
|
...a,
|
|
179
150
|
eventFilter: o
|
|
180
151
|
}),
|
|
@@ -183,18 +154,18 @@ function Fe(e, t, n = {}) {
|
|
|
183
154
|
isActive: l
|
|
184
155
|
};
|
|
185
156
|
}
|
|
186
|
-
function
|
|
187
|
-
|
|
157
|
+
function V(e, t = !0, n) {
|
|
158
|
+
Ee(n) ? f(e, n) : t ? e() : d(e);
|
|
188
159
|
}
|
|
189
|
-
function
|
|
190
|
-
return
|
|
160
|
+
function Ae(e, t, n) {
|
|
161
|
+
return S(e, t, {
|
|
191
162
|
...n,
|
|
192
163
|
immediate: !0
|
|
193
164
|
});
|
|
194
165
|
}
|
|
195
|
-
function
|
|
196
|
-
let r =
|
|
197
|
-
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));
|
|
198
169
|
}, {
|
|
199
170
|
...n,
|
|
200
171
|
once: !1
|
|
@@ -203,63 +174,63 @@ function Le(e, t, n) {
|
|
|
203
174
|
}
|
|
204
175
|
//#endregion
|
|
205
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
|
|
206
|
-
var U =
|
|
207
|
-
|
|
177
|
+
var U = L ? window : void 0, je = L ? window.document : void 0;
|
|
178
|
+
L && window.navigator, L && window.location;
|
|
208
179
|
function W(e) {
|
|
209
|
-
let t =
|
|
180
|
+
let t = b(e);
|
|
210
181
|
return t?.$el ?? t;
|
|
211
182
|
}
|
|
212
183
|
function G(...e) {
|
|
213
|
-
let
|
|
214
|
-
let t =
|
|
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);
|
|
215
186
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
216
187
|
});
|
|
217
|
-
return
|
|
188
|
+
return Ae(() => [
|
|
218
189
|
r.value?.map((e) => W(e)) ?? [U].filter((e) => e != null),
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
], ([e,
|
|
223
|
-
if (!e?.length || !
|
|
224
|
-
let s =
|
|
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))));
|
|
225
196
|
o(() => {
|
|
226
197
|
c.forEach((e) => e());
|
|
227
198
|
});
|
|
228
199
|
}, { flush: "post" });
|
|
229
200
|
}
|
|
230
|
-
function
|
|
231
|
-
let e =
|
|
232
|
-
return t &&
|
|
201
|
+
function Me() {
|
|
202
|
+
let e = v(!1), t = o();
|
|
203
|
+
return t && f(() => {
|
|
233
204
|
e.value = !0;
|
|
234
205
|
}, t), e;
|
|
235
206
|
}
|
|
236
207
|
/* @__NO_SIDE_EFFECTS__ */
|
|
237
|
-
function
|
|
238
|
-
let
|
|
239
|
-
return
|
|
208
|
+
function Ne(e) {
|
|
209
|
+
let n = Me();
|
|
210
|
+
return t(() => (n.value, !!e()));
|
|
240
211
|
}
|
|
241
|
-
function
|
|
212
|
+
function Pe(e) {
|
|
242
213
|
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
243
214
|
}
|
|
244
215
|
function K(...e) {
|
|
245
216
|
let t, n, r = {};
|
|
246
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]);
|
|
247
|
-
let { target: i = U, eventName: a = "keydown", passive: o = !1, dedupe: s = !1 } = r, c =
|
|
218
|
+
let { target: i = U, eventName: a = "keydown", passive: o = !1, dedupe: s = !1 } = r, c = Pe(t);
|
|
248
219
|
return G(i, a, (e) => {
|
|
249
|
-
e.repeat &&
|
|
220
|
+
e.repeat && b(s) || c(e) && n(e);
|
|
250
221
|
}, o);
|
|
251
222
|
}
|
|
252
|
-
var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, J = "__vueuse_ssr_handlers__",
|
|
253
|
-
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() {
|
|
254
225
|
return J in q || (q[J] = q[J] || {}), q[J];
|
|
255
226
|
}
|
|
256
|
-
function
|
|
257
|
-
return
|
|
227
|
+
function Le(e, t) {
|
|
228
|
+
return Fe[e] || t;
|
|
258
229
|
}
|
|
259
|
-
function
|
|
230
|
+
function Re(e) {
|
|
260
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";
|
|
261
232
|
}
|
|
262
|
-
var
|
|
233
|
+
var ze = {
|
|
263
234
|
boolean: {
|
|
264
235
|
read: (e) => e === "true",
|
|
265
236
|
write: (e) => String(e)
|
|
@@ -292,61 +263,61 @@ var Ke = {
|
|
|
292
263
|
read: (e) => new Date(e),
|
|
293
264
|
write: (e) => e.toISOString()
|
|
294
265
|
}
|
|
295
|
-
},
|
|
296
|
-
function
|
|
297
|
-
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) => {
|
|
298
269
|
console.error(e);
|
|
299
|
-
}, initOnMounted: h } = i,
|
|
270
|
+
}, initOnMounted: h } = i, _ = (u ? v : g)(typeof n == "function" ? n() : n), y = t(() => b(e));
|
|
300
271
|
if (!r) try {
|
|
301
|
-
r =
|
|
272
|
+
r = Le("getDefaultStorage", () => U?.localStorage)();
|
|
302
273
|
} catch (e) {
|
|
303
274
|
m(e);
|
|
304
275
|
}
|
|
305
|
-
if (!r) return
|
|
306
|
-
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), {
|
|
307
278
|
flush: a,
|
|
308
279
|
deep: o,
|
|
309
280
|
eventFilter: p
|
|
310
281
|
});
|
|
311
|
-
|
|
312
|
-
let
|
|
313
|
-
|
|
314
|
-
h && !
|
|
315
|
-
}, { passive: !0 }) : G(
|
|
316
|
-
h && !
|
|
317
|
-
})), h ?
|
|
318
|
-
|
|
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);
|
|
288
|
+
})), h ? V(() => {
|
|
289
|
+
E = !0, k();
|
|
319
290
|
}) : k();
|
|
320
|
-
function
|
|
321
|
-
if (
|
|
291
|
+
function D(e, t) {
|
|
292
|
+
if (f) {
|
|
322
293
|
let n = {
|
|
323
|
-
key:
|
|
294
|
+
key: y.value,
|
|
324
295
|
oldValue: e,
|
|
325
296
|
newValue: t,
|
|
326
297
|
storageArea: r
|
|
327
298
|
};
|
|
328
|
-
|
|
299
|
+
f.dispatchEvent(r instanceof Storage ? new StorageEvent("storage", n) : new CustomEvent(Be, { detail: n }));
|
|
329
300
|
}
|
|
330
301
|
}
|
|
331
|
-
function
|
|
302
|
+
function te(e) {
|
|
332
303
|
try {
|
|
333
|
-
let t = r.getItem(
|
|
334
|
-
if (e == null)
|
|
304
|
+
let t = r.getItem(y.value);
|
|
305
|
+
if (e == null) D(t, null), r.removeItem(y.value);
|
|
335
306
|
else {
|
|
336
307
|
let n = w.write(e);
|
|
337
|
-
t !== n && (r.setItem(
|
|
308
|
+
t !== n && (r.setItem(y.value, n), D(t, n));
|
|
338
309
|
}
|
|
339
310
|
} catch (e) {
|
|
340
311
|
m(e);
|
|
341
312
|
}
|
|
342
313
|
}
|
|
343
|
-
function
|
|
344
|
-
let t = e ? e.newValue : r.getItem(
|
|
345
|
-
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;
|
|
346
317
|
if (!e && l) {
|
|
347
318
|
let e = w.read(t);
|
|
348
|
-
return typeof l == "function" ? l(e,
|
|
349
|
-
...
|
|
319
|
+
return typeof l == "function" ? l(e, x) : C === "object" && !Array.isArray(e) ? {
|
|
320
|
+
...x,
|
|
350
321
|
...e
|
|
351
322
|
} : e;
|
|
352
323
|
} else if (typeof t != "string") return t;
|
|
@@ -355,36 +326,36 @@ function Je(e, t, r, i = {}) {
|
|
|
355
326
|
function k(e) {
|
|
356
327
|
if (!(e && e.storageArea !== r)) {
|
|
357
328
|
if (e && e.key == null) {
|
|
358
|
-
|
|
329
|
+
_.value = x;
|
|
359
330
|
return;
|
|
360
331
|
}
|
|
361
|
-
if (!(e && e.key !==
|
|
362
|
-
|
|
332
|
+
if (!(e && e.key !== y.value)) {
|
|
333
|
+
ee();
|
|
363
334
|
try {
|
|
364
|
-
let t = w.write(
|
|
365
|
-
(e === void 0 || e?.newValue !== t) && (
|
|
335
|
+
let t = w.write(_.value);
|
|
336
|
+
(e === void 0 || e?.newValue !== t) && (_.value = O(e));
|
|
366
337
|
} catch (e) {
|
|
367
338
|
m(e);
|
|
368
339
|
} finally {
|
|
369
|
-
e ?
|
|
340
|
+
e ? d(T) : T();
|
|
370
341
|
}
|
|
371
342
|
}
|
|
372
343
|
}
|
|
373
344
|
}
|
|
374
|
-
function
|
|
345
|
+
function ne(e) {
|
|
375
346
|
k(e.detail);
|
|
376
347
|
}
|
|
377
|
-
return
|
|
348
|
+
return _;
|
|
378
349
|
}
|
|
379
|
-
function
|
|
380
|
-
let { window: i = U, ...a } = r, o, s = /* @__PURE__ */
|
|
350
|
+
function He(e, n, r = {}) {
|
|
351
|
+
let { window: i = U, ...a } = r, o, s = /* @__PURE__ */ Ne(() => i && "ResizeObserver" in i), c = () => {
|
|
381
352
|
o &&= (o.disconnect(), void 0);
|
|
382
|
-
}, l =
|
|
383
|
-
let t =
|
|
353
|
+
}, l = S(t(() => {
|
|
354
|
+
let t = b(e);
|
|
384
355
|
return Array.isArray(t) ? t.map((e) => W(e)) : [W(t)];
|
|
385
356
|
}), (e) => {
|
|
386
357
|
if (c(), s.value && i) {
|
|
387
|
-
o = new ResizeObserver(
|
|
358
|
+
o = new ResizeObserver(n);
|
|
388
359
|
for (let t of e) t && o.observe(t, a);
|
|
389
360
|
}
|
|
390
361
|
}, {
|
|
@@ -393,19 +364,19 @@ function Ye(e, t, r = {}) {
|
|
|
393
364
|
}), u = () => {
|
|
394
365
|
c(), l();
|
|
395
366
|
};
|
|
396
|
-
return
|
|
367
|
+
return ye(u), {
|
|
397
368
|
isSupported: s,
|
|
398
369
|
stop: u
|
|
399
370
|
};
|
|
400
371
|
}
|
|
401
|
-
function
|
|
372
|
+
function Ue(e, n = {
|
|
402
373
|
width: 0,
|
|
403
374
|
height: 0
|
|
404
375
|
}, r = {}) {
|
|
405
|
-
let { window: i = U, box: a = "content-box" } = r, o =
|
|
376
|
+
let { window: i = U, box: a = "content-box" } = r, o = t(() => {
|
|
406
377
|
var t;
|
|
407
378
|
return (t = W(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
|
|
408
|
-
}), s =
|
|
379
|
+
}), s = v(n.width), c = v(n.height), { stop: l } = He(e, ([t]) => {
|
|
409
380
|
let n = a === "border-box" ? t.borderBoxSize : a === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
410
381
|
if (i && o.value) {
|
|
411
382
|
let t = W(e);
|
|
@@ -414,16 +385,16 @@ function Xe(e, t = {
|
|
|
414
385
|
s.value = e.width, c.value = e.height;
|
|
415
386
|
}
|
|
416
387
|
} else if (n) {
|
|
417
|
-
let e =
|
|
388
|
+
let e = B(n);
|
|
418
389
|
s.value = e.reduce((e, { inlineSize: t }) => e + t, 0), c.value = e.reduce((e, { blockSize: t }) => e + t, 0);
|
|
419
390
|
} else s.value = t.contentRect.width, c.value = t.contentRect.height;
|
|
420
391
|
}, r);
|
|
421
|
-
|
|
422
|
-
let
|
|
423
|
-
|
|
392
|
+
V(() => {
|
|
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);
|
|
424
395
|
});
|
|
425
|
-
let u =
|
|
426
|
-
s.value = e ?
|
|
396
|
+
let u = S(() => W(e), (e) => {
|
|
397
|
+
s.value = e ? n.width : 0, c.value = e ? n.height : 0;
|
|
427
398
|
});
|
|
428
399
|
function d() {
|
|
429
400
|
l(), u();
|
|
@@ -434,15 +405,15 @@ function Xe(e, t = {
|
|
|
434
405
|
stop: d
|
|
435
406
|
};
|
|
436
407
|
}
|
|
437
|
-
var
|
|
408
|
+
var We = [
|
|
438
409
|
"fullscreenchange",
|
|
439
410
|
"webkitfullscreenchange",
|
|
440
411
|
"webkitendfullscreen",
|
|
441
412
|
"mozfullscreenchange",
|
|
442
413
|
"MSFullscreenChange"
|
|
443
414
|
];
|
|
444
|
-
function
|
|
445
|
-
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(() => [
|
|
446
417
|
"requestFullscreen",
|
|
447
418
|
"webkitRequestFullscreen",
|
|
448
419
|
"webkitEnterFullscreen",
|
|
@@ -450,14 +421,14 @@ function Qe(e, t = {}) {
|
|
|
450
421
|
"webkitRequestFullScreen",
|
|
451
422
|
"mozRequestFullScreen",
|
|
452
423
|
"msRequestFullscreen"
|
|
453
|
-
].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(() => [
|
|
454
425
|
"exitFullscreen",
|
|
455
426
|
"webkitExitFullscreen",
|
|
456
427
|
"webkitExitFullScreen",
|
|
457
428
|
"webkitCancelFullScreen",
|
|
458
429
|
"mozCancelFullScreen",
|
|
459
430
|
"msExitFullscreen"
|
|
460
|
-
].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(() => [
|
|
461
432
|
"fullScreen",
|
|
462
433
|
"webkitIsFullScreen",
|
|
463
434
|
"webkitDisplayingFullscreen",
|
|
@@ -468,7 +439,7 @@ function Qe(e, t = {}) {
|
|
|
468
439
|
"webkitFullscreenElement",
|
|
469
440
|
"mozFullScreenElement",
|
|
470
441
|
"msFullscreenElement"
|
|
471
|
-
].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 = () => {
|
|
472
443
|
if (l.value) {
|
|
473
444
|
if (r && r[l.value] != null) return r[l.value];
|
|
474
445
|
{
|
|
@@ -500,11 +471,11 @@ function Qe(e, t = {}) {
|
|
|
500
471
|
let _ = () => {
|
|
501
472
|
let e = p();
|
|
502
473
|
(!e || e && f()) && (o.value = e);
|
|
503
|
-
},
|
|
474
|
+
}, y = {
|
|
504
475
|
capture: !1,
|
|
505
476
|
passive: !0
|
|
506
477
|
};
|
|
507
|
-
return G(r,
|
|
478
|
+
return G(r, We, _, y), G(() => W(a), We, _, y), V(_, !1), i && ye(m), {
|
|
508
479
|
isSupported: d,
|
|
509
480
|
isFullscreen: o,
|
|
510
481
|
enter: h,
|
|
@@ -512,11 +483,11 @@ function Qe(e, t = {}) {
|
|
|
512
483
|
toggle: g
|
|
513
484
|
};
|
|
514
485
|
}
|
|
515
|
-
function
|
|
486
|
+
function Ke(e, t, n = {}) {
|
|
516
487
|
let { window: r = U } = n;
|
|
517
|
-
return
|
|
488
|
+
return Ve(e, t, r?.localStorage, n);
|
|
518
489
|
}
|
|
519
|
-
var
|
|
490
|
+
var qe = {
|
|
520
491
|
ctrl: "control",
|
|
521
492
|
command: "meta",
|
|
522
493
|
cmd: "meta",
|
|
@@ -526,21 +497,21 @@ var et = {
|
|
|
526
497
|
left: "arrowleft",
|
|
527
498
|
right: "arrowright"
|
|
528
499
|
};
|
|
529
|
-
function
|
|
530
|
-
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 = {
|
|
531
502
|
toJSON() {
|
|
532
503
|
return {};
|
|
533
504
|
},
|
|
534
505
|
current: s
|
|
535
|
-
}, l =
|
|
506
|
+
}, l = n ? m(c) : c, u = /* @__PURE__ */ new Set(), d = new Map([
|
|
536
507
|
["Meta", u],
|
|
537
508
|
["Shift", /* @__PURE__ */ new Set()],
|
|
538
509
|
["Alt", /* @__PURE__ */ new Set()]
|
|
539
510
|
]), f = /* @__PURE__ */ new Set();
|
|
540
|
-
function p(e,
|
|
541
|
-
e in l && (
|
|
511
|
+
function p(e, t) {
|
|
512
|
+
e in l && (n ? l[e] = t : l[e].value = t);
|
|
542
513
|
}
|
|
543
|
-
function
|
|
514
|
+
function h() {
|
|
544
515
|
s.clear();
|
|
545
516
|
for (let e of f) p(e, !1);
|
|
546
517
|
}
|
|
@@ -561,7 +532,7 @@ function tt(e = {}) {
|
|
|
561
532
|
t >= a && (s.delete(e), p(e, !1));
|
|
562
533
|
}), r.clear();
|
|
563
534
|
}
|
|
564
|
-
function
|
|
535
|
+
function y(e, t) {
|
|
565
536
|
let n = e.key?.toLowerCase(), r = [e.code?.toLowerCase(), n].filter(Boolean);
|
|
566
537
|
if (n) {
|
|
567
538
|
n && (t ? s.add(n) : s.delete(n));
|
|
@@ -571,21 +542,21 @@ function tt(e = {}) {
|
|
|
571
542
|
}), u.clear());
|
|
572
543
|
}
|
|
573
544
|
}
|
|
574
|
-
G(r, "keydown", (e) => (
|
|
575
|
-
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) {
|
|
576
547
|
if (typeof r != "string") return Reflect.get(e, r, a);
|
|
577
548
|
if (r = r.toLowerCase(), r in i && (r = i[r]), !(r in l)) if (/[+_-]/.test(r)) {
|
|
578
549
|
let e = r.split(/[+_-]/g).map((e) => e.trim());
|
|
579
|
-
l[r] =
|
|
580
|
-
} else l[r] =
|
|
550
|
+
l[r] = t(() => e.map((e) => b(x[e])).every(Boolean));
|
|
551
|
+
} else l[r] = v(!1);
|
|
581
552
|
let o = Reflect.get(e, r, a);
|
|
582
|
-
return
|
|
553
|
+
return n ? b(o) : o;
|
|
583
554
|
} });
|
|
584
|
-
return
|
|
555
|
+
return x;
|
|
585
556
|
}
|
|
586
557
|
//#endregion
|
|
587
558
|
//#region src/RightContent/locale.ts
|
|
588
|
-
var
|
|
559
|
+
var Ye = {
|
|
589
560
|
searchPlaceholder: "搜索导航菜单",
|
|
590
561
|
searchLabel: "搜索",
|
|
591
562
|
searchShortcutLabel: "⌘ K",
|
|
@@ -602,33 +573,33 @@ var nt = {
|
|
|
602
573
|
};
|
|
603
574
|
//#endregion
|
|
604
575
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
605
|
-
function
|
|
576
|
+
function Xe(e) {
|
|
606
577
|
return e == null || typeof e != "object" && typeof e != "function";
|
|
607
578
|
}
|
|
608
579
|
//#endregion
|
|
609
580
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
610
|
-
function
|
|
581
|
+
function Ze(e) {
|
|
611
582
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
612
583
|
}
|
|
613
584
|
//#endregion
|
|
614
585
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
|
|
615
|
-
function
|
|
586
|
+
function Qe(e) {
|
|
616
587
|
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
617
588
|
}
|
|
618
589
|
//#endregion
|
|
619
590
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
|
|
620
|
-
function
|
|
591
|
+
function $e(e) {
|
|
621
592
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
622
593
|
}
|
|
623
594
|
//#endregion
|
|
624
595
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
|
|
625
|
-
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]";
|
|
626
597
|
//#endregion
|
|
627
598
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
628
599
|
function Y(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
629
600
|
let a = i?.(e, t, n, r);
|
|
630
601
|
if (a !== void 0) return a;
|
|
631
|
-
if (
|
|
602
|
+
if (Xe(e)) return e;
|
|
632
603
|
if (r.has(e)) return r.get(e);
|
|
633
604
|
if (Array.isArray(e)) {
|
|
634
605
|
let t = Array(e.length);
|
|
@@ -654,7 +625,7 @@ function Y(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
654
625
|
return t;
|
|
655
626
|
}
|
|
656
627
|
if (typeof Buffer < "u" && Buffer.isBuffer(e)) return e.subarray();
|
|
657
|
-
if (
|
|
628
|
+
if (Ze(e)) {
|
|
658
629
|
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
|
|
659
630
|
r.set(e, t);
|
|
660
631
|
for (let a = 0; a < e.length; a++) t[a] = Y(e[a], a, n, r, i);
|
|
@@ -689,43 +660,43 @@ function Y(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
689
660
|
let t = new String(e.valueOf());
|
|
690
661
|
return r.set(e, t), X(t, e, n, r, i), t;
|
|
691
662
|
}
|
|
692
|
-
if (typeof e == "object" &&
|
|
663
|
+
if (typeof e == "object" && St(e)) {
|
|
693
664
|
let t = Object.create(Object.getPrototypeOf(e));
|
|
694
665
|
return r.set(e, t), X(t, e, n, r, i), t;
|
|
695
666
|
}
|
|
696
667
|
return e;
|
|
697
668
|
}
|
|
698
669
|
function X(e, t, n = e, r, i) {
|
|
699
|
-
let a = [...Object.keys(t), ...
|
|
670
|
+
let a = [...Object.keys(t), ...Qe(t)];
|
|
700
671
|
for (let o = 0; o < a.length; o++) {
|
|
701
672
|
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
|
|
702
673
|
(c == null || c.writable) && (e[s] = Y(t[s], s, n, r, i));
|
|
703
674
|
}
|
|
704
675
|
}
|
|
705
|
-
function
|
|
706
|
-
switch (
|
|
707
|
-
case
|
|
708
|
-
case
|
|
676
|
+
function St(e) {
|
|
677
|
+
switch ($e(e)) {
|
|
678
|
+
case it:
|
|
679
|
+
case lt:
|
|
680
|
+
case ut:
|
|
681
|
+
case ft:
|
|
682
|
+
case rt:
|
|
683
|
+
case ot:
|
|
684
|
+
case bt:
|
|
685
|
+
case xt:
|
|
709
686
|
case _t:
|
|
687
|
+
case vt:
|
|
710
688
|
case yt:
|
|
711
|
-
case
|
|
689
|
+
case st:
|
|
690
|
+
case nt:
|
|
691
|
+
case dt:
|
|
692
|
+
case et:
|
|
693
|
+
case ct:
|
|
694
|
+
case tt:
|
|
695
|
+
case at:
|
|
712
696
|
case pt:
|
|
713
|
-
case Dt:
|
|
714
|
-
case Ot:
|
|
715
|
-
case wt:
|
|
716
|
-
case Tt:
|
|
717
|
-
case Et:
|
|
718
697
|
case mt:
|
|
719
|
-
case lt:
|
|
720
|
-
case vt:
|
|
721
|
-
case st:
|
|
722
698
|
case ht:
|
|
723
|
-
case
|
|
724
|
-
case ft:
|
|
725
|
-
case bt:
|
|
726
|
-
case xt:
|
|
727
|
-
case St:
|
|
728
|
-
case Ct: return !0;
|
|
699
|
+
case gt: return !0;
|
|
729
700
|
default: return !1;
|
|
730
701
|
}
|
|
731
702
|
}
|
|
@@ -736,104 +707,98 @@ function Z(e) {
|
|
|
736
707
|
}
|
|
737
708
|
//#endregion
|
|
738
709
|
//#region src/RightContent/utils.ts
|
|
739
|
-
function
|
|
710
|
+
function Ct(e, t) {
|
|
740
711
|
let n = /* @__PURE__ */ new Map();
|
|
741
712
|
return e.filter((e) => {
|
|
742
713
|
let r = e[t];
|
|
743
714
|
return n.has(r) ? !1 : (n.set(r, e), !0);
|
|
744
715
|
});
|
|
745
716
|
}
|
|
746
|
-
var
|
|
747
|
-
function
|
|
717
|
+
var wt = "ABCDEFGHJKLMNOPQRSTWXYZ", Tt = "阿八嚓哒鹅发旮哈讥咔垃妈拿噢啪七日撒他挖昔压匝";
|
|
718
|
+
function Et(e) {
|
|
748
719
|
let t = e.codePointAt(0);
|
|
749
720
|
if (t >= 65 && t <= 90) return e;
|
|
750
721
|
if (t >= 97 && t <= 122) return e.toUpperCase();
|
|
751
722
|
if (t < 19968 || t > 40959) return "";
|
|
752
|
-
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];
|
|
753
724
|
return "";
|
|
754
725
|
}
|
|
755
|
-
function
|
|
726
|
+
function Dt(e) {
|
|
756
727
|
let t = "";
|
|
757
|
-
for (let n of e) t +=
|
|
728
|
+
for (let n of e) t += Et(n);
|
|
758
729
|
return t;
|
|
759
730
|
}
|
|
760
|
-
function
|
|
731
|
+
function Ot(e, t) {
|
|
761
732
|
if (!t) return !1;
|
|
762
733
|
let n = t.trim().toLowerCase();
|
|
763
|
-
return !!(e.toLowerCase().includes(n) ||
|
|
734
|
+
return !!(e.toLowerCase().includes(n) || Dt(e).toLowerCase().includes(n));
|
|
764
735
|
}
|
|
765
|
-
function
|
|
736
|
+
function kt(e, t) {
|
|
766
737
|
let n = t.trim();
|
|
767
738
|
if (!n) return [];
|
|
768
739
|
let r = [];
|
|
769
|
-
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);
|
|
770
741
|
return r;
|
|
771
742
|
}
|
|
772
743
|
//#endregion
|
|
773
744
|
//#region src/RightContent/Search/Panel.tsx
|
|
774
|
-
var
|
|
775
|
-
image:
|
|
745
|
+
var At = ({ className: e, value: t, locale: n }) => t ? r(j, {
|
|
746
|
+
image: j.PRESENTED_IMAGE_SIMPLE,
|
|
776
747
|
description: n.noResult?.(t)
|
|
777
|
-
}, null) :
|
|
778
|
-
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({
|
|
779
750
|
suffixCls: "search-history",
|
|
780
|
-
|
|
781
|
-
}), []),
|
|
782
|
-
let
|
|
783
|
-
if (!
|
|
784
|
-
|
|
751
|
+
isPro: !0
|
|
752
|
+
}), []), o = g(0), s = g(Z(x(a))), c = De((e) => {
|
|
753
|
+
let n = e.trim();
|
|
754
|
+
if (!n) {
|
|
755
|
+
s.value = [];
|
|
785
756
|
return;
|
|
786
757
|
}
|
|
787
|
-
|
|
758
|
+
s.value = kt(t.dataSource ?? [], n), o.value = 0;
|
|
788
759
|
}, 200);
|
|
789
|
-
|
|
790
|
-
e ?
|
|
760
|
+
S(() => t.keyword, (e) => {
|
|
761
|
+
e ? c(e) : s.value = Z(x(a));
|
|
791
762
|
});
|
|
792
|
-
function
|
|
793
|
-
document.querySelector(`[data-search-item="${
|
|
763
|
+
function l() {
|
|
764
|
+
document.querySelector(`[data-search-item="${o.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
794
765
|
}
|
|
795
|
-
async function
|
|
796
|
-
if (
|
|
797
|
-
let e =
|
|
766
|
+
async function u() {
|
|
767
|
+
if (s.value.length === 0) return;
|
|
768
|
+
let e = o.value;
|
|
798
769
|
if (e < 0) return;
|
|
799
|
-
let
|
|
800
|
-
if (!
|
|
801
|
-
let i = he(
|
|
802
|
-
|
|
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 });
|
|
803
774
|
}
|
|
804
|
-
function
|
|
805
|
-
|
|
775
|
+
function p() {
|
|
776
|
+
s.value.length !== 0 && (t.onBlur?.(), o.value--, o.value < 0 && (o.value = s.value.length - 1), l());
|
|
806
777
|
}
|
|
807
|
-
function
|
|
808
|
-
|
|
778
|
+
function m() {
|
|
779
|
+
s.value.length !== 0 && (t.onBlur?.(), o.value++, o.value > s.value.length - 1 && (o.value = 0), l());
|
|
809
780
|
}
|
|
810
|
-
|
|
811
|
-
K("Enter",
|
|
781
|
+
f(() => {
|
|
782
|
+
K("Enter", u), K("ArrowUp", p), K("ArrowDown", m);
|
|
812
783
|
});
|
|
813
|
-
function
|
|
814
|
-
|
|
784
|
+
function h(e) {
|
|
785
|
+
o.value = e;
|
|
815
786
|
}
|
|
816
|
-
function
|
|
817
|
-
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();
|
|
818
789
|
}
|
|
819
|
-
let
|
|
820
|
-
return () => {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
})) : i(Lt, {
|
|
832
|
-
className: y("result"),
|
|
833
|
-
value: n.keyword,
|
|
834
|
-
locale: n.locale
|
|
835
|
-
}, null)]);
|
|
836
|
-
};
|
|
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)]);
|
|
837
802
|
}, {
|
|
838
803
|
props: {
|
|
839
804
|
className: {
|
|
@@ -875,7 +840,7 @@ var Lt = ({ className: e, value: t, locale: n }) => t ? i(N, {
|
|
|
875
840
|
},
|
|
876
841
|
name: "GSearchPanel",
|
|
877
842
|
inheritAttrs: !1
|
|
878
|
-
}),
|
|
843
|
+
}), Mt = P("ProRightSearch", (e) => {
|
|
879
844
|
let t = e.menuItemIconSize || e.fontSize, n = e.calc(e.borderRadiusLG).mul(2).equal(), r = e.calc(e.paddingXXS).div(2).equal();
|
|
880
845
|
return { [e.componentCls]: {
|
|
881
846
|
display: "flex",
|
|
@@ -963,42 +928,42 @@ var Lt = ({ className: e, value: t, locale: n }) => t ? i(N, {
|
|
|
963
928
|
color: e.colorTextQuaternary
|
|
964
929
|
}
|
|
965
930
|
} };
|
|
966
|
-
}),
|
|
967
|
-
|
|
968
|
-
|
|
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),
|
|
969
934
|
n.navigateLabel
|
|
970
|
-
])]),
|
|
971
|
-
let a =
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}),
|
|
975
|
-
|
|
976
|
-
|
|
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?.();
|
|
977
942
|
});
|
|
978
943
|
});
|
|
979
944
|
function y(e) {
|
|
980
|
-
p.value = !1, e && (
|
|
945
|
+
p.value = !1, e && (f.value = "");
|
|
981
946
|
}
|
|
982
947
|
return () => {
|
|
983
|
-
let
|
|
948
|
+
let t = {
|
|
984
949
|
className: o.value,
|
|
985
950
|
hashId: c.value
|
|
986
951
|
}, a = `${o.value}-modal`;
|
|
987
|
-
return
|
|
988
|
-
class:
|
|
952
|
+
return r(e, null, [r("div", {
|
|
953
|
+
class: I(o.value, c.value, l.value, s.value),
|
|
989
954
|
onClick: () => {
|
|
990
955
|
p.value = !0;
|
|
991
956
|
}
|
|
992
957
|
}, [
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
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("⌘"),
|
|
997
962
|
" ",
|
|
998
|
-
|
|
963
|
+
r("kbd", null, [n("K")])
|
|
999
964
|
])
|
|
1000
|
-
]),
|
|
1001
|
-
wrapClassName:
|
|
965
|
+
]), r(le, {
|
|
966
|
+
wrapClassName: I(a, c.value),
|
|
1002
967
|
width: 600,
|
|
1003
968
|
scrollProps: {
|
|
1004
969
|
maxHeight: 400,
|
|
@@ -1006,33 +971,33 @@ var Lt = ({ className: e, value: t, locale: n }) => t ? i(N, {
|
|
|
1006
971
|
},
|
|
1007
972
|
centered: !1,
|
|
1008
973
|
destroyOnHidden: !1,
|
|
1009
|
-
title:
|
|
974
|
+
title: r(M, {
|
|
1010
975
|
style: {
|
|
1011
976
|
width: `${600 * .8}px`,
|
|
1012
977
|
padding: 0
|
|
1013
978
|
},
|
|
1014
|
-
ref:
|
|
979
|
+
ref: _,
|
|
1015
980
|
bordered: !1,
|
|
1016
981
|
size: "large",
|
|
1017
|
-
placeholder:
|
|
1018
|
-
value:
|
|
982
|
+
placeholder: i.locale.searchPlaceholder,
|
|
983
|
+
value: f.value,
|
|
1019
984
|
"onUpdate:value": (e) => {
|
|
1020
|
-
|
|
985
|
+
f.value = e;
|
|
1021
986
|
}
|
|
1022
|
-
}, { prefix: () =>
|
|
987
|
+
}, { prefix: () => r(k, null, null) }),
|
|
1023
988
|
open: p.value,
|
|
1024
|
-
footer:
|
|
989
|
+
footer: r(Nt, {
|
|
1025
990
|
className: a,
|
|
1026
991
|
hashId: c.value,
|
|
1027
|
-
locale:
|
|
992
|
+
locale: i.locale
|
|
1028
993
|
}, null),
|
|
1029
994
|
onCancel: () => y()
|
|
1030
|
-
}, { default: () => [
|
|
1031
|
-
emptyProps:
|
|
1032
|
-
keyword:
|
|
995
|
+
}, { default: () => [r(jt, u(t, {
|
|
996
|
+
emptyProps: i.emptyProps,
|
|
997
|
+
keyword: f.value,
|
|
1033
998
|
dataSource: v.value,
|
|
1034
|
-
historyKey:
|
|
1035
|
-
locale:
|
|
999
|
+
historyKey: i.searchHistoryKey,
|
|
1000
|
+
locale: i.locale,
|
|
1036
1001
|
onClose: y
|
|
1037
1002
|
}), null)] })]);
|
|
1038
1003
|
};
|
|
@@ -1065,10 +1030,10 @@ var Lt = ({ className: e, value: t, locale: n }) => t ? i(N, {
|
|
|
1065
1030
|
});
|
|
1066
1031
|
//#endregion
|
|
1067
1032
|
//#region src/RightContent/style.ts
|
|
1068
|
-
function
|
|
1033
|
+
function Ft(e, t) {
|
|
1069
1034
|
return `color-mix(in srgb, ${e} ${t * 100}%, transparent)`;
|
|
1070
1035
|
}
|
|
1071
|
-
var
|
|
1036
|
+
var It = P("ProRightContent", (e) => ({ [e.componentCls]: {
|
|
1072
1037
|
height: "100%",
|
|
1073
1038
|
"&-header-actions": {
|
|
1074
1039
|
display: "flex",
|
|
@@ -1117,7 +1082,7 @@ var Ut = F("ProRightContent", (e) => ({ [e.componentCls]: {
|
|
|
1117
1082
|
height: 44,
|
|
1118
1083
|
lineHeight: "44px",
|
|
1119
1084
|
borderRadius: e.borderRadius,
|
|
1120
|
-
"&:hover": { backgroundColor:
|
|
1085
|
+
"&:hover": { backgroundColor: Ft(e.colorTextBase, .03) }
|
|
1121
1086
|
},
|
|
1122
1087
|
"&-avatar": {
|
|
1123
1088
|
display: "inline-flex",
|
|
@@ -1133,119 +1098,119 @@ var Ut = F("ProRightContent", (e) => ({ [e.componentCls]: {
|
|
|
1133
1098
|
}
|
|
1134
1099
|
} })), Q = { fontSize: "15px" };
|
|
1135
1100
|
function $(e, t) {
|
|
1136
|
-
return () =>
|
|
1101
|
+
return () => r("div", { style: {
|
|
1137
1102
|
display: "flex",
|
|
1138
1103
|
alignItems: "center",
|
|
1139
1104
|
gap: "6px"
|
|
1140
1105
|
} }, [typeof e == "function" ? e() : e, t]);
|
|
1141
1106
|
}
|
|
1142
|
-
var
|
|
1107
|
+
var Lt = [
|
|
1143
1108
|
{
|
|
1144
1109
|
value: "light",
|
|
1145
|
-
label: $(
|
|
1110
|
+
label: $(c(A, {
|
|
1146
1111
|
type: "Moon",
|
|
1147
1112
|
style: Q
|
|
1148
1113
|
}), "亮色")
|
|
1149
1114
|
},
|
|
1150
1115
|
{
|
|
1151
1116
|
value: "dark",
|
|
1152
|
-
label: $(
|
|
1117
|
+
label: $(c(A, {
|
|
1153
1118
|
type: "Sunny",
|
|
1154
1119
|
style: Q
|
|
1155
1120
|
}), "深色")
|
|
1156
1121
|
},
|
|
1157
1122
|
{
|
|
1158
1123
|
value: "system",
|
|
1159
|
-
label: $(
|
|
1124
|
+
label: $(c(T, { style: Q }), "自动")
|
|
1160
1125
|
}
|
|
1161
|
-
],
|
|
1162
|
-
let { isFullscreen: o, toggle: s } =
|
|
1163
|
-
|
|
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) => {
|
|
1164
1129
|
x.value = e > 0 ? e : "auto";
|
|
1165
1130
|
});
|
|
1166
|
-
let w =
|
|
1167
|
-
...
|
|
1168
|
-
...
|
|
1169
|
-
})),
|
|
1131
|
+
let w = g(!1), T = t(() => ({
|
|
1132
|
+
...Ye,
|
|
1133
|
+
...n.locale
|
|
1134
|
+
})), E = t(() => n.actions === !1 ? {} : {
|
|
1170
1135
|
lock: !0,
|
|
1171
1136
|
theme: !0,
|
|
1172
1137
|
search: !0,
|
|
1173
1138
|
themeEditor: !0,
|
|
1174
1139
|
fullScreen: !0,
|
|
1175
|
-
...
|
|
1176
|
-
}),
|
|
1140
|
+
...n.actions
|
|
1141
|
+
}), k = t(() => (n.themeOptions || Lt).map((e) => ({
|
|
1177
1142
|
key: e.value,
|
|
1178
1143
|
label: e.label()
|
|
1179
1144
|
})));
|
|
1180
|
-
function
|
|
1145
|
+
function j(e) {
|
|
1181
1146
|
let t = e.key;
|
|
1182
1147
|
l(t);
|
|
1183
1148
|
}
|
|
1184
|
-
let
|
|
1149
|
+
let M = t(() => {
|
|
1185
1150
|
let e = [];
|
|
1186
|
-
return
|
|
1151
|
+
return E.value.lock && a.lock && (e.push({
|
|
1187
1152
|
key: "lock",
|
|
1188
|
-
icon: () =>
|
|
1153
|
+
icon: () => r(te, null, null),
|
|
1189
1154
|
label: T.value.lockScreen
|
|
1190
1155
|
}), e.push({ type: "divider" })), e.push({
|
|
1191
1156
|
key: "logout",
|
|
1192
|
-
icon: () =>
|
|
1157
|
+
icon: () => r(O, null, null),
|
|
1193
1158
|
label: T.value.logout
|
|
1194
1159
|
}), e;
|
|
1195
1160
|
});
|
|
1196
|
-
function
|
|
1197
|
-
e.key === "lock" ? w.value = !0 : e.key === "logout" &&
|
|
1198
|
-
}
|
|
1199
|
-
function ue(e) {
|
|
1200
|
-
r("actionClick", e);
|
|
1161
|
+
function le(e) {
|
|
1162
|
+
e.key === "lock" ? w.value = !0 : e.key === "logout" && i("logout");
|
|
1201
1163
|
}
|
|
1202
1164
|
function P(e) {
|
|
1165
|
+
i("actionClick", e);
|
|
1166
|
+
}
|
|
1167
|
+
function F(e) {
|
|
1203
1168
|
w.value = e;
|
|
1204
1169
|
}
|
|
1205
1170
|
return () => {
|
|
1206
|
-
let
|
|
1207
|
-
return
|
|
1171
|
+
let t = [`${p.value}-header-actions-item`, h.value], i = o.value ? ee : D;
|
|
1172
|
+
return r("div", {
|
|
1208
1173
|
ref: y,
|
|
1209
|
-
class:
|
|
1174
|
+
class: I(p.value, h.value, _.value, m.value),
|
|
1210
1175
|
style: {
|
|
1211
1176
|
minWidth: x.value,
|
|
1212
1177
|
height: "100%"
|
|
1213
1178
|
}
|
|
1214
|
-
}, [
|
|
1215
|
-
|
|
1216
|
-
dataSource:
|
|
1217
|
-
disabledShortKey:
|
|
1218
|
-
searchHistoryKey:
|
|
1219
|
-
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,
|
|
1220
1185
|
locale: T.value
|
|
1221
1186
|
}, null),
|
|
1222
|
-
|
|
1223
|
-
ref:
|
|
1224
|
-
class:
|
|
1225
|
-
}, [
|
|
1187
|
+
E.value.theme && r("div", {
|
|
1188
|
+
ref: C,
|
|
1189
|
+
class: I(`${p.value}-header-actions-item`, `${p.value}-header-actions-theme`, h.value)
|
|
1190
|
+
}, [r(se, {
|
|
1226
1191
|
trigger: ["click"],
|
|
1227
1192
|
placement: "bottomRight",
|
|
1228
1193
|
menu: {
|
|
1229
|
-
items:
|
|
1230
|
-
onClick:
|
|
1194
|
+
items: k.value,
|
|
1195
|
+
onClick: j,
|
|
1231
1196
|
selectedKeys: [f.value]
|
|
1232
1197
|
}
|
|
1233
|
-
}, { default: () => [
|
|
1234
|
-
class:
|
|
1235
|
-
type:
|
|
1198
|
+
}, { default: () => [r(A, {
|
|
1199
|
+
class: I(`${p.value}-header-actions-icon`, h.value),
|
|
1200
|
+
type: d.value ? "Moon" : "Sunny"
|
|
1236
1201
|
}, null)] })]),
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
a.actionsRender?.(
|
|
1240
|
-
]),
|
|
1241
|
-
items:
|
|
1242
|
-
onClick:
|
|
1243
|
-
} }), { default: () => [a.dropdownTrigger ? a.dropdownTrigger() :
|
|
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 : {
|
|
1206
|
+
items: M.value,
|
|
1207
|
+
onClick: le
|
|
1208
|
+
} }), { default: () => [a.dropdownTrigger ? a.dropdownTrigger() : r("div", { class: I(`${p.value}-header-actions-avatar`, h.value) }, [r(oe, {
|
|
1244
1209
|
size: 28,
|
|
1245
|
-
icon:
|
|
1246
|
-
}, 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?.({
|
|
1247
1212
|
open: w.value,
|
|
1248
|
-
onOpenChange:
|
|
1213
|
+
onOpenChange: F
|
|
1249
1214
|
})]);
|
|
1250
1215
|
};
|
|
1251
1216
|
}, {
|
|
@@ -1285,4 +1250,4 @@ var Wt = [
|
|
|
1285
1250
|
inheritAttrs: !1
|
|
1286
1251
|
});
|
|
1287
1252
|
//#endregion
|
|
1288
|
-
export {
|
|
1253
|
+
export { Rt as RightContent };
|