@scalar/api-client 2.1.46 → 2.1.48
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 +33 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +6 -6
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +32 -26
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +14 -9
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +15 -10
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +17 -12
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +2 -2
- package/dist/components/ImportCollection/DropEventListener.vue.js +6 -6
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -21
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +87 -74
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +2 -2
- package/dist/components/ImportCollection/PasteEventListener.vue.js +5 -5
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +2 -2
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +10 -5
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +43 -33
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +31 -21
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +17 -17
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +14 -13
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +1 -3
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +11 -11
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +11 -10
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +22 -10
- package/dist/router.d.ts +4 -41
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +18 -149
- package/dist/routes.d.ts +150 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +182 -0
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/router-params.js +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +90 -90
- package/dist/style.css +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +20 -15
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +71 -71
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +18 -18
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +46 -33
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +6 -6
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +26 -21
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +5 -97
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +97 -2
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +8 -8
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
- 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 +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +61 -55
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +95 -64
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +60 -50
- 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 +12 -7
- package/package.json +7 -7
- package/dist/components/SubpageHeader.vue.d.ts +0 -18
- package/dist/components/SubpageHeader.vue.d.ts.map +0 -1
|
@@ -15,7 +15,7 @@ const V = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, B = { cl
|
|
|
15
15
|
s.commandPalette.emit({ commandName: "Create Request" });
|
|
16
16
|
}, i = (a) => {
|
|
17
17
|
a != null && a.createNew && y.name === "request" && m();
|
|
18
|
-
}, k = "2.1.
|
|
18
|
+
}, k = "2.1.48";
|
|
19
19
|
return R(() => s.hotKeys.on(i)), g(() => s.hotKeys.off(i)), (a, e) => (r(), n("div", V, [
|
|
20
20
|
o("div", B, [
|
|
21
21
|
t(f).isReadOnly ? p("", !0) : (r(), n("div", S, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AA0EA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;;AAyJF,wBAOG"}
|
|
@@ -1,76 +1,82 @@
|
|
|
1
|
-
import { defineComponent as _, openBlock as e, createBlock as
|
|
1
|
+
import { defineComponent as _, openBlock as e, createBlock as n, withCtx as t, createTextVNode as l, createElementBlock as s, createVNode as m, Fragment as f, renderList as x, toDisplayString as i } from "vue";
|
|
2
2
|
import h from "../../../components/DataTable/DataTable.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import y from "../../../components/DataTable/DataTableRow.vue.js";
|
|
4
4
|
import u from "../../../components/DataTable/DataTableText.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { httpHeaders as
|
|
8
|
-
const
|
|
5
|
+
import k from "../../../components/HelpfulLink.vue.js";
|
|
6
|
+
import b from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
|
+
import { httpHeaders as g } from "../../../data/httpHeaders.js";
|
|
8
|
+
const w = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "border max-h-[calc(100%-32px)] overflow-y-auto rounded"
|
|
11
|
+
}, C = {
|
|
9
12
|
key: 1,
|
|
10
13
|
class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
|
|
11
|
-
},
|
|
14
|
+
}, R = /* @__PURE__ */ _({
|
|
12
15
|
__name: "ResponseHeaders",
|
|
13
16
|
props: {
|
|
14
17
|
headers: {}
|
|
15
18
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
(
|
|
19
|
+
setup(v) {
|
|
20
|
+
const d = (r) => g.find(
|
|
21
|
+
(a) => a.name.toLowerCase() === r.toLowerCase()
|
|
19
22
|
);
|
|
20
|
-
return (r,
|
|
23
|
+
return (r, a) => (e(), n(b, {
|
|
24
|
+
class: "overflow-scroll",
|
|
21
25
|
defaultOpen: !1,
|
|
22
26
|
itemCount: r.headers.length
|
|
23
27
|
}, {
|
|
24
|
-
title: t(() =>
|
|
25
|
-
|
|
28
|
+
title: t(() => a[0] || (a[0] = [
|
|
29
|
+
l("Headers")
|
|
26
30
|
])),
|
|
27
31
|
default: t(() => [
|
|
28
|
-
r.headers.length ? (e(),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
32
|
+
r.headers.length ? (e(), s("div", w, [
|
|
33
|
+
m(h, {
|
|
34
|
+
class: "!border-0 !mx-0",
|
|
35
|
+
columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
|
|
36
|
+
scroll: ""
|
|
37
|
+
}, {
|
|
38
|
+
default: t(() => [
|
|
39
|
+
(e(!0), s(f, null, x(r.headers, (o, p) => (e(), n(y, {
|
|
40
|
+
key: p,
|
|
41
|
+
class: "text-c-1"
|
|
42
|
+
}, {
|
|
43
|
+
default: t(() => [
|
|
44
|
+
m(u, { class: "sticky left-0 z-1 bg-b-1 max-w-48" }, {
|
|
45
|
+
default: t(() => {
|
|
46
|
+
var c;
|
|
47
|
+
return [
|
|
48
|
+
typeof ((c = d(o.name)) == null ? void 0 : c.url) == "string" ? (e(), n(k, {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "decoration-c-3",
|
|
51
|
+
href: d(o.name).url
|
|
52
|
+
}, {
|
|
53
|
+
default: t(() => [
|
|
54
|
+
l(i(o.name), 1)
|
|
55
|
+
]),
|
|
56
|
+
_: 2
|
|
57
|
+
}, 1032, ["href"])) : (e(), s(f, { key: 1 }, [
|
|
58
|
+
l(i(o.name), 1)
|
|
59
|
+
], 64))
|
|
60
|
+
];
|
|
61
|
+
}),
|
|
62
|
+
_: 2
|
|
63
|
+
}, 1024),
|
|
64
|
+
m(u, {
|
|
65
|
+
class: "z-0",
|
|
66
|
+
text: o.value
|
|
67
|
+
}, null, 8, ["text"])
|
|
68
|
+
]),
|
|
69
|
+
_: 2
|
|
70
|
+
}, 1024))), 128))
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
})
|
|
74
|
+
])) : (e(), s("div", C, " No Headers "))
|
|
69
75
|
]),
|
|
70
76
|
_: 1
|
|
71
77
|
}, 8, ["itemCount"]));
|
|
72
78
|
}
|
|
73
79
|
});
|
|
74
80
|
export {
|
|
75
|
-
|
|
81
|
+
R as default
|
|
76
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA6MA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AASvE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;AA2RF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6fdb06f8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,101 +1,132 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { defineComponent as _, computed as m, ref as g, openBlock as n, createBlock as i, withCtx as u, createElementVNode as l, normalizeClass as f, createCommentVNode as c, createVNode as v, createElementBlock as y, Fragment as x } from "vue";
|
|
2
|
+
import R from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import S from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import j from "./ResponseBody.vue.js";
|
|
5
|
+
import b from "./ResponseEmpty.vue.js";
|
|
6
|
+
import H from "./ResponseLoadingOverlay.vue.js";
|
|
7
|
+
import V from "./ResponseMetaInformation.vue.js";
|
|
8
|
+
import w from "./ResponseBodyVirtual.vue.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
10
|
+
import L from "./ResponseCookies.vue.js";
|
|
11
|
+
import z from "./ResponseHeaders.vue.js";
|
|
12
|
+
const E = { class: "flex items-center flex-1 h-8" }, h = 2e5, X = /* @__PURE__ */ _({
|
|
13
13
|
__name: "ResponseSection",
|
|
14
14
|
props: {
|
|
15
15
|
response: {}
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
var
|
|
20
|
-
const e = (
|
|
21
|
-
return e ? Object.keys(e).map((
|
|
22
|
-
name:
|
|
23
|
-
value: e[
|
|
17
|
+
setup(k) {
|
|
18
|
+
const t = k, d = m(() => {
|
|
19
|
+
var s;
|
|
20
|
+
const e = (s = t.response) == null ? void 0 : s.headers;
|
|
21
|
+
return e ? Object.keys(e).map((o) => ({
|
|
22
|
+
name: o,
|
|
23
|
+
value: e[o],
|
|
24
24
|
required: !1
|
|
25
25
|
})).filter(
|
|
26
|
-
(
|
|
26
|
+
(o) => ![
|
|
27
27
|
"rest-api-client-content-length",
|
|
28
28
|
"X-API-Client-Content-Length"
|
|
29
|
-
].includes(
|
|
29
|
+
].includes(o.name)
|
|
30
30
|
) : [];
|
|
31
|
-
}),
|
|
31
|
+
}), B = m(
|
|
32
32
|
() => {
|
|
33
33
|
var e;
|
|
34
|
-
return ((e =
|
|
35
|
-
var
|
|
36
|
-
const
|
|
37
|
-
return
|
|
38
|
-
name:
|
|
39
|
-
value:
|
|
34
|
+
return ((e = t.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((s) => {
|
|
35
|
+
var r, p;
|
|
36
|
+
const o = (p = (r = t.response) == null ? void 0 : r.headers) == null ? void 0 : p[s];
|
|
37
|
+
return o ? {
|
|
38
|
+
name: s,
|
|
39
|
+
value: o,
|
|
40
40
|
required: !1
|
|
41
41
|
} : [];
|
|
42
42
|
})) ?? [];
|
|
43
43
|
}
|
|
44
|
-
),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
), C = ["All", "Cookies", "Headers", "Body"], a = g("All"), A = m(() => {
|
|
45
|
+
var r, p;
|
|
46
|
+
if (!t.response) return !1;
|
|
47
|
+
const e = ((r = t.response.headers) == null ? void 0 : r["content-type"]) || ((p = t.response.headers) == null ? void 0 : p["Content-Type"]);
|
|
48
|
+
return !e || (t.response.size ?? 0) <= h ? !1 : [
|
|
49
|
+
// Text types
|
|
50
|
+
"text/",
|
|
51
|
+
// JSON types
|
|
52
|
+
"application/json",
|
|
53
|
+
"application/ld+json",
|
|
54
|
+
"application/problem+json",
|
|
55
|
+
"application/vnd.api+json",
|
|
56
|
+
// XML types
|
|
57
|
+
"application/xml",
|
|
58
|
+
"application/atom+xml",
|
|
59
|
+
"application/rss+xml",
|
|
60
|
+
"application/problem+xml",
|
|
61
|
+
// Other structured text
|
|
62
|
+
"application/javascript",
|
|
63
|
+
"application/ecmascript",
|
|
64
|
+
"application/x-yaml",
|
|
65
|
+
"application/yaml",
|
|
66
|
+
// Source code
|
|
67
|
+
"application/x-httpd-php",
|
|
68
|
+
"application/x-sh",
|
|
69
|
+
"application/x-perl",
|
|
70
|
+
"application/x-python",
|
|
71
|
+
"application/x-ruby",
|
|
72
|
+
"application/x-java-source",
|
|
73
|
+
// Form data
|
|
74
|
+
"application/x-www-form-urlencoded"
|
|
75
|
+
].some((T) => e.includes(T)) && (t.response.size ?? 0) > h;
|
|
76
|
+
});
|
|
77
|
+
return (e, s) => (n(), i(S, { "aria-label": "Response" }, {
|
|
78
|
+
title: u(() => [
|
|
79
|
+
l("div", E, [
|
|
53
80
|
l("div", {
|
|
54
81
|
"aria-live": "polite",
|
|
55
|
-
class:
|
|
82
|
+
class: f(["flex items-center", { "animate-response-heading": e.response }])
|
|
56
83
|
}, [
|
|
57
|
-
|
|
58
|
-
e.response ? (
|
|
84
|
+
s[1] || (s[1] = l("span", { class: "response-heading absolute pointer-events-none" }, " Response ", -1)),
|
|
85
|
+
e.response ? (n(), i(V, {
|
|
59
86
|
key: 0,
|
|
60
87
|
class: "animate-response-children",
|
|
61
88
|
response: e.response
|
|
62
|
-
}, null, 8, ["response"])) :
|
|
89
|
+
}, null, 8, ["response"])) : c("", !0)
|
|
63
90
|
], 2),
|
|
64
|
-
|
|
65
|
-
activeSection:
|
|
66
|
-
sections:
|
|
67
|
-
onSetActiveSection:
|
|
91
|
+
v(R, {
|
|
92
|
+
activeSection: a.value,
|
|
93
|
+
sections: C,
|
|
94
|
+
onSetActiveSection: s[0] || (s[0] = (o) => a.value = o)
|
|
68
95
|
}, null, 8, ["activeSection"])
|
|
69
96
|
])
|
|
70
97
|
]),
|
|
71
|
-
default:
|
|
72
|
-
var
|
|
98
|
+
default: u(() => {
|
|
99
|
+
var o;
|
|
73
100
|
return [
|
|
74
|
-
l("div",
|
|
75
|
-
|
|
76
|
-
|
|
101
|
+
l("div", {
|
|
102
|
+
class: f(["custom-scroll h-full relative grid gap-[.5px] px-2 xl:px-3 py-2.5", {
|
|
103
|
+
"content-start": e.response
|
|
104
|
+
}])
|
|
105
|
+
}, [
|
|
106
|
+
e.response ? (n(), y(x, { key: 1 }, [
|
|
107
|
+
a.value === "All" || a.value === "Cookies" ? (n(), i(L, {
|
|
77
108
|
key: 0,
|
|
78
|
-
cookies:
|
|
79
|
-
}, null, 8, ["cookies"])) :
|
|
80
|
-
|
|
109
|
+
cookies: B.value
|
|
110
|
+
}, null, 8, ["cookies"])) : c("", !0),
|
|
111
|
+
a.value === "All" || a.value === "Headers" ? (n(), i(z, {
|
|
81
112
|
key: 1,
|
|
82
|
-
headers:
|
|
83
|
-
}, null, 8, ["headers"])) :
|
|
84
|
-
|
|
85
|
-
|
|
113
|
+
headers: d.value
|
|
114
|
+
}, null, 8, ["headers"])) : c("", !0),
|
|
115
|
+
a.value === "All" || a.value === "Body" ? (n(), y(x, { key: 2 }, [
|
|
116
|
+
A.value ? (n(), i(w, {
|
|
86
117
|
key: 0,
|
|
87
|
-
content:
|
|
88
|
-
}, null, 8, ["content"])) : (
|
|
118
|
+
content: t.response.data
|
|
119
|
+
}, null, 8, ["content"])) : (n(), i(j, {
|
|
89
120
|
key: 1,
|
|
90
121
|
active: !0,
|
|
91
|
-
data: (
|
|
92
|
-
headers:
|
|
122
|
+
data: (o = t.response) == null ? void 0 : o.data,
|
|
123
|
+
headers: d.value,
|
|
93
124
|
title: "Body"
|
|
94
125
|
}, null, 8, ["data", "headers"]))
|
|
95
|
-
], 64)) :
|
|
96
|
-
], 64)) : (
|
|
97
|
-
|
|
98
|
-
])
|
|
126
|
+
], 64)) : c("", !0)
|
|
127
|
+
], 64)) : (n(), i(b, { key: 0 })),
|
|
128
|
+
v(H)
|
|
129
|
+
], 2)
|
|
99
130
|
];
|
|
100
131
|
}),
|
|
101
132
|
_: 1
|
|
@@ -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":";AA8zBA,wBAMG"}
|
|
@@ -1,78 +1,88 @@
|
|
|
1
|
-
import { defineComponent as O, computed as A, ref as M, openBlock as
|
|
1
|
+
import { defineComponent as O, computed as A, ref as M, openBlock as m, createElementBlock as W, createElementVNode as a, createVNode as s, unref as e, withCtx as n, Fragment as I, renderList as L, createBlock as h, withModifiers as c, normalizeClass as U, toDisplayString as z } from "vue";
|
|
2
2
|
import V from "../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
3
|
import q from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
4
|
-
import { useModal as C, ScalarDropdown as
|
|
4
|
+
import { useModal as C, ScalarDropdown as S, ScalarDropdownItem as u, ScalarIcon as r, ScalarTooltip as F, ScalarButton as $, ScalarDropdownDivider as P, ScalarModal as N } from "@scalar/components";
|
|
5
5
|
import { useRouter as Y } from "vue-router";
|
|
6
6
|
import { useWorkspace as G } from "../../../store/store.js";
|
|
7
|
-
const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = { class: "flex items-center justify-center h-4 w-4" },
|
|
7
|
+
const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = { class: "flex items-center justify-center h-4 w-4" }, le = /* @__PURE__ */ O({
|
|
8
8
|
__name: "WorkspaceDropdown",
|
|
9
9
|
setup(Z) {
|
|
10
10
|
const { activeWorkspace: f, workspaces: d, workspaceMutators: g, events: T } = G(), { push: b } = Y(), E = (o) => {
|
|
11
|
-
o !== f.value.uid && b(
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
o !== f.value.uid && b({
|
|
12
|
+
name: "workspace",
|
|
13
|
+
params: {
|
|
14
|
+
workspace: o
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}, _ = A(() => Object.keys(d).length === 1), j = () => T.commandPalette.emit({ commandName: "Create Workspace" }), v = M(""), i = M(""), w = C(), k = C(), y = (o) => {
|
|
18
|
+
v.value = d[o].name, i.value = o, w.show();
|
|
14
19
|
}, B = (o) => {
|
|
15
|
-
o.trim() && (g.edit(
|
|
20
|
+
o.trim() && (g.edit(i.value, "name", o.trim()), w.hide());
|
|
16
21
|
}, D = (o) => {
|
|
17
|
-
v.value = d[o].name,
|
|
22
|
+
v.value = d[o].name, i.value = o, k.show();
|
|
18
23
|
}, R = async () => {
|
|
19
24
|
if (!_.value) {
|
|
20
|
-
const o = f.value.uid ===
|
|
21
|
-
if (delete t[
|
|
25
|
+
const o = f.value.uid === i.value, t = { ...d };
|
|
26
|
+
if (delete t[i.value], g.delete(i.value), o) {
|
|
22
27
|
const p = Object.keys(t)[0];
|
|
23
|
-
await b(
|
|
28
|
+
await b({
|
|
29
|
+
name: "workspace",
|
|
30
|
+
params: {
|
|
31
|
+
workspace: p
|
|
32
|
+
}
|
|
33
|
+
});
|
|
24
34
|
}
|
|
25
35
|
}
|
|
26
36
|
k.hide();
|
|
27
37
|
};
|
|
28
|
-
return (o, t) => (
|
|
29
|
-
|
|
30
|
-
s(e(
|
|
38
|
+
return (o, t) => (m(), W("div", null, [
|
|
39
|
+
a("div", H, [
|
|
40
|
+
s(e(S), null, {
|
|
31
41
|
items: n(() => [
|
|
32
|
-
(
|
|
33
|
-
key:
|
|
42
|
+
(m(!0), W(I, null, L(e(d), (p, l) => (m(), h(e(u), {
|
|
43
|
+
key: l,
|
|
34
44
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
35
|
-
onClick: c((x) => E(
|
|
45
|
+
onClick: c((x) => E(l), ["stop"])
|
|
36
46
|
}, {
|
|
37
47
|
default: n(() => [
|
|
38
|
-
|
|
48
|
+
a("div", {
|
|
39
49
|
class: U([
|
|
40
50
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4",
|
|
41
|
-
e(f).uid ===
|
|
51
|
+
e(f).uid === l ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
|
|
42
52
|
])
|
|
43
53
|
}, [
|
|
44
|
-
s(e(
|
|
54
|
+
s(e(r), {
|
|
45
55
|
class: "size-2.5",
|
|
46
56
|
icon: "Checkmark",
|
|
47
57
|
thickness: "3.5"
|
|
48
58
|
})
|
|
49
59
|
], 2),
|
|
50
|
-
|
|
51
|
-
s(e(
|
|
60
|
+
a("span", Q, z(p.name), 1),
|
|
61
|
+
s(e(S), { teleport: ".scalar-client" }, {
|
|
52
62
|
items: n(() => [
|
|
53
|
-
s(e(
|
|
63
|
+
s(e(u), {
|
|
54
64
|
class: "flex gap-2",
|
|
55
|
-
onMousedown: (x) => y(
|
|
56
|
-
onTouchend: c((x) => y(
|
|
65
|
+
onMousedown: (x) => y(l),
|
|
66
|
+
onTouchend: c((x) => y(l), ["prevent"])
|
|
57
67
|
}, {
|
|
58
68
|
default: n(() => [
|
|
59
|
-
s(e(
|
|
69
|
+
s(e(r), {
|
|
60
70
|
class: "inline-flex",
|
|
61
71
|
icon: "Edit",
|
|
62
72
|
size: "md",
|
|
63
73
|
thickness: "1.5"
|
|
64
74
|
}),
|
|
65
|
-
t[4] || (t[4] =
|
|
75
|
+
t[4] || (t[4] = a("span", null, "Rename", -1))
|
|
66
76
|
]),
|
|
67
77
|
_: 2
|
|
68
78
|
}, 1032, ["onMousedown", "onTouchend"]),
|
|
69
|
-
_.value ? (
|
|
79
|
+
_.value ? (m(), h(e(F), {
|
|
70
80
|
key: 0,
|
|
71
81
|
class: "z-10",
|
|
72
82
|
side: "bottom"
|
|
73
83
|
}, {
|
|
74
84
|
trigger: n(() => [
|
|
75
|
-
s(e(
|
|
85
|
+
s(e(u), {
|
|
76
86
|
class: "flex gap-2 w-full",
|
|
77
87
|
disabled: "",
|
|
78
88
|
onMousedown: t[0] || (t[0] = c(() => {
|
|
@@ -81,52 +91,52 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
81
91
|
}, ["prevent"]))
|
|
82
92
|
}, {
|
|
83
93
|
default: n(() => [
|
|
84
|
-
s(e(
|
|
94
|
+
s(e(r), {
|
|
85
95
|
class: "inline-flex",
|
|
86
96
|
icon: "Delete",
|
|
87
97
|
size: "md",
|
|
88
98
|
thickness: "1.5"
|
|
89
99
|
}),
|
|
90
|
-
t[5] || (t[5] =
|
|
100
|
+
t[5] || (t[5] = a("span", null, "Delete", -1))
|
|
91
101
|
]),
|
|
92
102
|
_: 1
|
|
93
103
|
})
|
|
94
104
|
]),
|
|
95
105
|
content: n(() => t[6] || (t[6] = [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
106
|
+
a("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" }, [
|
|
107
|
+
a("div", { class: "flex items-center text-c-2" }, [
|
|
108
|
+
a("span", null, "Only workspace cannot be deleted.")
|
|
99
109
|
])
|
|
100
110
|
], -1)
|
|
101
111
|
])),
|
|
102
112
|
_: 1
|
|
103
|
-
})) : (
|
|
113
|
+
})) : (m(), h(e(u), {
|
|
104
114
|
key: 1,
|
|
105
115
|
class: "flex !gap-2",
|
|
106
|
-
onMousedown: c((x) => D(
|
|
107
|
-
onTouchend: c((x) => D(
|
|
116
|
+
onMousedown: c((x) => D(l), ["prevent"]),
|
|
117
|
+
onTouchend: c((x) => D(l), ["prevent"])
|
|
108
118
|
}, {
|
|
109
119
|
default: n(() => [
|
|
110
|
-
s(e(
|
|
120
|
+
s(e(r), {
|
|
111
121
|
class: "inline-flex",
|
|
112
122
|
icon: "Delete",
|
|
113
123
|
size: "sm",
|
|
114
124
|
thickness: "1.5"
|
|
115
125
|
}),
|
|
116
|
-
t[7] || (t[7] =
|
|
126
|
+
t[7] || (t[7] = a("span", null, "Delete", -1))
|
|
117
127
|
]),
|
|
118
128
|
_: 2
|
|
119
129
|
}, 1032, ["onMousedown", "onTouchend"]))
|
|
120
130
|
]),
|
|
121
131
|
default: n(() => [
|
|
122
|
-
s(e(
|
|
132
|
+
s(e($), {
|
|
123
133
|
class: "px-0.5 py-0 hover:bg-b-3 group-hover/item:flex aspect-square ml-auto -mr-1 h-fit",
|
|
124
134
|
size: "sm",
|
|
125
135
|
type: "button",
|
|
126
136
|
variant: "ghost"
|
|
127
137
|
}, {
|
|
128
138
|
default: n(() => [
|
|
129
|
-
s(e(
|
|
139
|
+
s(e(r), {
|
|
130
140
|
icon: "Ellipses",
|
|
131
141
|
size: "sm"
|
|
132
142
|
})
|
|
@@ -140,33 +150,33 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
140
150
|
_: 2
|
|
141
151
|
}, 1032, ["onClick"]))), 128)),
|
|
142
152
|
s(e(P)),
|
|
143
|
-
s(e(
|
|
153
|
+
s(e(u), {
|
|
144
154
|
class: "flex items-center gap-1.5",
|
|
145
155
|
onClick: j
|
|
146
156
|
}, {
|
|
147
157
|
default: n(() => [
|
|
148
|
-
|
|
149
|
-
s(e(
|
|
158
|
+
a("div", X, [
|
|
159
|
+
s(e(r), {
|
|
150
160
|
class: "h-2.5",
|
|
151
161
|
icon: "Add",
|
|
152
162
|
thickness: "3"
|
|
153
163
|
})
|
|
154
164
|
]),
|
|
155
|
-
t[8] || (t[8] =
|
|
165
|
+
t[8] || (t[8] = a("span", null, "Create Workspace", -1))
|
|
156
166
|
]),
|
|
157
167
|
_: 1
|
|
158
168
|
})
|
|
159
169
|
]),
|
|
160
170
|
default: n(() => [
|
|
161
|
-
s(e(
|
|
171
|
+
s(e($), {
|
|
162
172
|
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",
|
|
163
173
|
fullWidth: "",
|
|
164
174
|
variant: "ghost"
|
|
165
175
|
}, {
|
|
166
176
|
default: n(() => [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
s(e(
|
|
177
|
+
a("div", J, [
|
|
178
|
+
a("h2", K, z(e(f).name), 1),
|
|
179
|
+
s(e(r), {
|
|
170
180
|
class: "size-3",
|
|
171
181
|
icon: "ChevronDown",
|
|
172
182
|
thickness: "3"
|
|
@@ -212,5 +222,5 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
212
222
|
}
|
|
213
223
|
});
|
|
214
224
|
export {
|
|
215
|
-
|
|
225
|
+
le as default
|
|
216
226
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Collection, Request, RequestExample, RequestMethod, Tag } from '@scalar/oas-utils/entities/spec';
|
|
2
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
2
3
|
export type SidebarItem = {
|
|
3
4
|
title: string;
|
|
4
5
|
entity: Collection | Tag | Request | RequestExample;
|
|
5
6
|
resourceTitle: string;
|
|
6
7
|
children: string[];
|
|
7
8
|
method?: RequestMethod;
|
|
8
|
-
link?:
|
|
9
|
+
link?: RouteLocationRaw;
|
|
9
10
|
warning?: string;
|
|
10
11
|
icon?: string;
|
|
11
12
|
edit: (name: string, icon?: string) => void;
|
|
@@ -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;
|
|
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;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,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,gBAAgB,CAAA;IACvB,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;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,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":";AAgOA,wBAMG"}
|