@scalar/api-client 2.1.33 → 2.1.35
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 +36 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +1 -1
- package/dist/components/ContextBar.vue2.js +6 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +53 -40
- package/dist/components/ScalarHotkey.vue.d.ts +5 -6
- package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
- package/dist/components/ScalarHotkey.vue.js +9 -18
- 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 +8 -8
- package/dist/components/Sidebar/SidebarButton.vue.d.ts +4 -0
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +19 -17
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +14 -14
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +35 -29
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +4 -4
- package/dist/layouts/App/create-api-client-app.d.ts +257 -45
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +10 -10
- package/dist/layouts/App/hotkeys.js +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +514 -90
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +24 -22
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +33 -27
- package/dist/layouts/Web/create-api-client-web.d.ts +258 -46
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +9 -9
- package/dist/libs/create-client.d.ts +280 -50
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +25 -24
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/local-storage.d.ts +2 -2
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/send-request.d.ts +2 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +98 -97
- package/dist/router.d.ts +5 -5
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +32 -32
- package/dist/store/collections.d.ts +14 -4
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/events.d.ts +1 -1
- package/dist/store/import-spec.d.ts +16 -31
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +43 -56
- package/dist/store/requests.d.ts +14 -14
- package/dist/store/store.d.ts +514 -90
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +43 -43
- package/dist/store/workspace.d.ts +10 -10
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts +5 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +64 -55
- package/dist/views/Environment/Environment.vue.d.ts +5 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +75 -66
- 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 +96 -90
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +21 -21
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +79 -71
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +2 -0
- 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 +105 -112
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts +5 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +38 -35
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +5 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -118
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +126 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +4 -4
- package/dist/views/Request/RequestSidebar.vue2.js +43 -42
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -26
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +5 -99
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +104 -2
- package/dist/views/Settings/SettingsGeneral.vue.js +3 -3
- package/dist/views/Settings/SettingsGeneralMode.vue.js +3 -3
- package/package.json +8 -8
- package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -5
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as g, computed as _, ref as q, watch as b, openBlock as m, createBlock as C, withCtx as S, createElementVNode as A, unref as s, createElementBlock as p, createCommentVNode as V, toDisplayString as w, createVNode as u, withDirectives as i, vShow as r } from "vue";
|
|
2
|
+
import H from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import N from "./RequestBody.vue.js";
|
|
5
|
+
import v from "./RequestParams.vue.js";
|
|
6
|
+
import K from "./RequestPathParams.vue.js";
|
|
7
|
+
import { canMethodHaveBody as h } from "@scalar/oas-utils/helpers";
|
|
8
|
+
import U from "./RequestAuth/RequestAuth.vue.js";
|
|
9
|
+
import { useWorkspace as E } from "../../../store/store.js";
|
|
10
|
+
const Q = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none h-full" }, $ = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
|
|
13
|
+
for: "requestname"
|
|
14
|
+
}, D = ["value"], M = {
|
|
15
|
+
key: 2,
|
|
16
|
+
class: "text-c-1"
|
|
17
|
+
}, P = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, X = /* @__PURE__ */ g({
|
|
18
|
+
__name: "RequestSection",
|
|
19
|
+
props: {
|
|
20
|
+
selectedSecuritySchemeUids: {}
|
|
21
|
+
},
|
|
22
|
+
setup(I) {
|
|
23
|
+
const { activeRequest: a, activeExample: f, isReadOnly: d, requestMutators: x } = E(), k = _(() => {
|
|
24
|
+
var l, o;
|
|
25
|
+
const t = /* @__PURE__ */ new Set([
|
|
26
|
+
"All",
|
|
27
|
+
"Query",
|
|
28
|
+
"Auth",
|
|
29
|
+
"Variables",
|
|
30
|
+
"Cookies",
|
|
31
|
+
"Headers",
|
|
32
|
+
"Body"
|
|
33
|
+
]);
|
|
34
|
+
return (l = f.value) != null && l.parameters.path.length || t.delete("Variables"), h(((o = a.value) == null ? void 0 : o.method) ?? "get") || t.delete("Body"), y.value && t.delete("Auth"), [...t];
|
|
35
|
+
}), y = _(
|
|
36
|
+
() => {
|
|
37
|
+
var t, l;
|
|
38
|
+
return d.value && ((l = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
|
|
39
|
+
}
|
|
40
|
+
), e = q("All");
|
|
41
|
+
b(a, (t) => {
|
|
42
|
+
e.value === "Body" && t && !h(t.method) && (e.value = "All");
|
|
43
|
+
});
|
|
44
|
+
const B = (t) => {
|
|
45
|
+
if (!a.value) return;
|
|
46
|
+
const l = t.target;
|
|
47
|
+
x.edit(a.value.uid, "summary", l.value);
|
|
48
|
+
};
|
|
49
|
+
return (t, l) => (m(), C(R, null, {
|
|
50
|
+
title: S(() => {
|
|
51
|
+
var o, n;
|
|
52
|
+
return [
|
|
53
|
+
A("div", Q, [
|
|
54
|
+
s(d) ? V("", !0) : (m(), p("label", $)),
|
|
55
|
+
s(d) ? (m(), p("span", M, w((n = s(a)) == null ? void 0 : n.summary), 1)) : (m(), p("input", {
|
|
56
|
+
key: 1,
|
|
57
|
+
id: "requestname",
|
|
58
|
+
class: "text-c-1 rounded pointer-events-auto relative w-full pl-3 -ml-3 has-[:focus-visible]:outline h-8 group-hover-input has-[:focus-visible]:outline",
|
|
59
|
+
placeholder: "Request Name",
|
|
60
|
+
value: (o = s(a)) == null ? void 0 : o.summary,
|
|
61
|
+
onInput: B
|
|
62
|
+
}, null, 40, D))
|
|
63
|
+
]),
|
|
64
|
+
u(H, {
|
|
65
|
+
activeSection: e.value,
|
|
66
|
+
sections: k.value,
|
|
67
|
+
onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
|
|
68
|
+
}, null, 8, ["activeSection", "sections"])
|
|
69
|
+
];
|
|
70
|
+
}),
|
|
71
|
+
default: S(() => {
|
|
72
|
+
var o, n, c;
|
|
73
|
+
return [
|
|
74
|
+
A("div", P, [
|
|
75
|
+
i(u(U, {
|
|
76
|
+
selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
|
|
77
|
+
title: "Authentication"
|
|
78
|
+
}, null, 8, ["selectedSecuritySchemeUids"]), [
|
|
79
|
+
[
|
|
80
|
+
r,
|
|
81
|
+
!y.value && (e.value === "All" || e.value === "Auth")
|
|
82
|
+
]
|
|
83
|
+
]),
|
|
84
|
+
i(u(K, {
|
|
85
|
+
paramKey: "path",
|
|
86
|
+
title: "Path Variables"
|
|
87
|
+
}, null, 512), [
|
|
88
|
+
[
|
|
89
|
+
r,
|
|
90
|
+
(e.value === "All" || e.value === "Variables") && ((c = (n = (o = s(f)) == null ? void 0 : o.parameters) == null ? void 0 : n.path) == null ? void 0 : c.length)
|
|
91
|
+
]
|
|
92
|
+
]),
|
|
93
|
+
i(u(v, {
|
|
94
|
+
paramKey: "cookies",
|
|
95
|
+
title: "Cookies"
|
|
96
|
+
}, null, 512), [
|
|
97
|
+
[r, e.value === "All" || e.value === "Cookies"]
|
|
98
|
+
]),
|
|
99
|
+
i(u(v, {
|
|
100
|
+
paramKey: "headers",
|
|
101
|
+
title: "Headers"
|
|
102
|
+
}, null, 512), [
|
|
103
|
+
[r, e.value === "All" || e.value === "Headers"]
|
|
104
|
+
]),
|
|
105
|
+
i(u(v, {
|
|
106
|
+
paramKey: "query",
|
|
107
|
+
title: "Query Parameters"
|
|
108
|
+
}, null, 512), [
|
|
109
|
+
[r, e.value === "All" || e.value === "Query"]
|
|
110
|
+
]),
|
|
111
|
+
i(u(N, { title: "Body" }, null, 512), [
|
|
112
|
+
[
|
|
113
|
+
r,
|
|
114
|
+
s(a) && (e.value === "All" || e.value === "Body") && s(h)(s(a).method)
|
|
115
|
+
]
|
|
116
|
+
])
|
|
117
|
+
])
|
|
118
|
+
];
|
|
119
|
+
}),
|
|
120
|
+
_: 1
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
export {
|
|
125
|
+
X as default
|
|
126
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBAwVe,OAAO;gBACR,OAAO;;;cAmnBkB,MAAM;aAAO,MAAM;;;;iBApnB3C,OAAO;gBACR,OAAO;;;cAmnBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./RequestSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(e, [["__scopeId", "data-v-beea081e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Q, reactive as X, watch as Y, onMounted as Z, onBeforeUnmount as _, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as ee, createVNode as u, unref as t, normalizeClass as
|
|
1
|
+
import { defineComponent as Q, reactive as X, watch as Y, onMounted as Z, onBeforeUnmount as _, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as ee, createVNode as u, unref as t, normalizeClass as f, createSlots as te, withCtx as i, createElementVNode as n, isRef as oe, withKeys as v, withModifiers as m, createBlock as l, renderList as x, createTextVNode as D, toDisplayString as se, createCommentVNode as F, vShow as re } from "vue";
|
|
2
2
|
import ae from "../../assets/rabbit.ascii.js";
|
|
3
3
|
import ne from "../../assets/rabbitjump.ascii.js";
|
|
4
4
|
import ie from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
@@ -6,8 +6,8 @@ import $ from "../../components/ScalarAsciiArt.vue.js";
|
|
|
6
6
|
import { useSearch as le } from "../../components/Search/useSearch.js";
|
|
7
7
|
import de from "../../components/Sidebar/SidebarButton.vue.js";
|
|
8
8
|
import ue from "./RequestSidebarItemMenu.vue.js";
|
|
9
|
-
import { dragHandlerFactory as
|
|
10
|
-
import { ScalarSearchInput as
|
|
9
|
+
import { dragHandlerFactory as pe } from "./handle-drag.js";
|
|
10
|
+
import { ScalarSearchInput as me, ScalarSearchResultList as ce, ScalarSearchResultItem as fe, ScalarIcon as V } from "@scalar/components";
|
|
11
11
|
import { LibraryIcon as be } from "@scalar/icons";
|
|
12
12
|
import he from "./RequestSidebarItem.vue.js";
|
|
13
13
|
import Se from "../../components/Sidebar/Sidebar.vue.js";
|
|
@@ -20,76 +20,76 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
20
20
|
isReadonly: { type: Boolean }
|
|
21
21
|
},
|
|
22
22
|
emits: ["update:showSidebar", "newTab"],
|
|
23
|
-
setup(q, { emit:
|
|
24
|
-
const
|
|
25
|
-
activeWorkspaceCollections:
|
|
26
|
-
activeRequest:
|
|
23
|
+
setup(q, { emit: T }) {
|
|
24
|
+
const B = q, g = T, R = ge(), {
|
|
25
|
+
activeWorkspaceCollections: E,
|
|
26
|
+
activeRequest: K,
|
|
27
27
|
activeWorkspaceRequests: M,
|
|
28
28
|
findRequestParents: O,
|
|
29
29
|
isReadOnly: W,
|
|
30
|
-
events:
|
|
31
|
-
} = R, { handleDragEnd:
|
|
30
|
+
events: b
|
|
31
|
+
} = R, { handleDragEnd: N, isDroppable: U } = pe(R), { collapsedSidebarFolders: z, setCollapsedSidebarFolder: A } = ve(), p = X({ open: !1 });
|
|
32
32
|
Y(
|
|
33
|
-
|
|
33
|
+
K,
|
|
34
34
|
(o) => {
|
|
35
35
|
o && O(o).forEach(
|
|
36
|
-
(e) =>
|
|
36
|
+
(e) => A(e, !0)
|
|
37
37
|
);
|
|
38
38
|
},
|
|
39
39
|
{ immediate: !0 }
|
|
40
40
|
);
|
|
41
41
|
const {
|
|
42
|
-
searchText:
|
|
42
|
+
searchText: c,
|
|
43
43
|
searchResultsWithPlaceholderResults: w,
|
|
44
44
|
selectedSearchResult: k,
|
|
45
|
-
onSearchResultClick:
|
|
46
|
-
fuseSearch:
|
|
45
|
+
onSearchResultClick: L,
|
|
46
|
+
fuseSearch: P,
|
|
47
47
|
searchInputRef: y,
|
|
48
48
|
searchResultRefs: H,
|
|
49
49
|
navigateSearchResults: C,
|
|
50
50
|
selectSearchResult: j
|
|
51
51
|
} = le(), I = (o) => {
|
|
52
52
|
var e;
|
|
53
|
-
o && (o.toggleSidebar && g("update:showSidebar",
|
|
53
|
+
o && (o.toggleSidebar && g("update:showSidebar", B.showSidebar), o.focusRequestSearch && ((e = y.value) == null || e.focus()));
|
|
54
54
|
};
|
|
55
|
-
Z(() =>
|
|
56
|
-
|
|
55
|
+
Z(() => b.hotKeys.on(I)), _(() => {
|
|
56
|
+
b.hotKeys.off(I);
|
|
57
57
|
});
|
|
58
58
|
const G = (o) => {
|
|
59
59
|
o != null && o.documentUrl && (o.watchForChanges = !o.watchForChanges);
|
|
60
60
|
};
|
|
61
61
|
return (o, e) => (a(), h(S, null, [
|
|
62
62
|
ee(u(t(Se), {
|
|
63
|
-
class:
|
|
63
|
+
class: f([o.showSidebar ? "sidebar-active-width" : ""]),
|
|
64
64
|
showSidebar: o.showSidebar,
|
|
65
65
|
"onUpdate:showSidebar": e[8] || (e[8] = (s) => o.$emit("update:showSidebar", s))
|
|
66
66
|
}, te({
|
|
67
67
|
content: i(() => [
|
|
68
68
|
n("div", Re, [
|
|
69
|
-
u(t(
|
|
69
|
+
u(t(me), {
|
|
70
70
|
ref_key: "searchInputRef",
|
|
71
71
|
ref: y,
|
|
72
|
-
modelValue: t(
|
|
73
|
-
"onUpdate:modelValue": e[0] || (e[0] = (s) => oe(
|
|
72
|
+
modelValue: t(c),
|
|
73
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => oe(c) ? c.value = s : null),
|
|
74
74
|
sidebar: "",
|
|
75
|
-
onInput: t(
|
|
75
|
+
onInput: t(P),
|
|
76
76
|
onKeydown: [
|
|
77
|
-
e[1] || (e[1] = v(
|
|
78
|
-
e[2] || (e[2] = v(
|
|
79
|
-
e[3] || (e[3] = v(
|
|
77
|
+
e[1] || (e[1] = v(m((s) => t(C)("down"), ["stop"]), ["down"])),
|
|
78
|
+
e[2] || (e[2] = v(m((s) => t(j)(), ["stop"]), ["enter"])),
|
|
79
|
+
e[3] || (e[3] = v(m((s) => t(C)("up"), ["stop"]), ["up"]))
|
|
80
80
|
]
|
|
81
81
|
}, null, 8, ["modelValue", "onInput"])
|
|
82
82
|
]),
|
|
83
83
|
n("div", {
|
|
84
|
-
class:
|
|
84
|
+
class: f(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
85
85
|
"pb-14": !o.isReadonly
|
|
86
86
|
}]),
|
|
87
|
-
onDragenter: e[6] || (e[6] =
|
|
87
|
+
onDragenter: e[6] || (e[6] = m(() => {
|
|
88
88
|
}, ["prevent"])),
|
|
89
|
-
onDragover: e[7] || (e[7] =
|
|
89
|
+
onDragover: e[7] || (e[7] = m(() => {
|
|
90
90
|
}, ["prevent"]))
|
|
91
91
|
}, [
|
|
92
|
-
t(
|
|
92
|
+
t(c) ? (a(), l(t(ce), {
|
|
93
93
|
key: 0,
|
|
94
94
|
class: "gap-px custom-scroll",
|
|
95
95
|
noResults: !t(w).length
|
|
@@ -102,7 +102,7 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
102
102
|
ref: (r) => t(H)[d] = r,
|
|
103
103
|
active: t(k) === d,
|
|
104
104
|
class: "px-2",
|
|
105
|
-
onClick: (r) => t(
|
|
105
|
+
onClick: (r) => t(L)(s),
|
|
106
106
|
onFocus: (r) => k.value = d
|
|
107
107
|
}, {
|
|
108
108
|
addon: i(() => [
|
|
@@ -118,18 +118,18 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
118
118
|
}, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
|
|
119
119
|
]),
|
|
120
120
|
_: 1
|
|
121
|
-
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, x(t(
|
|
121
|
+
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, x(t(E), (s) => {
|
|
122
122
|
var d;
|
|
123
123
|
return a(), l(he, {
|
|
124
124
|
key: s.uid,
|
|
125
125
|
isDraggable: !o.isReadonly && ((d = s.info) == null ? void 0 : d.title) !== "Drafts",
|
|
126
|
-
isDroppable: t(
|
|
127
|
-
menuItem:
|
|
126
|
+
isDroppable: t(U),
|
|
127
|
+
menuItem: p,
|
|
128
128
|
parentUids: [],
|
|
129
129
|
uid: s.uid,
|
|
130
130
|
onNewTab: e[4] || (e[4] = (r, J) => g("newTab", { name: r, uid: J })),
|
|
131
|
-
onOnDragEnd: t(
|
|
132
|
-
onOpenMenu: e[5] || (e[5] = (r) => Object.assign(
|
|
131
|
+
onOnDragEnd: t(N),
|
|
132
|
+
onOpenMenu: e[5] || (e[5] = (r) => Object.assign(p, r))
|
|
133
133
|
}, {
|
|
134
134
|
leftIcon: i(() => {
|
|
135
135
|
var r;
|
|
@@ -145,8 +145,8 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
145
145
|
src: s["x-scalar-icon"] || "interface-content-folder"
|
|
146
146
|
}, null, 8, ["src"])),
|
|
147
147
|
n("div", {
|
|
148
|
-
class:
|
|
149
|
-
"rotate-90": t(
|
|
148
|
+
class: f({
|
|
149
|
+
"rotate-90": t(z)[s.uid]
|
|
150
150
|
})
|
|
151
151
|
}, [
|
|
152
152
|
u(t(V), {
|
|
@@ -165,7 +165,7 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
165
165
|
]),
|
|
166
166
|
button: i(() => [
|
|
167
167
|
n("div", {
|
|
168
|
-
class:
|
|
168
|
+
class: f({
|
|
169
169
|
"empty-sidebar-item": t(M).length <= 1
|
|
170
170
|
})
|
|
171
171
|
}, [
|
|
@@ -187,7 +187,8 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
187
187
|
]),
|
|
188
188
|
o.isReadonly ? F("", !0) : (a(), l(de, {
|
|
189
189
|
key: 0,
|
|
190
|
-
click: t(
|
|
190
|
+
click: t(b).commandPalette.emit,
|
|
191
|
+
hotkey: "K"
|
|
191
192
|
}, {
|
|
192
193
|
title: i(() => e[11] || (e[11] = [
|
|
193
194
|
D("Add Item")
|
|
@@ -206,10 +207,10 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
206
207
|
]), 1032, ["class", "showSidebar"]), [
|
|
207
208
|
[re, o.showSidebar]
|
|
208
209
|
]),
|
|
209
|
-
!t(W) &&
|
|
210
|
+
!t(W) && p ? (a(), l(ue, {
|
|
210
211
|
key: 0,
|
|
211
|
-
menuItem:
|
|
212
|
-
onCloseMenu: e[9] || (e[9] = (s) =>
|
|
212
|
+
menuItem: p,
|
|
213
|
+
onCloseMenu: e[9] || (e[9] = (s) => p.open = !1),
|
|
213
214
|
onToggleWatchForChanges: G
|
|
214
215
|
}, null, 8, ["menuItem"])) : F("", !0)
|
|
215
216
|
], 64));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":";AAuOA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseEmpty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cf8761cd"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as k, onMounted as R, onBeforeUnmount as g, openBlock as a, createElementBlock as l, createElementVNode as t, unref as o, createTextVNode as r, toDisplayString as _, createCommentVNode as u, createVNode as i } from "vue";
|
|
2
|
+
import b from "../../../assets/computer.ascii.js";
|
|
3
|
+
import N from "../../../components/ScalarAsciiArt.vue.js";
|
|
4
|
+
import p from "../../../components/ScalarHotkey.vue.js";
|
|
5
|
+
import { useRoute as C } from "vue-router";
|
|
6
|
+
import { useWorkspace as q } from "../../../store/store.js";
|
|
7
|
+
const v = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, V = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, B = {
|
|
7
8
|
key: 0,
|
|
8
9
|
class: "scalar-version-number"
|
|
9
|
-
},
|
|
10
|
+
}, S = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, $ = /* @__PURE__ */ k({
|
|
10
11
|
__name: "ResponseEmpty",
|
|
11
|
-
setup(
|
|
12
|
-
const { isReadOnly: d, activeWorkspace: f, events: s } = C(), m = () => {
|
|
12
|
+
setup(h) {
|
|
13
|
+
const { isReadOnly: d, activeWorkspace: f, events: s } = q(), x = C(), m = () => {
|
|
13
14
|
s.commandPalette.emit({ commandName: "Create Request" });
|
|
14
15
|
}, c = (n) => {
|
|
15
|
-
n != null && n.
|
|
16
|
-
},
|
|
17
|
-
return
|
|
18
|
-
t("div",
|
|
19
|
-
o(f).isReadOnly ?
|
|
20
|
-
|
|
16
|
+
n != null && n.createNew && x.name === "request" && m();
|
|
17
|
+
}, y = "2.1.35";
|
|
18
|
+
return R(() => s.hotKeys.on(c)), g(() => s.hotKeys.off(c)), (n, e) => (a(), l("div", v, [
|
|
19
|
+
t("div", V, [
|
|
20
|
+
o(f).isReadOnly ? u("", !0) : (a(), l("div", B, [
|
|
21
|
+
r(" Scalar V" + _(o(y)) + " ", 1),
|
|
21
22
|
e[1] || (e[1] = t("b", null, "Beta", -1)),
|
|
22
|
-
e[2] || (e[2] =
|
|
23
|
+
e[2] || (e[2] = r(" Release ")),
|
|
23
24
|
e[3] || (e[3] = t("div", { class: "mt-1" }, [
|
|
24
25
|
t("a", {
|
|
25
26
|
href: "https://github.com/scalar/scalar/issues/2669",
|
|
@@ -27,33 +28,33 @@ const N = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, q = { cl
|
|
|
27
28
|
}, " Roadmap ")
|
|
28
29
|
], -1))
|
|
29
30
|
])),
|
|
30
|
-
i(
|
|
31
|
-
art: o(
|
|
31
|
+
i(N, {
|
|
32
|
+
art: o(b),
|
|
32
33
|
class: "text-c-3"
|
|
33
34
|
}, null, 8, ["art"])
|
|
34
35
|
]),
|
|
35
|
-
t("div",
|
|
36
|
+
t("div", S, [
|
|
36
37
|
t("button", {
|
|
37
38
|
class: "flex items-center gap-1.5",
|
|
38
39
|
type: "button",
|
|
39
|
-
onClick: e[0] || (e[0] = (
|
|
40
|
+
onClick: e[0] || (e[0] = (w) => o(s).executeRequest.emit())
|
|
40
41
|
}, [
|
|
41
|
-
e[4] || (e[4] =
|
|
42
|
-
i(
|
|
42
|
+
e[4] || (e[4] = r(" Send Request ")),
|
|
43
|
+
i(p, { hotkey: "↵" })
|
|
43
44
|
]),
|
|
44
|
-
o(d) ?
|
|
45
|
+
o(d) ? u("", !0) : (a(), l("button", {
|
|
45
46
|
key: 0,
|
|
46
47
|
class: "flex items-center gap-1.5",
|
|
47
48
|
type: "button",
|
|
48
49
|
onClick: m
|
|
49
50
|
}, [
|
|
50
|
-
e[5] || (e[5] =
|
|
51
|
-
i(
|
|
51
|
+
e[5] || (e[5] = r(" New Request ")),
|
|
52
|
+
i(p, { hotkey: "N" })
|
|
52
53
|
]))
|
|
53
54
|
])
|
|
54
55
|
]));
|
|
55
56
|
}
|
|
56
57
|
});
|
|
57
58
|
export {
|
|
58
|
-
|
|
59
|
+
$ as default
|
|
59
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAQrC,gBAAgB;;cAAhB,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AA0EA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAQrC,gBAAgB;;cAAhB,gBAAgB;;AA+HlD,wBAMG"}
|
|
@@ -4,7 +4,7 @@ import { httpStatusCodes as N } from "@scalar/oas-utils/helpers";
|
|
|
4
4
|
import V from "pretty-bytes";
|
|
5
5
|
import f from "pretty-ms";
|
|
6
6
|
import { useWorkspace as w } from "../../../store/store.js";
|
|
7
|
-
const E = { class: "flex gap-1.5 text-c-
|
|
7
|
+
const E = { class: "flex gap-1.5 text-c-1" }, M = { key: 0 }, q = { key: 0 }, x = { key: 1 }, b = /* @__PURE__ */ y({
|
|
8
8
|
__name: "ResponseMetaInformation",
|
|
9
9
|
props: {
|
|
10
10
|
response: {}
|
|
@@ -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":"AA8JA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAkPxC,wBAMG"}
|
|
@@ -1,101 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import V from "./ResponseEmpty.vue.js";
|
|
6
|
-
import $ from "./ResponseLoadingOverlay.vue.js";
|
|
7
|
-
import N from "./ResponseMetaInformation.vue.js";
|
|
8
|
-
import g from "./ResponseBodyVirtual.vue.js";
|
|
9
|
-
/* empty css */
|
|
10
|
-
import E from "./ResponseCookies.vue.js";
|
|
11
|
-
import I from "./ResponseHeaders.vue.js";
|
|
12
|
-
const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, T = 2e5, X = /* @__PURE__ */ A({
|
|
13
|
-
__name: "ResponseSection",
|
|
14
|
-
props: {
|
|
15
|
-
response: {}
|
|
16
|
-
},
|
|
17
|
-
setup(k) {
|
|
18
|
-
const l = k, c = i(() => {
|
|
19
|
-
var t;
|
|
20
|
-
const e = (t = l.response) == null ? void 0 : t.headers;
|
|
21
|
-
return e ? Object.keys(e).map((o) => ({
|
|
22
|
-
name: o,
|
|
23
|
-
value: e[o],
|
|
24
|
-
required: !1
|
|
25
|
-
})).filter(
|
|
26
|
-
(o) => ![
|
|
27
|
-
"rest-api-client-content-length",
|
|
28
|
-
"X-API-Client-Content-Length"
|
|
29
|
-
].includes(o.name)
|
|
30
|
-
) : [];
|
|
31
|
-
}), y = i(
|
|
32
|
-
() => {
|
|
33
|
-
var e;
|
|
34
|
-
return ((e = l.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((t) => {
|
|
35
|
-
var p, m;
|
|
36
|
-
const o = (m = (p = l.response) == null ? void 0 : p.headers) == null ? void 0 : m[t];
|
|
37
|
-
return o ? {
|
|
38
|
-
name: t,
|
|
39
|
-
value: o,
|
|
40
|
-
required: !1
|
|
41
|
-
} : [];
|
|
42
|
-
})) ?? [];
|
|
43
|
-
}
|
|
44
|
-
), h = ["All", "Cookies", "Headers", "Body"], n = C("All"), x = i(
|
|
45
|
-
() => {
|
|
46
|
-
var e;
|
|
47
|
-
return (((e = l.response) == null ? void 0 : e.size) ?? 0) > T;
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
return (e, t) => (s(), r(H, null, {
|
|
51
|
-
title: u(() => [
|
|
52
|
-
d("div", L, [
|
|
53
|
-
t[1] || (t[1] = B(" Response ")),
|
|
54
|
-
e.response ? (s(), r(N, {
|
|
55
|
-
key: 0,
|
|
56
|
-
response: e.response
|
|
57
|
-
}, null, 8, ["response"])) : a("", !0),
|
|
58
|
-
f(S, {
|
|
59
|
-
activeSection: n.value,
|
|
60
|
-
sections: h,
|
|
61
|
-
onSetActiveSection: t[0] || (t[0] = (o) => n.value = o)
|
|
62
|
-
}, null, 8, ["activeSection"])
|
|
63
|
-
])
|
|
64
|
-
]),
|
|
65
|
-
default: u(() => {
|
|
66
|
-
var o;
|
|
67
|
-
return [
|
|
68
|
-
d("div", O, [
|
|
69
|
-
e.response ? (s(), v(_, { key: 1 }, [
|
|
70
|
-
n.value === "All" || n.value === "Cookies" ? (s(), r(E, {
|
|
71
|
-
key: 0,
|
|
72
|
-
cookies: y.value
|
|
73
|
-
}, null, 8, ["cookies"])) : a("", !0),
|
|
74
|
-
n.value === "All" || n.value === "Headers" ? (s(), r(I, {
|
|
75
|
-
key: 1,
|
|
76
|
-
headers: c.value
|
|
77
|
-
}, null, 8, ["headers"])) : a("", !0),
|
|
78
|
-
n.value === "All" || n.value === "Body" ? (s(), v(_, { key: 2 }, [
|
|
79
|
-
x.value ? (s(), r(g, {
|
|
80
|
-
key: 0,
|
|
81
|
-
content: l.response.data
|
|
82
|
-
}, null, 8, ["content"])) : (s(), r(R, {
|
|
83
|
-
key: 1,
|
|
84
|
-
active: !0,
|
|
85
|
-
data: (o = l.response) == null ? void 0 : o.data,
|
|
86
|
-
headers: c.value,
|
|
87
|
-
title: "Body"
|
|
88
|
-
}, null, 8, ["data", "headers"]))
|
|
89
|
-
], 64)) : a("", !0)
|
|
90
|
-
], 64)) : (s(), r(V, { key: 0 })),
|
|
91
|
-
f($)
|
|
92
|
-
])
|
|
93
|
-
];
|
|
94
|
-
}),
|
|
95
|
-
_: 1
|
|
96
|
-
}));
|
|
97
|
-
}
|
|
98
|
-
});
|
|
1
|
+
import o from "./ResponseSection.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9b7fd1f2"]]);
|
|
99
5
|
export {
|
|
100
|
-
|
|
6
|
+
r as default
|
|
101
7
|
};
|