@scalar/api-client 2.1.22 → 2.1.24
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 +31 -0
- package/README.md +22 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +163 -154
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +5 -5
- package/dist/components/DataTable/DataTableText.vue.d.ts +12 -3
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableText.vue.js +13 -9
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +9 -9
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +84 -63
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +36 -40
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts +3 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +125 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +4 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +2 -2
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +28 -27
- package/dist/components/SideNav/SideHelp.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +8 -8
- package/dist/components/SideNav/SideNavLink.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +4 -4
- package/dist/components/Sidebar/SidebarList.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarList.vue.js +3 -3
- package/dist/components/Sidebar/SidebarToggle.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +3 -3
- package/dist/data/httpHeaders.d.ts +6 -0
- package/dist/data/httpHeaders.d.ts.map +1 -0
- package/dist/data/httpHeaders.js +537 -0
- package/dist/layouts/App/create-api-client-app.d.ts +8 -8
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +16 -16
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +8 -8
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +8 -8
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/importers/curl.d.ts +25 -1
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +40 -38
- package/dist/libs/parse-curl.d.ts +3 -4
- package/dist/libs/parse-curl.d.ts.map +1 -1
- package/dist/libs/parse-curl.js +58 -55
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/store.d.ts +16 -16
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +21 -21
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +45 -53
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +61 -63
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +43 -43
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
- package/dist/views/Request/RequestSubpageHeader.vue2.js +15 -13
- 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 +43 -22
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +44 -51
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AA0gBA,wBAKG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as L, computed as V, onMounted as D, openBlock as l, createBlock as y, withCtx as a, createVNode as s, unref as n, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as v, normalizeClass as w, createTextVNode as x, toDisplayString as S, withDirectives as O, vShow as $ } from "vue";
|
|
2
|
+
import M from "../../components/Sidebar/SidebarButton.vue.js";
|
|
3
|
+
import N from "../../components/Sidebar/SidebarList.vue.js";
|
|
4
4
|
import B from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
5
5
|
import F from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
6
6
|
import I from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
@@ -12,7 +12,7 @@ import P from "./CookieRaw.vue.js";
|
|
|
12
12
|
import { useSidebar as T } from "../../hooks/useSidebar.js";
|
|
13
13
|
import { useWorkspace as W } from "../../store/store.js";
|
|
14
14
|
import q from "../../components/Sidebar/Sidebar.vue.js";
|
|
15
|
-
const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-
|
|
15
|
+
const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, Q = ["onClick"], U = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, de = /* @__PURE__ */ L({
|
|
16
16
|
__name: "Cookies",
|
|
17
17
|
setup(X) {
|
|
18
18
|
const { cookies: p, cookieMutators: g } = W(), { collapsedSidebarFolders: i, toggleSidebarFolder: k } = T(), b = A(), E = () => {
|
|
@@ -26,7 +26,7 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
26
26
|
sameSite: "None"
|
|
27
27
|
});
|
|
28
28
|
g.add(e), b.push(e.uid);
|
|
29
|
-
},
|
|
29
|
+
}, z = (t) => {
|
|
30
30
|
g.delete(t);
|
|
31
31
|
const e = Object.values(p).filter(
|
|
32
32
|
(o) => o.uid !== t
|
|
@@ -35,13 +35,13 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
35
35
|
const o = e[e.length - 1];
|
|
36
36
|
b.push(o.uid);
|
|
37
37
|
} else e.length === 1 && e[0].uid === "default" && b.push("default");
|
|
38
|
-
}, h =
|
|
38
|
+
}, h = V(() => {
|
|
39
39
|
const t = {};
|
|
40
40
|
return Object.values(p).forEach((e) => {
|
|
41
41
|
e.domain && e.path && (t[e.domain] || (t[e.domain] = {}), t[e.domain][e.path] || (t[e.domain][e.path] = []), t[e.domain][e.path].push(e));
|
|
42
42
|
}), t;
|
|
43
43
|
}), C = (t) => i[t];
|
|
44
|
-
return
|
|
44
|
+
return D(() => {
|
|
45
45
|
const t = Object.keys(h.value), e = Object.entries(h.value).flatMap(
|
|
46
46
|
([o, r]) => Object.keys(r).map((d) => o + d)
|
|
47
47
|
);
|
|
@@ -54,11 +54,11 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
54
54
|
default: a(() => [
|
|
55
55
|
s(n(q), { title: "Cookies" }, {
|
|
56
56
|
content: a(() => [
|
|
57
|
-
|
|
58
|
-
s(
|
|
57
|
+
f("div", G, [
|
|
58
|
+
s(N, null, {
|
|
59
59
|
default: a(() => [
|
|
60
|
-
(l(!0),
|
|
61
|
-
|
|
60
|
+
(l(!0), m(_, null, v(h.value, (o, r) => (l(), m("div", { key: r }, [
|
|
61
|
+
f("button", {
|
|
62
62
|
class: "flex font-medium gap-1.5 items-center px-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
63
63
|
type: "button",
|
|
64
64
|
onClick: (d) => n(k)(r)
|
|
@@ -71,11 +71,11 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
71
71
|
size: "sm",
|
|
72
72
|
thickness: "2.5"
|
|
73
73
|
}, null, 8, ["class"]),
|
|
74
|
-
|
|
74
|
+
x(" " + S(r), 1)
|
|
75
75
|
], 8, J),
|
|
76
|
-
O(
|
|
77
|
-
(l(!0),
|
|
78
|
-
|
|
76
|
+
O(f("div", K, [
|
|
77
|
+
(l(!0), m(_, null, v(o, (d, c) => (l(), m("div", { key: c }, [
|
|
78
|
+
f("button", {
|
|
79
79
|
class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
80
80
|
type: "button",
|
|
81
81
|
onClick: (u) => n(k)(r + c)
|
|
@@ -88,15 +88,15 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
88
88
|
size: "sm",
|
|
89
89
|
thickness: "2.5"
|
|
90
90
|
}, null, 8, ["class"]),
|
|
91
|
-
|
|
91
|
+
x(" " + S(c), 1)
|
|
92
92
|
], 8, Q),
|
|
93
|
-
O(
|
|
94
|
-
(l(!0),
|
|
93
|
+
O(f("div", U, [
|
|
94
|
+
(l(!0), m(_, null, v(d, (u) => (l(), y(B, {
|
|
95
95
|
key: u.uid,
|
|
96
96
|
class: "cookie text-xs",
|
|
97
97
|
variable: { name: u.name, uid: u.uid },
|
|
98
98
|
warningMessage: "Are you sure you want to delete this cookie?",
|
|
99
|
-
onDelete: (Y) =>
|
|
99
|
+
onDelete: (Y) => z(u.uid)
|
|
100
100
|
}, null, 8, ["variable", "onDelete"]))), 128))
|
|
101
101
|
], 512), [
|
|
102
102
|
[$, C(r + c)]
|
|
@@ -112,9 +112,9 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
112
112
|
])
|
|
113
113
|
]),
|
|
114
114
|
button: a(() => [
|
|
115
|
-
s(
|
|
115
|
+
s(M, { click: E }, {
|
|
116
116
|
title: a(() => e[0] || (e[0] = [
|
|
117
|
-
|
|
117
|
+
x("Add Item")
|
|
118
118
|
])),
|
|
119
119
|
_: 1
|
|
120
120
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Request.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a2bc9058"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -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":";AAiZA,wBAKG"}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as g, computed as _, ref as q, watch as b, openBlock as m, createBlock as C, withCtx as x, createElementVNode as A, unref as r, createElementBlock as p, createCommentVNode as V, toDisplayString as w, createVNode as s, withDirectives as u, vShow as n } from "vue";
|
|
2
|
+
import H from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import N from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import R from "./RequestBody.vue.js";
|
|
5
5
|
import v from "./RequestParams.vue.js";
|
|
6
6
|
import K from "./RequestPathParams.vue.js";
|
|
7
|
-
import { ScalarIcon as $ } from "@scalar/components";
|
|
8
7
|
import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
|
|
9
|
-
import
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
const
|
|
8
|
+
import $ 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" }, D = {
|
|
12
11
|
key: 0,
|
|
13
12
|
class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
|
|
14
13
|
for: "requestname"
|
|
15
|
-
},
|
|
14
|
+
}, M = ["value"], P = {
|
|
16
15
|
key: 2,
|
|
17
|
-
class: "text-c-
|
|
18
|
-
},
|
|
16
|
+
class: "text-c-1"
|
|
17
|
+
}, I = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, X = /* @__PURE__ */ g({
|
|
19
18
|
__name: "RequestSection",
|
|
20
19
|
setup(O) {
|
|
21
|
-
const { activeRequest: a, activeExample: h, isReadOnly:
|
|
22
|
-
var l,
|
|
20
|
+
const { activeRequest: a, activeExample: h, isReadOnly: d, requestMutators: k } = E(), B = _(() => {
|
|
21
|
+
var l, o;
|
|
23
22
|
const t = /* @__PURE__ */ new Set([
|
|
24
23
|
"All",
|
|
25
24
|
"Query",
|
|
@@ -29,91 +28,84 @@ const I = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none"
|
|
|
29
28
|
"Headers",
|
|
30
29
|
"Body"
|
|
31
30
|
]);
|
|
32
|
-
return (l = h.value) != null && l.parameters.path.length || t.delete("Variables"), f(((
|
|
31
|
+
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];
|
|
33
32
|
}), y = _(
|
|
34
33
|
() => {
|
|
35
34
|
var t, l;
|
|
36
|
-
return
|
|
35
|
+
return d.value && ((l = (t = a.value) == null ? void 0 : t.security) == null ? void 0 : l.length) === 0;
|
|
37
36
|
}
|
|
38
|
-
), e =
|
|
39
|
-
|
|
37
|
+
), e = q("All");
|
|
38
|
+
b(a, (t) => {
|
|
40
39
|
e.value === "Body" && t && !f(t.method) && (e.value = "All");
|
|
41
40
|
});
|
|
42
|
-
const
|
|
41
|
+
const S = (t) => {
|
|
43
42
|
if (!a.value) return;
|
|
44
43
|
const l = t.target;
|
|
45
44
|
k.edit(a.value.uid, "summary", l.value);
|
|
46
45
|
};
|
|
47
|
-
return (t, l) => (m(),
|
|
46
|
+
return (t, l) => (m(), C(N, null, {
|
|
48
47
|
title: x(() => {
|
|
49
|
-
var
|
|
48
|
+
var o, i;
|
|
50
49
|
return [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
size: "sm",
|
|
55
|
-
thickness: "2.5"
|
|
56
|
-
}),
|
|
57
|
-
A("div", I, [
|
|
58
|
-
l[1] || (l[1] = C(" Request ")),
|
|
59
|
-
o(p) ? w("", !0) : (m(), d("label", M)),
|
|
60
|
-
o(p) ? (m(), d("span", z, H((u = o(a)) == null ? void 0 : u.summary), 1)) : (m(), d("input", {
|
|
50
|
+
A("div", Q, [
|
|
51
|
+
r(d) ? V("", !0) : (m(), p("label", D)),
|
|
52
|
+
r(d) ? (m(), p("span", P, w((i = r(a)) == null ? void 0 : i.summary), 1)) : (m(), p("input", {
|
|
61
53
|
key: 1,
|
|
62
54
|
id: "requestname",
|
|
63
|
-
class: "outline-none border-0 text-c-
|
|
55
|
+
class: "outline-none border-0 text-c-1 rounded pointer-events-auto relative w-full",
|
|
64
56
|
placeholder: "Request Name",
|
|
65
|
-
value: (
|
|
66
|
-
onInput:
|
|
67
|
-
}, null, 40,
|
|
57
|
+
value: (o = r(a)) == null ? void 0 : o.summary,
|
|
58
|
+
onInput: S
|
|
59
|
+
}, null, 40, M))
|
|
68
60
|
]),
|
|
69
|
-
s(
|
|
61
|
+
s(H, {
|
|
70
62
|
activeSection: e.value,
|
|
71
|
-
sections:
|
|
63
|
+
sections: B.value,
|
|
72
64
|
onSetActiveSection: l[0] || (l[0] = (c) => e.value = c)
|
|
73
65
|
}, null, 8, ["activeSection", "sections"])
|
|
74
66
|
];
|
|
75
67
|
}),
|
|
76
68
|
default: x(() => {
|
|
77
|
-
var
|
|
69
|
+
var o, i, c;
|
|
78
70
|
return [
|
|
79
|
-
A("div",
|
|
80
|
-
|
|
71
|
+
A("div", I, [
|
|
72
|
+
u(s($, { title: "Authentication" }, null, 512), [
|
|
81
73
|
[
|
|
82
|
-
|
|
74
|
+
n,
|
|
83
75
|
!y.value && (e.value === "All" || e.value === "Auth")
|
|
84
76
|
]
|
|
85
77
|
]),
|
|
86
|
-
|
|
78
|
+
u(s(K, {
|
|
87
79
|
paramKey: "path",
|
|
88
80
|
title: "Path Variables"
|
|
89
81
|
}, null, 512), [
|
|
90
82
|
[
|
|
91
|
-
|
|
92
|
-
(e.value === "All" || e.value === "Variables") && ((c = (
|
|
83
|
+
n,
|
|
84
|
+
(e.value === "All" || e.value === "Variables") && ((c = (i = (o = r(h)) == null ? void 0 : o.parameters) == null ? void 0 : i.path) == null ? void 0 : c.length)
|
|
93
85
|
]
|
|
94
86
|
]),
|
|
95
|
-
|
|
87
|
+
u(s(v, {
|
|
96
88
|
paramKey: "cookies",
|
|
97
89
|
title: "Cookies"
|
|
98
90
|
}, null, 512), [
|
|
99
|
-
[
|
|
91
|
+
[n, e.value === "All" || e.value === "Cookies"]
|
|
100
92
|
]),
|
|
101
|
-
|
|
93
|
+
u(s(v, {
|
|
102
94
|
paramKey: "headers",
|
|
103
95
|
title: "Headers"
|
|
104
96
|
}, null, 512), [
|
|
105
|
-
[
|
|
97
|
+
[n, e.value === "All" || e.value === "Headers"]
|
|
106
98
|
]),
|
|
107
|
-
|
|
99
|
+
u(s(v, {
|
|
108
100
|
paramKey: "query",
|
|
109
101
|
title: "Query Parameters"
|
|
110
102
|
}, null, 512), [
|
|
111
|
-
[
|
|
103
|
+
[n, e.value === "All" || e.value === "Query"]
|
|
112
104
|
]),
|
|
113
|
-
|
|
105
|
+
u(s(R, { title: "Body" }, null, 512), [
|
|
114
106
|
[
|
|
115
|
-
|
|
116
|
-
|
|
107
|
+
n,
|
|
108
|
+
r(a) && (e.value === "All" || e.value === "Body") && r(f)(r(a).method)
|
|
117
109
|
]
|
|
118
110
|
])
|
|
119
111
|
])
|
|
@@ -124,5 +116,5 @@ const I = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none"
|
|
|
124
116
|
}
|
|
125
117
|
});
|
|
126
118
|
export {
|
|
127
|
-
|
|
119
|
+
X as default
|
|
128
120
|
};
|
|
@@ -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":";iBAsVe,OAAO;gBACR,OAAO;;;cAqmBkB,MAAM;aAAO,MAAM;;;;iBAtmB3C,OAAO;gBACR,OAAO;;;cAqmBkB,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 m = /* @__PURE__ */
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(e, [["__scopeId", "data-v-3e3ee583"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as u, unref as t, normalizeClass as b, createSlots as ee, withCtx as n, createElementVNode as i, isRef as te, withKeys as v, withModifiers as p, createBlock as l, renderList as C, createTextVNode as D, toDisplayString as oe, createCommentVNode as $, vShow as se } from "vue";
|
|
2
|
+
import re from "../../assets/rabbit.ascii.js";
|
|
3
3
|
import ae from "../../assets/rabbitjump.ascii.js";
|
|
4
4
|
import ie from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
5
5
|
import V from "../../components/ScalarAsciiArt.vue.js";
|
|
6
6
|
import { useSearch as ne } from "../../components/Search/useSearch.js";
|
|
7
7
|
import le from "../../components/Sidebar/SidebarButton.vue.js";
|
|
8
8
|
import de from "./RequestSidebarItemMenu.vue.js";
|
|
9
|
-
import { dragHandlerFactory as
|
|
10
|
-
import { ScalarSearchInput as
|
|
9
|
+
import { dragHandlerFactory as ue } from "./handle-drag.js";
|
|
10
|
+
import { ScalarSearchInput as me, ScalarSearchResultList as pe, ScalarSearchResultItem as ce, ScalarIcon as q } from "@scalar/components";
|
|
11
11
|
import { LibraryIcon as fe } from "@scalar/icons";
|
|
12
12
|
import be from "./RequestSidebarItem.vue.js";
|
|
13
13
|
import he from "../../components/Sidebar/Sidebar.vue.js";
|
|
14
|
-
import Se from "
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, ke = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, Te = /* @__PURE__ */ J({
|
|
14
|
+
import { useSidebar as Se } from "../../hooks/useSidebar.js";
|
|
15
|
+
import { useWorkspace as ve } from "../../store/store.js";
|
|
16
|
+
const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, we = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, Ke = /* @__PURE__ */ J({
|
|
18
17
|
__name: "RequestSidebar",
|
|
19
18
|
props: {
|
|
20
19
|
showSidebar: { type: Boolean },
|
|
@@ -22,18 +21,18 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
22
21
|
},
|
|
23
22
|
emits: ["update:showSidebar", "newTab"],
|
|
24
23
|
setup(P, { emit: B }) {
|
|
25
|
-
const E = P, R = B,
|
|
24
|
+
const E = P, R = B, k = ve(), {
|
|
26
25
|
activeWorkspaceCollections: F,
|
|
27
26
|
activeRequest: M,
|
|
28
27
|
activeWorkspaceRequests: O,
|
|
29
28
|
findRequestParents: K,
|
|
30
29
|
isReadOnly: N,
|
|
31
30
|
events: c
|
|
32
|
-
} =
|
|
31
|
+
} = k, { handleDragEnd: T, isDroppable: z } = ue(k), { collapsedSidebarFolders: A, setCollapsedSidebarFolder: L } = Se(), m = Q({ open: !1 });
|
|
33
32
|
X(
|
|
34
33
|
M,
|
|
35
|
-
(
|
|
36
|
-
|
|
34
|
+
(s) => {
|
|
35
|
+
s && K(s).forEach(
|
|
37
36
|
(e) => L(e, !0)
|
|
38
37
|
);
|
|
39
38
|
},
|
|
@@ -42,28 +41,28 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
42
41
|
const {
|
|
43
42
|
searchText: f,
|
|
44
43
|
searchResultsWithPlaceholderResults: w,
|
|
45
|
-
selectedSearchResult:
|
|
44
|
+
selectedSearchResult: y,
|
|
46
45
|
onSearchResultClick: U,
|
|
47
46
|
fuseSearch: W,
|
|
48
47
|
searchInputRef: g,
|
|
49
48
|
searchResultRefs: H,
|
|
50
|
-
navigateSearchResults:
|
|
49
|
+
navigateSearchResults: I,
|
|
51
50
|
selectSearchResult: j
|
|
52
|
-
} = ne(),
|
|
51
|
+
} = ne(), x = (s) => {
|
|
53
52
|
var e;
|
|
54
|
-
|
|
53
|
+
s && (s.toggleSidebar && R("update:showSidebar", E.showSidebar), s.openCommandPalette && (s.openCommandPalette.preventDefault(), c.commandPalette.emit()), s.focusRequestSearch && ((e = g.value) == null || e.focus()));
|
|
55
54
|
};
|
|
56
|
-
return Y(() => c.hotKeys.on(
|
|
57
|
-
c.hotKeys.off(
|
|
58
|
-
}), (
|
|
59
|
-
_(
|
|
60
|
-
class: b([
|
|
61
|
-
showSidebar:
|
|
62
|
-
"onUpdate:showSidebar": e[8] || (e[8] = (o) =>
|
|
55
|
+
return Y(() => c.hotKeys.on(x)), Z(() => {
|
|
56
|
+
c.hotKeys.off(x);
|
|
57
|
+
}), (s, e) => (a(), h(S, null, [
|
|
58
|
+
_(u(t(he), {
|
|
59
|
+
class: b([s.showSidebar ? "sidebar-active-width" : ""]),
|
|
60
|
+
showSidebar: s.showSidebar,
|
|
61
|
+
"onUpdate:showSidebar": e[8] || (e[8] = (o) => s.$emit("update:showSidebar", o))
|
|
63
62
|
}, ee({
|
|
64
63
|
content: n(() => [
|
|
65
|
-
i("div",
|
|
66
|
-
|
|
64
|
+
i("div", Re, [
|
|
65
|
+
u(t(me), {
|
|
67
66
|
ref_key: "searchInputRef",
|
|
68
67
|
ref: g,
|
|
69
68
|
modelValue: t(f),
|
|
@@ -71,39 +70,39 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
71
70
|
sidebar: "",
|
|
72
71
|
onInput: t(W),
|
|
73
72
|
onKeydown: [
|
|
74
|
-
e[1] || (e[1] = v(p((o) => t(
|
|
73
|
+
e[1] || (e[1] = v(p((o) => t(I)("down"), ["stop"]), ["down"])),
|
|
75
74
|
e[2] || (e[2] = v(p((o) => t(j)(), ["stop"]), ["enter"])),
|
|
76
|
-
e[3] || (e[3] = v(p((o) => t(
|
|
75
|
+
e[3] || (e[3] = v(p((o) => t(I)("up"), ["stop"]), ["up"]))
|
|
77
76
|
]
|
|
78
77
|
}, null, 8, ["modelValue", "onInput"])
|
|
79
78
|
]),
|
|
80
79
|
i("div", {
|
|
81
80
|
class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
82
|
-
"pb-14": !
|
|
81
|
+
"pb-14": !s.isReadonly
|
|
83
82
|
}]),
|
|
84
83
|
onDragenter: e[6] || (e[6] = p(() => {
|
|
85
84
|
}, ["prevent"])),
|
|
86
85
|
onDragover: e[7] || (e[7] = p(() => {
|
|
87
86
|
}, ["prevent"]))
|
|
88
87
|
}, [
|
|
89
|
-
t(f) ? (a(),
|
|
88
|
+
t(f) ? (a(), l(t(pe), {
|
|
90
89
|
key: 0,
|
|
91
90
|
class: "gap-px custom-scroll",
|
|
92
91
|
noResults: !t(w).length
|
|
93
92
|
}, {
|
|
94
93
|
default: n(() => [
|
|
95
|
-
(a(!0), h(S, null, C(t(w), (o,
|
|
94
|
+
(a(!0), h(S, null, C(t(w), (o, d) => (a(), l(t(ce), {
|
|
96
95
|
id: `#search-input-${o.item.id}`,
|
|
97
96
|
key: o.refIndex,
|
|
98
97
|
ref_for: !0,
|
|
99
|
-
ref: (
|
|
100
|
-
active: t(
|
|
98
|
+
ref: (r) => t(H)[d] = r,
|
|
99
|
+
active: t(y) === d,
|
|
101
100
|
class: "px-2",
|
|
102
|
-
onClick: (
|
|
103
|
-
onFocus: (
|
|
101
|
+
onClick: (r) => t(U)(o),
|
|
102
|
+
onFocus: (r) => y.value = d
|
|
104
103
|
}, {
|
|
105
104
|
addon: n(() => [
|
|
106
|
-
|
|
105
|
+
u(ie, {
|
|
107
106
|
class: "font-bold",
|
|
108
107
|
method: o.item.httpVerb ?? "get"
|
|
109
108
|
}, null, 8, ["method"])
|
|
@@ -116,29 +115,29 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
116
115
|
]),
|
|
117
116
|
_: 1
|
|
118
117
|
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, C(t(F), (o) => {
|
|
119
|
-
var
|
|
120
|
-
return a(),
|
|
118
|
+
var d;
|
|
119
|
+
return a(), l(be, {
|
|
121
120
|
key: o.uid,
|
|
122
|
-
isDraggable: !
|
|
121
|
+
isDraggable: !s.isReadonly && ((d = o.info) == null ? void 0 : d.title) !== "Drafts",
|
|
123
122
|
isDroppable: t(z),
|
|
124
|
-
menuItem:
|
|
123
|
+
menuItem: m,
|
|
125
124
|
parentUids: [],
|
|
126
125
|
uid: o.uid,
|
|
127
|
-
onNewTab: e[4] || (e[4] = (
|
|
126
|
+
onNewTab: e[4] || (e[4] = (r, G) => R("newTab", { name: r, uid: G })),
|
|
128
127
|
onOnDragEnd: t(T),
|
|
129
|
-
onOpenMenu: e[5] || (e[5] = (
|
|
128
|
+
onOpenMenu: e[5] || (e[5] = (r) => Object.assign(m, r))
|
|
130
129
|
}, {
|
|
131
130
|
leftIcon: n(() => {
|
|
132
|
-
var
|
|
131
|
+
var r;
|
|
133
132
|
return [
|
|
134
|
-
((
|
|
133
|
+
((r = o.info) == null ? void 0 : r.title) === "Drafts" ? (a(), l(t(q), {
|
|
135
134
|
key: 0,
|
|
136
135
|
class: "text-sidebar-c-2 group-hover:hidden",
|
|
137
136
|
icon: "Scribble",
|
|
138
|
-
thickness: "2.
|
|
139
|
-
})) : (a(),
|
|
137
|
+
thickness: "2.25"
|
|
138
|
+
})) : (a(), l(t(fe), {
|
|
140
139
|
key: 1,
|
|
141
|
-
class: "text-sidebar-c-2 size-3.5 stroke-[2.
|
|
140
|
+
class: "text-sidebar-c-2 size-3.5 stroke-[2.25] group-hover:hidden",
|
|
142
141
|
src: o["x-scalar-icon"] || "interface-content-folder"
|
|
143
142
|
}, null, 8, ["src"])),
|
|
144
143
|
i("div", {
|
|
@@ -146,10 +145,11 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
146
145
|
"rotate-90": t(A)[o.uid]
|
|
147
146
|
})
|
|
148
147
|
}, [
|
|
149
|
-
|
|
148
|
+
u(t(q), {
|
|
150
149
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
151
150
|
icon: "ChevronRight",
|
|
152
|
-
size: "sm"
|
|
151
|
+
size: "sm",
|
|
152
|
+
thickness: "2.5"
|
|
153
153
|
})
|
|
154
154
|
], 2)
|
|
155
155
|
];
|
|
@@ -165,13 +165,13 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
165
165
|
"empty-sidebar-item": t(O).length <= 1
|
|
166
166
|
})
|
|
167
167
|
}, [
|
|
168
|
-
i("div",
|
|
169
|
-
i("div",
|
|
170
|
-
|
|
171
|
-
art: t(
|
|
168
|
+
i("div", ke, [
|
|
169
|
+
i("div", we, [
|
|
170
|
+
u(V, {
|
|
171
|
+
art: t(re),
|
|
172
172
|
class: "font-bold rabbitsit"
|
|
173
173
|
}, null, 8, ["art"]),
|
|
174
|
-
|
|
174
|
+
u(V, {
|
|
175
175
|
art: t(ae),
|
|
176
176
|
class: "font-bold absolute top-0 left-0 rabbitjump"
|
|
177
177
|
}, null, 8, ["art"])
|
|
@@ -181,7 +181,7 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
181
181
|
i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
|
|
182
182
|
], -1))
|
|
183
183
|
]),
|
|
184
|
-
|
|
184
|
+
s.isReadonly ? $("", !0) : (a(), l(le, {
|
|
185
185
|
key: 0,
|
|
186
186
|
click: t(c).commandPalette.emit
|
|
187
187
|
}, {
|
|
@@ -194,24 +194,22 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
194
194
|
]),
|
|
195
195
|
_: 2
|
|
196
196
|
}, [
|
|
197
|
-
|
|
197
|
+
s.isReadonly ? void 0 : {
|
|
198
198
|
name: "header",
|
|
199
|
-
fn: n(() => [
|
|
200
|
-
l(t(Se), { class: "min-h-11 xl:min-h-header xl:py-2.5 py-1 px-2.5 border-b-1/2" })
|
|
201
|
-
]),
|
|
199
|
+
fn: n(() => []),
|
|
202
200
|
key: "0"
|
|
203
201
|
}
|
|
204
202
|
]), 1032, ["class", "showSidebar"]), [
|
|
205
|
-
[
|
|
203
|
+
[se, s.showSidebar]
|
|
206
204
|
]),
|
|
207
|
-
!t(N) &&
|
|
205
|
+
!t(N) && m ? (a(), l(de, {
|
|
208
206
|
key: 0,
|
|
209
|
-
menuItem:
|
|
210
|
-
onCloseMenu: e[9] || (e[9] = (o) =>
|
|
207
|
+
menuItem: m,
|
|
208
|
+
onCloseMenu: e[9] || (e[9] = (o) => m.open = !1)
|
|
211
209
|
}, null, 8, ["menuItem"])) : $("", !0)
|
|
212
210
|
], 64));
|
|
213
211
|
}
|
|
214
212
|
});
|
|
215
213
|
export {
|
|
216
|
-
|
|
214
|
+
Ke as default
|
|
217
215
|
};
|
|
@@ -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 a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-d0057f49"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|