@scalar/api-client 2.1.34 → 2.1.36
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 +30 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +105 -119
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +14 -14
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +15 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +39 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue2.js +4 -0
- 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/EnvironmentSelector/EnvironmentSelector.vue.js +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +39 -33
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +22 -20
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +2 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +159 -100
- package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +5 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +2 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +35 -31
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +7 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +46 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue2.js +4 -0
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts +8 -0
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts.map +1 -0
- 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 +7 -7
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +2 -2
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +29 -12
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +34 -42
- package/dist/components/OpenApiClientButton.vue.d.ts +13 -0
- package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -0
- package/dist/components/OpenApiClientButton.vue.js +7 -0
- package/dist/components/OpenApiClientButton.vue2.js +36 -0
- 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/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.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -2
- 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 +58 -41
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +116 -82
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +42 -38
- package/dist/layouts/Web/create-api-client-web.d.ts +58 -41
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +58 -41
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/store/collections.d.ts +34 -24
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts +6 -4
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/store.d.ts +116 -82
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue2.js +30 -31
- 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.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +24 -24
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +8 -8
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -124
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +126 -0
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +29 -29
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +76 -76
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +47 -47
- 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 +67 -42
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- 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/Request/components/WorkspaceDropdown.vue.js +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +24 -24
- package/dist/views/Request/types/sidebar-item.d.ts +1 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestSection.vue3.js +0 -5
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, computed as g, openBlock as r, createElementBlock as s, Fragment as f, renderList as x, createVNode as o, unref as i, withCtx as l, createBlock as k, createTextVNode as n, toDisplayString as T, createCommentVNode as c, capitalize as B } from "vue";
|
|
2
2
|
import y from "../RequestAuthDataTableInput.vue.js";
|
|
3
3
|
import E from "./OAuth2.vue.js";
|
|
4
4
|
import p from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
5
5
|
import F from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
6
6
|
import { isOauth2Example as R } from "../../libs/oauth2.js";
|
|
7
7
|
import { useWorkspace as C } from "../../../../store/store.js";
|
|
8
|
-
const A = /* @__PURE__ */
|
|
8
|
+
const A = /* @__PURE__ */ b({
|
|
9
9
|
__name: "RequestExampleAuth",
|
|
10
10
|
props: {
|
|
11
11
|
selectedSecuritySchemeUids: {}
|
|
12
12
|
},
|
|
13
13
|
setup(_) {
|
|
14
|
-
const { activeCollection: V, activeRequest: $, collectionMutators: v, securitySchemes:
|
|
14
|
+
const { activeCollection: V, activeRequest: $, collectionMutators: v, securitySchemes: w } = C(), U = g(() => !V.value || !$.value ? [] : _.selectedSecuritySchemeUids.map((d) => ({
|
|
15
15
|
example: V.value.auth[d],
|
|
16
|
-
scheme:
|
|
16
|
+
scheme: w[d]
|
|
17
17
|
})));
|
|
18
|
-
function
|
|
18
|
+
function S(d) {
|
|
19
19
|
return `${B(d.nameKey)}: ${d.type} ${d.type === "oauth2" ? d.flow.type : ""}`;
|
|
20
20
|
}
|
|
21
21
|
function m(d, u, e, t) {
|
|
@@ -26,17 +26,17 @@ const A = /* @__PURE__ */ x({
|
|
|
26
26
|
t
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
return (d, u) => (r(!0), s(f, null,
|
|
29
|
+
return (d, u) => (r(!0), s(f, null, x(U.value, ({ scheme: e, example: t }) => (r(), s(f, {
|
|
30
30
|
key: e.uid
|
|
31
31
|
}, [
|
|
32
32
|
o(i(p), { class: "group/delete" }, {
|
|
33
33
|
default: l(() => [
|
|
34
34
|
U.value.length > 1 ? (r(), k(i(F), {
|
|
35
35
|
key: 0,
|
|
36
|
-
class: "text-c-
|
|
36
|
+
class: "text-c-3 pl-2 font-medium flex items-center"
|
|
37
37
|
}, {
|
|
38
38
|
default: l(() => [
|
|
39
|
-
n(T(
|
|
39
|
+
n(T(S(e)), 1)
|
|
40
40
|
]),
|
|
41
41
|
_: 2
|
|
42
42
|
}, 1024)) : c("", !0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":";gCA4K8B,MAAM,EAAE;;gCAAR,MAAM,EAAE;;AA4QtC,wBAMG"}
|
|
@@ -1,126 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import v from "./RequestParams.vue.js";
|
|
6
|
-
import K from "./RequestPathParams.vue.js";
|
|
7
|
-
import { canMethodHaveBody as f } 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" }, $ = {
|
|
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__ */ q({
|
|
18
|
-
__name: "RequestSection",
|
|
19
|
-
props: {
|
|
20
|
-
selectedSecuritySchemeUids: {}
|
|
21
|
-
},
|
|
22
|
-
setup(I) {
|
|
23
|
-
const { activeRequest: a, activeExample: h, 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 = h.value) != null && l.parameters.path.length || t.delete("Variables"), f(((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 = g("All");
|
|
41
|
-
b(a, (t) => {
|
|
42
|
-
e.value === "Body" && t && !f(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: "outline-none border-0 text-c-1 rounded pointer-events-auto relative w-full",
|
|
59
|
-
placeholder: "Request Name",
|
|
60
|
-
value: (o = s(a)) == null ? void 0 : o.summary,
|
|
61
|
-
onInput: B
|
|
62
|
-
}, null, 40, D))
|
|
63
|
-
]),
|
|
64
|
-
r(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
|
-
u(r(U, {
|
|
76
|
-
selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
|
|
77
|
-
title: "Authentication"
|
|
78
|
-
}, null, 8, ["selectedSecuritySchemeUids"]), [
|
|
79
|
-
[
|
|
80
|
-
i,
|
|
81
|
-
!y.value && (e.value === "All" || e.value === "Auth")
|
|
82
|
-
]
|
|
83
|
-
]),
|
|
84
|
-
u(r(K, {
|
|
85
|
-
paramKey: "path",
|
|
86
|
-
title: "Path Variables"
|
|
87
|
-
}, null, 512), [
|
|
88
|
-
[
|
|
89
|
-
i,
|
|
90
|
-
(e.value === "All" || e.value === "Variables") && ((c = (n = (o = s(h)) == null ? void 0 : o.parameters) == null ? void 0 : n.path) == null ? void 0 : c.length)
|
|
91
|
-
]
|
|
92
|
-
]),
|
|
93
|
-
u(r(v, {
|
|
94
|
-
paramKey: "cookies",
|
|
95
|
-
title: "Cookies"
|
|
96
|
-
}, null, 512), [
|
|
97
|
-
[i, e.value === "All" || e.value === "Cookies"]
|
|
98
|
-
]),
|
|
99
|
-
u(r(v, {
|
|
100
|
-
paramKey: "headers",
|
|
101
|
-
title: "Headers"
|
|
102
|
-
}, null, 512), [
|
|
103
|
-
[i, e.value === "All" || e.value === "Headers"]
|
|
104
|
-
]),
|
|
105
|
-
u(r(v, {
|
|
106
|
-
paramKey: "query",
|
|
107
|
-
title: "Query Parameters"
|
|
108
|
-
}, null, 512), [
|
|
109
|
-
[i, e.value === "All" || e.value === "Query"]
|
|
110
|
-
]),
|
|
111
|
-
u(r(N, { title: "Body" }, null, 512), [
|
|
112
|
-
[
|
|
113
|
-
i,
|
|
114
|
-
s(a) && (e.value === "All" || e.value === "Body") && s(f)(s(a).method)
|
|
115
|
-
]
|
|
116
|
-
])
|
|
117
|
-
])
|
|
118
|
-
];
|
|
119
|
-
}),
|
|
120
|
-
_: 1
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
});
|
|
1
|
+
import o from "./RequestSection.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-55b0bff1"]]);
|
|
124
5
|
export {
|
|
125
|
-
|
|
6
|
+
m as default
|
|
126
7
|
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as B, 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 group" }, $ = {
|
|
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__ */ B({
|
|
18
|
+
__name: "RequestSection",
|
|
19
|
+
props: {
|
|
20
|
+
selectedSecuritySchemeUids: {}
|
|
21
|
+
},
|
|
22
|
+
setup(I) {
|
|
23
|
+
const { activeRequest: a, activeExample: f, isReadOnly: d, requestMutators: x } = E(), g = _(() => {
|
|
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 k = (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: k
|
|
62
|
+
}, null, 40, D))
|
|
63
|
+
]),
|
|
64
|
+
u(H, {
|
|
65
|
+
activeSection: e.value,
|
|
66
|
+
sections: g.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,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./RequestSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */ o
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-71517875"]]);
|
|
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 f, createSlots as te, withCtx as i, createElementVNode as n, isRef as oe, withKeys as v, withModifiers as m, createBlock as l, renderList 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 D, createTextVNode as C, toDisplayString as se, createCommentVNode as M, 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";
|
|
@@ -12,8 +12,8 @@ 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";
|
|
14
14
|
import { useSidebar as ve } from "../../hooks/useSidebar.js";
|
|
15
|
-
import { useWorkspace as
|
|
16
|
-
const
|
|
15
|
+
import { useWorkspace as Re } from "../../store/store.js";
|
|
16
|
+
const we = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ge = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, ke = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, We = /* @__PURE__ */ Q({
|
|
17
17
|
__name: "RequestSidebar",
|
|
18
18
|
props: {
|
|
19
19
|
showSidebar: { type: Boolean },
|
|
@@ -21,16 +21,16 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
21
21
|
},
|
|
22
22
|
emits: ["update:showSidebar", "newTab"],
|
|
23
23
|
setup(q, { emit: T }) {
|
|
24
|
-
const B = q,
|
|
24
|
+
const B = q, R = T, w = Re(), {
|
|
25
25
|
activeWorkspaceCollections: E,
|
|
26
|
-
activeRequest:
|
|
27
|
-
activeWorkspaceRequests:
|
|
26
|
+
activeRequest: F,
|
|
27
|
+
activeWorkspaceRequests: K,
|
|
28
28
|
findRequestParents: O,
|
|
29
29
|
isReadOnly: W,
|
|
30
30
|
events: b
|
|
31
|
-
} =
|
|
31
|
+
} = w, { handleDragEnd: N, isDroppable: U } = pe(w), { collapsedSidebarFolders: z, setCollapsedSidebarFolder: A } = ve(), p = X({ open: !1 });
|
|
32
32
|
Y(
|
|
33
|
-
|
|
33
|
+
F,
|
|
34
34
|
(o) => {
|
|
35
35
|
o && O(o).forEach(
|
|
36
36
|
(e) => A(e, !0)
|
|
@@ -40,23 +40,23 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
40
40
|
);
|
|
41
41
|
const {
|
|
42
42
|
searchText: c,
|
|
43
|
-
searchResultsWithPlaceholderResults:
|
|
43
|
+
searchResultsWithPlaceholderResults: g,
|
|
44
44
|
selectedSearchResult: k,
|
|
45
45
|
onSearchResultClick: L,
|
|
46
46
|
fuseSearch: P,
|
|
47
47
|
searchInputRef: y,
|
|
48
48
|
searchResultRefs: H,
|
|
49
|
-
navigateSearchResults:
|
|
49
|
+
navigateSearchResults: I,
|
|
50
50
|
selectSearchResult: j
|
|
51
|
-
} = le(),
|
|
51
|
+
} = le(), x = (o) => {
|
|
52
52
|
var e;
|
|
53
|
-
o && (o.toggleSidebar &&
|
|
53
|
+
o && (o.toggleSidebar && R("update:showSidebar", B.showSidebar), o.focusRequestSearch && ((e = y.value) == null || e.focus()));
|
|
54
54
|
};
|
|
55
|
-
Z(() => b.hotKeys.on(
|
|
56
|
-
b.hotKeys.off(
|
|
55
|
+
Z(() => b.hotKeys.on(x)), _(() => {
|
|
56
|
+
b.hotKeys.off(x);
|
|
57
57
|
});
|
|
58
58
|
const G = (o) => {
|
|
59
|
-
o != null && o.documentUrl && (o.
|
|
59
|
+
o != null && o.documentUrl && (o.watchMode = !o.watchMode);
|
|
60
60
|
};
|
|
61
61
|
return (o, e) => (a(), h(S, null, [
|
|
62
62
|
ee(u(t(Se), {
|
|
@@ -65,7 +65,7 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
65
65
|
"onUpdate:showSidebar": e[8] || (e[8] = (s) => o.$emit("update:showSidebar", s))
|
|
66
66
|
}, te({
|
|
67
67
|
content: i(() => [
|
|
68
|
-
n("div",
|
|
68
|
+
n("div", we, [
|
|
69
69
|
u(t(me), {
|
|
70
70
|
ref_key: "searchInputRef",
|
|
71
71
|
ref: y,
|
|
@@ -74,9 +74,9 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
74
74
|
sidebar: "",
|
|
75
75
|
onInput: t(P),
|
|
76
76
|
onKeydown: [
|
|
77
|
-
e[1] || (e[1] = v(m((s) => t(
|
|
77
|
+
e[1] || (e[1] = v(m((s) => t(I)("down"), ["stop"]), ["down"])),
|
|
78
78
|
e[2] || (e[2] = v(m((s) => t(j)(), ["stop"]), ["enter"])),
|
|
79
|
-
e[3] || (e[3] = v(m((s) => t(
|
|
79
|
+
e[3] || (e[3] = v(m((s) => t(I)("up"), ["stop"]), ["up"]))
|
|
80
80
|
]
|
|
81
81
|
}, null, 8, ["modelValue", "onInput"])
|
|
82
82
|
]),
|
|
@@ -92,10 +92,10 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
92
92
|
t(c) ? (a(), l(t(ce), {
|
|
93
93
|
key: 0,
|
|
94
94
|
class: "gap-px custom-scroll",
|
|
95
|
-
noResults: !t(
|
|
95
|
+
noResults: !t(g).length
|
|
96
96
|
}, {
|
|
97
97
|
default: i(() => [
|
|
98
|
-
(a(!0), h(S, null,
|
|
98
|
+
(a(!0), h(S, null, D(t(g), (s, d) => (a(), l(t(fe), {
|
|
99
99
|
id: `#search-input-${s.item.id}`,
|
|
100
100
|
key: s.refIndex,
|
|
101
101
|
ref_for: !0,
|
|
@@ -112,13 +112,13 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
112
112
|
}, null, 8, ["method"])
|
|
113
113
|
]),
|
|
114
114
|
default: i(() => [
|
|
115
|
-
|
|
115
|
+
C(se(s.item.title) + " ", 1)
|
|
116
116
|
]),
|
|
117
117
|
_: 2
|
|
118
118
|
}, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
|
|
119
119
|
]),
|
|
120
120
|
_: 1
|
|
121
|
-
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 },
|
|
121
|
+
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, D(t(E), (s) => {
|
|
122
122
|
var d;
|
|
123
123
|
return a(), l(he, {
|
|
124
124
|
key: s.uid,
|
|
@@ -127,7 +127,7 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
127
127
|
menuItem: p,
|
|
128
128
|
parentUids: [],
|
|
129
129
|
uid: s.uid,
|
|
130
|
-
onNewTab: e[4] || (e[4] = (r, J) =>
|
|
130
|
+
onNewTab: e[4] || (e[4] = (r, J) => R("newTab", { name: r, uid: J })),
|
|
131
131
|
onOnDragEnd: t(N),
|
|
132
132
|
onOpenMenu: e[5] || (e[5] = (r) => Object.assign(p, r))
|
|
133
133
|
}, {
|
|
@@ -166,10 +166,10 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
166
166
|
button: i(() => [
|
|
167
167
|
n("div", {
|
|
168
168
|
class: f({
|
|
169
|
-
"empty-sidebar-item": t(
|
|
169
|
+
"empty-sidebar-item": t(K).length <= 1
|
|
170
170
|
})
|
|
171
171
|
}, [
|
|
172
|
-
n("div",
|
|
172
|
+
n("div", ge, [
|
|
173
173
|
n("div", ke, [
|
|
174
174
|
u($, {
|
|
175
175
|
art: t(ae),
|
|
@@ -185,13 +185,13 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
185
185
|
n("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
|
|
186
186
|
], -1))
|
|
187
187
|
]),
|
|
188
|
-
o.isReadonly ?
|
|
188
|
+
o.isReadonly ? M("", !0) : (a(), l(de, {
|
|
189
189
|
key: 0,
|
|
190
190
|
click: t(b).commandPalette.emit,
|
|
191
191
|
hotkey: "K"
|
|
192
192
|
}, {
|
|
193
193
|
title: i(() => e[11] || (e[11] = [
|
|
194
|
-
|
|
194
|
+
C("Add Item")
|
|
195
195
|
])),
|
|
196
196
|
_: 1
|
|
197
197
|
}, 8, ["click"]))
|
|
@@ -211,8 +211,8 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = {
|
|
|
211
211
|
key: 0,
|
|
212
212
|
menuItem: p,
|
|
213
213
|
onCloseMenu: e[9] || (e[9] = (s) => p.open = !1),
|
|
214
|
-
|
|
215
|
-
}, null, 8, ["menuItem"])) :
|
|
214
|
+
onToggleWatchMode: G
|
|
215
|
+
}, null, 8, ["menuItem"])) : M("", !0)
|
|
216
216
|
], 64));
|
|
217
217
|
}
|
|
218
218
|
});
|
|
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e4ab1065"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
p as default
|
|
8
8
|
};
|