@scalar/api-client 2.0.44 → 2.0.46
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 +23 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +77 -69
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +24 -25
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +23 -23
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +6 -6
- 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 +1 -1
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +5 -23
- package/dist/components/ContextBar.vue2.js +25 -2
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +1 -1
- package/dist/components/Form/Form.vue.d.ts +12 -3
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +24 -24
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +5 -64
- package/dist/components/HttpMethod/HttpMethod.vue2.js +61 -2
- package/dist/components/Search/SearchModal.vue2.js +22 -22
- package/dist/components/SideNav/SideHelp.vue.js +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/SidebarButton.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +21 -21
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +19 -18
- package/dist/components/Sidebar/SidebarToggle.vue.js +1 -1
- package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.js +3 -3
- package/dist/components/SubpageHeader.vue2.js +8 -8
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/errors.d.ts +5 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +7 -0
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +46 -43
- package/dist/layouts/App/create-api-client-app.d.ts +158 -81
- 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/ApiClientModal.vue2.js +24 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts +316 -162
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +159 -83
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +18 -19
- package/dist/libs/event-busses/command-palette.d.ts.map +1 -0
- package/dist/libs/{eventBusses/executeRequestBus.d.ts → event-busses/execute-requestBus.d.ts} +1 -1
- package/dist/libs/event-busses/execute-requestBus.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-key.d.ts +34 -0
- package/dist/libs/event-busses/hot-key.d.ts.map +1 -0
- package/dist/libs/event-busses/hot-key.js +25 -0
- package/dist/libs/event-busses/index.d.ts +5 -0
- package/dist/libs/event-busses/index.d.ts.map +1 -0
- package/dist/libs/event-busses/index.js +12 -0
- package/dist/libs/event-busses/request-status-bus.d.ts +5 -0
- package/dist/libs/event-busses/request-status-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/request-status-bus.js +5 -0
- package/dist/libs/index.d.ts +1 -1
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +18 -10
- package/dist/libs/sendRequest.d.ts +2 -0
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +46 -37
- package/dist/store/workspace.d.ts +316 -162
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +34 -17
- package/dist/views/Cookies/Cookies.vue2.js +9 -9
- package/dist/views/Environment/Environment.vue2.js +24 -24
- 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 +170 -166
- package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth.vue2.js +115 -126
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +63 -42
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +69 -51
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +32 -32
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +19 -19
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +18 -18
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +10 -10
- package/package.json +9 -9
- package/dist/libs/eventBusses/command-palette.d.ts.map +0 -1
- package/dist/libs/eventBusses/executeRequestBus.d.ts.map +0 -1
- package/dist/libs/eventBusses/index.d.ts +0 -2
- package/dist/libs/eventBusses/index.d.ts.map +0 -1
- package/dist/libs/eventBusses/index.js +0 -4
- /package/dist/libs/{eventBusses → event-busses}/command-palette.d.ts +0 -0
- /package/dist/libs/{eventBusses → event-busses}/command-palette.js +0 -0
- /package/dist/libs/{eventBusses/executeRequestBus.js → event-busses/execute-requestBus.js} +0 -0
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useWorkspace as
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as k, computed as h, ref as R, watch as B, openBlock as y, createBlock as b, withCtx as _, createVNode as l, unref as o, createElementVNode as m, createTextVNode as C, createElementBlock as E, createCommentVNode as N, withDirectives as a, vShow as s } from "vue";
|
|
2
|
+
import g from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import w from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import { useWorkspace as H } from "../../../store/workspace.js";
|
|
5
|
+
import O from "./RequestAuth.vue.js";
|
|
6
6
|
import P from "./RequestBody.vue.js";
|
|
7
|
-
import
|
|
7
|
+
import d from "./RequestParams.vue.js";
|
|
8
8
|
import T from "./RequestPathParams.vue.js";
|
|
9
|
-
import { ScalarIcon as
|
|
10
|
-
const
|
|
9
|
+
import { ScalarIcon as V } from "@scalar/components";
|
|
10
|
+
const K = { class: "flex-1 flex items-center 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
|
+
}, Q = ["disabled", "value"], D = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, X = /* @__PURE__ */ k({
|
|
11
15
|
__name: "RequestSection",
|
|
12
|
-
setup(
|
|
16
|
+
setup(I) {
|
|
13
17
|
const {
|
|
14
|
-
activeRequest:
|
|
15
|
-
activeSecuritySchemes:
|
|
16
|
-
activeExample:
|
|
17
|
-
activeSecurityRequirements:
|
|
18
|
-
isReadOnly:
|
|
19
|
-
|
|
18
|
+
activeRequest: i,
|
|
19
|
+
activeSecuritySchemes: x,
|
|
20
|
+
activeExample: v,
|
|
21
|
+
activeSecurityRequirements: p,
|
|
22
|
+
isReadOnly: r,
|
|
23
|
+
requestMutators: A
|
|
24
|
+
} = H(), c = ["POST", "PUT", "PATCH", "DELETE"], S = h(() => {
|
|
20
25
|
const t = [
|
|
21
26
|
"All",
|
|
22
27
|
"Auth",
|
|
@@ -26,79 +31,92 @@ const w = { class: "flex-1" }, K = { class: "text-c-3 pl-1" }, N = { class: "req
|
|
|
26
31
|
"Query",
|
|
27
32
|
"Body"
|
|
28
33
|
];
|
|
29
|
-
return
|
|
30
|
-
}),
|
|
31
|
-
() =>
|
|
32
|
-
), e =
|
|
33
|
-
|
|
34
|
-
e.value === "Body" && !
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
return v.value.parameters.path.length || t.splice(t.indexOf("Request"), 1), c.includes(i.value.method) || t.splice(t.indexOf("Body"), 1), f.value && t.splice(t.indexOf("Auth"), 1), t;
|
|
35
|
+
}), f = h(
|
|
36
|
+
() => r.value && (p.value.length === 0 || JSON.stringify(p.value) === "[{}]")
|
|
37
|
+
), e = R("All");
|
|
38
|
+
B(i, (t) => {
|
|
39
|
+
e.value === "Body" && !c.includes(t.method) && (e.value = "All");
|
|
40
|
+
});
|
|
41
|
+
const q = (t) => {
|
|
42
|
+
const n = t.target;
|
|
43
|
+
A.edit(i.value.uid, "summary", n.value);
|
|
44
|
+
};
|
|
45
|
+
return (t, n) => (y(), b(w, null, {
|
|
46
|
+
title: _(() => {
|
|
47
|
+
var u;
|
|
38
48
|
return [
|
|
39
|
-
l(o(
|
|
40
|
-
class: "text-c-3 mr-2",
|
|
49
|
+
l(o(V), {
|
|
50
|
+
class: "text-c-3 mr-2 pointer-events-none",
|
|
41
51
|
icon: "ExternalLink",
|
|
42
52
|
size: "sm",
|
|
43
53
|
thickness: "2.5"
|
|
44
54
|
}),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
m("div", K, [
|
|
56
|
+
C(" Request "),
|
|
57
|
+
o(r) ? N("", !0) : (y(), E("label", $)),
|
|
58
|
+
m("input", {
|
|
59
|
+
id: "requestname",
|
|
60
|
+
class: "pl-1 outline-none border-0 text-c-2 rounded pointer-events-auto relative w-full",
|
|
61
|
+
disabled: o(r),
|
|
62
|
+
placeholder: "Request Name",
|
|
63
|
+
value: (u = o(i)) == null ? void 0 : u.summary,
|
|
64
|
+
onInput: q
|
|
65
|
+
}, null, 40, Q)
|
|
48
66
|
])
|
|
49
67
|
];
|
|
50
68
|
}),
|
|
51
|
-
default:
|
|
52
|
-
|
|
53
|
-
l(
|
|
69
|
+
default: _(() => [
|
|
70
|
+
m("div", D, [
|
|
71
|
+
l(g, {
|
|
54
72
|
activeSection: e.value,
|
|
55
|
-
sections:
|
|
56
|
-
onSetActiveSection:
|
|
73
|
+
sections: S.value,
|
|
74
|
+
onSetActiveSection: n[0] || (n[0] = (u) => e.value = u)
|
|
57
75
|
}, null, 8, ["activeSection", "sections"]),
|
|
58
|
-
|
|
76
|
+
a(l(O, {
|
|
59
77
|
index: 0,
|
|
60
|
-
securityScheme: o(
|
|
78
|
+
securityScheme: o(x)[0],
|
|
61
79
|
title: "Authentication"
|
|
62
80
|
}, null, 8, ["securityScheme"]), [
|
|
63
81
|
[
|
|
64
|
-
|
|
65
|
-
!
|
|
82
|
+
s,
|
|
83
|
+
!f.value && (e.value === "All" || e.value === "Auth")
|
|
66
84
|
]
|
|
67
85
|
]),
|
|
68
|
-
|
|
86
|
+
a(l(T, {
|
|
69
87
|
paramKey: "path",
|
|
70
88
|
title: "Path Variables"
|
|
71
89
|
}, null, 512), [
|
|
72
90
|
[
|
|
73
|
-
|
|
74
|
-
(e.value === "All" || e.value === "Request") && o(
|
|
91
|
+
s,
|
|
92
|
+
(e.value === "All" || e.value === "Request") && o(v).parameters.path.length > 0
|
|
75
93
|
]
|
|
76
94
|
]),
|
|
77
|
-
|
|
95
|
+
a(l(d, {
|
|
78
96
|
paramKey: "cookies",
|
|
79
97
|
title: "Cookies"
|
|
80
98
|
}, null, 512), [
|
|
81
|
-
[
|
|
99
|
+
[s, e.value === "All" || e.value === "Cookies"]
|
|
82
100
|
]),
|
|
83
|
-
|
|
101
|
+
a(l(d, {
|
|
84
102
|
paramKey: "headers",
|
|
85
103
|
title: "Headers"
|
|
86
104
|
}, null, 512), [
|
|
87
|
-
[
|
|
105
|
+
[s, e.value === "All" || e.value === "Headers"]
|
|
88
106
|
]),
|
|
89
|
-
|
|
107
|
+
a(l(d, {
|
|
90
108
|
paramKey: "query",
|
|
91
109
|
title: "Query Parameters"
|
|
92
110
|
}, null, 512), [
|
|
93
|
-
[
|
|
111
|
+
[s, e.value === "All" || e.value === "Query"]
|
|
94
112
|
]),
|
|
95
|
-
|
|
113
|
+
a(l(P, {
|
|
96
114
|
body: "foo",
|
|
97
115
|
title: "Body"
|
|
98
116
|
}, null, 512), [
|
|
99
117
|
[
|
|
100
|
-
|
|
101
|
-
(e.value === "All" || e.value === "Body") &&
|
|
118
|
+
s,
|
|
119
|
+
(e.value === "All" || e.value === "Body") && c.includes(o(i).method)
|
|
102
120
|
]
|
|
103
121
|
])
|
|
104
122
|
])
|
|
@@ -108,5 +126,5 @@ const w = { class: "flex-1" }, K = { class: "text-c-3 pl-1" }, N = { class: "req
|
|
|
108
126
|
}
|
|
109
127
|
});
|
|
110
128
|
export {
|
|
111
|
-
|
|
129
|
+
X as default
|
|
112
130
|
};
|
|
@@ -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 a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-149f8145"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as H, useCssVars as G, computed as a, ref as J, resolveComponent as K, openBlock as o, createElementBlock as m, normalizeClass as d, unref as i, createVNode as U, withCtx as C, createBlock as c, createElementVNode as s, toDisplayString as I, createCommentVNode as b, createTextVNode as E, renderSlot as Q, withDirectives as X, Fragment as Y, renderList as Z, vShow as ee, pushScopeId as te, popScopeId as ie } from "vue";
|
|
2
2
|
import { PathId as re } from "../../router.js";
|
|
3
3
|
import { useWorkspace as se } from "../../store/workspace.js";
|
|
4
|
-
import { ScalarIcon as
|
|
5
|
-
import { Draggable as
|
|
4
|
+
import { ScalarIcon as le } from "@scalar/components";
|
|
5
|
+
import { Draggable as ae } from "@scalar/draggable";
|
|
6
6
|
import { RouterLink as ne } from "vue-router";
|
|
7
7
|
import z from "./RequestSidebarItemMenu.vue.js";
|
|
8
8
|
import oe from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
9
9
|
import { useSidebar as de } from "../../hooks/useSidebar.js";
|
|
10
|
-
const ue = (u) => (te("data-v-
|
|
10
|
+
const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex flex-row gap-1 items-center" }, fe = { class: "relative" }, me = { class: "flex" }, ce = { class: "z-10 flex h-fit items-center justify-center max-w-[14px]" }, be = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, ge = { class: "relative flex h-fit" }, ve = /* @__PURE__ */ ue(() => /* @__PURE__ */ s("span", null, " ", -1)), he = { key: 2 }, O = "hover:bg-sidebar-active-b indent-padding-left", $e = /* @__PURE__ */ H({
|
|
11
11
|
__name: "RequestSidebarItem",
|
|
12
12
|
props: {
|
|
13
13
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -17,43 +17,43 @@ const ue = (u) => (te("data-v-0285aba2"), u = u(), ie(), u), pe = { class: "flex
|
|
|
17
17
|
},
|
|
18
18
|
emits: ["onDragEnd"],
|
|
19
19
|
setup(u) {
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
20
|
+
G((e) => ({
|
|
21
|
+
"75f1595a": N.value,
|
|
22
|
+
d92033b8: _.value
|
|
23
23
|
}));
|
|
24
24
|
const t = u, {
|
|
25
25
|
activeRequest: w,
|
|
26
|
-
activeRouterParams:
|
|
26
|
+
activeRouterParams: B,
|
|
27
27
|
activeWorkspace: g,
|
|
28
28
|
collections: D,
|
|
29
|
-
folders:
|
|
30
|
-
isReadOnly:
|
|
29
|
+
folders: V,
|
|
30
|
+
isReadOnly: l,
|
|
31
31
|
requests: k,
|
|
32
32
|
requestExamples: v
|
|
33
|
-
} = se(), { collapsedSidebarFolders: y, toggleSidebarFolder:
|
|
33
|
+
} = se(), { collapsedSidebarFolders: y, toggleSidebarFolder: j } = de(), F = a(() => "childUids" in t.item), q = a(() => "spec" in t.item), x = a(() => "summary" in t.item), N = a(() => t.parentUids.length ? l.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), _ = a(() => t.parentUids.length ? l.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), R = (e) => {
|
|
34
34
|
var r;
|
|
35
35
|
return "spec" in e ? (r = e.spec.info) == null ? void 0 : r.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
|
|
36
|
-
}, L =
|
|
36
|
+
}, L = a(() => ("requestUid" in t.item ? k[t.item.requestUid] : t.item).method), M = a(
|
|
37
37
|
() => {
|
|
38
38
|
var e;
|
|
39
39
|
return y[t.item.uid] || ((e = w.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
|
|
40
40
|
}
|
|
41
|
-
),
|
|
42
|
-
() =>
|
|
43
|
-
), h = J(null), S =
|
|
41
|
+
), P = () => "requestUid" in t.item ? `/workspace/${g.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${g.value.uid}/request/${t.item.uid}`, T = a(
|
|
42
|
+
() => B.value[re.Request] === "default" && w.value.uid === t.item.uid
|
|
43
|
+
), h = J(null), S = a(() => {
|
|
44
44
|
let e = 0.5, r = 0.5;
|
|
45
45
|
if (!h.value) return { ceiling: e, floor: r };
|
|
46
46
|
const { draggingItem: p } = h.value;
|
|
47
|
-
return !D[p == null ? void 0 : p.id] && q.value ? (e = 1, r = 0) :
|
|
48
|
-
}),
|
|
47
|
+
return !D[p == null ? void 0 : p.id] && q.value ? (e = 1, r = 0) : F.value && !x.value && !q.value && (e = 0.8, r = 0.2), { ceiling: e, floor: r };
|
|
48
|
+
}), W = (e, r) => !(g.value.isReadOnly || v[r.id] || D[e.id]);
|
|
49
49
|
return (e, r) => {
|
|
50
50
|
const p = K("RequestSidebarItem", !0);
|
|
51
51
|
return o(), m("div", {
|
|
52
52
|
class: d(["relative flex flex-row", [
|
|
53
|
-
i(
|
|
53
|
+
i(l) && e.parentUids.length > 1 || !i(l) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
54
54
|
]])
|
|
55
55
|
}, [
|
|
56
|
-
U(i(
|
|
56
|
+
U(i(ae), {
|
|
57
57
|
id: e.item.uid,
|
|
58
58
|
ref_key: "draggableRef",
|
|
59
59
|
ref: h,
|
|
@@ -71,24 +71,24 @@ const ue = (u) => (te("data-v-0285aba2"), u = u(), ie(), u), pe = { class: "flex
|
|
|
71
71
|
"summary" in e.item || "requestUid" in e.item ? (o(), c(i(ne), {
|
|
72
72
|
key: 0,
|
|
73
73
|
class: "no-underline",
|
|
74
|
-
to:
|
|
74
|
+
to: P()
|
|
75
75
|
}, {
|
|
76
76
|
default: C(({ isExactActive: n }) => [
|
|
77
77
|
s("div", {
|
|
78
78
|
class: d(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 rounded editable-sidebar-hover", [
|
|
79
79
|
O,
|
|
80
|
-
n ||
|
|
80
|
+
n || T.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
81
81
|
]]),
|
|
82
82
|
tabindex: "0"
|
|
83
83
|
}, [
|
|
84
84
|
s("span", {
|
|
85
85
|
class: d(["z-10 font-medium w-full pl-2 word-break-break-word", {
|
|
86
|
-
"editable-sidebar-hover-item": !i(
|
|
86
|
+
"editable-sidebar-hover-item": !i(l)
|
|
87
87
|
}])
|
|
88
88
|
}, I(R(e.item)), 3),
|
|
89
89
|
s("div", pe, [
|
|
90
90
|
s("div", fe, [
|
|
91
|
-
i(
|
|
91
|
+
i(l) ? b("", !0) : (o(), c(z, {
|
|
92
92
|
key: 0,
|
|
93
93
|
item: e.item,
|
|
94
94
|
parentUids: e.parentUids
|
|
@@ -105,11 +105,11 @@ const ue = (u) => (te("data-v-0285aba2"), u = u(), ie(), u), pe = { class: "flex
|
|
|
105
105
|
], 2)
|
|
106
106
|
]),
|
|
107
107
|
_: 1
|
|
108
|
-
}, 8, ["to"])) : !i(
|
|
108
|
+
}, 8, ["to"])) : !i(l) || e.parentUids.length ? (o(), m("button", {
|
|
109
109
|
key: 1,
|
|
110
110
|
class: d(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", O]),
|
|
111
111
|
type: "button",
|
|
112
|
-
onClick: r[0] || (r[0] = (n) => i(
|
|
112
|
+
onClick: r[0] || (r[0] = (n) => i(j)(e.item.uid))
|
|
113
113
|
}, [
|
|
114
114
|
s("span", ce, [
|
|
115
115
|
Q(e.$slots, "leftIcon", {}, () => [
|
|
@@ -118,7 +118,7 @@ const ue = (u) => (te("data-v-0285aba2"), u = u(), ie(), u), pe = { class: "flex
|
|
|
118
118
|
"rotate-90": i(y)[e.item.uid]
|
|
119
119
|
})
|
|
120
120
|
}, [
|
|
121
|
-
U(i(
|
|
121
|
+
U(i(le), {
|
|
122
122
|
class: "text-c-3 text-sm",
|
|
123
123
|
icon: "ChevronRight",
|
|
124
124
|
size: "sm",
|
|
@@ -131,11 +131,11 @@ const ue = (u) => (te("data-v-0285aba2"), u = u(), ie(), u), pe = { class: "flex
|
|
|
131
131
|
s("div", be, [
|
|
132
132
|
s("span", {
|
|
133
133
|
class: d(["z-10 font-medium text-left w-full word-break-break-word", {
|
|
134
|
-
"editable-sidebar-hover-item": !i(
|
|
134
|
+
"editable-sidebar-hover-item": !i(l)
|
|
135
135
|
}])
|
|
136
136
|
}, I(R(e.item)), 3),
|
|
137
137
|
s("div", ge, [
|
|
138
|
-
!i(
|
|
138
|
+
!i(l) && (($ = (f = e.item.spec) == null ? void 0 : f.info) == null ? void 0 : $.title) !== "Drafts" ? (o(), c(z, {
|
|
139
139
|
key: 0,
|
|
140
140
|
item: e.item,
|
|
141
141
|
parentUids: e.parentUids
|
|
@@ -148,13 +148,13 @@ const ue = (u) => (te("data-v-0285aba2"), u = u(), ie(), u), pe = { class: "flex
|
|
|
148
148
|
(o(!0), m(Y, null, Z(x.value ? e.item.childUids.slice(1) : e.item.childUids, (n) => (o(), c(p, {
|
|
149
149
|
key: n,
|
|
150
150
|
isDraggable: !i(v)[n],
|
|
151
|
-
isDroppable:
|
|
152
|
-
item: i(
|
|
151
|
+
isDroppable: W,
|
|
152
|
+
item: i(V)[n] || i(k)[n] || i(v)[n],
|
|
153
153
|
parentUids: [...e.parentUids, e.item.uid],
|
|
154
|
-
onOnDragEnd: r[1] || (r[1] = (...
|
|
154
|
+
onOnDragEnd: r[1] || (r[1] = (...A) => e.$emit("onDragEnd", ...A))
|
|
155
155
|
}, null, 8, ["isDraggable", "item", "parentUids"]))), 128))
|
|
156
156
|
], 512)), [
|
|
157
|
-
[ee,
|
|
157
|
+
[ee, M.value]
|
|
158
158
|
]) : b("", !0)
|
|
159
159
|
];
|
|
160
160
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./RequestSidebarItemMenu.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const a = /* @__PURE__ */ t(e, [["__scopeId", "data-v-52248ee9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as V, computed as f, ref as B, openBlock as
|
|
1
|
+
import { defineComponent as V, computed as f, ref as B, openBlock as b, createElementBlock as A, Fragment as F, createVNode as i, unref as t, withCtx as l, createBlock as P, createCommentVNode as T, withKeys as K, withModifiers as W, createElementVNode as d, createTextVNode as E, pushScopeId as j, popScopeId as G } from "vue";
|
|
2
2
|
import H from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
-
import { commandPaletteBus as J } from "../../libs/eventBusses/command-palette.js";
|
|
4
3
|
import { PathId as R } from "../../router.js";
|
|
5
|
-
import { useWorkspace as
|
|
6
|
-
import { useModal as I, ScalarDropdown as
|
|
7
|
-
import { useRouter as
|
|
8
|
-
|
|
4
|
+
import { useWorkspace as J } from "../../store/workspace.js";
|
|
5
|
+
import { useModal as I, ScalarDropdown as L, ScalarDropdownItem as v, ScalarIcon as u, ScalarButton as h, ScalarModal as N, ScalarTextField as O } from "@scalar/components";
|
|
6
|
+
import { useRouter as Q } from "vue-router";
|
|
7
|
+
import { commandPaletteBus as X } from "../../libs/event-busses/command-palette.js";
|
|
8
|
+
const x = (o) => (j("data-v-52248ee9"), o = o(), G(), o), Y = /* @__PURE__ */ x(() => /* @__PURE__ */ d("span", null, "Add Example", -1)), Z = /* @__PURE__ */ x(() => /* @__PURE__ */ d("span", null, "Rename", -1)), ee = /* @__PURE__ */ x(() => /* @__PURE__ */ d("span", null, "Delete", -1)), te = { class: "flex gap-3" }, me = /* @__PURE__ */ V({
|
|
9
9
|
__name: "RequestSidebarItemMenu",
|
|
10
10
|
props: {
|
|
11
11
|
parentUids: {},
|
|
@@ -19,29 +19,29 @@ const x = (o) => (j("data-v-b4adf477"), o = o(), G(), o), Y = /* @__PURE__ */ x(
|
|
|
19
19
|
folderMutators: w,
|
|
20
20
|
requestMutators: y,
|
|
21
21
|
requestExampleMutators: C
|
|
22
|
-
} =
|
|
22
|
+
} = J(), { replace: q } = Q(), U = () => X.emit({
|
|
23
23
|
commandName: "Add Example",
|
|
24
24
|
metaData: e.item.uid
|
|
25
25
|
}), D = () => {
|
|
26
|
-
"requestUid" in e.item ? (C.delete(e.item), g.value[R.Examples] === e.item.uid &&
|
|
26
|
+
"requestUid" in e.item ? (C.delete(e.item), g.value[R.Examples] === e.item.uid && q(`/workspace/${k.value}/request/default`)) : "summary" in e.item ? (y.delete(
|
|
27
27
|
e.item,
|
|
28
28
|
e.parentUids[e.parentUids.length - 1]
|
|
29
|
-
), g.value[R.Request] === e.item.uid &&
|
|
29
|
+
), g.value[R.Request] === e.item.uid && q(`/workspace/${k.value.uid}/request/default`)) : "spec" in e.item ? _.delete(e.item) : "name" in e.item && w.delete(
|
|
30
30
|
e.item,
|
|
31
31
|
e.parentUids[e.parentUids.length - 1]
|
|
32
32
|
);
|
|
33
|
-
}, $ = f(() => "summary" in e.item),
|
|
33
|
+
}, $ = f(() => "summary" in e.item), M = f(() => {
|
|
34
34
|
var p;
|
|
35
35
|
return "summary" in e.item ? e.item.summary || "" : "name" in e.item ? e.item.name || "" : "spec" in e.item && ((p = e.item.spec.info) == null ? void 0 : p.title) || "";
|
|
36
|
-
}), s = B(""),
|
|
36
|
+
}), s = B(""), S = () => {
|
|
37
37
|
"summary" in e.item ? y.edit(e.item.uid, "summary", s.value) : "requestUid" in e.item ? C.edit(e.item.uid, "name", s.value) : "spec" in e.item ? _.edit(e.item.uid, "spec.info.title", s.value) : w.edit(e.item.uid, "name", s.value), m.hide();
|
|
38
38
|
}, m = I(), c = I(), z = () => {
|
|
39
|
-
s.value =
|
|
39
|
+
s.value = M.value, m.show();
|
|
40
40
|
}, r = f(() => "requestUid" in e.item ? "Example" : "summary" in e.item ? "Request" : "spec" in e.item ? "Collection" : "Folder");
|
|
41
|
-
return (p, a) => (
|
|
42
|
-
i(t(
|
|
41
|
+
return (p, a) => (b(), A(F, null, [
|
|
42
|
+
i(t(L), { teleport: "#scalar-client" }, {
|
|
43
43
|
items: l(() => [
|
|
44
|
-
$.value ? (
|
|
44
|
+
$.value ? (b(), P(t(v), {
|
|
45
45
|
key: 0,
|
|
46
46
|
class: "flex !gap-2",
|
|
47
47
|
onClick: U
|
|
@@ -115,7 +115,7 @@ const x = (o) => (j("data-v-b4adf477"), o = o(), G(), o), Y = /* @__PURE__ */ x(
|
|
|
115
115
|
}, {
|
|
116
116
|
default: l(() => [
|
|
117
117
|
i(H, {
|
|
118
|
-
variableName:
|
|
118
|
+
variableName: M.value,
|
|
119
119
|
warningMessage: "Warning: Deleting this will delete all items inside of this",
|
|
120
120
|
onClose: a[2] || (a[2] = (n) => t(c).hide()),
|
|
121
121
|
onDelete: D
|
|
@@ -128,12 +128,12 @@ const x = (o) => (j("data-v-b4adf477"), o = o(), G(), o), Y = /* @__PURE__ */ x(
|
|
|
128
128
|
title: `Rename ${r.value}`
|
|
129
129
|
}, {
|
|
130
130
|
default: l(() => [
|
|
131
|
-
i(t(
|
|
131
|
+
i(t(O), {
|
|
132
132
|
modelValue: s.value,
|
|
133
133
|
"onUpdate:modelValue": a[3] || (a[3] = (n) => s.value = n),
|
|
134
134
|
label: r.value,
|
|
135
135
|
labelShadowColor: "var(--scalar-background-1)",
|
|
136
|
-
onKeydown: K(W(
|
|
136
|
+
onKeydown: K(W(S, ["prevent"]), ["enter"])
|
|
137
137
|
}, null, 8, ["modelValue", "label", "onKeydown"]),
|
|
138
138
|
d("div", te, [
|
|
139
139
|
i(t(h), {
|
|
@@ -149,7 +149,7 @@ const x = (o) => (j("data-v-b4adf477"), o = o(), G(), o), Y = /* @__PURE__ */ x(
|
|
|
149
149
|
i(t(h), {
|
|
150
150
|
class: "flex-1",
|
|
151
151
|
type: "submit",
|
|
152
|
-
onClick:
|
|
152
|
+
onClick: S
|
|
153
153
|
}, {
|
|
154
154
|
default: l(() => [
|
|
155
155
|
E(" Save ")
|
|
@@ -3,7 +3,7 @@ import h from "../../../assets/computer.ascii.js";
|
|
|
3
3
|
import x from "../../../components/ScalarAsciiArt.vue.js";
|
|
4
4
|
import i from "../../../components/ScalarHotkey.vue.js";
|
|
5
5
|
import { useWorkspace as k } from "../../../store/workspace.js";
|
|
6
|
-
import { executeRequestBus as v } from "../../../libs/
|
|
6
|
+
import { executeRequestBus as v } from "../../../libs/event-busses/execute-requestBus.js";
|
|
7
7
|
const p = (t) => (_("data-v-84b69d7e"), t = t(), f(), t), y = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, b = { class: "flex h-[calc(100%_-_50px)] flex-col items-center justify-center" }, R = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "scalar-version-number"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as _, computed as m, ref as h, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as _, computed as m, ref as h, openBlock as r, createBlock as n, withCtx as p, createVNode as u, unref as x, createElementVNode as d, createTextVNode as y, createCommentVNode as l, createElementBlock as C, Fragment as A } from "vue";
|
|
2
|
+
import B from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import S from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
4
|
import $ from "./ResponseBody.vue.js";
|
|
5
5
|
import E from "./ResponseEmpty.vue.js";
|
|
6
6
|
import N from "./ResponseMetaInformation.vue.js";
|
|
@@ -14,8 +14,8 @@ const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll fle
|
|
|
14
14
|
},
|
|
15
15
|
setup(f) {
|
|
16
16
|
const c = f, i = m(() => {
|
|
17
|
-
var
|
|
18
|
-
const e = (
|
|
17
|
+
var s;
|
|
18
|
+
const e = (s = c.response) == null ? void 0 : s.headers;
|
|
19
19
|
return e ? Object.keys(e).map((o) => ({
|
|
20
20
|
name: o,
|
|
21
21
|
value: e[o],
|
|
@@ -27,15 +27,15 @@ const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll fle
|
|
|
27
27
|
].includes(o.name)
|
|
28
28
|
) : [];
|
|
29
29
|
}), v = m(() => {
|
|
30
|
-
var
|
|
31
|
-
const e = (o = (
|
|
30
|
+
var s, o;
|
|
31
|
+
const e = (o = (s = c.response) == null ? void 0 : s.headers) == null ? void 0 : o.cookies;
|
|
32
32
|
return e ? Object.keys(e).map((a) => ({
|
|
33
33
|
name: a,
|
|
34
34
|
value: e[a],
|
|
35
35
|
required: !1
|
|
36
36
|
})) : [];
|
|
37
|
-
}), k = ["All", "Body", "Headers", "Cookies"],
|
|
38
|
-
return (e,
|
|
37
|
+
}), k = ["All", "Body", "Headers", "Cookies"], t = h("All");
|
|
38
|
+
return (e, s) => (r(), n(S, null, {
|
|
39
39
|
title: p(() => [
|
|
40
40
|
u(x(V), {
|
|
41
41
|
class: "text-c-3 mr-2 rotate-180",
|
|
@@ -45,7 +45,7 @@ const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll fle
|
|
|
45
45
|
}),
|
|
46
46
|
d("div", R, [
|
|
47
47
|
y(" Response "),
|
|
48
|
-
e.response ? (
|
|
48
|
+
e.response ? (r(), n(N, {
|
|
49
49
|
key: 0,
|
|
50
50
|
response: e.response
|
|
51
51
|
}, null, 8, ["response"])) : l("", !0)
|
|
@@ -55,28 +55,28 @@ const R = { class: "flex items-center flex-1" }, b = { class: "custom-scroll fle
|
|
|
55
55
|
var o;
|
|
56
56
|
return [
|
|
57
57
|
d("div", b, [
|
|
58
|
-
e.response ? (
|
|
59
|
-
u(
|
|
60
|
-
activeSection:
|
|
58
|
+
e.response ? (r(), C(A, { key: 1 }, [
|
|
59
|
+
u(B, {
|
|
60
|
+
activeSection: t.value,
|
|
61
61
|
sections: k,
|
|
62
|
-
onSetActiveSection:
|
|
62
|
+
onSetActiveSection: s[0] || (s[0] = (a) => t.value = a)
|
|
63
63
|
}, null, 8, ["activeSection"]),
|
|
64
|
-
|
|
64
|
+
t.value === "All" || t.value === "Cookies" ? (r(), n(g, {
|
|
65
65
|
key: 0,
|
|
66
66
|
cookies: v.value
|
|
67
67
|
}, null, 8, ["cookies"])) : l("", !0),
|
|
68
|
-
|
|
68
|
+
t.value === "All" || t.value === "Headers" ? (r(), n(H, {
|
|
69
69
|
key: 1,
|
|
70
70
|
headers: i.value
|
|
71
71
|
}, null, 8, ["headers"])) : l("", !0),
|
|
72
|
-
|
|
72
|
+
t.value === "All" || t.value === "Body" ? (r(), n($, {
|
|
73
73
|
key: 2,
|
|
74
74
|
active: !0,
|
|
75
75
|
data: (o = c.response) == null ? void 0 : o.data,
|
|
76
76
|
headers: i.value,
|
|
77
77
|
title: "Body"
|
|
78
78
|
}, null, 8, ["data", "headers"])) : l("", !0)
|
|
79
|
-
], 64)) : (
|
|
79
|
+
], 64)) : (r(), n(E, { key: 0 }))
|
|
80
80
|
])
|
|
81
81
|
];
|
|
82
82
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAoWA,wBAKG"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as k, openBlock as c, createElementBlock as i, createVNode as t, unref as e, withCtx as o, Fragment as w, renderList as v, createBlock as g, withModifiers as C, createElementVNode as r, normalizeClass as b, createTextVNode as m, toDisplayString as p } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const j = { class: "xl:min-h-header py-2.5 flex items-center border-b px-2.5 text-sm" }, z = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, V = { class: "flex items-center justify-center h-4 w-4" }, E = /* @__PURE__ */ r("span", null, "Create new workspace", -1), T = /* @__PURE__ */ k({
|
|
2
|
+
import { useWorkspace as y } from "../../../store/workspace.js";
|
|
3
|
+
import { ScalarDropdown as D, ScalarDropdownItem as d, ScalarIcon as l, ScalarDropdownDivider as S, ScalarButton as W } from "@scalar/components";
|
|
4
|
+
import { useRouter as B } from "vue-router";
|
|
5
|
+
import { commandPaletteBus as N } from "../../../libs/event-busses/command-palette.js";
|
|
6
|
+
const j = { class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-2.5 text-sm" }, z = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, V = { class: "flex items-center justify-center h-4 w-4" }, E = /* @__PURE__ */ r("span", null, "Create new workspace", -1), T = /* @__PURE__ */ k({
|
|
7
7
|
__name: "WorkspaceDropdown",
|
|
8
8
|
setup(I) {
|
|
9
|
-
const { activeWorkspace: s, workspaces: u } =
|
|
9
|
+
const { activeWorkspace: s, workspaces: u } = y(), { push: f } = B(), h = (a) => {
|
|
10
10
|
a !== s.value.uid && f(`/workspace/${a}`);
|
|
11
|
-
}, x = () =>
|
|
11
|
+
}, x = () => N.emit({ commandName: "Create Workspace" });
|
|
12
12
|
return (a, $) => (c(), i("div", j, [
|
|
13
|
-
t(e(
|
|
13
|
+
t(e(D), null, {
|
|
14
14
|
items: o(() => [
|
|
15
15
|
(c(!0), i(w, null, v(e(u), (_, n) => (c(), g(e(d), {
|
|
16
16
|
key: n,
|
|
@@ -34,7 +34,7 @@ const j = { class: "xl:min-h-header py-2.5 flex items-center border-b px-2.5 tex
|
|
|
34
34
|
]),
|
|
35
35
|
_: 2
|
|
36
36
|
}, 1032, ["onClick"]))), 128)),
|
|
37
|
-
t(e(
|
|
37
|
+
t(e(S)),
|
|
38
38
|
t(e(d), {
|
|
39
39
|
class: "flex items-center gap-1.5",
|
|
40
40
|
onClick: x
|
|
@@ -52,7 +52,7 @@ const j = { class: "xl:min-h-header py-2.5 flex items-center border-b px-2.5 tex
|
|
|
52
52
|
})
|
|
53
53
|
]),
|
|
54
54
|
default: o(() => [
|
|
55
|
-
t(e(
|
|
55
|
+
t(e(W), {
|
|
56
56
|
class: "font-normal h-full justify-start py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
|
|
57
57
|
fullWidth: "",
|
|
58
58
|
variant: "ghost"
|