@scalar/api-client 2.1.33 → 2.1.34
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 +20 -0
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- 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/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/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/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 +98 -91
- 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 +104 -111
- 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 +37 -34
- 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 +43 -37
- 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/Settings/SettingsGeneral.vue.js +3 -3
- package/dist/views/Settings/SettingsGeneralMode.vue.js +3 -3
- package/package.json +9 -9
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as x, computed as g, openBlock as r, createElementBlock as s, Fragment as f, renderList as S, 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
|
+
import y from "../RequestAuthDataTableInput.vue.js";
|
|
3
|
+
import E from "./OAuth2.vue.js";
|
|
4
4
|
import p from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import { isOauth2Example as
|
|
7
|
-
import { useWorkspace as
|
|
8
|
-
const A = /* @__PURE__ */
|
|
5
|
+
import F from "../../../../components/DataTable/DataTableCell.vue.js";
|
|
6
|
+
import { isOauth2Example as R } from "../../libs/oauth2.js";
|
|
7
|
+
import { useWorkspace as C } from "../../../../store/store.js";
|
|
8
|
+
const A = /* @__PURE__ */ x({
|
|
9
9
|
__name: "RequestExampleAuth",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
props: {
|
|
11
|
+
selectedSecuritySchemeUids: {}
|
|
12
|
+
},
|
|
13
|
+
setup(_) {
|
|
14
|
+
const { activeCollection: V, activeRequest: $, collectionMutators: v, securitySchemes: b } = C(), U = g(() => !V.value || !$.value ? [] : _.selectedSecuritySchemeUids.map((d) => ({
|
|
15
|
+
example: V.value.auth[d],
|
|
16
|
+
scheme: b[d]
|
|
14
17
|
})));
|
|
15
|
-
function
|
|
16
|
-
return `${B(
|
|
18
|
+
function w(d) {
|
|
19
|
+
return `${B(d.nameKey)}: ${d.type} ${d.type === "oauth2" ? d.flow.type : ""}`;
|
|
17
20
|
}
|
|
18
|
-
function m(
|
|
21
|
+
function m(d, u, e, t) {
|
|
19
22
|
var a;
|
|
20
|
-
(a =
|
|
21
|
-
|
|
22
|
-
`auth.${
|
|
23
|
+
(a = V.value) != null && a.uid && v.edit(
|
|
24
|
+
V.value.uid,
|
|
25
|
+
`auth.${d}.${e}`,
|
|
23
26
|
t
|
|
24
27
|
);
|
|
25
28
|
}
|
|
26
|
-
return (
|
|
29
|
+
return (d, u) => (r(!0), s(f, null, S(U.value, ({ scheme: e, example: t }) => (r(), s(f, {
|
|
27
30
|
key: e.uid
|
|
28
31
|
}, [
|
|
29
|
-
|
|
32
|
+
o(i(p), { class: "group/delete" }, {
|
|
30
33
|
default: l(() => [
|
|
31
|
-
|
|
34
|
+
U.value.length > 1 ? (r(), k(i(F), {
|
|
32
35
|
key: 0,
|
|
33
36
|
class: "text-c-2 pl-2 text-xs font-medium flex items-center bg-b-2"
|
|
34
37
|
}, {
|
|
35
38
|
default: l(() => [
|
|
36
|
-
n(T(
|
|
39
|
+
n(T(w(e)), 1)
|
|
37
40
|
]),
|
|
38
41
|
_: 2
|
|
39
|
-
}, 1024)) :
|
|
42
|
+
}, 1024)) : c("", !0)
|
|
40
43
|
]),
|
|
41
44
|
_: 2
|
|
42
45
|
}, 1024),
|
|
43
46
|
e.type === "http" && t.type === "http" ? (r(), s(f, { key: 0 }, [
|
|
44
47
|
e.scheme === "bearer" ? (r(), k(i(p), { key: 0 }, {
|
|
45
48
|
default: l(() => [
|
|
46
|
-
|
|
49
|
+
o(y, {
|
|
47
50
|
id: `http-bearer-token-${e.uid}`,
|
|
48
51
|
modelValue: t.token,
|
|
49
52
|
placeholder: "Token",
|
|
@@ -58,9 +61,9 @@ const A = /* @__PURE__ */ w({
|
|
|
58
61
|
]),
|
|
59
62
|
_: 2
|
|
60
63
|
}, 1024)) : e.scheme === "basic" ? (r(), s(f, { key: 1 }, [
|
|
61
|
-
|
|
64
|
+
o(i(p), null, {
|
|
62
65
|
default: l(() => [
|
|
63
|
-
|
|
66
|
+
o(y, {
|
|
64
67
|
id: `http-basic-username-${e.uid}`,
|
|
65
68
|
class: "text-c-2",
|
|
66
69
|
modelValue: t.username,
|
|
@@ -76,9 +79,9 @@ const A = /* @__PURE__ */ w({
|
|
|
76
79
|
]),
|
|
77
80
|
_: 2
|
|
78
81
|
}, 1024),
|
|
79
|
-
|
|
82
|
+
o(i(p), null, {
|
|
80
83
|
default: l(() => [
|
|
81
|
-
|
|
84
|
+
o(y, {
|
|
82
85
|
id: `http-basic-password-${e.uid}`,
|
|
83
86
|
modelValue: t.password,
|
|
84
87
|
placeholder: "xxxxxx",
|
|
@@ -93,11 +96,11 @@ const A = /* @__PURE__ */ w({
|
|
|
93
96
|
]),
|
|
94
97
|
_: 2
|
|
95
98
|
}, 1024)
|
|
96
|
-
], 64)) :
|
|
99
|
+
], 64)) : c("", !0)
|
|
97
100
|
], 64)) : e.type === "apiKey" && t.type === "apiKey" ? (r(), s(f, { key: 1 }, [
|
|
98
|
-
|
|
101
|
+
o(i(p), null, {
|
|
99
102
|
default: l(() => [
|
|
100
|
-
|
|
103
|
+
o(y, {
|
|
101
104
|
id: `api-key-name-${e.uid}`,
|
|
102
105
|
modelValue: t.name,
|
|
103
106
|
placeholder: "api-key",
|
|
@@ -111,9 +114,9 @@ const A = /* @__PURE__ */ w({
|
|
|
111
114
|
]),
|
|
112
115
|
_: 2
|
|
113
116
|
}, 1024),
|
|
114
|
-
|
|
117
|
+
o(i(p), null, {
|
|
115
118
|
default: l(() => [
|
|
116
|
-
|
|
119
|
+
o(y, {
|
|
117
120
|
id: `api-key-value-add-${e.uid}`,
|
|
118
121
|
modelValue: t.value,
|
|
119
122
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
@@ -127,11 +130,11 @@ const A = /* @__PURE__ */ w({
|
|
|
127
130
|
]),
|
|
128
131
|
_: 2
|
|
129
132
|
}, 1024)
|
|
130
|
-
], 64)) : e.type === "oauth2" && i(
|
|
133
|
+
], 64)) : e.type === "oauth2" && i(R)(t) ? (r(), k(E, {
|
|
131
134
|
key: 2,
|
|
132
135
|
example: t,
|
|
133
136
|
scheme: e
|
|
134
|
-
}, null, 8, ["example", "scheme"])) :
|
|
137
|
+
}, null, 8, ["example", "scheme"])) : c("", !0)
|
|
135
138
|
], 64))), 128));
|
|
136
139
|
}
|
|
137
140
|
});
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
selectedSecuritySchemeUids: string[];
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
4
|
+
selectedSecuritySchemeUids: string[];
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
6
|
export default _default;
|
|
3
7
|
//# sourceMappingURL=RequestSection.vue.d.ts.map
|
|
@@ -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":";gCA2J8B,MAAM,EAAE;;gCAAR,MAAM,EAAE;;AA+PtC,wBAMG"}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as q, computed as _, ref as g, 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 r, withDirectives as u, vShow as i } from "vue";
|
|
2
2
|
import H from "../../../components/ContextBar.vue.js";
|
|
3
3
|
import R from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
4
|
import N from "./RequestBody.vue.js";
|
|
5
5
|
import v from "./RequestParams.vue.js";
|
|
6
6
|
import K from "./RequestPathParams.vue.js";
|
|
7
7
|
import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
|
|
8
|
-
import
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
const
|
|
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
11
|
key: 0,
|
|
12
12
|
class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
|
|
13
13
|
for: "requestname"
|
|
14
|
-
},
|
|
14
|
+
}, D = ["value"], M = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "text-c-1"
|
|
17
|
-
},
|
|
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
18
|
__name: "RequestSection",
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
props: {
|
|
20
|
+
selectedSecuritySchemeUids: {}
|
|
21
|
+
},
|
|
22
|
+
setup(I) {
|
|
23
|
+
const { activeRequest: a, activeExample: h, isReadOnly: d, requestMutators: x } = E(), k = _(() => {
|
|
21
24
|
var l, o;
|
|
22
25
|
const t = /* @__PURE__ */ new Set([
|
|
23
26
|
"All",
|
|
@@ -38,74 +41,77 @@ const $ = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none"
|
|
|
38
41
|
b(a, (t) => {
|
|
39
42
|
e.value === "Body" && t && !f(t.method) && (e.value = "All");
|
|
40
43
|
});
|
|
41
|
-
const
|
|
44
|
+
const B = (t) => {
|
|
42
45
|
if (!a.value) return;
|
|
43
46
|
const l = t.target;
|
|
44
|
-
|
|
47
|
+
x.edit(a.value.uid, "summary", l.value);
|
|
45
48
|
};
|
|
46
49
|
return (t, l) => (m(), C(R, null, {
|
|
47
|
-
title:
|
|
48
|
-
var o,
|
|
50
|
+
title: S(() => {
|
|
51
|
+
var o, n;
|
|
49
52
|
return [
|
|
50
|
-
A("div",
|
|
51
|
-
|
|
52
|
-
|
|
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", {
|
|
53
56
|
key: 1,
|
|
54
57
|
id: "requestname",
|
|
55
58
|
class: "outline-none border-0 text-c-1 rounded pointer-events-auto relative w-full",
|
|
56
59
|
placeholder: "Request Name",
|
|
57
|
-
value: (o =
|
|
58
|
-
onInput:
|
|
59
|
-
}, null, 40,
|
|
60
|
+
value: (o = s(a)) == null ? void 0 : o.summary,
|
|
61
|
+
onInput: B
|
|
62
|
+
}, null, 40, D))
|
|
60
63
|
]),
|
|
61
|
-
|
|
64
|
+
r(H, {
|
|
62
65
|
activeSection: e.value,
|
|
63
|
-
sections:
|
|
66
|
+
sections: k.value,
|
|
64
67
|
onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
|
|
65
68
|
}, null, 8, ["activeSection", "sections"])
|
|
66
69
|
];
|
|
67
70
|
}),
|
|
68
|
-
default:
|
|
69
|
-
var o,
|
|
71
|
+
default: S(() => {
|
|
72
|
+
var o, n, c;
|
|
70
73
|
return [
|
|
71
|
-
A("div",
|
|
72
|
-
u(
|
|
74
|
+
A("div", P, [
|
|
75
|
+
u(r(U, {
|
|
76
|
+
selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
|
|
77
|
+
title: "Authentication"
|
|
78
|
+
}, null, 8, ["selectedSecuritySchemeUids"]), [
|
|
73
79
|
[
|
|
74
|
-
|
|
80
|
+
i,
|
|
75
81
|
!y.value && (e.value === "All" || e.value === "Auth")
|
|
76
82
|
]
|
|
77
83
|
]),
|
|
78
|
-
u(
|
|
84
|
+
u(r(K, {
|
|
79
85
|
paramKey: "path",
|
|
80
86
|
title: "Path Variables"
|
|
81
87
|
}, null, 512), [
|
|
82
88
|
[
|
|
83
|
-
|
|
84
|
-
(e.value === "All" || e.value === "Variables") && ((c = (
|
|
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)
|
|
85
91
|
]
|
|
86
92
|
]),
|
|
87
|
-
u(
|
|
93
|
+
u(r(v, {
|
|
88
94
|
paramKey: "cookies",
|
|
89
95
|
title: "Cookies"
|
|
90
96
|
}, null, 512), [
|
|
91
|
-
[
|
|
97
|
+
[i, e.value === "All" || e.value === "Cookies"]
|
|
92
98
|
]),
|
|
93
|
-
u(
|
|
99
|
+
u(r(v, {
|
|
94
100
|
paramKey: "headers",
|
|
95
101
|
title: "Headers"
|
|
96
102
|
}, null, 512), [
|
|
97
|
-
[
|
|
103
|
+
[i, e.value === "All" || e.value === "Headers"]
|
|
98
104
|
]),
|
|
99
|
-
u(
|
|
105
|
+
u(r(v, {
|
|
100
106
|
paramKey: "query",
|
|
101
107
|
title: "Query Parameters"
|
|
102
108
|
}, null, 512), [
|
|
103
|
-
[
|
|
109
|
+
[i, e.value === "All" || e.value === "Query"]
|
|
104
110
|
]),
|
|
105
|
-
u(
|
|
111
|
+
u(r(N, { title: "Body" }, null, 512), [
|
|
106
112
|
[
|
|
107
|
-
|
|
108
|
-
|
|
113
|
+
i,
|
|
114
|
+
s(a) && (e.value === "All" || e.value === "Body") && s(f)(s(a).method)
|
|
109
115
|
]
|
|
110
116
|
])
|
|
111
117
|
])
|
|
@@ -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.34";
|
|
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
|
};
|