@scalar/api-client 2.1.7 → 2.1.9
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 +28 -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 +48 -21
- 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/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/IconSelector.vue.d.ts +35 -0
- package/dist/components/IconSelector.vue.d.ts.map +1 -0
- package/dist/components/IconSelector.vue.js +74 -0
- package/dist/components/IconSelector.vue2.js +4 -0
- 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/Actions/EditSidebarListCollection.vue.d.ts +24 -0
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +1 -0
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +58 -0
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +4 -0
- package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.d.ts → EditSidebarListElement.vue.d.ts} +3 -3
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +1 -0
- package/dist/components/Sidebar/Actions/{RenameSidebarListElement.vue.js → EditSidebarListElement.vue.js} +9 -9
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +4 -0
- 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 +34 -22
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +68 -44
- 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 +39 -38
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
- package/dist/store/collections.d.ts +14 -4
- package/dist/store/collections.d.ts.map +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/request-example.d.ts +2 -2
- package/dist/store/requests.d.ts +2 -2
- package/dist/store/security-schemes.d.ts +4 -4
- package/dist/store/store.d.ts +68 -44
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.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 +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +135 -113
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +94 -91
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +93 -79
- 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/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +109 -95
- package/dist/views/Request/types/sidebar-item.d.ts +2 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +48 -54
- package/package.json +9 -12
- 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/Sidebar/Actions/RenameSidebarListElement.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/Actions/RenameSidebarListElement.vue2.js +0 -4
- package/dist/components/SubpageHeader.vue.js +0 -7
- package/dist/components/SubpageHeader.vue2.js +0 -34
|
@@ -6,7 +6,7 @@ import { useWorkspace as g } from "../../../store/store.js";
|
|
|
6
6
|
import { hotKeyBus as d } from "../../../libs/event-busses/hot-keys-bus.js";
|
|
7
7
|
import { executeRequestBus as N } from "../../../libs/event-busses/execute-request-bus.js";
|
|
8
8
|
import { commandPaletteBus as q } from "../../../libs/event-busses/command-palette-bus.js";
|
|
9
|
-
const f = (t) => (R("data-v-
|
|
9
|
+
const f = (t) => (R("data-v-54db086c"), t = t(), v(), t), B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, S = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, V = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "scalar-version-number"
|
|
12
12
|
}, w = /* @__PURE__ */ f(() => /* @__PURE__ */ e("b", null, "Alpha", -1)), A = /* @__PURE__ */ f(() => /* @__PURE__ */ e("div", { class: "mt-1" }, [
|
|
@@ -19,10 +19,10 @@ const f = (t) => (R("data-v-c180e370"), t = t(), v(), t), B = { class: "relative
|
|
|
19
19
|
setup(t) {
|
|
20
20
|
const { isReadOnly: _, activeWorkspace: h } = g(), r = () => {
|
|
21
21
|
q.emit({ commandName: "Create Request" });
|
|
22
|
-
},
|
|
23
|
-
|
|
22
|
+
}, l = (m) => {
|
|
23
|
+
m.openCommandPaletteRequest && r();
|
|
24
24
|
};
|
|
25
|
-
return y(() => d.on(
|
|
25
|
+
return y(() => d.on(l)), k(() => d.off(l)), (m, i) => (a(), c("div", B, [
|
|
26
26
|
e("div", S, [
|
|
27
27
|
o(h).isReadOnly ? p("", !0) : (a(), c("div", V, [
|
|
28
28
|
s(" Scalar V1.0.6 "),
|
|
@@ -30,7 +30,10 @@ const f = (t) => (R("data-v-c180e370"), t = t(), v(), t), B = { class: "relative
|
|
|
30
30
|
s(" Release "),
|
|
31
31
|
A
|
|
32
32
|
])),
|
|
33
|
-
n(C, {
|
|
33
|
+
n(C, {
|
|
34
|
+
art: o(b),
|
|
35
|
+
class: "text-c-3"
|
|
36
|
+
}, null, 8, ["art"])
|
|
34
37
|
]),
|
|
35
38
|
e("div", E, [
|
|
36
39
|
e("button", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAS3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAS3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AA4NxC,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,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":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AA67BA,wBAKG"}
|
|
@@ -1,159 +1,173 @@
|
|
|
1
|
-
import { defineComponent as O, computed as A, ref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useModal as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
import { commandPaletteBus as
|
|
8
|
-
const
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
1
|
+
import { defineComponent as O, computed as A, ref as M, openBlock as u, createElementBlock as W, Fragment as z, createElementVNode as o, createVNode as t, unref as e, withCtx as s, renderList as I, createBlock as k, withModifiers as c, normalizeClass as L, toDisplayString as C } from "vue";
|
|
2
|
+
import U from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import V from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
4
|
+
import { useModal as $, ScalarDropdown as S, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as q, ScalarButton as N, ScalarDropdownDivider as F, ScalarModal as T } from "@scalar/components";
|
|
5
|
+
import { useRouter as P } from "vue-router";
|
|
6
|
+
import { useWorkspace as Y } from "../../../store/store.js";
|
|
7
|
+
import { commandPaletteBus as G } from "../../../libs/event-busses/command-palette-bus.js";
|
|
8
|
+
const H = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/2 px-2.5 text-sm w-[inherit]" }, J = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = /* @__PURE__ */ o("span", null, "Rename", -1), Z = /* @__PURE__ */ o("span", null, "Delete", -1), ee = /* @__PURE__ */ o("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, [
|
|
9
|
+
/* @__PURE__ */ o("div", { class: "flex items-center text-c-2" }, [
|
|
10
|
+
/* @__PURE__ */ o("span", null, "Only workspace cannot be deleted.")
|
|
11
11
|
])
|
|
12
|
-
], -1),
|
|
12
|
+
], -1), te = /* @__PURE__ */ o("span", null, "Delete", -1), se = { class: "flex items-center justify-center h-4 w-4" }, ne = /* @__PURE__ */ o("span", null, "Create Workspace", -1), ue = /* @__PURE__ */ O({
|
|
13
13
|
__name: "WorkspaceDropdown",
|
|
14
|
-
setup(
|
|
15
|
-
const { activeWorkspace: f, workspaces:
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
if (!
|
|
25
|
-
const
|
|
26
|
-
if (delete a[
|
|
27
|
-
const
|
|
28
|
-
await
|
|
14
|
+
setup(oe) {
|
|
15
|
+
const { activeWorkspace: f, workspaces: d, workspaceMutators: _ } = Y(), { push: g } = P(), E = (n) => {
|
|
16
|
+
n !== f.value.uid && g(`/workspace/${n}`);
|
|
17
|
+
}, b = A(() => Object.keys(d).length === 1), j = () => G.emit({ commandName: "Create Workspace" }), h = M(""), r = M(""), v = $(), x = $(), y = (n) => {
|
|
18
|
+
h.value = d[n].name, r.value = n, v.show();
|
|
19
|
+
}, B = (n) => {
|
|
20
|
+
n.trim() && (_.edit(r.value, "name", n.trim()), v.hide());
|
|
21
|
+
}, D = (n) => {
|
|
22
|
+
h.value = d[n].name, r.value = n, x.show();
|
|
23
|
+
}, R = async () => {
|
|
24
|
+
if (!b.value) {
|
|
25
|
+
const n = f.value.uid === r.value, a = { ...d };
|
|
26
|
+
if (delete a[r.value], _.delete(r.value), n) {
|
|
27
|
+
const p = Object.keys(a)[0];
|
|
28
|
+
await g(`/workspace/${p}/`);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
x.hide();
|
|
32
32
|
};
|
|
33
|
-
return (
|
|
34
|
-
|
|
35
|
-
t(e(
|
|
33
|
+
return (n, a) => (u(), W(z, null, [
|
|
34
|
+
o("div", H, [
|
|
35
|
+
t(e(S), null, {
|
|
36
36
|
items: s(() => [
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
]),
|
|
58
|
-
_: 2
|
|
59
|
-
}, 1032, ["onClick"])
|
|
60
|
-
]),
|
|
61
|
-
content: s(() => [
|
|
62
|
-
t(e(z), { static: "" }, {
|
|
37
|
+
(u(!0), W(z, null, I(e(d), (p, l) => (u(), k(e(m), {
|
|
38
|
+
key: l,
|
|
39
|
+
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
40
|
+
onClick: c((w) => E(l), ["stop"])
|
|
41
|
+
}, {
|
|
42
|
+
default: s(() => [
|
|
43
|
+
o("div", {
|
|
44
|
+
class: L([
|
|
45
|
+
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
46
|
+
e(f).uid === l ? "bg-blue text-b-1" : "text-transparent"
|
|
47
|
+
])
|
|
48
|
+
}, [
|
|
49
|
+
t(e(i), {
|
|
50
|
+
class: "size-2.5",
|
|
51
|
+
icon: "Checkmark",
|
|
52
|
+
thickness: "3.5"
|
|
53
|
+
})
|
|
54
|
+
], 2),
|
|
55
|
+
o("span", Q, C(p.name), 1),
|
|
56
|
+
t(e(S), { teleport: ".scalar-client" }, {
|
|
63
57
|
items: s(() => [
|
|
64
|
-
t(e(
|
|
58
|
+
t(e(m), {
|
|
65
59
|
class: "flex gap-2",
|
|
66
|
-
onMousedown: (
|
|
60
|
+
onMousedown: (w) => y(l),
|
|
61
|
+
onTouchend: c((w) => y(l), ["prevent"])
|
|
67
62
|
}, {
|
|
68
63
|
default: s(() => [
|
|
69
|
-
t(e(
|
|
64
|
+
t(e(i), {
|
|
70
65
|
class: "inline-flex",
|
|
71
66
|
icon: "Edit",
|
|
72
67
|
size: "md",
|
|
73
68
|
thickness: "1.5"
|
|
74
69
|
}),
|
|
75
|
-
|
|
70
|
+
X
|
|
76
71
|
]),
|
|
77
72
|
_: 2
|
|
78
|
-
}, 1032, ["onMousedown"]),
|
|
79
|
-
|
|
73
|
+
}, 1032, ["onMousedown", "onTouchend"]),
|
|
74
|
+
b.value ? (u(), k(e(q), {
|
|
80
75
|
key: 0,
|
|
81
76
|
class: "z-10",
|
|
82
77
|
side: "bottom"
|
|
83
78
|
}, {
|
|
84
79
|
trigger: s(() => [
|
|
85
|
-
t(e(
|
|
80
|
+
t(e(m), {
|
|
86
81
|
class: "flex gap-2 w-full",
|
|
87
82
|
disabled: "",
|
|
88
|
-
onMousedown: a[0] || (a[0] =
|
|
83
|
+
onMousedown: a[0] || (a[0] = c(() => {
|
|
84
|
+
}, ["prevent"])),
|
|
85
|
+
onTouchend: a[1] || (a[1] = c(() => {
|
|
89
86
|
}, ["prevent"]))
|
|
90
87
|
}, {
|
|
91
88
|
default: s(() => [
|
|
92
|
-
t(e(
|
|
89
|
+
t(e(i), {
|
|
93
90
|
class: "inline-flex",
|
|
94
91
|
icon: "Delete",
|
|
95
92
|
size: "md",
|
|
96
93
|
thickness: "1.5"
|
|
97
94
|
}),
|
|
98
|
-
|
|
95
|
+
Z
|
|
99
96
|
]),
|
|
100
97
|
_: 1
|
|
101
98
|
})
|
|
102
99
|
]),
|
|
103
100
|
content: s(() => [
|
|
104
|
-
|
|
101
|
+
ee
|
|
105
102
|
]),
|
|
106
103
|
_: 1
|
|
107
|
-
})) : (
|
|
104
|
+
})) : (u(), k(e(m), {
|
|
108
105
|
key: 1,
|
|
109
106
|
class: "flex !gap-2",
|
|
110
|
-
onMousedown:
|
|
107
|
+
onMousedown: c((w) => D(l), ["prevent"]),
|
|
108
|
+
onTouchend: c((w) => D(l), ["prevent"])
|
|
111
109
|
}, {
|
|
112
110
|
default: s(() => [
|
|
113
|
-
t(e(
|
|
111
|
+
t(e(i), {
|
|
114
112
|
class: "inline-flex",
|
|
115
113
|
icon: "Delete",
|
|
116
114
|
size: "sm",
|
|
117
115
|
thickness: "1.5"
|
|
118
116
|
}),
|
|
119
|
-
|
|
117
|
+
te
|
|
120
118
|
]),
|
|
121
119
|
_: 2
|
|
122
|
-
}, 1032, ["onMousedown"]))
|
|
120
|
+
}, 1032, ["onMousedown", "onTouchend"]))
|
|
121
|
+
]),
|
|
122
|
+
default: s(() => [
|
|
123
|
+
t(e(N), {
|
|
124
|
+
class: "px-0.5 py-0 hover:bg-b-3 group-hover/item:flex aspect-square ml-auto -mr-1 h-fit",
|
|
125
|
+
size: "sm",
|
|
126
|
+
type: "button",
|
|
127
|
+
variant: "ghost"
|
|
128
|
+
}, {
|
|
129
|
+
default: s(() => [
|
|
130
|
+
t(e(i), {
|
|
131
|
+
icon: "Ellipses",
|
|
132
|
+
size: "sm"
|
|
133
|
+
})
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
})
|
|
123
137
|
]),
|
|
124
138
|
_: 2
|
|
125
139
|
}, 1024)
|
|
126
140
|
]),
|
|
127
141
|
_: 2
|
|
128
|
-
},
|
|
129
|
-
t(e(
|
|
130
|
-
t(e(
|
|
142
|
+
}, 1032, ["onClick"]))), 128)),
|
|
143
|
+
t(e(F)),
|
|
144
|
+
t(e(m), {
|
|
131
145
|
class: "flex items-center gap-1.5",
|
|
132
|
-
onClick:
|
|
146
|
+
onClick: j
|
|
133
147
|
}, {
|
|
134
148
|
default: s(() => [
|
|
135
|
-
|
|
136
|
-
t(e(
|
|
149
|
+
o("div", se, [
|
|
150
|
+
t(e(i), {
|
|
137
151
|
class: "h-2.5",
|
|
138
152
|
icon: "Add",
|
|
139
153
|
thickness: "3"
|
|
140
154
|
})
|
|
141
155
|
]),
|
|
142
|
-
|
|
156
|
+
ne
|
|
143
157
|
]),
|
|
144
158
|
_: 1
|
|
145
159
|
})
|
|
146
160
|
]),
|
|
147
161
|
default: s(() => [
|
|
148
|
-
t(e(
|
|
162
|
+
t(e(N), {
|
|
149
163
|
class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
|
|
150
164
|
fullWidth: "",
|
|
151
165
|
variant: "ghost"
|
|
152
166
|
}, {
|
|
153
167
|
default: s(() => [
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
t(e(
|
|
168
|
+
o("div", J, [
|
|
169
|
+
o("h2", K, C(e(f).name), 1),
|
|
170
|
+
t(e(i), {
|
|
157
171
|
class: "size-2.5",
|
|
158
172
|
icon: "ChevronDown",
|
|
159
173
|
thickness: "3.5"
|
|
@@ -166,31 +180,31 @@ const J = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b-1/
|
|
|
166
180
|
_: 1
|
|
167
181
|
})
|
|
168
182
|
]),
|
|
169
|
-
t(e(
|
|
183
|
+
t(e(T), {
|
|
170
184
|
size: "xxs",
|
|
171
|
-
state: e(
|
|
185
|
+
state: e(x),
|
|
172
186
|
title: "Delete workspace"
|
|
173
187
|
}, {
|
|
174
188
|
default: s(() => [
|
|
175
|
-
t(
|
|
176
|
-
variableName:
|
|
189
|
+
t(U, {
|
|
190
|
+
variableName: h.value,
|
|
177
191
|
warningMessage: "This cannot be undone. You’re about to delete the workspace and everything inside it.",
|
|
178
|
-
onClose: a[
|
|
179
|
-
onDelete:
|
|
192
|
+
onClose: a[2] || (a[2] = (p) => e(x).hide()),
|
|
193
|
+
onDelete: R
|
|
180
194
|
}, null, 8, ["variableName"])
|
|
181
195
|
]),
|
|
182
196
|
_: 1
|
|
183
197
|
}, 8, ["state"]),
|
|
184
|
-
t(e(
|
|
198
|
+
t(e(T), {
|
|
185
199
|
size: "xxs",
|
|
186
|
-
state: e(
|
|
200
|
+
state: e(v),
|
|
187
201
|
title: "Rename Workspace"
|
|
188
202
|
}, {
|
|
189
203
|
default: s(() => [
|
|
190
|
-
t(
|
|
191
|
-
name:
|
|
192
|
-
onClose: a[
|
|
193
|
-
|
|
204
|
+
t(V, {
|
|
205
|
+
name: h.value,
|
|
206
|
+
onClose: a[3] || (a[3] = (p) => e(v).hide()),
|
|
207
|
+
onEdit: B
|
|
194
208
|
}, null, 8, ["name"])
|
|
195
209
|
]),
|
|
196
210
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"sidebar-item.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/types/sidebar-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,GAAG,EACJ,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO,GAAG,cAAc,CAAA;IACnD,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,qDAAqD;IACrD,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,OAAO,CAAA;CACd,CAAA"}
|
|
@@ -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
|
};
|