@scalar/api-client 2.1.8 → 2.1.10
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 +18 -0
- package/dist/assets/rabbit.ascii.js +11 -0
- package/dist/assets/rabbitjump.ascii.js +11 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +7 -7
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +22 -13
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +1 -1
- package/dist/components/IconSelector.vue.d.ts.map +1 -1
- package/dist/components/IconSelector.vue.js +4 -3
- package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +10 -10
- package/dist/components/SideNav/SideHelp.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +2 -2
- package/dist/components/SideNav/SideNav.vue2.js +19 -22
- package/dist/components/SideNav/SideNavLink.vue.d.ts +0 -2
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +19 -21
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +24 -26
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +4 -4
- package/dist/layouts/App/create-api-client-app.d.ts +2 -2
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -4
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +19 -17
- package/dist/libs/create-client.d.ts +7 -18
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +1 -1
- package/dist/store/import-spec.d.ts +3 -2
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +34 -26
- package/dist/store/store.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +74 -80
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +86 -92
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +26 -26
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +88 -80
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +45 -45
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +131 -108
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +14 -18
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +8 -5
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +33 -33
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +48 -54
- package/package.json +3 -7
- package/dist/components/Search/SearchButton.vue.d.ts +0 -7
- package/dist/components/Search/SearchButton.vue.d.ts.map +0 -1
- package/dist/components/Search/SearchModal.vue.d.ts +0 -17
- package/dist/components/Search/SearchModal.vue.d.ts.map +0 -1
- package/dist/components/Search/SearchModal.vue.js +0 -7
- package/dist/components/Search/SearchModal.vue2.js +0 -142
- package/dist/components/Search/index.d.ts +0 -3
- package/dist/components/Search/index.d.ts.map +0 -1
- package/dist/components/Search/index.js +0 -4
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.js +0 -31
- package/dist/components/SideNav/WorkspaceProfileIcon.vue3.js +0 -5
- package/dist/components/SubpageHeader.vue.js +0 -7
- package/dist/components/SubpageHeader.vue2.js +0 -34
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as h, computed as u, ref as x, openBlock as r, createBlock as n, withCtx as d, createVNode as
|
|
1
|
+
import { defineComponent as h, computed as u, ref as x, openBlock as r, createBlock as n, withCtx as d, createVNode as i, unref as y, createElementVNode as f, createTextVNode as C, createCommentVNode as l, createElementBlock as A, Fragment as B } from "vue";
|
|
2
2
|
import S from "../../../components/ContextBar.vue.js";
|
|
3
3
|
import $ from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
4
|
import g from "./ResponseBody.vue.js";
|
|
@@ -14,36 +14,36 @@ const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll rel
|
|
|
14
14
|
response: {}
|
|
15
15
|
},
|
|
16
16
|
setup(v) {
|
|
17
|
-
const a = v,
|
|
17
|
+
const a = v, c = u(() => {
|
|
18
18
|
var s;
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
name:
|
|
22
|
-
value: e
|
|
19
|
+
const o = (s = a.response) == null ? void 0 : s.headers;
|
|
20
|
+
return o ? Object.keys(o).map((e) => ({
|
|
21
|
+
name: e,
|
|
22
|
+
value: o[e],
|
|
23
23
|
required: !1
|
|
24
24
|
})).filter(
|
|
25
|
-
(
|
|
25
|
+
(e) => ![
|
|
26
26
|
"rest-api-client-content-length",
|
|
27
27
|
"X-API-Client-Content-Length"
|
|
28
|
-
].includes(
|
|
28
|
+
].includes(e.name)
|
|
29
29
|
) : [];
|
|
30
30
|
}), k = u(
|
|
31
31
|
() => {
|
|
32
|
-
var
|
|
33
|
-
return ((
|
|
34
|
-
var
|
|
35
|
-
const
|
|
36
|
-
return
|
|
32
|
+
var o;
|
|
33
|
+
return ((o = a.response) == null ? void 0 : o.cookieHeaderKeys.flatMap((s) => {
|
|
34
|
+
var m, p;
|
|
35
|
+
const e = (p = (m = a.response) == null ? void 0 : m.headers) == null ? void 0 : p[s];
|
|
36
|
+
return e ? {
|
|
37
37
|
name: s,
|
|
38
|
-
value:
|
|
38
|
+
value: e,
|
|
39
39
|
required: !1
|
|
40
40
|
} : [];
|
|
41
41
|
})) ?? [];
|
|
42
42
|
}
|
|
43
43
|
), _ = ["Cookies", "Headers", "Body", "All"], t = x("All");
|
|
44
|
-
return (
|
|
44
|
+
return (o, s) => (r(), n($, null, {
|
|
45
45
|
title: d(() => [
|
|
46
|
-
|
|
46
|
+
i(y(R), {
|
|
47
47
|
class: "text-c-3 mr-2 rotate-180",
|
|
48
48
|
icon: "ExternalLink",
|
|
49
49
|
size: "sm",
|
|
@@ -51,39 +51,39 @@ const q = { class: "flex items-center flex-1" }, I = { class: "custom-scroll rel
|
|
|
51
51
|
}),
|
|
52
52
|
f("div", q, [
|
|
53
53
|
C(" Response "),
|
|
54
|
-
|
|
54
|
+
o.response ? (r(), n(N, {
|
|
55
55
|
key: 0,
|
|
56
|
-
response:
|
|
57
|
-
}, null, 8, ["response"])) :
|
|
56
|
+
response: o.response
|
|
57
|
+
}, null, 8, ["response"])) : l("", !0),
|
|
58
|
+
i(S, {
|
|
59
|
+
activeSection: t.value,
|
|
60
|
+
sections: _,
|
|
61
|
+
onSetActiveSection: s[0] || (s[0] = (e) => t.value = e)
|
|
62
|
+
}, null, 8, ["activeSection"])
|
|
58
63
|
])
|
|
59
64
|
]),
|
|
60
65
|
default: d(() => {
|
|
61
|
-
var
|
|
66
|
+
var e;
|
|
62
67
|
return [
|
|
63
68
|
f("div", I, [
|
|
64
|
-
|
|
65
|
-
c(S, {
|
|
66
|
-
activeSection: t.value,
|
|
67
|
-
sections: _,
|
|
68
|
-
onSetActiveSection: s[0] || (s[0] = (l) => t.value = l)
|
|
69
|
-
}, null, 8, ["activeSection"]),
|
|
69
|
+
o.response ? (r(), A(B, { key: 1 }, [
|
|
70
70
|
t.value === "All" || t.value === "Cookies" ? (r(), n(V, {
|
|
71
71
|
key: 0,
|
|
72
72
|
cookies: k.value
|
|
73
|
-
}, null, 8, ["cookies"])) :
|
|
73
|
+
}, null, 8, ["cookies"])) : l("", !0),
|
|
74
74
|
t.value === "All" || t.value === "Headers" ? (r(), n(L, {
|
|
75
75
|
key: 1,
|
|
76
|
-
headers:
|
|
77
|
-
}, null, 8, ["headers"])) :
|
|
76
|
+
headers: c.value
|
|
77
|
+
}, null, 8, ["headers"])) : l("", !0),
|
|
78
78
|
t.value === "All" || t.value === "Body" ? (r(), n(g, {
|
|
79
79
|
key: 2,
|
|
80
80
|
active: !0,
|
|
81
|
-
data: (
|
|
82
|
-
headers:
|
|
81
|
+
data: (e = a.response) == null ? void 0 : e.data,
|
|
82
|
+
headers: c.value,
|
|
83
83
|
title: "Body"
|
|
84
|
-
}, null, 8, ["data", "headers"])) :
|
|
84
|
+
}, null, 8, ["data", "headers"])) : l("", !0)
|
|
85
85
|
], 64)) : (r(), n(E, { key: 0 })),
|
|
86
|
-
|
|
86
|
+
i(H)
|
|
87
87
|
])
|
|
88
88
|
];
|
|
89
89
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Servers.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Servers/Servers.vue"],"names":[],"mappings":";AAoNA,wBAKG"}
|
|
@@ -1,66 +1,60 @@
|
|
|
1
|
-
import { defineComponent as d, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as d, openBlock as s, createBlock as i, withCtx as e, createVNode as r, unref as l, createElementVNode as p, createElementBlock as _, Fragment as v, renderList as S, createTextVNode as x } from "vue";
|
|
2
|
+
import h from "../../components/Sidebar/SidebarButton.vue.js";
|
|
3
|
+
import b from "../../components/Sidebar/SidebarList.vue.js";
|
|
4
4
|
import k from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
5
|
-
import L from "../../components/
|
|
6
|
-
import V from "../../components/ViewLayout/
|
|
7
|
-
import w from "
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import B from "
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
const $ = { class: "flex-1" }, J = /* @__PURE__ */ d({
|
|
5
|
+
import L from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
6
|
+
import V from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
7
|
+
import { serverSchema as w } from "@scalar/oas-utils/entities/spec";
|
|
8
|
+
import { useRouter as C } from "vue-router";
|
|
9
|
+
import y from "./ServerForm.vue.js";
|
|
10
|
+
import { useWorkspace as B } from "../../store/store.js";
|
|
11
|
+
import E from "../../components/Sidebar/Sidebar.vue.js";
|
|
12
|
+
const N = { class: "flex-1" }, G = /* @__PURE__ */ d({
|
|
14
13
|
__name: "Servers",
|
|
15
|
-
setup(
|
|
16
|
-
const { activeCollection: t, servers: m, serverMutators:
|
|
14
|
+
setup($) {
|
|
15
|
+
const { activeCollection: t, servers: m, serverMutators: c } = B(), { push: u } = C(), f = () => {
|
|
17
16
|
if (!t.value) return;
|
|
18
|
-
const o =
|
|
19
|
-
|
|
17
|
+
const o = w.parse({ url: "http://localhost" });
|
|
18
|
+
c.add(o, t.value.uid), u(`/servers/${o.uid}`);
|
|
20
19
|
};
|
|
21
|
-
return (o,
|
|
20
|
+
return (o, g) => (s(), i(L, null, {
|
|
22
21
|
default: e(() => [
|
|
23
|
-
r(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
title: e(() => [
|
|
49
|
-
x("Add Server")
|
|
50
|
-
]),
|
|
51
|
-
_: 1
|
|
52
|
-
})
|
|
53
|
-
]),
|
|
54
|
-
_: 1
|
|
55
|
-
}),
|
|
56
|
-
r(w, { class: "flex-1" }, {
|
|
57
|
-
default: e(() => [
|
|
58
|
-
r(B)
|
|
22
|
+
r(l(E), { title: "Servers" }, {
|
|
23
|
+
content: e(() => [
|
|
24
|
+
p("div", N, [
|
|
25
|
+
r(b, null, {
|
|
26
|
+
default: e(() => {
|
|
27
|
+
var n;
|
|
28
|
+
return [
|
|
29
|
+
(s(!0), _(v, null, S((n = l(t)) == null ? void 0 : n.servers, (a) => (s(), i(k, {
|
|
30
|
+
key: a,
|
|
31
|
+
class: "text-xs",
|
|
32
|
+
variable: {
|
|
33
|
+
name: l(m)[a].url ?? "",
|
|
34
|
+
uid: a
|
|
35
|
+
}
|
|
36
|
+
}, null, 8, ["variable"]))), 128))
|
|
37
|
+
];
|
|
38
|
+
}),
|
|
39
|
+
_: 1
|
|
40
|
+
})
|
|
41
|
+
])
|
|
42
|
+
]),
|
|
43
|
+
button: e(() => [
|
|
44
|
+
r(h, { click: f }, {
|
|
45
|
+
title: e(() => [
|
|
46
|
+
x("Add Server")
|
|
59
47
|
]),
|
|
60
48
|
_: 1
|
|
61
49
|
})
|
|
62
50
|
]),
|
|
63
51
|
_: 1
|
|
52
|
+
}),
|
|
53
|
+
r(V, { class: "flex-1" }, {
|
|
54
|
+
default: e(() => [
|
|
55
|
+
r(y)
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
64
58
|
})
|
|
65
59
|
]),
|
|
66
60
|
_: 1
|
|
@@ -68,5 +62,5 @@ const $ = { class: "flex-1" }, J = /* @__PURE__ */ d({
|
|
|
68
62
|
}
|
|
69
63
|
});
|
|
70
64
|
export {
|
|
71
|
-
|
|
65
|
+
G as default
|
|
72
66
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.1.
|
|
21
|
+
"version": "2.1.10",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -77,10 +77,6 @@
|
|
|
77
77
|
"import": "./dist/components/Sidebar/index.js",
|
|
78
78
|
"types": "./dist/components/Sidebar/index.d.ts"
|
|
79
79
|
},
|
|
80
|
-
"./components/Search": {
|
|
81
|
-
"import": "./dist/components/Search/index.js",
|
|
82
|
-
"types": "./dist/components/Search/index.d.ts"
|
|
83
|
-
},
|
|
84
80
|
"./components/HttpMethod": {
|
|
85
81
|
"import": "./dist/components/HttpMethod/index.js",
|
|
86
82
|
"types": "./dist/components/HttpMethod/index.d.ts"
|
|
@@ -131,9 +127,9 @@
|
|
|
131
127
|
"zod": "^3.23.8",
|
|
132
128
|
"@scalar/components": "0.12.48",
|
|
133
129
|
"@scalar/draggable": "0.1.5",
|
|
134
|
-
"@scalar/oas-utils": "0.2.48",
|
|
135
|
-
"@scalar/object-utils": "1.1.9",
|
|
136
130
|
"@scalar/icons": "0.1.0",
|
|
131
|
+
"@scalar/oas-utils": "0.2.49",
|
|
132
|
+
"@scalar/object-utils": "1.1.9",
|
|
137
133
|
"@scalar/openapi-parser": "0.8.4",
|
|
138
134
|
"@scalar/openapi-types": "0.1.1",
|
|
139
135
|
"@scalar/themes": "0.9.32",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
openSearchModal: () => void;
|
|
3
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
4
|
-
onOpenSearchModal?: (() => any) | undefined;
|
|
5
|
-
}, {}, {}>;
|
|
6
|
-
export default _default;
|
|
7
|
-
//# sourceMappingURL=SearchButton.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchButton.vue"],"names":[],"mappings":";;;;;AAoIA,wBAMG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type ModalState } from '@scalar/components';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
-
modalState: ModalState;
|
|
4
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
5
|
-
modalState: ModalState;
|
|
6
|
-
}>>>, {}, {}>;
|
|
7
|
-
export default _default;
|
|
8
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
-
type __VLS_TypePropsToOption<T> = {
|
|
10
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
-
} : {
|
|
13
|
-
type: import('vue').PropType<T[K]>;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=SearchModal.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchModal.vue"],"names":[],"mappings":"AA8PA,OAAO,EACL,KAAK,UAAU,EAKhB,MAAM,oBAAoB,CAAA;;gBAUb,UAAU;;gBAAV,UAAU;;AA+WxB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, ref as i, watch as y, computed as B, openBlock as w, createBlock as E, unref as d, withCtx as r, createElementVNode as h, createVNode as R, createTextVNode as m, toDisplayString as p, createElementBlock as N, Fragment as T, renderList as W, createSlots as L, pushScopeId as U, popScopeId as H } from "vue";
|
|
2
|
-
import { ScalarModal as K, ScalarSearchInput as P, ScalarSearchResultList as j, ScalarSearchResultItem as z } from "@scalar/components";
|
|
3
|
-
import { useMagicKeys as G, whenever as g } from "@vueuse/core";
|
|
4
|
-
import J from "fuse.js";
|
|
5
|
-
import { useRouter as O } from "vue-router";
|
|
6
|
-
import Q from "../HttpMethod/HttpMethod.vue.js";
|
|
7
|
-
import { useWorkspace as X } from "../../store/store.js";
|
|
8
|
-
const Y = (u) => (U("data-v-85de57c6"), u = u(), H(), u), Z = /* @__PURE__ */ Y(() => /* @__PURE__ */ h("div", { class: "ref-search-meta" }, [
|
|
9
|
-
/* @__PURE__ */ h("span", null, "↑↓ Navigate"),
|
|
10
|
-
/* @__PURE__ */ h("span", null, "⏎ Select")
|
|
11
|
-
], -1)), se = /* @__PURE__ */ D({
|
|
12
|
-
__name: "SearchModal",
|
|
13
|
-
props: {
|
|
14
|
-
modalState: {}
|
|
15
|
-
},
|
|
16
|
-
setup(u) {
|
|
17
|
-
const c = u, F = O(), { activeWorkspaceRequests: I, requests: V } = X(), v = G(), l = i([]), f = i([]), o = i(0), s = i(""), _ = i(null), S = new J(l.value, {
|
|
18
|
-
keys: ["title", "description", "body"]
|
|
19
|
-
}), $ = () => {
|
|
20
|
-
s.value = "", o.value = 0, f.value = [];
|
|
21
|
-
}, b = (e) => {
|
|
22
|
-
l.value = e.map((a) => ({
|
|
23
|
-
id: a.uid,
|
|
24
|
-
title: a.summary ?? a.method,
|
|
25
|
-
description: a.description ?? "",
|
|
26
|
-
httpVerb: a.method,
|
|
27
|
-
path: a.path
|
|
28
|
-
})), S.setCollection(l.value);
|
|
29
|
-
}, x = () => {
|
|
30
|
-
o.value = 0, f.value = S.search(s.value);
|
|
31
|
-
};
|
|
32
|
-
y(
|
|
33
|
-
() => c.modalState.open,
|
|
34
|
-
(e) => {
|
|
35
|
-
var a;
|
|
36
|
-
if (!e) {
|
|
37
|
-
l.value.length > 0 && (l.value = [], S.setCollection(l.value));
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
(a = _.value) == null || a.focus(), $(), b(
|
|
41
|
-
I.value.map((t) => V[t])
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
), y(
|
|
45
|
-
I,
|
|
46
|
-
(e) => {
|
|
47
|
-
b(e.map((a) => V[a]));
|
|
48
|
-
},
|
|
49
|
-
{ immediate: !0 }
|
|
50
|
-
);
|
|
51
|
-
function C(e) {
|
|
52
|
-
F.push(e.item.id), c.modalState.hide();
|
|
53
|
-
}
|
|
54
|
-
const k = B(
|
|
55
|
-
() => n.value[o.value]
|
|
56
|
-
), n = B(
|
|
57
|
-
() => s.value.length === 0 ? l.value.map((e) => ({
|
|
58
|
-
item: e
|
|
59
|
-
})) : f.value
|
|
60
|
-
);
|
|
61
|
-
return g(v.enter, () => {
|
|
62
|
-
c.modalState.open && window && C(k.value);
|
|
63
|
-
}), g(v.ArrowDown, () => {
|
|
64
|
-
var e;
|
|
65
|
-
c.modalState.open && window && (o.value < n.value.length - 1 ? o.value++ : o.value = 0, (e = document.getElementById(`search-modal-${k.value.item.id}`)) == null || e.scrollIntoView({
|
|
66
|
-
behavior: "smooth",
|
|
67
|
-
block: "center"
|
|
68
|
-
}));
|
|
69
|
-
}), g(v.ArrowUp, () => {
|
|
70
|
-
var e;
|
|
71
|
-
c.modalState.open && window && (o.value > 0 ? o.value-- : o.value = n.value.length - 1, (e = document.getElementById(`search-modal-${k.value.item.id}`)) == null || e.scrollIntoView({
|
|
72
|
-
behavior: "smooth",
|
|
73
|
-
block: "center"
|
|
74
|
-
}));
|
|
75
|
-
}), (e, a) => (w(), E(d(K), {
|
|
76
|
-
state: e.modalState,
|
|
77
|
-
variant: "search"
|
|
78
|
-
}, {
|
|
79
|
-
default: r(() => [
|
|
80
|
-
h("div", {
|
|
81
|
-
ref_key: "searchModalRef",
|
|
82
|
-
ref: _,
|
|
83
|
-
class: "ref-search-container"
|
|
84
|
-
}, [
|
|
85
|
-
R(d(P), {
|
|
86
|
-
modelValue: s.value,
|
|
87
|
-
"onUpdate:modelValue": a[0] || (a[0] = (t) => s.value = t),
|
|
88
|
-
onInput: x
|
|
89
|
-
}, null, 8, ["modelValue"])
|
|
90
|
-
], 512),
|
|
91
|
-
R(d(j), {
|
|
92
|
-
class: "ref-search-results custom-scroll",
|
|
93
|
-
noResults: !n.value.length
|
|
94
|
-
}, {
|
|
95
|
-
query: r(() => [
|
|
96
|
-
m(p(s.value), 1)
|
|
97
|
-
]),
|
|
98
|
-
default: r(() => [
|
|
99
|
-
(w(!0), N(T, null, W(n.value, (t, M) => (w(), E(d(z), {
|
|
100
|
-
id: `#search-modal-${t.item.id}`,
|
|
101
|
-
key: t.refIndex,
|
|
102
|
-
active: o.value === M,
|
|
103
|
-
icon: "Terminal",
|
|
104
|
-
onClick: (A) => C(t),
|
|
105
|
-
onFocus: (A) => o.value = M
|
|
106
|
-
}, L({
|
|
107
|
-
addon: r(() => [
|
|
108
|
-
R(d(Q), {
|
|
109
|
-
method: t.item.httpVerb ?? "get"
|
|
110
|
-
}, null, 8, ["method"])
|
|
111
|
-
]),
|
|
112
|
-
default: r(() => [
|
|
113
|
-
m(p(t.item.title) + " ", 1)
|
|
114
|
-
]),
|
|
115
|
-
_: 2
|
|
116
|
-
}, [
|
|
117
|
-
(t.item.httpVerb || t.item.path) && t.item.path !== t.item.title ? {
|
|
118
|
-
name: "description",
|
|
119
|
-
fn: r(() => [
|
|
120
|
-
m(p(t.item.path), 1)
|
|
121
|
-
]),
|
|
122
|
-
key: "0"
|
|
123
|
-
} : t.item.description ? {
|
|
124
|
-
name: "description",
|
|
125
|
-
fn: r(() => [
|
|
126
|
-
m(p(t.item.description), 1)
|
|
127
|
-
]),
|
|
128
|
-
key: "1"
|
|
129
|
-
} : void 0
|
|
130
|
-
]), 1032, ["id", "active", "onClick", "onFocus"]))), 128))
|
|
131
|
-
]),
|
|
132
|
-
_: 1
|
|
133
|
-
}, 8, ["noResults"]),
|
|
134
|
-
Z
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
}, 8, ["state"]));
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
export {
|
|
141
|
-
se as default
|
|
142
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Search/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,mBAAmB,CAAA;AAE3C,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i, openBlock as a, createElementBlock as s, toDisplayString as n, createBlock as p, unref as l } from "vue";
|
|
2
|
-
import { ScalarIcon as m } from "@scalar/components";
|
|
3
|
-
const k = {
|
|
4
|
-
"aria-label": "Workspace Menu",
|
|
5
|
-
class: "workspace-avatar shine-effect",
|
|
6
|
-
type: "button"
|
|
7
|
-
}, f = ["src"], u = { key: 1 }, U = /* @__PURE__ */ i({
|
|
8
|
-
__name: "WorkspaceProfileIcon",
|
|
9
|
-
props: {
|
|
10
|
-
activeUser: {}
|
|
11
|
-
},
|
|
12
|
-
setup(_) {
|
|
13
|
-
return (e, d) => {
|
|
14
|
-
var r, o, t, c;
|
|
15
|
-
return a(), s("button", k, [
|
|
16
|
-
(r = e.activeUser) != null && r.imageUri ? (a(), s("img", {
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "workspace-avatar-image",
|
|
19
|
-
src: e.activeUser.imageUri
|
|
20
|
-
}, null, 8, f)) : (o = e.activeUser) != null && o.displayName && ((t = e.activeUser) != null && t.displayName[0]) ? (a(), s("span", u, n((c = e.activeUser) == null ? void 0 : c.displayName[0]), 1)) : (a(), p(l(m), {
|
|
21
|
-
key: 2,
|
|
22
|
-
class: "text-c-1 h-6 w-6",
|
|
23
|
-
icon: "Logo"
|
|
24
|
-
}))
|
|
25
|
-
]);
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
export {
|
|
30
|
-
U as default
|
|
31
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, resolveComponent as a, openBlock as l, createElementBlock as i, createElementVNode as r, createVNode as t, unref as o, withCtx as p, renderSlot as u, pushScopeId as m, popScopeId as f } from "vue";
|
|
2
|
-
import { ScalarIcon as _ } from "@scalar/components";
|
|
3
|
-
import { useRoute as h } from "vue-router";
|
|
4
|
-
const b = (e) => (m("data-v-4f9e2869"), e = e(), f(), e), v = { class: "flex flex-1 flex-col rounded pt-0 h-full bg-b-1 relative border-1/2 rounded mr-1.5 mb-1.5 overflow-hidden" }, x = { class: "hidden md:flex lg:min-h-header items-center w-full p-1 t-app__top-container items-center border-b-1/2" }, k = /* @__PURE__ */ b(() => /* @__PURE__ */ r("span", { class: "leading-none" }, "Back To Requests", -1)), I = /* @__PURE__ */ d({
|
|
5
|
-
__name: "SubpageHeader",
|
|
6
|
-
setup(e) {
|
|
7
|
-
const n = h();
|
|
8
|
-
return (s, g) => {
|
|
9
|
-
const c = a("router-link");
|
|
10
|
-
return l(), i("div", v, [
|
|
11
|
-
r("div", x, [
|
|
12
|
-
t(c, {
|
|
13
|
-
class: "text-c-2 text-sm font-medium ml-1 flex items-center p-1.5 hover:bg-b-2 rounded cursor-pointer gap-0.5 active:text-c-1 no-underline dark:hover:bg-b-2",
|
|
14
|
-
to: `/workspace/${o(n).params.workspace}/request/default`
|
|
15
|
-
}, {
|
|
16
|
-
default: p(() => [
|
|
17
|
-
t(o(_), {
|
|
18
|
-
icon: "ChevronLeft",
|
|
19
|
-
size: "md",
|
|
20
|
-
thickness: "1.75"
|
|
21
|
-
}),
|
|
22
|
-
k
|
|
23
|
-
]),
|
|
24
|
-
_: 1
|
|
25
|
-
}, 8, ["to"])
|
|
26
|
-
]),
|
|
27
|
-
u(s.$slots, "default", {}, void 0, !0)
|
|
28
|
-
]);
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
export {
|
|
33
|
-
I as default
|
|
34
|
-
};
|