@scalar/api-client 2.0.57 → 2.0.58
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 +18 -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 +61 -58
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +31 -25
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +51 -45
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +47 -41
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -40
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +67 -61
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +30 -30
- package/dist/components/TopNav/TopNav.vue.d.ts +20 -1
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +64 -49
- package/dist/layouts/App/ApiClientApp.vue.d.ts +11 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +53 -49
- package/dist/libs/event-busses/cancel-request-bus.d.ts +2 -0
- package/dist/libs/event-busses/cancel-request-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/cancel-request-bus.js +5 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts +3 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.js +1 -0
- package/dist/libs/event-busses/index.d.ts +2 -1
- package/dist/libs/event-busses/index.d.ts.map +1 -1
- package/dist/libs/event-busses/index.js +11 -8
- package/dist/libs/index.js +21 -18
- package/dist/libs/local-storage.js +1 -1
- package/dist/libs/sendRequest.d.ts +2 -2
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +22 -21
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +100 -103
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts +11 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +3 -3
- package/dist/views/Request/Request.vue2.js +184 -174
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -0
- 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 +139 -130
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts +3 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +39 -0
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -30
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +23 -21
- package/package.json +7 -7
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { PathId as
|
|
4
|
-
import { useWorkspace as
|
|
5
|
-
import { useModal as
|
|
6
|
-
import { Draggable as
|
|
7
|
-
import { useRouter as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useSidebar as
|
|
11
|
-
|
|
1
|
+
import { defineComponent as he, useCssVars as Ue, computed as o, ref as J, resolveComponent as we, openBlock as f, createElementBlock as I, Fragment as Q, createElementVNode as l, normalizeClass as b, unref as i, createVNode as d, withCtx as u, createBlock as g, withModifiers as X, toDisplayString as Y, createCommentVNode as y, createTextVNode as D, renderSlot as ye, withDirectives as De, renderList as ke, vShow as qe, withKeys as $e, pushScopeId as Re, popScopeId as Ce } from "vue";
|
|
2
|
+
import Se from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import { PathId as E } from "../../router.js";
|
|
4
|
+
import { useWorkspace as xe } from "../../store/workspace.js";
|
|
5
|
+
import { useModal as Z, ScalarContextMenu as _, ScalarIcon as Me, ScalarModal as ee, ScalarTextField as Te, ScalarButton as te } from "@scalar/components";
|
|
6
|
+
import { Draggable as Ie } from "@scalar/draggable";
|
|
7
|
+
import { useRouter as Ee, RouterLink as Ne } from "vue-router";
|
|
8
|
+
import R from "./RequestSidebarItemMenu.vue.js";
|
|
9
|
+
import ze from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
10
|
+
import { useSidebar as Ve } from "../../hooks/useSidebar.js";
|
|
11
|
+
import { getModifiers as Oe } from "../../libs/event-busses/hot-keys-bus.js";
|
|
12
|
+
const Be = (h) => (Re("data-v-12eca20d"), h = h(), Ce(), h), Fe = { class: "flex flex-row gap-1 items-center" }, je = { class: "relative" }, Pe = { class: "flex items-start" }, Ke = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Le = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, We = { class: "relative flex h-fit" }, Ae = /* @__PURE__ */ Be(() => /* @__PURE__ */ l("span", null, " ", -1)), He = { key: 2 }, Ge = { class: "flex gap-3" }, ie = "hover:bg-sidebar-active-b indent-padding-left", lt = /* @__PURE__ */ he({
|
|
12
13
|
__name: "RequestSidebarItem",
|
|
13
14
|
props: {
|
|
14
15
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -16,154 +17,161 @@ const Ee = (g) => (De("data-v-f405c234"), g = g(), ke(), g), ze = { class: "flex
|
|
|
16
17
|
parentUids: {},
|
|
17
18
|
item: {}
|
|
18
19
|
},
|
|
19
|
-
emits: ["onDragEnd"],
|
|
20
|
-
setup(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
emits: ["onDragEnd", "newTab"],
|
|
21
|
+
setup(h, { emit: se }) {
|
|
22
|
+
Ue((e) => ({
|
|
23
|
+
"4347e458": de.value,
|
|
24
|
+
a65fb12c: ue.value
|
|
24
25
|
}));
|
|
25
|
-
const t =
|
|
26
|
-
activeRequest:
|
|
27
|
-
activeRouterParams:
|
|
28
|
-
activeWorkspace:
|
|
29
|
-
collections:
|
|
30
|
-
folders:
|
|
26
|
+
const t = h, re = se, {
|
|
27
|
+
activeRequest: N,
|
|
28
|
+
activeRouterParams: C,
|
|
29
|
+
activeWorkspace: U,
|
|
30
|
+
collections: z,
|
|
31
|
+
folders: le,
|
|
31
32
|
isReadOnly: a,
|
|
32
|
-
requests:
|
|
33
|
-
requestExamples:
|
|
34
|
-
collectionMutators:
|
|
35
|
-
folderMutators:
|
|
36
|
-
requestMutators:
|
|
37
|
-
requestExampleMutators:
|
|
38
|
-
|
|
33
|
+
requests: V,
|
|
34
|
+
requestExamples: S,
|
|
35
|
+
collectionMutators: O,
|
|
36
|
+
folderMutators: B,
|
|
37
|
+
requestMutators: F,
|
|
38
|
+
requestExampleMutators: j,
|
|
39
|
+
router: ae
|
|
40
|
+
} = xe(), { replace: P } = Ee(), { collapsedSidebarFolders: K, toggleSidebarFolder: ne } = Ve(), oe = o(() => "childUids" in t.item), L = o(() => "spec" in t.item), W = o(() => "summary" in t.item), de = o(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), ue = o(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), k = (e) => {
|
|
39
41
|
var s;
|
|
40
42
|
return "spec" in e ? (s = e.spec.info) == null ? void 0 : s.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
|
|
41
|
-
},
|
|
43
|
+
}, me = o(() => ("requestUid" in t.item ? V[t.item.requestUid] : t.item).method), fe = o(
|
|
42
44
|
() => {
|
|
43
45
|
var e;
|
|
44
|
-
return
|
|
46
|
+
return K[t.item.uid] || ((e = N.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
|
|
45
47
|
}
|
|
46
|
-
),
|
|
47
|
-
() =>
|
|
48
|
-
),
|
|
48
|
+
), A = () => "requestUid" in t.item ? `/workspace/${U.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${U.value.uid}/request/${t.item.uid}`, pe = o(
|
|
49
|
+
() => C.value[E.Request] === "default" && N.value.uid === t.item.uid
|
|
50
|
+
), x = J(null), H = o(() => {
|
|
49
51
|
let e = 0.5, s = 0.5;
|
|
50
|
-
if (!
|
|
51
|
-
const { draggingItem:
|
|
52
|
-
return !
|
|
53
|
-
}),
|
|
54
|
-
"summary" in t.item ?
|
|
55
|
-
},
|
|
56
|
-
p.value =
|
|
57
|
-
},
|
|
58
|
-
"requestUid" in t.item ? (
|
|
52
|
+
if (!x.value) return { ceiling: e, floor: s };
|
|
53
|
+
const { draggingItem: v } = x.value;
|
|
54
|
+
return !z[v == null ? void 0 : v.id] && L.value ? (e = 1, s = 0) : oe.value && !W.value && !L.value && (e = 0.8, s = 0.2), { ceiling: e, floor: s };
|
|
55
|
+
}), ce = (e, s) => !(U.value.isReadOnly || S[s.id] || z[e.id]), p = J(""), q = Z(), w = Z(), G = () => {
|
|
56
|
+
"summary" in t.item ? F.edit(t.item.uid, "summary", p.value) : "requestUid" in t.item ? j.edit(t.item.uid, "name", p.value) : "spec" in t.item ? O.edit(t.item.uid, "spec.info.title", p.value) : B.edit(t.item.uid, "name", p.value), q.hide();
|
|
57
|
+
}, M = () => {
|
|
58
|
+
p.value = k(t.item) || "", q.show();
|
|
59
|
+
}, ve = () => {
|
|
60
|
+
"requestUid" in t.item ? (j.delete(t.item), C.value[E.Examples] === t.item.uid && P(`/workspace/${U.value}/request/default`)) : "summary" in t.item ? (F.delete(
|
|
59
61
|
t.item,
|
|
60
62
|
t.parentUids[t.parentUids.length - 1]
|
|
61
|
-
),
|
|
63
|
+
), C.value[E.Request] === t.item.uid && P(`/workspace/${U.value.uid}/request/default`)) : "spec" in t.item ? O.delete(t.item) : "name" in t.item && B.delete(
|
|
62
64
|
t.item,
|
|
63
65
|
t.parentUids[t.parentUids.length - 1]
|
|
64
66
|
);
|
|
65
|
-
},
|
|
67
|
+
}, be = o(() => {
|
|
66
68
|
var e;
|
|
67
69
|
return "summary" in t.item ? t.item.summary || "" : "name" in t.item ? t.item.name || "" : "spec" in t.item && ((e = t.item.spec.info) == null ? void 0 : e.title) || "";
|
|
68
|
-
}), c =
|
|
70
|
+
}), c = o(() => "requestUid" in t.item ? "Example" : "summary" in t.item ? "Request" : "spec" in t.item ? "Collection" : "Folder"), ge = (e, s) => {
|
|
71
|
+
e && (Oe(["default"]).some(($) => e[$]) ? re("newTab", k(s) || "", s.uid) : ae.push(A()));
|
|
72
|
+
};
|
|
69
73
|
return (e, s) => {
|
|
70
|
-
const
|
|
71
|
-
return
|
|
74
|
+
const v = we("RequestSidebarItem", !0);
|
|
75
|
+
return f(), I(Q, null, [
|
|
72
76
|
l("div", {
|
|
73
|
-
class:
|
|
77
|
+
class: b(["relative flex flex-row", [
|
|
74
78
|
i(a) && e.parentUids.length > 1 || !i(a) && 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" : ""
|
|
75
79
|
]])
|
|
76
80
|
}, [
|
|
77
|
-
|
|
81
|
+
d(i(Ie), {
|
|
78
82
|
id: e.item.uid,
|
|
79
83
|
ref_key: "draggableRef",
|
|
80
|
-
ref:
|
|
81
|
-
ceiling:
|
|
84
|
+
ref: x,
|
|
85
|
+
ceiling: H.value.ceiling,
|
|
82
86
|
class: "flex flex-1 flex-col gap-[.5px] text-sm",
|
|
83
|
-
floor:
|
|
87
|
+
floor: H.value.floor,
|
|
84
88
|
isDraggable: e.isDraggable,
|
|
85
89
|
isDroppable: e.isDroppable,
|
|
86
90
|
parentIds: e.parentUids,
|
|
87
|
-
onOnDragEnd: s[
|
|
91
|
+
onOnDragEnd: s[6] || (s[6] = (...m) => e.$emit("onDragEnd", ...m))
|
|
88
92
|
}, {
|
|
89
|
-
default:
|
|
90
|
-
var
|
|
93
|
+
default: u(() => {
|
|
94
|
+
var m, $;
|
|
91
95
|
return [
|
|
92
|
-
"summary" in e.item || "requestUid" in e.item ? (
|
|
96
|
+
"summary" in e.item || "requestUid" in e.item ? (f(), g(i(Ne), {
|
|
93
97
|
key: 0,
|
|
94
98
|
class: "no-underline",
|
|
95
|
-
to:
|
|
99
|
+
to: A(),
|
|
100
|
+
onClick: s[2] || (s[2] = X(
|
|
101
|
+
(r) => ge(r, e.item),
|
|
102
|
+
["prevent"]
|
|
103
|
+
))
|
|
96
104
|
}, {
|
|
97
|
-
default:
|
|
98
|
-
|
|
99
|
-
trigger:
|
|
105
|
+
default: u(({ isExactActive: r }) => [
|
|
106
|
+
d(i(_), { disabled: i(a) }, {
|
|
107
|
+
trigger: u(() => [
|
|
100
108
|
l("div", {
|
|
101
|
-
class:
|
|
102
|
-
|
|
103
|
-
r ||
|
|
109
|
+
class: b(["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", [
|
|
110
|
+
ie,
|
|
111
|
+
r || pe.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
104
112
|
]]),
|
|
105
113
|
tabindex: "0"
|
|
106
114
|
}, [
|
|
107
115
|
l("span", {
|
|
108
|
-
class:
|
|
116
|
+
class: b(["z-10 font-medium w-full pl-2 word-break-break-word", {
|
|
109
117
|
"editable-sidebar-hover-item": !i(a)
|
|
110
118
|
}])
|
|
111
|
-
},
|
|
112
|
-
l("div",
|
|
113
|
-
l("div",
|
|
114
|
-
i(a) ? y("", !0) : (
|
|
119
|
+
}, Y(k(e.item)), 3),
|
|
120
|
+
l("div", Fe, [
|
|
121
|
+
l("div", je, [
|
|
122
|
+
i(a) ? y("", !0) : (f(), g(R, {
|
|
115
123
|
key: 0,
|
|
116
124
|
item: e.item,
|
|
117
125
|
parentUids: e.parentUids,
|
|
118
126
|
resourceTitle: c.value,
|
|
119
|
-
onDelete: s[0] || (s[0] = (
|
|
120
|
-
onRename:
|
|
127
|
+
onDelete: s[0] || (s[0] = (n) => i(w).show()),
|
|
128
|
+
onRename: M
|
|
121
129
|
}, null, 8, ["item", "parentUids", "resourceTitle"]))
|
|
122
130
|
]),
|
|
123
|
-
l("span",
|
|
131
|
+
l("span", Pe, [
|
|
124
132
|
D(" "),
|
|
125
|
-
|
|
133
|
+
d(i(ze), {
|
|
126
134
|
class: "font-bold",
|
|
127
|
-
method:
|
|
135
|
+
method: me.value
|
|
128
136
|
}, null, 8, ["method"])
|
|
129
137
|
])
|
|
130
138
|
])
|
|
131
139
|
], 2)
|
|
132
140
|
]),
|
|
133
|
-
content:
|
|
134
|
-
|
|
141
|
+
content: u(() => [
|
|
142
|
+
d(R, {
|
|
135
143
|
item: e.item,
|
|
136
144
|
parentUids: e.parentUids,
|
|
137
145
|
resourceTitle: c.value,
|
|
138
146
|
static: "",
|
|
139
|
-
onDelete: s[1] || (s[1] = (
|
|
140
|
-
onRename:
|
|
147
|
+
onDelete: s[1] || (s[1] = (n) => i(w).show()),
|
|
148
|
+
onRename: M
|
|
141
149
|
}, null, 8, ["item", "parentUids", "resourceTitle"])
|
|
142
150
|
]),
|
|
143
151
|
_: 2
|
|
144
152
|
}, 1032, ["disabled"])
|
|
145
153
|
]),
|
|
146
154
|
_: 1
|
|
147
|
-
}, 8, ["to"])) : !i(a) || e.parentUids.length ? (
|
|
155
|
+
}, 8, ["to"])) : !i(a) || e.parentUids.length ? (f(), g(i(_), {
|
|
148
156
|
key: 1,
|
|
149
|
-
disabled: i(a) || ((
|
|
157
|
+
disabled: i(a) || (($ = (m = e.item.spec) == null ? void 0 : m.info) == null ? void 0 : $.title) === "Drafts"
|
|
150
158
|
}, {
|
|
151
|
-
trigger:
|
|
152
|
-
var r,
|
|
159
|
+
trigger: u(() => {
|
|
160
|
+
var r, n;
|
|
153
161
|
return [
|
|
154
162
|
l("button", {
|
|
155
|
-
class:
|
|
163
|
+
class: b(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", ie]),
|
|
156
164
|
type: "button",
|
|
157
|
-
onClick: s[
|
|
165
|
+
onClick: s[3] || (s[3] = (T) => i(ne)(e.item.uid))
|
|
158
166
|
}, [
|
|
159
|
-
l("span",
|
|
160
|
-
|
|
167
|
+
l("span", Ke, [
|
|
168
|
+
ye(e.$slots, "leftIcon", {}, () => [
|
|
161
169
|
l("div", {
|
|
162
|
-
class:
|
|
163
|
-
"rotate-90": i(
|
|
170
|
+
class: b({
|
|
171
|
+
"rotate-90": i(K)[e.item.uid]
|
|
164
172
|
})
|
|
165
173
|
}, [
|
|
166
|
-
|
|
174
|
+
d(i(Me), {
|
|
167
175
|
class: "text-c-3 text-sm",
|
|
168
176
|
icon: "ChevronRight",
|
|
169
177
|
size: "sm",
|
|
@@ -173,104 +181,105 @@ const Ee = (g) => (De("data-v-f405c234"), g = g(), ke(), g), ze = { class: "flex
|
|
|
173
181
|
], !0),
|
|
174
182
|
D(" ")
|
|
175
183
|
]),
|
|
176
|
-
l("div",
|
|
184
|
+
l("div", Le, [
|
|
177
185
|
l("span", {
|
|
178
|
-
class:
|
|
186
|
+
class: b(["z-10 font-medium text-left w-full word-break-break-word", {
|
|
179
187
|
"editable-sidebar-hover-item": !i(a)
|
|
180
188
|
}])
|
|
181
|
-
},
|
|
182
|
-
l("div",
|
|
183
|
-
!i(a) && ((
|
|
189
|
+
}, Y(k(e.item)), 3),
|
|
190
|
+
l("div", We, [
|
|
191
|
+
!i(a) && ((n = (r = e.item.spec) == null ? void 0 : r.info) == null ? void 0 : n.title) !== "Drafts" ? (f(), g(R, {
|
|
184
192
|
key: 0,
|
|
185
193
|
item: e.item,
|
|
186
194
|
parentUids: e.parentUids,
|
|
187
195
|
resourceTitle: c.value
|
|
188
196
|
}, null, 8, ["item", "parentUids", "resourceTitle"])) : y("", !0),
|
|
189
|
-
|
|
197
|
+
Ae
|
|
190
198
|
])
|
|
191
199
|
])
|
|
192
200
|
])
|
|
193
201
|
];
|
|
194
202
|
}),
|
|
195
|
-
content:
|
|
196
|
-
var r,
|
|
203
|
+
content: u(() => {
|
|
204
|
+
var r, n;
|
|
197
205
|
return [
|
|
198
|
-
!i(a) && ((
|
|
206
|
+
!i(a) && ((n = (r = e.item.spec) == null ? void 0 : r.info) == null ? void 0 : n.title) !== "Drafts" ? (f(), g(R, {
|
|
199
207
|
key: 0,
|
|
200
208
|
item: e.item,
|
|
201
209
|
parentUids: e.parentUids,
|
|
202
210
|
resourceTitle: c.value,
|
|
203
211
|
static: "",
|
|
204
|
-
onDelete: s[
|
|
205
|
-
onRename:
|
|
212
|
+
onDelete: s[4] || (s[4] = (T) => i(w).show()),
|
|
213
|
+
onRename: M
|
|
206
214
|
}, null, 8, ["item", "parentUids", "resourceTitle"])) : y("", !0)
|
|
207
215
|
];
|
|
208
216
|
}),
|
|
209
|
-
default:
|
|
217
|
+
default: u(() => [
|
|
210
218
|
D(" > ")
|
|
211
219
|
]),
|
|
212
220
|
_: 3
|
|
213
221
|
}, 8, ["disabled"])) : y("", !0),
|
|
214
|
-
"childUids" in e.item ?
|
|
215
|
-
(
|
|
222
|
+
"childUids" in e.item ? De((f(), I("div", He, [
|
|
223
|
+
(f(!0), I(Q, null, ke(W.value ? e.item.childUids.slice(1) : e.item.childUids, (r) => (f(), g(v, {
|
|
216
224
|
key: r,
|
|
217
|
-
isDraggable: !i(
|
|
218
|
-
isDroppable:
|
|
219
|
-
item: i(
|
|
225
|
+
isDraggable: !i(S)[r],
|
|
226
|
+
isDroppable: ce,
|
|
227
|
+
item: i(le)[r] || i(V)[r] || i(S)[r],
|
|
220
228
|
parentUids: [...e.parentUids, e.item.uid],
|
|
221
|
-
|
|
222
|
-
|
|
229
|
+
onNewTab: (n, T) => e.$emit("newTab", n, T),
|
|
230
|
+
onOnDragEnd: s[5] || (s[5] = (...n) => e.$emit("onDragEnd", ...n))
|
|
231
|
+
}, null, 8, ["isDraggable", "item", "parentUids", "onNewTab"]))), 128))
|
|
223
232
|
], 512)), [
|
|
224
|
-
[
|
|
233
|
+
[qe, fe.value]
|
|
225
234
|
]) : y("", !0)
|
|
226
235
|
];
|
|
227
236
|
}),
|
|
228
237
|
_: 3
|
|
229
238
|
}, 8, ["id", "ceiling", "floor", "isDraggable", "isDroppable", "parentIds"])
|
|
230
239
|
], 2),
|
|
231
|
-
|
|
240
|
+
d(i(ee), {
|
|
232
241
|
size: "sm",
|
|
233
|
-
state: i(
|
|
242
|
+
state: i(w),
|
|
234
243
|
title: `Delete ${c.value}`
|
|
235
244
|
}, {
|
|
236
|
-
default:
|
|
237
|
-
|
|
238
|
-
variableName:
|
|
245
|
+
default: u(() => [
|
|
246
|
+
d(Se, {
|
|
247
|
+
variableName: be.value,
|
|
239
248
|
warningMessage: "Warning: Deleting this will delete all items inside of this",
|
|
240
|
-
onClose: s[
|
|
241
|
-
onDelete:
|
|
249
|
+
onClose: s[7] || (s[7] = (m) => i(w).hide()),
|
|
250
|
+
onDelete: ve
|
|
242
251
|
}, null, 8, ["variableName"])
|
|
243
252
|
]),
|
|
244
253
|
_: 1
|
|
245
254
|
}, 8, ["state", "title"]),
|
|
246
|
-
|
|
247
|
-
state: i(
|
|
255
|
+
d(i(ee), {
|
|
256
|
+
state: i(q),
|
|
248
257
|
title: `Rename ${c.value}`
|
|
249
258
|
}, {
|
|
250
|
-
default:
|
|
251
|
-
|
|
259
|
+
default: u(() => [
|
|
260
|
+
d(i(Te), {
|
|
252
261
|
modelValue: p.value,
|
|
253
|
-
"onUpdate:modelValue": s[
|
|
262
|
+
"onUpdate:modelValue": s[8] || (s[8] = (m) => p.value = m),
|
|
254
263
|
label: c.value,
|
|
255
|
-
onKeydown:
|
|
264
|
+
onKeydown: $e(X(G, ["prevent"]), ["enter"])
|
|
256
265
|
}, null, 8, ["modelValue", "label", "onKeydown"]),
|
|
257
|
-
l("div",
|
|
258
|
-
|
|
266
|
+
l("div", Ge, [
|
|
267
|
+
d(i(te), {
|
|
259
268
|
class: "flex-1",
|
|
260
269
|
variant: "outlined",
|
|
261
|
-
onClick: s[
|
|
270
|
+
onClick: s[9] || (s[9] = (m) => i(q).hide())
|
|
262
271
|
}, {
|
|
263
|
-
default:
|
|
272
|
+
default: u(() => [
|
|
264
273
|
D(" Cancel ")
|
|
265
274
|
]),
|
|
266
275
|
_: 1
|
|
267
276
|
}),
|
|
268
|
-
|
|
277
|
+
d(i(te), {
|
|
269
278
|
class: "flex-1",
|
|
270
279
|
type: "submit",
|
|
271
|
-
onClick:
|
|
280
|
+
onClick: G
|
|
272
281
|
}, {
|
|
273
|
-
default:
|
|
282
|
+
default: u(() => [
|
|
274
283
|
D(" Save ")
|
|
275
284
|
]),
|
|
276
285
|
_: 1
|
|
@@ -284,5 +293,5 @@ const Ee = (g) => (De("data-v-f405c234"), g = g(), ke(), g), ze = { class: "flex
|
|
|
284
293
|
}
|
|
285
294
|
});
|
|
286
295
|
export {
|
|
287
|
-
|
|
296
|
+
lt as default
|
|
288
297
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=ResponseLoadingOverlay.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseLoadingOverlay.vue"],"names":[],"mappings":";AA2LA,wBAKG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as l, ref as c, openBlock as s, createBlock as u, Transition as d, withCtx as i, unref as e, createElementBlock as m, createVNode as r, createTextVNode as f, createCommentVNode as p } from "vue";
|
|
2
|
+
import { useLoadingState as g, ScalarLoading as _, ScalarButton as v } from "@scalar/components";
|
|
3
|
+
import { cancelRequestBus as x } from "../../../libs/event-busses/cancel-request-bus.js";
|
|
4
|
+
import { requestStatusBus as B } from "../../../libs/event-busses/request-status-bus.js";
|
|
5
|
+
const L = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "absolute inset-0 bg-b-1 z-10 flex flex-col gap-6 items-center justify-center"
|
|
8
|
+
}, N = /* @__PURE__ */ l({
|
|
9
|
+
__name: "ResponseLoadingOverlay",
|
|
10
|
+
setup(S) {
|
|
11
|
+
const t = g(), o = c();
|
|
12
|
+
return B.on((a) => {
|
|
13
|
+
a === "start" ? o.value = setTimeout(() => t.startLoading(), 1e3) : (clearTimeout(o.value), o.value = void 0, t.stopLoading());
|
|
14
|
+
}), (a, n) => (s(), u(d, null, {
|
|
15
|
+
default: i(() => [
|
|
16
|
+
e(t).isLoading ? (s(), m("div", L, [
|
|
17
|
+
r(e(_), {
|
|
18
|
+
class: "text-c-3",
|
|
19
|
+
loadingState: e(t),
|
|
20
|
+
size: "3xl"
|
|
21
|
+
}, null, 8, ["loadingState"]),
|
|
22
|
+
r(e(v), {
|
|
23
|
+
variant: "ghost",
|
|
24
|
+
onClick: n[0] || (n[0] = (k) => e(x).emit())
|
|
25
|
+
}, {
|
|
26
|
+
default: i(() => [
|
|
27
|
+
f(" Cancel ")
|
|
28
|
+
]),
|
|
29
|
+
_: 1
|
|
30
|
+
})
|
|
31
|
+
])) : p("", !0)
|
|
32
|
+
]),
|
|
33
|
+
_: 1
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
N as default
|
|
39
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseMetaInformation.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseMetaInformation.vue"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cAQ/C,gBAAgB;;cAAhB,gBAAgB;;AA+HlD,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"}
|
|
@@ -1,43 +1,50 @@
|
|
|
1
|
-
import { defineComponent as c, computed as
|
|
2
|
-
import
|
|
3
|
-
import { httpStatusCodes as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as y, ref as c, computed as k, openBlock as t, createElementBlock as s, toDisplayString as o, unref as m, Fragment as d, createElementVNode as g, createCommentVNode as v, createBlock as C, withCtx as B, createTextVNode as I } from "vue";
|
|
2
|
+
import S from "../../../components/HelpfulLink.vue.js";
|
|
3
|
+
import { httpStatusCodes as L } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import N from "pretty-bytes";
|
|
5
|
+
import f from "pretty-ms";
|
|
6
|
+
import { requestStatusBus as V } from "../../../libs/event-busses/request-status-bus.js";
|
|
7
|
+
const w = { class: "flex gap-1.5 text-c-3 pl-1" }, E = { key: 0 }, M = { key: 0 }, q = { key: 1 }, b = /* @__PURE__ */ y({
|
|
7
8
|
__name: "ResponseMetaInformation",
|
|
8
9
|
props: {
|
|
9
10
|
response: {}
|
|
10
11
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
setup(h) {
|
|
13
|
+
const _ = h, r = c(), a = c(0);
|
|
14
|
+
V.on((e) => {
|
|
15
|
+
e === "start" ? r.value = setInterval(() => a.value += 1e3, 1e3) : (clearInterval(r.value), r.value = void 0, a.value = 0);
|
|
16
|
+
});
|
|
17
|
+
const l = (e) => {
|
|
18
|
+
var p, i;
|
|
19
|
+
const u = parseInt(
|
|
20
|
+
((p = e.headers) == null ? void 0 : p["Content-Length"]) || ((i = e.headers) == null ? void 0 : i["content-length"]) || "0",
|
|
16
21
|
10
|
|
17
22
|
);
|
|
18
|
-
return
|
|
19
|
-
},
|
|
20
|
-
const e =
|
|
23
|
+
return u ? N(u) : void 0;
|
|
24
|
+
}, n = k(() => {
|
|
25
|
+
const e = _.response.status;
|
|
21
26
|
if (e)
|
|
22
|
-
return
|
|
27
|
+
return L[e] ?? void 0;
|
|
23
28
|
});
|
|
24
|
-
return (e,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
return (e, u) => (t(), s("div", w, [
|
|
30
|
+
r.value && a.value ? (t(), s("span", E, o(m(f)(a.value)), 1)) : (t(), s(d, { key: 1 }, [
|
|
31
|
+
g("span", null, o(m(f)(e.response.duration)), 1),
|
|
32
|
+
l(e.response) ? (t(), s("span", M, o(l(e.response)), 1)) : v("", !0),
|
|
33
|
+
n.value ? (t(), s(d, { key: 1 }, [
|
|
34
|
+
n.value.url ? (t(), C(S, {
|
|
35
|
+
key: 0,
|
|
36
|
+
href: n.value.url
|
|
37
|
+
}, {
|
|
38
|
+
default: B(() => [
|
|
39
|
+
I(o(e.response.status) + " " + o(n.value.name), 1)
|
|
40
|
+
]),
|
|
41
|
+
_: 1
|
|
42
|
+
}, 8, ["href"])) : (t(), s("span", q, o(e.response.status) + " " + o(n.value.name), 1))
|
|
43
|
+
], 64)) : v("", !0)
|
|
44
|
+
], 64))
|
|
38
45
|
]));
|
|
39
46
|
}
|
|
40
47
|
});
|
|
41
48
|
export {
|
|
42
|
-
|
|
49
|
+
b as default
|
|
43
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA6GA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;;cASrE,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AA2NxC,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"}
|