@scalar/api-client 2.0.35 → 2.0.37
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/CHANGELOG.md +16 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +29 -39
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +55 -65
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +35 -45
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +33 -43
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +50 -60
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +24 -34
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +34 -34
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideHelp.vue.js +47 -45
- package/dist/index.js +1 -1
- package/dist/layouts/Modal/{api-client-modal.d.ts → create-api-client-modal.d.ts} +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -0
- package/dist/layouts/Modal/index.d.ts +1 -1
- package/dist/layouts/Modal/index.d.ts.map +1 -1
- package/dist/layouts/Modal/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +5 -36
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +50 -2
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +20 -20
- package/package.json +6 -6
- package/dist/components/CommandPalette/handleKeyDown.d.ts +0 -2
- package/dist/components/CommandPalette/handleKeyDown.d.ts.map +0 -1
- package/dist/components/CommandPalette/handleKeyDown.js +0 -7
- package/dist/layouts/Modal/api-client-modal.d.ts.map +0 -1
- /package/dist/layouts/Modal/{api-client-modal.js → create-api-client-modal.js} +0 -0
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as K, ref as d, computed as v, onMounted as T, openBlock as k, createElementBlock as W, createElementVNode as u, withDirectives as $, withKeys as G, withModifiers as L, vModelText as O, createVNode as o, unref as s, withCtx as c, normalizeClass as M, toDisplayString as S, createBlock as P, createCommentVNode as A, createTextVNode as H } from "vue";
|
|
2
2
|
import J from "../HttpMethod/HttpMethod.vue.js";
|
|
3
3
|
import { useWorkspace as Q } from "../../store/workspace.js";
|
|
4
|
-
import { ScalarListbox as
|
|
4
|
+
import { ScalarListbox as U, ScalarButton as p, ScalarIcon as N } from "@scalar/components";
|
|
5
5
|
import { useRouter as X } from "vue-router";
|
|
6
|
-
import { handleKeyDown as R } from "./handleKeyDown.js";
|
|
7
6
|
const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, ee = /* @__PURE__ */ u("label", {
|
|
8
7
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
9
8
|
for: "requestname"
|
|
10
|
-
}, null, -1), te = { class: "flex" },
|
|
9
|
+
}, null, -1), te = ["onKeydown"], le = { class: "flex" }, ae = { class: "flex flex-1 gap-2 max-h-8" }, ce = /* @__PURE__ */ K({
|
|
11
10
|
__name: "CommandPaletteRequest",
|
|
12
11
|
emits: ["close"],
|
|
13
|
-
setup(
|
|
12
|
+
setup(oe, { emit: R }) {
|
|
14
13
|
var g, q;
|
|
15
|
-
const I =
|
|
14
|
+
const I = R, { push: B } = X(), {
|
|
16
15
|
activeCollection: D,
|
|
17
|
-
activeWorkspace:
|
|
18
|
-
activeWorkspaceCollections:
|
|
19
|
-
requestMutators:
|
|
20
|
-
activeRequest:
|
|
21
|
-
folders:
|
|
22
|
-
} = Q(), i = d(""), m = d("GET"),
|
|
23
|
-
() =>
|
|
16
|
+
activeWorkspace: E,
|
|
17
|
+
activeWorkspaceCollections: h,
|
|
18
|
+
requestMutators: j,
|
|
19
|
+
activeRequest: z,
|
|
20
|
+
folders: x
|
|
21
|
+
} = Q(), i = d(""), m = d("GET"), r = d(((g = D.value) == null ? void 0 : g.uid) ?? ""), b = v(
|
|
22
|
+
() => h.value.map((e) => {
|
|
24
23
|
var t;
|
|
25
24
|
return {
|
|
26
25
|
id: e.uid,
|
|
@@ -28,14 +27,14 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
28
27
|
};
|
|
29
28
|
})
|
|
30
29
|
), n = v({
|
|
31
|
-
get: () =>
|
|
30
|
+
get: () => b.value.find(({ id: e }) => e === r.value),
|
|
32
31
|
set: (e) => {
|
|
33
|
-
e != null && e.id && (
|
|
32
|
+
e != null && e.id && (r.value = e.id);
|
|
34
33
|
}
|
|
35
34
|
}), f = v(
|
|
36
|
-
() =>
|
|
37
|
-
(e) => e.uid ===
|
|
38
|
-
const l =
|
|
35
|
+
() => h.value.flatMap(
|
|
36
|
+
(e) => e.uid === r.value ? e.childUids.flatMap((t) => {
|
|
37
|
+
const l = x[t];
|
|
39
38
|
return l ? [
|
|
40
39
|
{
|
|
41
40
|
id: l.uid,
|
|
@@ -45,10 +44,10 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
45
44
|
}) : []
|
|
46
45
|
)
|
|
47
46
|
), _ = d(
|
|
48
|
-
((q = Object.values(
|
|
47
|
+
((q = Object.values(x).find(
|
|
49
48
|
(e) => {
|
|
50
49
|
var t;
|
|
51
|
-
return e.childUids.includes((t =
|
|
50
|
+
return e.childUids.includes((t = z.value) == null ? void 0 : t.uid);
|
|
52
51
|
}
|
|
53
52
|
)) == null ? void 0 : q.uid) ?? ""
|
|
54
53
|
), a = v({
|
|
@@ -57,13 +56,13 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
57
56
|
e != null && e.id && (_.value = e.id);
|
|
58
57
|
}
|
|
59
58
|
});
|
|
60
|
-
function
|
|
59
|
+
function F(e) {
|
|
61
60
|
m.value = e;
|
|
62
61
|
}
|
|
63
|
-
const
|
|
64
|
-
var l,
|
|
65
|
-
if (!
|
|
66
|
-
const e = ((
|
|
62
|
+
const w = () => {
|
|
63
|
+
var l, y, V;
|
|
64
|
+
if (!r.value && !((l = a.value) != null && l.id)) return;
|
|
65
|
+
const e = ((y = a.value) == null ? void 0 : y.id) ?? ((V = n.value) == null ? void 0 : V.id), t = j.add(
|
|
67
66
|
{
|
|
68
67
|
path: "",
|
|
69
68
|
method: m.value.toUpperCase(),
|
|
@@ -74,57 +73,48 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
74
73
|
},
|
|
75
74
|
e
|
|
76
75
|
);
|
|
77
|
-
B(`/workspace/${
|
|
76
|
+
B(`/workspace/${E.value.uid}/request/${t.uid}`), I("close");
|
|
78
77
|
}, C = d(null);
|
|
79
|
-
return
|
|
78
|
+
return T(() => {
|
|
80
79
|
var e;
|
|
81
|
-
(e = C.value) == null || e.focus()
|
|
82
|
-
|
|
83
|
-
(t) => R(t, p),
|
|
84
|
-
!0
|
|
85
|
-
);
|
|
86
|
-
}), $(() => {
|
|
87
|
-
window.removeEventListener(
|
|
88
|
-
"keydown",
|
|
89
|
-
(e) => R(e, p),
|
|
90
|
-
!0
|
|
91
|
-
);
|
|
92
|
-
}), (e, t) => (V(), G("div", Y, [
|
|
80
|
+
(e = C.value) == null || e.focus();
|
|
81
|
+
}), (e, t) => (k(), W("div", Y, [
|
|
93
82
|
u("div", Z, [
|
|
94
83
|
ee,
|
|
95
|
-
|
|
84
|
+
$(u("input", {
|
|
96
85
|
id: "requestname",
|
|
97
86
|
ref_key: "requestInput",
|
|
98
87
|
ref: C,
|
|
99
88
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => i.value = l),
|
|
100
89
|
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
101
90
|
label: "Request Name",
|
|
102
|
-
placeholder: "Request Name"
|
|
103
|
-
|
|
91
|
+
placeholder: "Request Name",
|
|
92
|
+
onKeydown: G(L(w, ["prevent"]), ["enter"])
|
|
93
|
+
}, null, 40, te), [
|
|
104
94
|
[O, i.value]
|
|
105
95
|
])
|
|
106
96
|
]),
|
|
107
|
-
u("div",
|
|
108
|
-
u("div",
|
|
97
|
+
u("div", le, [
|
|
98
|
+
u("div", ae, [
|
|
109
99
|
o(J, {
|
|
110
100
|
isEditable: !0,
|
|
111
101
|
isSquare: "",
|
|
112
102
|
method: m.value,
|
|
113
|
-
onChange:
|
|
103
|
+
onChange: F
|
|
114
104
|
}, null, 8, ["method"]),
|
|
115
|
-
o(s(
|
|
105
|
+
o(s(U), {
|
|
116
106
|
modelValue: n.value,
|
|
117
107
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => n.value = l),
|
|
118
|
-
options:
|
|
108
|
+
options: b.value
|
|
119
109
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
o(s(
|
|
110
|
+
default: c(() => [
|
|
111
|
+
o(s(p), {
|
|
122
112
|
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
123
113
|
variant: "outlined"
|
|
124
114
|
}, {
|
|
125
|
-
default:
|
|
115
|
+
default: c(() => [
|
|
126
116
|
u("span", {
|
|
127
|
-
class:
|
|
117
|
+
class: M(n.value ? "text-c-1" : "text-c-3")
|
|
128
118
|
}, S(n.value ? n.value.label : "Select Collection"), 3),
|
|
129
119
|
o(s(N), {
|
|
130
120
|
class: "text-c-3",
|
|
@@ -137,20 +127,20 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
137
127
|
]),
|
|
138
128
|
_: 1
|
|
139
129
|
}, 8, ["modelValue", "options"]),
|
|
140
|
-
f.value.length ? (
|
|
130
|
+
f.value.length ? (k(), P(s(U), {
|
|
141
131
|
key: 0,
|
|
142
132
|
modelValue: a.value,
|
|
143
133
|
"onUpdate:modelValue": t[2] || (t[2] = (l) => a.value = l),
|
|
144
134
|
options: f.value
|
|
145
135
|
}, {
|
|
146
|
-
default:
|
|
147
|
-
o(s(
|
|
136
|
+
default: c(() => [
|
|
137
|
+
o(s(p), {
|
|
148
138
|
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
149
139
|
variant: "outlined"
|
|
150
140
|
}, {
|
|
151
|
-
default:
|
|
141
|
+
default: c(() => [
|
|
152
142
|
u("span", {
|
|
153
|
-
class:
|
|
143
|
+
class: M(a.value ? "text-c-1" : "text-c-3")
|
|
154
144
|
}, S(a.value ? a.value.label : "Select Folder"), 3),
|
|
155
145
|
o(s(N), {
|
|
156
146
|
class: "text-c-3",
|
|
@@ -164,11 +154,11 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
164
154
|
_: 1
|
|
165
155
|
}, 8, ["modelValue", "options"])) : A("", !0)
|
|
166
156
|
]),
|
|
167
|
-
o(s(
|
|
157
|
+
o(s(p), {
|
|
168
158
|
class: "max-h-8 text-xs p-0 px-3",
|
|
169
|
-
onClick:
|
|
159
|
+
onClick: w
|
|
170
160
|
}, {
|
|
171
|
-
default:
|
|
161
|
+
default: c(() => [
|
|
172
162
|
H(" Create Request ")
|
|
173
163
|
]),
|
|
174
164
|
_: 1
|
|
@@ -178,5 +168,5 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
178
168
|
}
|
|
179
169
|
});
|
|
180
170
|
export {
|
|
181
|
-
|
|
171
|
+
ce as default
|
|
182
172
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;AAmMA,wBAMG"}
|
|
@@ -1,55 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, ref as l, onMounted as m, openBlock as f, createElementBlock as h, createElementVNode as o, withDirectives as w, withKeys as _, withModifiers as x, vModelText as k, createVNode as v, unref as b, withCtx as y, createTextVNode as N } from "vue";
|
|
2
2
|
import { useWorkspace as g } from "../../store/workspace.js";
|
|
3
3
|
import { ScalarButton as C } from "@scalar/components";
|
|
4
|
-
import { useRouter as
|
|
5
|
-
|
|
6
|
-
const E = { class: "flex w-full flex-col gap-3" }, V = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, W = /* @__PURE__ */ o("label", {
|
|
4
|
+
import { useRouter as M } from "vue-router";
|
|
5
|
+
const V = { class: "flex w-full flex-col gap-3" }, W = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, B = /* @__PURE__ */ o("label", {
|
|
7
6
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
8
7
|
for: "workspacename"
|
|
9
|
-
}, null, -1),
|
|
8
|
+
}, null, -1), K = ["onKeydown"], E = { class: "flex" }, I = /* @__PURE__ */ o("div", { class: "flex flex-1 gap-2 max-h-8" }, null, -1), U = /* @__PURE__ */ d({
|
|
10
9
|
__name: "CommandPaletteWorkspace",
|
|
11
10
|
emits: ["close"],
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
const e =
|
|
15
|
-
name:
|
|
11
|
+
setup(S, { emit: r }) {
|
|
12
|
+
const c = r, { push: i } = M(), { workspaceMutators: u } = g(), t = l(""), s = () => {
|
|
13
|
+
const e = u.add({
|
|
14
|
+
name: t.value
|
|
16
15
|
});
|
|
17
|
-
i(`/workspace/${e.uid}`),
|
|
16
|
+
i(`/workspace/${e.uid}`), c("close");
|
|
18
17
|
}, a = l(null);
|
|
19
|
-
return
|
|
18
|
+
return m(() => {
|
|
20
19
|
var e;
|
|
21
|
-
(e = a.value) == null || e.focus()
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}), w(() => {
|
|
27
|
-
window.removeEventListener(
|
|
28
|
-
"keydown",
|
|
29
|
-
(e) => r(e, n),
|
|
30
|
-
!0
|
|
31
|
-
);
|
|
32
|
-
}), (e, t) => (h(), k("div", E, [
|
|
33
|
-
o("div", V, [
|
|
34
|
-
W,
|
|
35
|
-
_(o("input", {
|
|
20
|
+
(e = a.value) == null || e.focus();
|
|
21
|
+
}), (e, n) => (f(), h("div", V, [
|
|
22
|
+
o("div", W, [
|
|
23
|
+
B,
|
|
24
|
+
w(o("input", {
|
|
36
25
|
id: "workspacename",
|
|
37
26
|
ref_key: "workspaceInput",
|
|
38
27
|
ref: a,
|
|
39
|
-
"onUpdate:modelValue":
|
|
28
|
+
"onUpdate:modelValue": n[0] || (n[0] = (p) => t.value = p),
|
|
40
29
|
autofocus: "",
|
|
41
30
|
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
42
31
|
label: "Workspace Name",
|
|
43
|
-
placeholder: "Workspace Name"
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
placeholder: "Workspace Name",
|
|
33
|
+
onKeydown: _(x(s, ["prevent"]), ["enter"])
|
|
34
|
+
}, null, 40, K), [
|
|
35
|
+
[k, t.value]
|
|
46
36
|
])
|
|
47
37
|
]),
|
|
48
|
-
o("div",
|
|
49
|
-
|
|
38
|
+
o("div", E, [
|
|
39
|
+
I,
|
|
50
40
|
v(b(C), {
|
|
51
41
|
class: "max-h-8 text-xs p-0 px-3",
|
|
52
|
-
onClick:
|
|
42
|
+
onClick: s
|
|
53
43
|
}, {
|
|
54
44
|
default: y(() => [
|
|
55
45
|
N(" Continue ")
|
|
@@ -61,5 +51,5 @@ const E = { class: "flex w-full flex-col gap-3" }, V = { class: "gap-3 rounded b
|
|
|
61
51
|
}
|
|
62
52
|
});
|
|
63
53
|
export {
|
|
64
|
-
|
|
54
|
+
U as default
|
|
65
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAmYA;;;;GAIG;;AACH,wBA4ZI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CACxD"}
|
|
@@ -2,7 +2,7 @@ import o from "./TheCommandPalette.vue2.js";
|
|
|
2
2
|
import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-41343ef9"]]);
|
|
6
6
|
export {
|
|
7
7
|
s as PaletteComponents,
|
|
8
8
|
a as default
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as K, ref as u, computed as F, onMounted as q, onBeforeUnmount as I, openBlock as
|
|
1
|
+
import { defineComponent as K, ref as u, computed as F, onMounted as q, onBeforeUnmount as I, openBlock as r, createElementBlock as m, Fragment as d, withDirectives as h, createElementVNode as c, vShow as L, unref as p, createVNode as S, vModelText as N, renderList as B, toDisplayString as M, normalizeClass as T, createTextVNode as U, createBlock as G, resolveDynamicComponent as H } from "vue";
|
|
2
2
|
import { useModal as O, ScalarIcon as A } from "@scalar/components";
|
|
3
3
|
import { useMagicKeys as Q, whenever as k } from "@vueuse/core";
|
|
4
4
|
import { useRouter as j } from "vue-router";
|
|
@@ -11,7 +11,7 @@ import ee from "./CommandPaletteFolder.vue.js";
|
|
|
11
11
|
import oe from "./CommandPaletteImport.vue.js";
|
|
12
12
|
import te from "./CommandPaletteRequest.vue.js";
|
|
13
13
|
import ne from "./CommandPaletteWorkspace.vue.js";
|
|
14
|
-
const ae = { class: "commandmenu" },
|
|
14
|
+
const ae = { class: "commandmenu" }, le = { class: "bg-b-2 flex items-center rounded mb-2 pl-2 focus-within:bg-b-1 focus-within:shadow-border" }, re = { for: "commandmenu" }, se = ["onClick"], me = {
|
|
15
15
|
name: "TheCommandPalette"
|
|
16
16
|
}, ce = {
|
|
17
17
|
"Import Collection": oe,
|
|
@@ -73,31 +73,31 @@ const ae = { class: "commandmenu" }, re = { class: "bg-b-2 flex items-center rou
|
|
|
73
73
|
}
|
|
74
74
|
]
|
|
75
75
|
}
|
|
76
|
-
], f = Q(), a = O(), { push: V } = j(), { activeWorkspace: W } = X(), $ = u(), i = u(""), s = u(null),
|
|
76
|
+
], f = Q(), a = O(), { push: V } = j(), { activeWorkspace: W } = X(), $ = u(), i = u(""), s = u(null), o = u(-1), w = u([]), _ = F(
|
|
77
77
|
() => b.reduce((e, n) => {
|
|
78
|
-
const
|
|
78
|
+
const t = n.commands.filter(
|
|
79
79
|
(C) => C.name.toLowerCase().includes(i.value.toLowerCase())
|
|
80
80
|
);
|
|
81
|
-
return [...e, ...
|
|
81
|
+
return [...e, ...t];
|
|
82
82
|
}, [])
|
|
83
83
|
), v = () => {
|
|
84
|
-
a.hide(), i.value = "", s.value = null, window.removeEventListener("keydown", y, !0);
|
|
84
|
+
a.hide(), i.value = "", s.value = null, window.removeEventListener("keydown", y, !0), o.value = -1;
|
|
85
85
|
};
|
|
86
86
|
k(f.escape, () => {
|
|
87
87
|
a.open && v();
|
|
88
88
|
}), k(f.enter, () => {
|
|
89
|
-
if (!a.open) return;
|
|
90
|
-
const e = _.value[
|
|
89
|
+
if (!a.open || o.value === -1) return;
|
|
90
|
+
const e = _.value[o.value];
|
|
91
91
|
g(e);
|
|
92
92
|
}), k(f.ArrowDown, () => {
|
|
93
93
|
var e;
|
|
94
|
-
a.open && (
|
|
94
|
+
a.open && (o.value < _.value.length - 1 ? o.value++ : o.value = 0, (e = w.value[o.value]) == null || e.scrollIntoView({
|
|
95
95
|
behavior: "smooth",
|
|
96
96
|
block: "center"
|
|
97
97
|
}));
|
|
98
98
|
}), k(f.ArrowUp, () => {
|
|
99
99
|
var e;
|
|
100
|
-
a.open && (
|
|
100
|
+
a.open && (o.value > 0 ? o.value-- : o.value = _.value.length - 1, (e = w.value[o.value]) == null || e.scrollIntoView({
|
|
101
101
|
behavior: "smooth",
|
|
102
102
|
block: "center"
|
|
103
103
|
}));
|
|
@@ -108,8 +108,8 @@ const ae = { class: "commandmenu" }, re = { class: "bg-b-2 flex items-center rou
|
|
|
108
108
|
commandName: e,
|
|
109
109
|
metaData: n
|
|
110
110
|
} = {}) => {
|
|
111
|
-
var
|
|
112
|
-
s.value = e ?? null, $.value = n, a.show(), (
|
|
111
|
+
var t;
|
|
112
|
+
s.value = e ?? null, $.value = n, a.show(), (t = D.value) == null || t.focus(), window.addEventListener("keydown", y, !0);
|
|
113
113
|
};
|
|
114
114
|
q(() => P.on(R)), I(() => P.off(R));
|
|
115
115
|
const z = (e) => J() ? e.metaKey && e.key === "Enter" : e.ctrlKey && e.key === "Enter", y = (e) => {
|
|
@@ -117,32 +117,32 @@ const ae = { class: "commandmenu" }, re = { class: "bg-b-2 flex items-center rou
|
|
|
117
117
|
};
|
|
118
118
|
return I(() => {
|
|
119
119
|
window.removeEventListener("keydown", y, !0);
|
|
120
|
-
}), (e, n) => (
|
|
120
|
+
}), (e, n) => (r(), m(d, null, [
|
|
121
121
|
h(c("div", {
|
|
122
122
|
class: "commandmenu-clickout",
|
|
123
|
-
onClick: n[0] || (n[0] = (
|
|
123
|
+
onClick: n[0] || (n[0] = (t) => v())
|
|
124
124
|
}, null, 512), [
|
|
125
125
|
[L, p(a).open]
|
|
126
126
|
]),
|
|
127
127
|
h(c("div", ae, [
|
|
128
|
-
s.value ? (
|
|
128
|
+
s.value ? (r(), m(d, { key: 1 }, [
|
|
129
129
|
c("button", {
|
|
130
130
|
class: "absolute p-1 hover:bg-b-3 rounded text-c-3 active:text-c-1 m-1.5 z-10",
|
|
131
131
|
type: "button",
|
|
132
|
-
onClick: n[2] || (n[2] = (
|
|
132
|
+
onClick: n[2] || (n[2] = (t) => s.value = null)
|
|
133
133
|
}, [
|
|
134
134
|
S(p(A), {
|
|
135
135
|
icon: "ChevronLeft",
|
|
136
136
|
size: "sm"
|
|
137
137
|
})
|
|
138
138
|
]),
|
|
139
|
-
(
|
|
139
|
+
(r(), G(H(ce[s.value]), {
|
|
140
140
|
metaData: $.value,
|
|
141
141
|
onClose: v
|
|
142
142
|
}, null, 40, ["metaData"]))
|
|
143
|
-
], 64)) : (
|
|
144
|
-
c("div",
|
|
145
|
-
c("label",
|
|
143
|
+
], 64)) : (r(), m(d, { key: 0 }, [
|
|
144
|
+
c("div", le, [
|
|
145
|
+
c("label", re, [
|
|
146
146
|
S(p(A), {
|
|
147
147
|
class: "text-c-1 mr-2.5",
|
|
148
148
|
icon: "Search",
|
|
@@ -154,7 +154,7 @@ const ae = { class: "commandmenu" }, re = { class: "bg-b-2 flex items-center rou
|
|
|
154
154
|
id: "commandmenu",
|
|
155
155
|
ref_key: "commandInputRef",
|
|
156
156
|
ref: D,
|
|
157
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
157
|
+
"onUpdate:modelValue": n[1] || (n[1] = (t) => i.value = t),
|
|
158
158
|
autocomplete: "off",
|
|
159
159
|
autofocus: "",
|
|
160
160
|
class: "w-full rounded bg-none border-none py-1.5 text-sm focus:outline-none",
|
|
@@ -164,37 +164,37 @@ const ae = { class: "commandmenu" }, re = { class: "bg-b-2 flex items-center rou
|
|
|
164
164
|
[N, i.value]
|
|
165
165
|
])
|
|
166
166
|
]),
|
|
167
|
-
(
|
|
168
|
-
key:
|
|
167
|
+
(r(), m(d, null, B(b, (t, C) => (r(), m(d, {
|
|
168
|
+
key: t.label
|
|
169
169
|
}, [
|
|
170
|
-
h(c("div", { class: "text-c-3 font-medium text-xs mt-2" }, M(
|
|
170
|
+
h(c("div", { class: "text-c-3 font-medium text-xs mt-2" }, M(t.label), 513), [
|
|
171
171
|
[
|
|
172
172
|
L,
|
|
173
|
-
|
|
174
|
-
(
|
|
173
|
+
t.commands.filter(
|
|
174
|
+
(l) => l.name.toLowerCase().includes(i.value.toLowerCase())
|
|
175
175
|
).length > 0
|
|
176
176
|
]
|
|
177
177
|
]),
|
|
178
|
-
(
|
|
179
|
-
(
|
|
180
|
-
), (
|
|
181
|
-
key:
|
|
178
|
+
(r(!0), m(d, null, B(t.commands.filter(
|
|
179
|
+
(l) => l.name.toLowerCase().includes(i.value.toLowerCase())
|
|
180
|
+
), (l, x) => (r(), m("div", {
|
|
181
|
+
key: l.name,
|
|
182
182
|
ref_for: !0,
|
|
183
183
|
ref: (E) => {
|
|
184
184
|
E && (w.value[x] = E);
|
|
185
185
|
},
|
|
186
186
|
class: T(["commandmenu-item text-sm flex items-center py-1.5 px-2 rounded hover:bg-b-2 cursor-pointer", {
|
|
187
|
-
"bg-b-2": C > 0 ?
|
|
187
|
+
"bg-b-2": C > 0 ? o.value === x + b[C - 1].commands.length : o.value === x
|
|
188
188
|
}]),
|
|
189
|
-
onClick: (E) => g(
|
|
189
|
+
onClick: (E) => g(l)
|
|
190
190
|
}, [
|
|
191
191
|
S(p(A), {
|
|
192
192
|
class: "text-c-1 mr-2.5",
|
|
193
|
-
icon:
|
|
193
|
+
icon: l.icon,
|
|
194
194
|
size: "md",
|
|
195
195
|
thickness: "1.5"
|
|
196
196
|
}, null, 8, ["icon"]),
|
|
197
|
-
U(" " + M(
|
|
197
|
+
U(" " + M(l.name), 1)
|
|
198
198
|
], 10, se))), 128))
|
|
199
199
|
], 64))), 64))
|
|
200
200
|
], 64))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideHelp.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideHelp.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SideHelp.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideHelp.vue"],"names":[],"mappings":";AA8YA,wBAKG"}
|