@scalar/api-client 2.1.19 → 2.1.20
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 +12 -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 -79
- package/dist/components/AddressBar/AddressBarServer.vue.js +23 -23
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +62 -45
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +6 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +89 -91
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +29 -32
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +3 -3
- package/dist/components/TopNav/TopNav.vue2.js +41 -40
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +38 -38
- package/dist/layouts/App/create-api-client-app.d.ts +33 -26
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue2.js +15 -15
- package/dist/layouts/Modal/create-api-client-modal.d.ts +66 -52
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +30 -30
- package/dist/layouts/Web/create-api-client-web.d.ts +33 -26
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +33 -26
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-bus.d.ts +41 -0
- package/dist/libs/event-bus.d.ts.map +1 -0
- package/dist/libs/event-bus.js +32 -0
- package/dist/libs/{event-busses/hot-keys-bus.d.ts → hot-keys.d.ts} +6 -7
- package/dist/libs/hot-keys.d.ts.map +1 -0
- package/dist/libs/hot-keys.js +45 -0
- package/dist/libs/index.d.ts +3 -1
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +31 -33
- package/dist/libs/send-request.d.ts +4 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +103 -103
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/events.d.ts +29 -0
- package/dist/store/events.d.ts.map +1 -0
- package/dist/store/events.js +31 -0
- package/dist/store/request-example.d.ts +2 -2
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/security-schemes.d.ts +4 -4
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store.d.ts +66 -52
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +75 -73
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- 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 +63 -63
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +101 -102
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +76 -76
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +33 -34
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +16 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +31 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +5 -0
- 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 +30 -33
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +17 -18
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +68 -56
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +29 -30
- package/package.json +5 -5
- package/dist/libs/event-busses/cancel-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/cancel-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/cancel-request-bus.js +0 -5
- package/dist/libs/event-busses/command-palette-bus.d.ts +0 -14
- package/dist/libs/event-busses/command-palette-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/command-palette-bus.js +0 -5
- package/dist/libs/event-busses/execute-request-bus.d.ts +0 -2
- package/dist/libs/event-busses/execute-request-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/execute-request-bus.js +0 -5
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/hot-keys-bus.js +0 -47
- package/dist/libs/event-busses/index.d.ts +0 -6
- package/dist/libs/event-busses/index.d.ts.map +0 -1
- package/dist/libs/event-busses/index.js +0 -15
- package/dist/libs/event-busses/request-status-bus.d.ts +0 -5
- package/dist/libs/event-busses/request-status-bus.d.ts.map +0 -1
- package/dist/libs/event-busses/request-status-bus.js +0 -5
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { PathId as
|
|
1
|
+
import { defineComponent as ie, useCssVars as ne, computed as c, ref as le, resolveComponent as re, openBlock as p, createElementBlock as w, normalizeClass as m, unref as n, createVNode as h, withCtx as y, createBlock as b, withModifiers as R, createElementVNode as d, toDisplayString as z, createCommentVNode as g, createTextVNode as B, renderSlot as se, Fragment as ae, renderList as oe, pushScopeId as de, popScopeId as ue } from "vue";
|
|
2
|
+
import { PathId as pe } from "../../router.js";
|
|
3
3
|
import { ScalarButton as $, ScalarIcon as q } from "@scalar/components";
|
|
4
|
-
import { Draggable as
|
|
5
|
-
import { RouterLink as
|
|
6
|
-
import
|
|
7
|
-
import { useSidebar as
|
|
8
|
-
import { getModifiers as
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
|
|
11
|
-
const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relative" }, xe = { class: "flex items-start" }, ke = { class: "flex h-5 items-center justify-center max-w-[14px]" }, we = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, qe = { class: "relative flex h-fit" }, Ue = /* @__PURE__ */ V(() => /* @__PURE__ */ u("span", null, " ", -1)), De = { key: 2 }, Ce = /* @__PURE__ */ V(() => /* @__PURE__ */ u("span", null, "Add Request", -1)), P = "hover:bg-sidebar-active-b indent-padding-left", je = /* @__PURE__ */ te({
|
|
4
|
+
import { Draggable as fe } from "@scalar/draggable";
|
|
5
|
+
import { RouterLink as me } from "vue-router";
|
|
6
|
+
import ce from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
7
|
+
import { useSidebar as be } from "../../hooks/useSidebar.js";
|
|
8
|
+
import { getModifiers as ge } from "../../libs/hot-keys.js";
|
|
9
|
+
import { useWorkspace as ve } from "../../store/store.js";
|
|
10
|
+
const V = (v) => (de("data-v-9324d78b"), v = v(), ue(), v), he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relative" }, xe = { class: "flex items-start" }, ke = { class: "flex h-5 items-center justify-center max-w-[14px]" }, we = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, qe = { class: "relative flex h-fit" }, Ue = /* @__PURE__ */ V(() => /* @__PURE__ */ d("span", null, " ", -1)), De = { key: 2 }, Ce = /* @__PURE__ */ V(() => /* @__PURE__ */ d("span", null, "Add Request", -1)), P = "hover:bg-sidebar-active-b indent-padding-left", je = /* @__PURE__ */ ie({
|
|
12
11
|
__name: "RequestSidebarItem",
|
|
13
12
|
props: {
|
|
14
13
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -19,11 +18,11 @@ const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex
|
|
|
19
18
|
},
|
|
20
19
|
emits: ["onDragEnd", "newTab", "openMenu"],
|
|
21
20
|
setup(v, { emit: F }) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
21
|
+
ne((e) => ({
|
|
22
|
+
"46298a49": K.value,
|
|
23
|
+
"4e765ad5": Q.value
|
|
25
24
|
}));
|
|
26
|
-
const
|
|
25
|
+
const l = v, Y = F, {
|
|
27
26
|
activeRequest: T,
|
|
28
27
|
activeRouterParams: A,
|
|
29
28
|
activeWorkspace: x,
|
|
@@ -36,10 +35,11 @@ const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex
|
|
|
36
35
|
tagMutators: E,
|
|
37
36
|
requestMutators: S,
|
|
38
37
|
requestExampleMutators: N,
|
|
39
|
-
router: W
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
router: W,
|
|
39
|
+
events: H
|
|
40
|
+
} = ve(), { collapsedSidebarFolders: O, toggleSidebarFolder: G } = be(), i = c(() => {
|
|
41
|
+
var s, u;
|
|
42
|
+
const e = U[l.uid], t = L[l.uid], r = M[l.uid], a = D[l.uid];
|
|
43
43
|
return e ? {
|
|
44
44
|
title: ((s = e.info) == null ? void 0 : s.title) ?? "Unknown title",
|
|
45
45
|
entity: e,
|
|
@@ -58,21 +58,21 @@ const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex
|
|
|
58
58
|
children: t.children,
|
|
59
59
|
warning: "This cannot be undone. You’re about to delete the tag and all requests inside it",
|
|
60
60
|
edit: (o) => E.edit(t.uid, "name", o),
|
|
61
|
-
delete: () => E.delete(t,
|
|
62
|
-
} :
|
|
63
|
-
title:
|
|
64
|
-
link: `/workspace/${x.value.uid}/request/${
|
|
65
|
-
method:
|
|
66
|
-
entity:
|
|
61
|
+
delete: () => E.delete(t, l.parentUids[0])
|
|
62
|
+
} : r ? {
|
|
63
|
+
title: r.summary ?? [r.method, r.path].join(" - "),
|
|
64
|
+
link: `/workspace/${x.value.uid}/request/${r.uid}`,
|
|
65
|
+
method: r.method,
|
|
66
|
+
entity: r,
|
|
67
67
|
resourceTitle: "Request",
|
|
68
68
|
warning: "This cannot be undone. You’re about to delete the request.",
|
|
69
|
-
children:
|
|
70
|
-
edit: (o) => S.edit(
|
|
71
|
-
delete: () => S.delete(
|
|
69
|
+
children: r.examples,
|
|
70
|
+
edit: (o) => S.edit(r.uid, "summary", o),
|
|
71
|
+
delete: () => S.delete(r, l.parentUids[0])
|
|
72
72
|
} : {
|
|
73
73
|
title: a.name,
|
|
74
74
|
link: `/workspace/${x.value.uid}/request/${a.requestUid}/examples/${a.uid}`,
|
|
75
|
-
method: (
|
|
75
|
+
method: (u = M[a.requestUid]) == null ? void 0 : u.method,
|
|
76
76
|
entity: a,
|
|
77
77
|
resourceTitle: "Example",
|
|
78
78
|
warning: "This cannot be undone. You’re about to delete the example from the request.",
|
|
@@ -80,49 +80,49 @@ const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex
|
|
|
80
80
|
edit: (o) => N.edit(a.uid, "name", o),
|
|
81
81
|
delete: () => N.delete(a)
|
|
82
82
|
};
|
|
83
|
-
}),
|
|
83
|
+
}), J = c(
|
|
84
84
|
() => i.value.entity.type === "collection" && i.value.title === "Drafts"
|
|
85
|
-
),
|
|
85
|
+
), K = c(() => l.parentUids.length ? f.value ? `${(l.parentUids.length - 1) * 12}px` : `${l.parentUids.length * 12}px` : "12px"), Q = c(() => l.parentUids.length ? f.value ? `${(l.parentUids.length - 1) * 12}px` : `${l.parentUids.length * 12}px` : "0px"), X = c(
|
|
86
86
|
() => {
|
|
87
87
|
var e;
|
|
88
|
-
return O[
|
|
88
|
+
return O[l.uid] || ((e = T.value) == null ? void 0 : e.uid) === l.uid && i.value.entity.examples.length > 1;
|
|
89
89
|
}
|
|
90
|
-
),
|
|
90
|
+
), Z = c(
|
|
91
91
|
() => {
|
|
92
92
|
var e;
|
|
93
|
-
return A.value[
|
|
93
|
+
return A.value[pe.Request] === "default" && ((e = T.value) == null ? void 0 : e.uid) === l.uid;
|
|
94
94
|
}
|
|
95
|
-
), I =
|
|
95
|
+
), I = le(null), j = c(() => {
|
|
96
96
|
let e = 0.5, t = 0.5;
|
|
97
97
|
if (!I.value) return { ceiling: e, floor: t };
|
|
98
|
-
const { draggingItem:
|
|
99
|
-
return !U[
|
|
100
|
-
}),
|
|
101
|
-
e && (
|
|
98
|
+
const { draggingItem: r } = I.value;
|
|
99
|
+
return !U[r == null ? void 0 : r.id] && i.value.entity.type === "collection" ? (e = 1, t = 0) : i.value.entity.type === "tag" && (e = 0.8, t = 0.2), { ceiling: e, floor: t };
|
|
100
|
+
}), _ = (e, t) => !(x.value.isReadOnly || D[t.id] || U[e.id]), ee = (e, t) => {
|
|
101
|
+
e && (ge(["default"]).some((s) => e[s]) ? Y("newTab", t.title || "", t.entity.uid) : t.link && W.push(t.link));
|
|
102
102
|
};
|
|
103
|
-
function
|
|
104
|
-
|
|
103
|
+
function te() {
|
|
104
|
+
H.commandPalette.emit({
|
|
105
105
|
commandName: "Create Request",
|
|
106
106
|
metaData: {
|
|
107
|
-
itemUid:
|
|
108
|
-
parentUid:
|
|
107
|
+
itemUid: l.uid,
|
|
108
|
+
parentUid: l.parentUids[0]
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
return (e, t) => {
|
|
113
|
-
const
|
|
113
|
+
const r = re("RequestSidebarItem", !0);
|
|
114
114
|
return p(), w("div", {
|
|
115
115
|
class: m(["relative flex flex-row", [
|
|
116
116
|
n(f) && e.parentUids.length > 1 || !n(f) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
117
117
|
]])
|
|
118
118
|
}, [
|
|
119
|
-
h(n(
|
|
119
|
+
h(n(fe), {
|
|
120
120
|
id: i.value.entity.uid,
|
|
121
121
|
ref_key: "draggableRef",
|
|
122
122
|
ref: I,
|
|
123
|
-
ceiling:
|
|
123
|
+
ceiling: j.value.ceiling,
|
|
124
124
|
class: "flex flex-1 flex-col gap-[.5px] text-sm",
|
|
125
|
-
floor:
|
|
125
|
+
floor: j.value.floor,
|
|
126
126
|
isDraggable: e.isDraggable,
|
|
127
127
|
isDroppable: e.isDroppable,
|
|
128
128
|
parentIds: e.parentUids,
|
|
@@ -131,36 +131,36 @@ const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex
|
|
|
131
131
|
default: y(() => {
|
|
132
132
|
var a;
|
|
133
133
|
return [
|
|
134
|
-
i.value.link ? (p(), b(n(
|
|
134
|
+
i.value.link ? (p(), b(n(me), {
|
|
135
135
|
key: 0,
|
|
136
136
|
class: "no-underline",
|
|
137
137
|
to: i.value.link,
|
|
138
138
|
onClick: t[1] || (t[1] = R(
|
|
139
|
-
(s) =>
|
|
139
|
+
(s) => ee(s, i.value),
|
|
140
140
|
["prevent"]
|
|
141
141
|
))
|
|
142
142
|
}, {
|
|
143
143
|
default: y(({ isExactActive: s }) => {
|
|
144
|
-
var
|
|
144
|
+
var u, o;
|
|
145
145
|
return [
|
|
146
|
-
|
|
146
|
+
d("div", {
|
|
147
147
|
class: m(["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 w-full", [
|
|
148
148
|
P,
|
|
149
|
-
s ||
|
|
149
|
+
s || Z.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
150
150
|
]]),
|
|
151
151
|
tabindex: "0"
|
|
152
152
|
}, [
|
|
153
|
-
|
|
153
|
+
d("span", {
|
|
154
154
|
class: m(["line-clamp-3 font-medium w-full pl-2 word-break-break-word", {
|
|
155
155
|
"editable-sidebar-hover-item": !n(f)
|
|
156
156
|
}])
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
}, z(i.value.title), 3),
|
|
158
|
+
d("div", he, [
|
|
159
|
+
d("div", ye, [
|
|
160
160
|
n(f) ? g("", !0) : (p(), b(n($), {
|
|
161
161
|
key: 0,
|
|
162
162
|
class: m(["px-0.5 py-0 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
163
|
-
flex: ((o = (
|
|
163
|
+
flex: ((o = (u = e.menuItem) == null ? void 0 : u.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
164
164
|
}]),
|
|
165
165
|
size: "sm",
|
|
166
166
|
type: "button",
|
|
@@ -184,9 +184,9 @@ const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex
|
|
|
184
184
|
_: 1
|
|
185
185
|
}, 8, ["class"]))
|
|
186
186
|
]),
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
i.value.method ? (p(), b(n(
|
|
187
|
+
d("span", xe, [
|
|
188
|
+
B(" "),
|
|
189
|
+
i.value.method ? (p(), b(n(ce), {
|
|
190
190
|
key: 0,
|
|
191
191
|
class: "font-bold",
|
|
192
192
|
method: i.value.method
|
|
@@ -201,11 +201,11 @@ const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex
|
|
|
201
201
|
key: 1,
|
|
202
202
|
class: m(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5", P]),
|
|
203
203
|
type: "button",
|
|
204
|
-
onClick: t[3] || (t[3] = (s) => n(
|
|
204
|
+
onClick: t[3] || (t[3] = (s) => n(G)(i.value.entity.uid))
|
|
205
205
|
}, [
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
d("span", ke, [
|
|
207
|
+
se(e.$slots, "leftIcon", {}, () => [
|
|
208
|
+
d("div", {
|
|
209
209
|
class: m({
|
|
210
210
|
"rotate-90": n(O)[i.value.entity.uid]
|
|
211
211
|
})
|
|
@@ -218,16 +218,16 @@ const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex
|
|
|
218
218
|
})
|
|
219
219
|
], 2)
|
|
220
220
|
], !0),
|
|
221
|
-
|
|
221
|
+
B(" ")
|
|
222
222
|
]),
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
d("div", we, [
|
|
224
|
+
d("span", {
|
|
225
225
|
class: m(["line-clamp-3 font-medium text-left w-full word-break-break-word", {
|
|
226
226
|
"editable-sidebar-hover-item": !n(f)
|
|
227
227
|
}])
|
|
228
|
-
},
|
|
229
|
-
|
|
230
|
-
!n(f) && !
|
|
228
|
+
}, z(i.value.title), 3),
|
|
229
|
+
d("div", qe, [
|
|
230
|
+
!n(f) && !J.value ? (p(), b(n($), {
|
|
231
231
|
key: 0,
|
|
232
232
|
class: m(["px-0.5 py-0 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
233
233
|
flex: ((a = e.menuItem.item) == null ? void 0 : a.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
@@ -256,23 +256,23 @@ const V = (v) => (oe("data-v-a2f84453"), v = v(), ue(), v), he = { class: "flex
|
|
|
256
256
|
])
|
|
257
257
|
])
|
|
258
258
|
])) : g("", !0),
|
|
259
|
-
|
|
260
|
-
(p(!0), w(
|
|
259
|
+
X.value ? (p(), w("div", De, [
|
|
260
|
+
(p(!0), w(ae, null, oe(i.value.children, (s) => (p(), b(r, {
|
|
261
261
|
key: s,
|
|
262
262
|
isDraggable: !n(D)[s],
|
|
263
|
-
isDroppable:
|
|
263
|
+
isDroppable: _,
|
|
264
264
|
menuItem: e.menuItem,
|
|
265
265
|
parentUids: [...e.parentUids, e.uid],
|
|
266
266
|
uid: s,
|
|
267
|
-
onNewTab: t[4] || (t[4] = (
|
|
268
|
-
onOnDragEnd: t[5] || (t[5] = (...
|
|
269
|
-
onOpenMenu: t[6] || (t[6] = (
|
|
267
|
+
onNewTab: t[4] || (t[4] = (u, o) => e.$emit("newTab", u, o)),
|
|
268
|
+
onOnDragEnd: t[5] || (t[5] = (...u) => e.$emit("onDragEnd", ...u)),
|
|
269
|
+
onOpenMenu: t[6] || (t[6] = (u) => e.$emit("openMenu", u))
|
|
270
270
|
}, null, 8, ["isDraggable", "menuItem", "parentUids", "uid"]))), 128)),
|
|
271
271
|
i.value.children.length === 0 ? (p(), b(n($), {
|
|
272
272
|
key: 0,
|
|
273
273
|
class: m(["mb-[.5px] flex gap-1.5 h-8 text-c-1 py-0 justify-start text-xs w-full hover:bg-b-2", e.parentUids.length ? "pl-9" : ""]),
|
|
274
274
|
variant: "ghost",
|
|
275
|
-
onClick: t[7] || (t[7] = (s) =>
|
|
275
|
+
onClick: t[7] || (t[7] = (s) => te())
|
|
276
276
|
}, {
|
|
277
277
|
default: y(() => [
|
|
278
278
|
h(n(q), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AAmLA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;;cAa1B,eAAe;;;;cAAf,eAAe;;;;AA+bjD,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from "./RequestSidebarItemMenu.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const a = /* @__PURE__ */ e(t, [["__scopeId", "data-v-65353484"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { PathId as
|
|
6
|
-
import { useModal as
|
|
7
|
-
import { useRouter as
|
|
8
|
-
import { useWorkspace as
|
|
9
|
-
|
|
10
|
-
const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z(() => /* @__PURE__ */ y("span", null, "Add Example", -1)), te = /* @__PURE__ */ z(() => /* @__PURE__ */ y("span", null, "Delete", -1)), de = /* @__PURE__ */ P({
|
|
1
|
+
import { defineComponent as K, ref as U, watch as W, onMounted as F, onBeforeUnmount as j, openBlock as s, createElementBlock as k, Fragment as v, createBlock as f, unref as n, withKeys as G, withCtx as r, createVNode as l, createCommentVNode as S, createElementVNode as y, createTextVNode as N, pushScopeId as H, popScopeId as J } from "vue";
|
|
2
|
+
import O from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import Q from "../../components/Sidebar/Actions/EditSidebarListCollection.vue.js";
|
|
4
|
+
import X from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
5
|
+
import { PathId as q } from "../../router.js";
|
|
6
|
+
import { useModal as x, ScalarDropdown as Y, ScalarDropdownItem as w, ScalarIcon as $, ScalarModal as z } from "@scalar/components";
|
|
7
|
+
import { useRouter as Z } from "vue-router";
|
|
8
|
+
import { useWorkspace as _ } from "../../store/store.js";
|
|
9
|
+
const b = (u) => (H("data-v-65353484"), u = u(), J(), u), ee = /* @__PURE__ */ b(() => /* @__PURE__ */ y("span", null, "Add Example", -1)), te = /* @__PURE__ */ b(() => /* @__PURE__ */ y("span", null, "Delete", -1)), ue = /* @__PURE__ */ K({
|
|
11
10
|
__name: "RequestSidebarItemMenu",
|
|
12
11
|
props: {
|
|
13
12
|
menuItem: {}
|
|
14
13
|
},
|
|
15
14
|
emits: ["closeMenu"],
|
|
16
15
|
setup(u, { emit: B }) {
|
|
17
|
-
const a = u, T = B, { replace: E } =
|
|
16
|
+
const a = u, T = B, { replace: E } = Z(), { activeWorkspace: g, activeRouterParams: C, events: V } = _(), d = x(), c = x(), A = () => {
|
|
18
17
|
var e;
|
|
19
|
-
return
|
|
18
|
+
return V.commandPalette.emit({
|
|
20
19
|
commandName: "Add Example",
|
|
21
20
|
metaData: {
|
|
22
21
|
itemUid: (e = a.menuItem.item) == null ? void 0 : e.entity.uid
|
|
@@ -25,24 +24,24 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
|
|
|
25
24
|
}, M = (e, t) => {
|
|
26
25
|
var m;
|
|
27
26
|
(m = a.menuItem.item) == null || m.edit(e, t), d.hide();
|
|
28
|
-
},
|
|
27
|
+
}, L = () => {
|
|
29
28
|
var e, t, m;
|
|
30
|
-
(e = a.menuItem.item) == null || e.delete(), C.value[
|
|
31
|
-
},
|
|
32
|
-
|
|
29
|
+
(e = a.menuItem.item) == null || e.delete(), C.value[q.Request] === ((t = a.menuItem.item) == null ? void 0 : t.entity.uid) && E(`/workspace/${g.value.uid}/request/default`), C.value[q.Examples] === ((m = a.menuItem.item) == null ? void 0 : m.entity.uid) && E(`/workspace/${g.value}/request/default`), c.hide();
|
|
30
|
+
}, p = U(null);
|
|
31
|
+
W([() => a.menuItem.open, p], async ([e]) => {
|
|
33
32
|
var t, m;
|
|
34
|
-
e && ((m = (t =
|
|
33
|
+
e && ((m = (t = p.value) == null ? void 0 : t.$parent) != null && m.$el) && p.value.$parent.$el.focus();
|
|
35
34
|
});
|
|
36
35
|
const R = () => a.menuItem.open && T("closeMenu");
|
|
37
|
-
return
|
|
36
|
+
return F(() => window.addEventListener("click", R)), j(() => window.removeEventListener("click", R)), (e, t) => {
|
|
38
37
|
var m, h;
|
|
39
38
|
return s(), k(v, null, [
|
|
40
|
-
e.menuItem.targetRef && e.menuItem.open ? (s(), f(n(
|
|
39
|
+
e.menuItem.targetRef && e.menuItem.open ? (s(), f(n(Y), {
|
|
41
40
|
key: 0,
|
|
42
41
|
static: "",
|
|
43
42
|
targetRef: e.menuItem.targetRef,
|
|
44
43
|
teleport: "",
|
|
45
|
-
onKeydown: t[2] || (t[2] =
|
|
44
|
+
onKeydown: t[2] || (t[2] = G((o) => e.$emit("closeMenu"), ["escape"]))
|
|
46
45
|
}, {
|
|
47
46
|
items: r(() => {
|
|
48
47
|
var o;
|
|
@@ -50,7 +49,7 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
|
|
|
50
49
|
((o = e.menuItem.item) == null ? void 0 : o.entity.type) === "request" ? (s(), f(n(w), {
|
|
51
50
|
key: 0,
|
|
52
51
|
class: "flex gap-2",
|
|
53
|
-
onClick:
|
|
52
|
+
onClick: A
|
|
54
53
|
}, {
|
|
55
54
|
default: r(() => [
|
|
56
55
|
l(n($), {
|
|
@@ -65,7 +64,7 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
|
|
|
65
64
|
})) : S("", !0),
|
|
66
65
|
l(n(w), {
|
|
67
66
|
ref_key: "menuRef",
|
|
68
|
-
ref:
|
|
67
|
+
ref: p,
|
|
69
68
|
class: "flex gap-2",
|
|
70
69
|
onClick: t[0] || (t[0] = (i) => n(d).show())
|
|
71
70
|
}, {
|
|
@@ -91,7 +90,7 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
|
|
|
91
90
|
}, 512),
|
|
92
91
|
l(n(w), {
|
|
93
92
|
class: "flex gap-2",
|
|
94
|
-
onClick: t[1] || (t[1] = (i) => n(
|
|
93
|
+
onClick: t[1] || (t[1] = (i) => n(c).show())
|
|
95
94
|
}, {
|
|
96
95
|
default: r(() => [
|
|
97
96
|
l(n($), {
|
|
@@ -108,25 +107,25 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
|
|
|
108
107
|
}),
|
|
109
108
|
_: 1
|
|
110
109
|
}, 8, ["targetRef"])) : S("", !0),
|
|
111
|
-
l(n(
|
|
110
|
+
l(n(z), {
|
|
112
111
|
size: "xxs",
|
|
113
|
-
state: n(
|
|
112
|
+
state: n(c),
|
|
114
113
|
title: `Delete ${(m = e.menuItem.item) == null ? void 0 : m.resourceTitle}`
|
|
115
114
|
}, {
|
|
116
115
|
default: r(() => {
|
|
117
116
|
var o, i;
|
|
118
117
|
return [
|
|
119
|
-
l(
|
|
118
|
+
l(O, {
|
|
120
119
|
variableName: ((o = e.menuItem.item) == null ? void 0 : o.title) ?? "",
|
|
121
120
|
warningMessage: (i = e.menuItem.item) == null ? void 0 : i.warning,
|
|
122
|
-
onClose: t[3] || (t[3] = (I) => n(
|
|
123
|
-
onDelete:
|
|
121
|
+
onClose: t[3] || (t[3] = (I) => n(c).hide()),
|
|
122
|
+
onDelete: L
|
|
124
123
|
}, null, 8, ["variableName", "warningMessage"])
|
|
125
124
|
];
|
|
126
125
|
}),
|
|
127
126
|
_: 1
|
|
128
127
|
}, 8, ["state", "title"]),
|
|
129
|
-
l(n(
|
|
128
|
+
l(n(z), {
|
|
130
129
|
size: "xxs",
|
|
131
130
|
state: n(d),
|
|
132
131
|
title: `Edit ${(h = e.menuItem.item) == null ? void 0 : h.resourceTitle}`
|
|
@@ -134,16 +133,16 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
|
|
|
134
133
|
default: r(() => {
|
|
135
134
|
var o, i, I, D;
|
|
136
135
|
return [
|
|
137
|
-
((o = e.menuItem.item) == null ? void 0 : o.resourceTitle) === "Collection" ? (s(), f(
|
|
136
|
+
((o = e.menuItem.item) == null ? void 0 : o.resourceTitle) === "Collection" ? (s(), f(Q, {
|
|
138
137
|
key: 0,
|
|
139
138
|
icon: ((i = e.menuItem.item) == null ? void 0 : i.icon) || "interface-content-folder",
|
|
140
139
|
name: (I = e.menuItem.item) == null ? void 0 : I.title,
|
|
141
|
-
onClose: t[4] || (t[4] = (
|
|
140
|
+
onClose: t[4] || (t[4] = (P) => n(d).hide()),
|
|
142
141
|
onEdit: M
|
|
143
|
-
}, null, 8, ["icon", "name"])) : (s(), f(
|
|
142
|
+
}, null, 8, ["icon", "name"])) : (s(), f(X, {
|
|
144
143
|
key: 1,
|
|
145
144
|
name: ((D = e.menuItem.item) == null ? void 0 : D.title) ?? "",
|
|
146
|
-
onClose: t[5] || (t[5] = (
|
|
145
|
+
onClose: t[5] || (t[5] = (P) => n(d).hide()),
|
|
147
146
|
onEdit: M
|
|
148
147
|
}, null, 8, ["name"]))
|
|
149
148
|
];
|
|
@@ -155,5 +154,5 @@ const z = (u) => (G("data-v-eb0a2336"), u = u(), H(), u), ee = /* @__PURE__ */ z
|
|
|
155
154
|
}
|
|
156
155
|
});
|
|
157
156
|
export {
|
|
158
|
-
|
|
157
|
+
ue as default
|
|
159
158
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
2
|
+
content: string;
|
|
3
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
4
|
+
content: string;
|
|
5
|
+
}>>>, {}, {}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
+
type __VLS_TypePropsToOption<T> = {
|
|
9
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
+
} : {
|
|
12
|
+
type: import('vue').PropType<T[K]>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=ResponseBodyVirtual.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBodyVirtual.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBodyVirtual.vue"],"names":[],"mappings":";aAgDW,MAAM;;aAAN,MAAM;;AA8EjB,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent as n, computed as s, openBlock as a, createBlock as c, withCtx as e, createTextVNode as l, createVNode as i, unref as d, createElementVNode as p } from "vue";
|
|
2
|
+
import m from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
+
import { ScalarVirtualText as u } from "@scalar/components";
|
|
4
|
+
import { formatJsonOrYamlString as x } from "@scalar/oas-utils/helpers";
|
|
5
|
+
const f = /* @__PURE__ */ p("div", { class: "py-1.5 px-2.5 font-code text-xxs border-1/2 rounded-t border-b-0" }, " This response body is massive! Syntax highlighting won’t work here. ", -1), V = /* @__PURE__ */ n({
|
|
6
|
+
__name: "ResponseBodyVirtual",
|
|
7
|
+
props: {
|
|
8
|
+
content: {}
|
|
9
|
+
},
|
|
10
|
+
setup(t) {
|
|
11
|
+
const o = t, r = s(() => x(o.content));
|
|
12
|
+
return (_, h) => (a(), c(m, { class: "response-body-virtual" }, {
|
|
13
|
+
title: e(() => [
|
|
14
|
+
l("Body")
|
|
15
|
+
]),
|
|
16
|
+
default: e(() => [
|
|
17
|
+
f,
|
|
18
|
+
i(d(u), {
|
|
19
|
+
containerClass: "custom-scroll scalar-code-block border-1/2 rounded-b flex flex-1",
|
|
20
|
+
contentClass: "hljs language-plaintext",
|
|
21
|
+
lineHeight: 20,
|
|
22
|
+
text: r.value
|
|
23
|
+
}, null, 8, ["text"])
|
|
24
|
+
]),
|
|
25
|
+
_: 1
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
V as default
|
|
31
|
+
};
|
|
@@ -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":";AA+NA,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-cddb96c9"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|