@scalar/api-client 2.1.47 → 2.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/assets/keycap.ascii.js +25 -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 +6 -6
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/codeVariableWidget.js +12 -12
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +13 -13
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +1 -3
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +11 -11
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/requests.d.ts +40 -0
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +65 -55
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +24 -29
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +71 -71
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +23 -23
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +18 -18
- package/dist/views/Request/RequestSidebar.vue.d.ts +2 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +169 -133
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +181 -155
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +2 -0
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +155 -96
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +26 -21
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +5 -97
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +97 -2
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +74 -34
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +15 -15
- package/package.json +7 -7
|
@@ -1,183 +1,242 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { defineComponent as J, ref as O, watch as Q, onMounted as X, onBeforeUnmount as Y, computed as Z, openBlock as s, createElementBlock as h, Fragment as q, createBlock as d, unref as n, withKeys as _, withCtx as u, createVNode as m, createElementVNode as I, createCommentVNode as c, createTextVNode as S, toDisplayString as ee } from "vue";
|
|
2
|
+
import T from "../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
3
|
+
import te from "../../components/Sidebar/Actions/EditSidebarListCollection.vue.js";
|
|
4
|
+
import ne from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
5
|
+
import { createInitialRequest as le } from "../../store/requests.js";
|
|
6
|
+
import { useModal as W, ScalarDropdown as ie, ScalarDropdownItem as g, ScalarIcon as w, ScalarModal as b } from "@scalar/components";
|
|
7
|
+
import { useRouter as ae } from "vue-router";
|
|
8
|
+
import { PathId as A } from "../../routes.js";
|
|
9
|
+
import { useWorkspace as se } from "../../store/store.js";
|
|
10
|
+
const ve = /* @__PURE__ */ J({
|
|
10
11
|
__name: "RequestSidebarItemMenu",
|
|
11
12
|
props: {
|
|
12
13
|
menuItem: {}
|
|
13
14
|
},
|
|
14
|
-
emits: ["closeMenu", "toggleWatchMode"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
15
|
+
emits: ["closeMenu", "toggleWatchMode", "clearDrafts"],
|
|
16
|
+
setup(B, { emit: U }) {
|
|
17
|
+
const r = B, C = U, { replace: $ } = ae(), {
|
|
18
|
+
activeWorkspace: y,
|
|
19
|
+
activeRouterParams: x,
|
|
20
|
+
events: V,
|
|
21
|
+
requestMutators: L,
|
|
22
|
+
activeWorkspaceCollections: E,
|
|
23
|
+
activeWorkspaceRequests: P
|
|
24
|
+
} = se(), p = W(), D = W(), M = W(), K = () => {
|
|
17
25
|
var e;
|
|
18
|
-
return
|
|
26
|
+
return V.commandPalette.emit({
|
|
19
27
|
commandName: "Add Example",
|
|
20
28
|
metaData: {
|
|
21
|
-
itemUid: (e =
|
|
29
|
+
itemUid: (e = r.menuItem.item) == null ? void 0 : e.entity.uid
|
|
22
30
|
}
|
|
23
31
|
});
|
|
24
|
-
},
|
|
25
|
-
var
|
|
26
|
-
(
|
|
27
|
-
},
|
|
28
|
-
var e, t,
|
|
29
|
-
(e =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
}, z = (e, t) => {
|
|
33
|
+
var a;
|
|
34
|
+
(a = r.menuItem.item) == null || a.edit(e, t), p.hide();
|
|
35
|
+
}, F = () => {
|
|
36
|
+
var e, t, a;
|
|
37
|
+
if ((e = r.menuItem.item) == null || e.delete(), !P.value.length) {
|
|
38
|
+
const { request: f } = le(), i = E.value.find(
|
|
39
|
+
(o) => {
|
|
40
|
+
var l;
|
|
41
|
+
return ((l = o.info) == null ? void 0 : l.title) === "Drafts";
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
i && (L.add(f, i.uid), $(`/workspace/${y.value.uid}/request/${f.uid}`));
|
|
45
|
+
}
|
|
46
|
+
if (x.value[A.Request] === ((t = r.menuItem.item) == null ? void 0 : t.entity.uid) && $(`/workspace/${y.value.uid}/request/default`), x.value[A.Examples] === ((a = r.menuItem.item) == null ? void 0 : a.entity.uid) && $(`/workspace/${y.value}/request/default`), E.value[0]) {
|
|
47
|
+
const f = E.value[0].requests[0];
|
|
48
|
+
$(`/workspace/${y.value.uid}/request/${f}`);
|
|
49
|
+
}
|
|
50
|
+
D.hide();
|
|
51
|
+
}, k = O(null);
|
|
52
|
+
Q([() => r.menuItem.open, k], async ([e]) => {
|
|
53
|
+
var t, a;
|
|
54
|
+
e && ((a = (t = k.value) == null ? void 0 : t.$parent) != null && a.$el) && k.value.$parent.$el.focus();
|
|
55
|
+
});
|
|
56
|
+
const N = () => r.menuItem.open && C("closeMenu");
|
|
57
|
+
X(() => window.addEventListener("click", N)), Y(() => window.removeEventListener("click", N));
|
|
58
|
+
const j = () => {
|
|
59
|
+
C("toggleWatchMode", r.menuItem.item);
|
|
60
|
+
}, G = () => {
|
|
61
|
+
C("clearDrafts"), M.hide();
|
|
62
|
+
}, R = Z(() => {
|
|
63
|
+
var e;
|
|
64
|
+
return ((e = r.menuItem.item) == null ? void 0 : e.title) === "Drafts";
|
|
34
65
|
});
|
|
35
|
-
const D = () => a.menuItem.open && $("closeMenu");
|
|
36
|
-
F(() => window.addEventListener("click", D)), j(() => window.removeEventListener("click", D));
|
|
37
|
-
const V = () => {
|
|
38
|
-
$("toggleWatchMode", a.menuItem.item);
|
|
39
|
-
};
|
|
40
66
|
return (e, t) => {
|
|
41
|
-
var
|
|
42
|
-
return
|
|
43
|
-
e.menuItem.targetRef && e.menuItem.open ? (
|
|
67
|
+
var a, f;
|
|
68
|
+
return s(), h(q, null, [
|
|
69
|
+
e.menuItem.targetRef && e.menuItem.open ? (s(), d(n(ie), {
|
|
44
70
|
key: 0,
|
|
45
71
|
static: "",
|
|
46
72
|
targetRef: e.menuItem.targetRef,
|
|
47
73
|
teleport: "",
|
|
48
|
-
onKeydown: t[
|
|
74
|
+
onKeydown: t[3] || (t[3] = _((i) => e.$emit("closeMenu"), ["escape"]))
|
|
49
75
|
}, {
|
|
50
|
-
items:
|
|
51
|
-
var
|
|
76
|
+
items: u(() => {
|
|
77
|
+
var i, o;
|
|
52
78
|
return [
|
|
53
|
-
((
|
|
79
|
+
((i = e.menuItem.item) == null ? void 0 : i.entity.type) === "request" ? (s(), d(n(g), {
|
|
54
80
|
key: 0,
|
|
55
81
|
class: "flex gap-2",
|
|
56
|
-
onClick:
|
|
82
|
+
onClick: K
|
|
57
83
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
|
|
84
|
+
default: u(() => [
|
|
85
|
+
m(n(w), {
|
|
60
86
|
class: "inline-flex",
|
|
61
87
|
icon: "Example",
|
|
62
88
|
size: "md",
|
|
63
89
|
thickness: "1.5"
|
|
64
90
|
}),
|
|
65
|
-
t[
|
|
91
|
+
t[8] || (t[8] = I("span", null, "Add Example", -1))
|
|
66
92
|
]),
|
|
67
93
|
_: 1
|
|
68
|
-
})) :
|
|
69
|
-
|
|
94
|
+
})) : c("", !0),
|
|
95
|
+
R.value ? c("", !0) : (s(), d(n(g), {
|
|
96
|
+
key: 1,
|
|
70
97
|
ref_key: "menuRef",
|
|
71
|
-
ref:
|
|
98
|
+
ref: k,
|
|
72
99
|
class: "flex gap-2",
|
|
73
|
-
onClick: t[0] || (t[0] = (
|
|
100
|
+
onClick: t[0] || (t[0] = (l) => n(p).show())
|
|
74
101
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
var
|
|
102
|
+
default: u(() => {
|
|
103
|
+
var l;
|
|
77
104
|
return [
|
|
78
|
-
|
|
105
|
+
m(n(w), {
|
|
79
106
|
class: "inline-flex",
|
|
80
107
|
icon: "Edit",
|
|
81
108
|
size: "md",
|
|
82
109
|
thickness: "1.5"
|
|
83
110
|
}),
|
|
84
|
-
|
|
85
|
-
((
|
|
86
|
-
|
|
87
|
-
], 64)) : (
|
|
88
|
-
|
|
111
|
+
I("span", null, [
|
|
112
|
+
((l = e.menuItem.item) == null ? void 0 : l.entity.type) === "collection" ? (s(), h(q, { key: 0 }, [
|
|
113
|
+
S(" Edit ")
|
|
114
|
+
], 64)) : (s(), h(q, { key: 1 }, [
|
|
115
|
+
S(" Rename ")
|
|
89
116
|
], 64))
|
|
90
117
|
])
|
|
91
118
|
];
|
|
92
119
|
}),
|
|
93
120
|
_: 1
|
|
94
|
-
}, 512),
|
|
95
|
-
(
|
|
96
|
-
key:
|
|
121
|
+
}, 512)),
|
|
122
|
+
(o = e.menuItem.item) != null && o.documentUrl ? (s(), d(n(g), {
|
|
123
|
+
key: 2,
|
|
97
124
|
ref_key: "menuRef",
|
|
98
|
-
ref:
|
|
125
|
+
ref: k,
|
|
99
126
|
class: "flex gap-2",
|
|
100
|
-
onClick:
|
|
127
|
+
onClick: j
|
|
101
128
|
}, {
|
|
102
|
-
default:
|
|
103
|
-
var
|
|
129
|
+
default: u(() => {
|
|
130
|
+
var l, v;
|
|
104
131
|
return [
|
|
105
|
-
|
|
132
|
+
m(n(w), {
|
|
106
133
|
class: "inline-flex",
|
|
107
|
-
icon: (
|
|
134
|
+
icon: (l = e.menuItem.item) != null && l.watchMode ? "Unwatch" : "Watch",
|
|
108
135
|
size: "md",
|
|
109
136
|
thickness: "1.5"
|
|
110
137
|
}, null, 8, ["icon"]),
|
|
111
|
-
|
|
138
|
+
I("span", null, ee((v = e.menuItem.item) != null && v.watchMode ? "Disable Watch Mode" : "Enable Watch Mode"), 1)
|
|
112
139
|
];
|
|
113
140
|
}),
|
|
114
141
|
_: 1
|
|
115
|
-
}, 512)) :
|
|
116
|
-
|
|
142
|
+
}, 512)) : c("", !0),
|
|
143
|
+
R.value ? c("", !0) : (s(), d(n(g), {
|
|
144
|
+
key: 3,
|
|
145
|
+
class: "flex gap-2",
|
|
146
|
+
onClick: t[1] || (t[1] = (l) => n(D).show())
|
|
147
|
+
}, {
|
|
148
|
+
default: u(() => [
|
|
149
|
+
m(n(w), {
|
|
150
|
+
class: "inline-flex",
|
|
151
|
+
icon: "Delete",
|
|
152
|
+
size: "md",
|
|
153
|
+
thickness: "1.5"
|
|
154
|
+
}),
|
|
155
|
+
t[9] || (t[9] = I("span", null, "Delete", -1))
|
|
156
|
+
]),
|
|
157
|
+
_: 1
|
|
158
|
+
})),
|
|
159
|
+
R.value ? (s(), d(n(g), {
|
|
160
|
+
key: 4,
|
|
117
161
|
class: "flex gap-2",
|
|
118
|
-
onClick: t[
|
|
162
|
+
onClick: t[2] || (t[2] = (l) => n(M).show())
|
|
119
163
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
164
|
+
default: u(() => [
|
|
165
|
+
m(n(w), {
|
|
122
166
|
class: "inline-flex",
|
|
123
167
|
icon: "Delete",
|
|
124
168
|
size: "md",
|
|
125
169
|
thickness: "1.5"
|
|
126
170
|
}),
|
|
127
|
-
t[
|
|
171
|
+
t[10] || (t[10] = I("span", null, "Clear Drafts", -1))
|
|
128
172
|
]),
|
|
129
173
|
_: 1
|
|
130
|
-
})
|
|
174
|
+
})) : c("", !0)
|
|
131
175
|
];
|
|
132
176
|
}),
|
|
133
177
|
_: 1
|
|
134
|
-
}, 8, ["targetRef"])) :
|
|
135
|
-
|
|
178
|
+
}, 8, ["targetRef"])) : c("", !0),
|
|
179
|
+
m(n(b), {
|
|
136
180
|
size: "xxs",
|
|
137
|
-
state: n(
|
|
138
|
-
title: `Delete ${(
|
|
181
|
+
state: n(D),
|
|
182
|
+
title: `Delete ${(a = e.menuItem.item) == null ? void 0 : a.resourceTitle}`
|
|
139
183
|
}, {
|
|
140
|
-
default:
|
|
141
|
-
var
|
|
184
|
+
default: u(() => {
|
|
185
|
+
var i, o;
|
|
142
186
|
return [
|
|
143
|
-
|
|
144
|
-
variableName: ((
|
|
145
|
-
warningMessage: (
|
|
146
|
-
onClose: t[
|
|
147
|
-
onDelete:
|
|
187
|
+
m(T, {
|
|
188
|
+
variableName: ((i = e.menuItem.item) == null ? void 0 : i.title) ?? "",
|
|
189
|
+
warningMessage: (o = e.menuItem.item) == null ? void 0 : o.warning,
|
|
190
|
+
onClose: t[4] || (t[4] = (l) => n(D).hide()),
|
|
191
|
+
onDelete: F
|
|
148
192
|
}, null, 8, ["variableName", "warningMessage"])
|
|
149
193
|
];
|
|
150
194
|
}),
|
|
151
195
|
_: 1
|
|
152
196
|
}, 8, ["state", "title"]),
|
|
153
|
-
|
|
197
|
+
m(n(b), {
|
|
154
198
|
size: "xxs",
|
|
155
|
-
state: n(
|
|
156
|
-
title: `Edit ${(
|
|
199
|
+
state: n(p),
|
|
200
|
+
title: `Edit ${(f = e.menuItem.item) == null ? void 0 : f.resourceTitle}`
|
|
157
201
|
}, {
|
|
158
|
-
default:
|
|
159
|
-
var
|
|
202
|
+
default: u(() => {
|
|
203
|
+
var i, o, l, v;
|
|
160
204
|
return [
|
|
161
|
-
((
|
|
205
|
+
((i = e.menuItem.item) == null ? void 0 : i.resourceTitle) === "Collection" ? (s(), d(te, {
|
|
162
206
|
key: 0,
|
|
163
|
-
icon: ((
|
|
164
|
-
name: (
|
|
165
|
-
onClose: t[
|
|
166
|
-
onEdit:
|
|
167
|
-
}, null, 8, ["icon", "name"])) : (
|
|
207
|
+
icon: ((o = e.menuItem.item) == null ? void 0 : o.icon) || "interface-content-folder",
|
|
208
|
+
name: (l = e.menuItem.item) == null ? void 0 : l.title,
|
|
209
|
+
onClose: t[5] || (t[5] = (H) => n(p).hide()),
|
|
210
|
+
onEdit: z
|
|
211
|
+
}, null, 8, ["icon", "name"])) : (s(), d(ne, {
|
|
168
212
|
key: 1,
|
|
169
|
-
name: ((
|
|
170
|
-
onClose: t[
|
|
171
|
-
onEdit:
|
|
213
|
+
name: ((v = e.menuItem.item) == null ? void 0 : v.title) ?? "",
|
|
214
|
+
onClose: t[6] || (t[6] = (H) => n(p).hide()),
|
|
215
|
+
onEdit: z
|
|
172
216
|
}, null, 8, ["name"]))
|
|
173
217
|
];
|
|
174
218
|
}),
|
|
175
219
|
_: 1
|
|
176
|
-
}, 8, ["state", "title"])
|
|
220
|
+
}, 8, ["state", "title"]),
|
|
221
|
+
m(n(b), {
|
|
222
|
+
size: "xxs",
|
|
223
|
+
state: n(M),
|
|
224
|
+
title: "Clear Drafts"
|
|
225
|
+
}, {
|
|
226
|
+
default: u(() => [
|
|
227
|
+
m(T, {
|
|
228
|
+
variableName: "All Drafts",
|
|
229
|
+
warningMessage: "This action will clear all drafts. This cannot be undone.",
|
|
230
|
+
onClose: t[7] || (t[7] = (i) => n(M).hide()),
|
|
231
|
+
onDelete: G
|
|
232
|
+
})
|
|
233
|
+
]),
|
|
234
|
+
_: 1
|
|
235
|
+
}, 8, ["state"])
|
|
177
236
|
], 64);
|
|
178
237
|
};
|
|
179
238
|
}
|
|
180
239
|
});
|
|
181
240
|
export {
|
|
182
|
-
|
|
241
|
+
ve as default
|
|
183
242
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"AA+GA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;;;;;;;AAyPF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./RequestSubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-1e708e85"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,49 +1,54 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as y, openBlock as l, createElementBlock as a, createElementVNode as n, createVNode as s, normalizeClass as c, unref as t, createBlock as d, createCommentVNode as i } from "vue";
|
|
2
|
+
import k from "../../components/AddressBar/AddressBar.vue.js";
|
|
3
|
+
import C from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
|
|
4
|
+
import x from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
5
5
|
import { ScalarIcon as g } from "@scalar/components";
|
|
6
|
-
import
|
|
6
|
+
import V from "./components/WorkspaceDropdown.vue.js";
|
|
7
7
|
import v from "../../components/OpenApiClientButton.vue.js";
|
|
8
8
|
import { useWorkspace as w } from "../../store/store.js";
|
|
9
|
-
|
|
9
|
+
import { useLayout as h } from "../../hooks/useLayout.js";
|
|
10
|
+
const $ = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-2 lg:pt-1 lg:p-1 flex-wrap t-app__top-container border-b-1/2" }, B = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 lg:mb-0 mb-2 lg:flex-1 w-6/12" }, R = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-2 lg:flex-1 justify-end w-6/12" }, H = /* @__PURE__ */ y({
|
|
10
11
|
__name: "RequestSubpageHeader",
|
|
11
12
|
props: {
|
|
12
13
|
modelValue: { type: Boolean },
|
|
13
14
|
isReadonly: { type: Boolean }
|
|
14
15
|
},
|
|
15
16
|
emits: ["update:modelValue", "hideModal", "importCurl"],
|
|
16
|
-
setup(
|
|
17
|
-
const { activeCollection: m } = w();
|
|
17
|
+
setup(S) {
|
|
18
|
+
const { activeCollection: m } = w(), { layout: b } = h();
|
|
18
19
|
return (o, e) => {
|
|
19
20
|
var p, u, f;
|
|
20
|
-
return l(),
|
|
21
|
-
n("div",
|
|
22
|
-
s(
|
|
23
|
-
class: "gitbook-hidden",
|
|
21
|
+
return l(), a("div", $, [
|
|
22
|
+
n("div", B, [
|
|
23
|
+
s(x, {
|
|
24
|
+
class: c(["gitbook-hidden", [
|
|
25
|
+
"xl:hidden",
|
|
26
|
+
{ "xl:!flex": !o.modelValue },
|
|
27
|
+
{ "!flex": t(b) === "modal" }
|
|
28
|
+
]]),
|
|
24
29
|
modelValue: o.modelValue,
|
|
25
30
|
"onUpdate:modelValue": e[0] || (e[0] = (r) => o.$emit("update:modelValue", r))
|
|
26
|
-
}, null, 8, ["modelValue"]),
|
|
27
|
-
o.isReadonly ? i("", !0) : (l(),
|
|
31
|
+
}, null, 8, ["class", "modelValue"]),
|
|
32
|
+
o.isReadonly ? i("", !0) : (l(), d(t(V), { key: 0 })),
|
|
28
33
|
e[4] || (e[4] = n("a", {
|
|
29
34
|
class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
|
|
30
35
|
href: "https://scalar.com/",
|
|
31
36
|
target: "_blank"
|
|
32
37
|
}, " Powered by Scalar.com ", -1))
|
|
33
38
|
]),
|
|
34
|
-
s(
|
|
39
|
+
s(k, {
|
|
35
40
|
onImportCurl: e[1] || (e[1] = (r) => o.$emit("importCurl", r))
|
|
36
41
|
}),
|
|
37
|
-
n("div",
|
|
38
|
-
o.isReadonly ? i("", !0) : (l(),
|
|
39
|
-
o.isReadonly && ((p = t(m)) != null && p.documentUrl) ? (l(),
|
|
42
|
+
n("div", R, [
|
|
43
|
+
o.isReadonly ? i("", !0) : (l(), d(C, { key: 0 })),
|
|
44
|
+
o.isReadonly && ((p = t(m)) != null && p.documentUrl) ? (l(), d(t(v), {
|
|
40
45
|
key: 1,
|
|
41
46
|
buttonSource: "modal",
|
|
42
47
|
class: "gitbook-hidden !w-fit lg:-mr-1",
|
|
43
48
|
integration: (u = t(m)) == null ? void 0 : u.integration,
|
|
44
49
|
url: (f = t(m)) == null ? void 0 : f.documentUrl
|
|
45
50
|
}, null, 8, ["integration", "url"])) : i("", !0),
|
|
46
|
-
o.isReadonly ? (l(),
|
|
51
|
+
o.isReadonly ? (l(), a("button", {
|
|
47
52
|
key: 2,
|
|
48
53
|
class: "app-exit-button p-2 rounded-full fixed right-2 top-2 gitbook-hidden",
|
|
49
54
|
type: "button",
|
|
@@ -56,7 +61,7 @@ const V = { class: "lg:min-h-header flex items-center w-full justify-center p-2
|
|
|
56
61
|
}),
|
|
57
62
|
e[5] || (e[5] = n("span", { class: "sr-only" }, "Close Client", -1))
|
|
58
63
|
])) : i("", !0),
|
|
59
|
-
o.isReadonly ? (l(),
|
|
64
|
+
o.isReadonly ? (l(), a("button", {
|
|
60
65
|
key: 3,
|
|
61
66
|
class: "text-c-1 hover:bg-b-2 active:text-c-1 p-2 rounded -mr-1.5 gitbook-show",
|
|
62
67
|
type: "button",
|
|
@@ -75,5 +80,5 @@ const V = { class: "lg:min-h-header flex items-center w-full justify-center p-2
|
|
|
75
80
|
}
|
|
76
81
|
});
|
|
77
82
|
export {
|
|
78
|
-
|
|
83
|
+
H as default
|
|
79
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBody.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBody.vue"],"names":[],"mappings":"AA6HA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AAsMF,wBAOG"}
|
|
@@ -1,99 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import S from "./ResponseBodyDownload.vue.js";
|
|
6
|
-
import P from "./ResponseBodyInfo.vue.js";
|
|
7
|
-
import $ from "./ResponseBodyPreview.vue.js";
|
|
8
|
-
import E from "./ResponseBodyRaw.vue.js";
|
|
9
|
-
import F from "./ResponseBodyToggle.vue.js";
|
|
10
|
-
import { mediaTypes as D } from "../consts/mediaTypes.js";
|
|
11
|
-
const I = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "max-h-[calc(100%-32px)] mx-1 border-1/2 flex flex-col rounded bg-b-1 overflow-hidden"
|
|
14
|
-
}, J = { class: "flex justify-between items-center border-b-1/2 px-3 py-1.5" }, M = { class: "text-xxs leading-3 font-code" }, Z = /* @__PURE__ */ L({
|
|
15
|
-
__name: "ResponseBody",
|
|
16
|
-
props: {
|
|
17
|
-
title: {},
|
|
18
|
-
data: {},
|
|
19
|
-
headers: {}
|
|
20
|
-
},
|
|
21
|
-
setup(b) {
|
|
22
|
-
const a = b, x = (e) => e instanceof Blob, d = U(!0), p = n(
|
|
23
|
-
() => {
|
|
24
|
-
var e;
|
|
25
|
-
return !!((e = o.value) != null && e.raw && o.value.preview);
|
|
26
|
-
}
|
|
27
|
-
), B = n(() => d.value || !p.value), R = n(() => !d.value || !p.value), r = n(() => {
|
|
28
|
-
var t;
|
|
29
|
-
const e = ((t = a.headers.find((l) => l.name.toLowerCase() === "content-type")) == null ? void 0 : t.value) ?? "";
|
|
30
|
-
return new N(e);
|
|
31
|
-
}), _ = n(() => {
|
|
32
|
-
var t;
|
|
33
|
-
const e = ((t = a.headers.find(
|
|
34
|
-
(l) => l.name.toLowerCase() === "content-disposition"
|
|
35
|
-
)) == null ? void 0 : t.value) ?? "";
|
|
36
|
-
return T(e);
|
|
37
|
-
}), o = n(() => D[r.value.essence]), i = n(() => x(a.data) ? URL.createObjectURL(a.data) : typeof a.data == "string" ? URL.createObjectURL(
|
|
38
|
-
new Blob([a.data], { type: r.value.toString() })
|
|
39
|
-
) : a.data instanceof Object && Object.keys(a.data).length ? URL.createObjectURL(
|
|
40
|
-
new Blob([JSON.stringify(a.data)], {
|
|
41
|
-
type: r.value.toString()
|
|
42
|
-
})
|
|
43
|
-
) : "");
|
|
44
|
-
return (e, t) => (s(), u(O, { class: "max-h-content overflow-x-auto" }, V({
|
|
45
|
-
title: m(() => [
|
|
46
|
-
w(g(e.title), 1)
|
|
47
|
-
]),
|
|
48
|
-
default: m(() => {
|
|
49
|
-
var l, v, f, y;
|
|
50
|
-
return [
|
|
51
|
-
e.data ? (s(), j("div", I, [
|
|
52
|
-
h("div", J, [
|
|
53
|
-
h("span", M, g(r.value.essence), 1),
|
|
54
|
-
p.value ? (s(), u(F, {
|
|
55
|
-
key: 0,
|
|
56
|
-
modelValue: d.value,
|
|
57
|
-
"onUpdate:modelValue": t[0] || (t[0] = (k) => d.value = k)
|
|
58
|
-
}, null, 8, ["modelValue"])) : c("", !0)
|
|
59
|
-
]),
|
|
60
|
-
(l = o.value) != null && l.raw && R.value ? (s(), u(E, {
|
|
61
|
-
key: i.value,
|
|
62
|
-
content: e.data,
|
|
63
|
-
language: o.value.language
|
|
64
|
-
}, null, 8, ["content", "language"])) : c("", !0),
|
|
65
|
-
(v = o.value) != null && v.preview && B.value ? (s(), u($, {
|
|
66
|
-
key: i.value,
|
|
67
|
-
alpha: o.value.alpha,
|
|
68
|
-
mode: o.value.preview,
|
|
69
|
-
src: i.value,
|
|
70
|
-
type: r.value.essence
|
|
71
|
-
}, null, 8, ["alpha", "mode", "src", "type"])) : c("", !0),
|
|
72
|
-
!((f = o.value) != null && f.raw) && !((y = o.value) != null && y.preview) ? (s(), u(P, { key: 2 }, {
|
|
73
|
-
default: m(() => t[1] || (t[1] = [
|
|
74
|
-
w(" Binary file ")
|
|
75
|
-
])),
|
|
76
|
-
_: 1
|
|
77
|
-
})) : c("", !0)
|
|
78
|
-
])) : c("", !0)
|
|
79
|
-
];
|
|
80
|
-
}),
|
|
81
|
-
_: 2
|
|
82
|
-
}, [
|
|
83
|
-
e.data && i.value ? {
|
|
84
|
-
name: "actions",
|
|
85
|
-
fn: m(() => [
|
|
86
|
-
C(S, {
|
|
87
|
-
filename: _.value,
|
|
88
|
-
href: i.value,
|
|
89
|
-
type: r.value.essence
|
|
90
|
-
}, null, 8, ["filename", "href", "type"])
|
|
91
|
-
]),
|
|
92
|
-
key: "0"
|
|
93
|
-
} : void 0
|
|
94
|
-
]), 1024));
|
|
95
|
-
}
|
|
96
|
-
});
|
|
1
|
+
import o from "./ResponseBody.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cb6b7a57"]]);
|
|
97
5
|
export {
|
|
98
|
-
|
|
6
|
+
a as default
|
|
99
7
|
};
|