@scalar/api-client 2.1.22 → 2.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +22 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +163 -154
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +5 -5
- package/dist/components/DataTable/DataTableText.vue.d.ts +12 -3
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableText.vue.js +13 -9
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +9 -9
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +84 -63
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +36 -40
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts +3 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +125 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +4 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +2 -2
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +28 -27
- package/dist/components/SideNav/SideHelp.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +8 -8
- package/dist/components/SideNav/SideNavLink.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +4 -4
- package/dist/components/Sidebar/SidebarList.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarList.vue.js +3 -3
- package/dist/components/Sidebar/SidebarToggle.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +3 -3
- package/dist/data/httpHeaders.d.ts +6 -0
- package/dist/data/httpHeaders.d.ts.map +1 -0
- package/dist/data/httpHeaders.js +537 -0
- package/dist/layouts/App/create-api-client-app.d.ts +8 -8
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +16 -16
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +8 -8
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +8 -8
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/importers/curl.d.ts +25 -1
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +40 -38
- package/dist/libs/parse-curl.d.ts +3 -4
- package/dist/libs/parse-curl.d.ts.map +1 -1
- package/dist/libs/parse-curl.js +58 -55
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/store.d.ts +16 -16
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +21 -21
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +45 -53
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +3 -3
- package/dist/views/Request/RequestSidebar.vue2.js +61 -63
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +43 -43
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
- package/dist/views/Request/RequestSubpageHeader.vue2.js +15 -13
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +43 -22
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +44 -51
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +2 -2
- package/package.json +10 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as te, useCssVars as ie, computed as b, ref as ne, resolveComponent as
|
|
1
|
+
import { defineComponent as te, useCssVars as ie, computed as b, ref as ne, resolveComponent as re, openBlock as p, createElementBlock as k, normalizeClass as m, unref as n, createVNode as c, withCtx as h, createBlock as g, withModifiers as R, createElementVNode as u, toDisplayString as z, createCommentVNode as v, createTextVNode as j, renderSlot as le, Fragment as se, renderList as ae } from "vue";
|
|
2
2
|
import { PathId as oe } from "../../router.js";
|
|
3
3
|
import { ScalarButton as $, ScalarIcon as w } from "@scalar/components";
|
|
4
4
|
import { Draggable as ue } from "@scalar/draggable";
|
|
@@ -7,7 +7,7 @@ import pe from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
|
7
7
|
import { useSidebar as fe } from "../../hooks/useSidebar.js";
|
|
8
8
|
import { getModifiers as me } from "../../libs/hot-keys.js";
|
|
9
9
|
import { useWorkspace as be } from "../../store/store.js";
|
|
10
|
-
const ge = { class: "flex flex-row gap-1 items-center" },
|
|
10
|
+
const ge = { class: "flex flex-row gap-1 items-center" }, ve = { class: "relative" }, ce = { class: "flex items-start" }, he = { class: "flex h-5 items-center justify-center max-w-[14px]" }, ye = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, xe = { class: "relative flex h-fit" }, ke = { key: 2 }, B = "hover:bg-sidebar-active-b indent-padding-left", Me = /* @__PURE__ */ te({
|
|
11
11
|
__name: "RequestSidebarItem",
|
|
12
12
|
props: {
|
|
13
13
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -19,10 +19,10 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
19
19
|
emits: ["onDragEnd", "newTab", "openMenu"],
|
|
20
20
|
setup(P, { emit: V }) {
|
|
21
21
|
ie((e) => ({
|
|
22
|
-
"
|
|
23
|
-
|
|
22
|
+
"0e0f2455": J.value,
|
|
23
|
+
f310156e: K.value
|
|
24
24
|
}));
|
|
25
|
-
const
|
|
25
|
+
const r = P, F = V, {
|
|
26
26
|
activeRequest: T,
|
|
27
27
|
activeRouterParams: Y,
|
|
28
28
|
activeWorkspace: y,
|
|
@@ -39,7 +39,7 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
39
39
|
events: W
|
|
40
40
|
} = be(), { collapsedSidebarFolders: N, toggleSidebarFolder: H } = fe(), i = b(() => {
|
|
41
41
|
var s, d;
|
|
42
|
-
const e = q[
|
|
42
|
+
const e = q[r.uid], t = A[r.uid], l = I[r.uid], a = U[r.uid];
|
|
43
43
|
return e ? {
|
|
44
44
|
title: ((s = e.info) == null ? void 0 : s.title) ?? "Unknown title",
|
|
45
45
|
entity: e,
|
|
@@ -58,17 +58,17 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
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) => M.edit(t.uid, "name", o),
|
|
61
|
-
delete: () => M.delete(t,
|
|
62
|
-
} :
|
|
63
|
-
title:
|
|
64
|
-
link: `/workspace/${y.value.uid}/request/${
|
|
65
|
-
method:
|
|
66
|
-
entity:
|
|
61
|
+
delete: () => M.delete(t, r.parentUids[0])
|
|
62
|
+
} : l ? {
|
|
63
|
+
title: l.summary ?? [l.method, l.path].join(" - "),
|
|
64
|
+
link: `/workspace/${y.value.uid}/request/${l.uid}`,
|
|
65
|
+
method: l.method,
|
|
66
|
+
entity: l,
|
|
67
67
|
resourceTitle: "Request",
|
|
68
68
|
warning: "This cannot be undone. You’re about to delete the request.",
|
|
69
|
-
children:
|
|
70
|
-
edit: (o) => E.edit(
|
|
71
|
-
delete: () => E.delete(
|
|
69
|
+
children: l.examples,
|
|
70
|
+
edit: (o) => E.edit(l.uid, "summary", o),
|
|
71
|
+
delete: () => E.delete(l, r.parentUids[0])
|
|
72
72
|
} : {
|
|
73
73
|
title: a.name,
|
|
74
74
|
link: `/workspace/${y.value.uid}/request/${a.requestUid}/examples/${a.uid}`,
|
|
@@ -82,21 +82,21 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
82
82
|
};
|
|
83
83
|
}), G = b(
|
|
84
84
|
() => i.value.entity.type === "collection" && i.value.title === "Drafts"
|
|
85
|
-
), J = b(() =>
|
|
85
|
+
), J = b(() => r.parentUids.length ? f.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "12px"), K = b(() => r.parentUids.length ? f.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "0px"), Q = b(
|
|
86
86
|
() => {
|
|
87
87
|
var e;
|
|
88
|
-
return N[
|
|
88
|
+
return N[r.uid] || ((e = T.value) == null ? void 0 : e.uid) === r.uid && i.value.entity.examples.length > 1;
|
|
89
89
|
}
|
|
90
90
|
), X = b(
|
|
91
91
|
() => {
|
|
92
92
|
var e;
|
|
93
|
-
return Y.value[oe.Request] === "default" && ((e = T.value) == null ? void 0 : e.uid) ===
|
|
93
|
+
return Y.value[oe.Request] === "default" && ((e = T.value) == null ? void 0 : e.uid) === r.uid;
|
|
94
94
|
}
|
|
95
95
|
), C = ne(null), O = b(() => {
|
|
96
96
|
let e = 0.5, t = 0.5;
|
|
97
97
|
if (!C.value) return { ceiling: e, floor: t };
|
|
98
|
-
const { draggingItem:
|
|
99
|
-
return !q[
|
|
98
|
+
const { draggingItem: l } = C.value;
|
|
99
|
+
return !q[l == null ? void 0 : l.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
100
|
}), Z = (e, t) => !(y.value.isReadOnly || U[t.id] || q[e.id]), _ = (e, t) => {
|
|
101
101
|
e && (me(["default"]).some((s) => e[s]) ? F("newTab", t.title || "", t.entity.uid) : t.link && L.push(t.link));
|
|
102
102
|
};
|
|
@@ -104,19 +104,19 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
104
104
|
W.commandPalette.emit({
|
|
105
105
|
commandName: "Create Request",
|
|
106
106
|
metaData: {
|
|
107
|
-
itemUid:
|
|
108
|
-
parentUid:
|
|
107
|
+
itemUid: r.uid,
|
|
108
|
+
parentUid: r.parentUids[0]
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
return (e, t) => {
|
|
113
|
-
const
|
|
113
|
+
const l = re("RequestSidebarItem", !0);
|
|
114
114
|
return p(), k("div", {
|
|
115
115
|
class: m(["relative flex flex-row", [
|
|
116
|
-
n(f) && e.parentUids.length > 1 || !n(f) && e.parentUids.length ? "before:bg-
|
|
116
|
+
n(f) && e.parentUids.length > 1 || !n(f) && e.parentUids.length ? "before:bg-border before:pointer-events-none before:z-1 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
|
-
|
|
119
|
+
c(n(ue), {
|
|
120
120
|
id: i.value.entity.uid,
|
|
121
121
|
ref_key: "draggableRef",
|
|
122
122
|
ref: C,
|
|
@@ -154,10 +154,10 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
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
|
-
},
|
|
157
|
+
}, z(i.value.title), 3),
|
|
158
158
|
u("div", ge, [
|
|
159
|
-
u("div",
|
|
160
|
-
n(f) ?
|
|
159
|
+
u("div", ve, [
|
|
160
|
+
n(f) ? v("", !0) : (p(), g(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
163
|
flex: ((o = (d = e.menuItem) == null ? void 0 : d.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
@@ -176,7 +176,7 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
176
176
|
))
|
|
177
177
|
}, {
|
|
178
178
|
default: h(() => [
|
|
179
|
-
|
|
179
|
+
c(n(w), {
|
|
180
180
|
icon: "Ellipses",
|
|
181
181
|
size: "sm"
|
|
182
182
|
})
|
|
@@ -184,13 +184,13 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
184
184
|
_: 1
|
|
185
185
|
}, 8, ["class"]))
|
|
186
186
|
]),
|
|
187
|
-
u("span",
|
|
188
|
-
t[9] || (t[9] =
|
|
187
|
+
u("span", ce, [
|
|
188
|
+
t[9] || (t[9] = j(" ")),
|
|
189
189
|
i.value.method ? (p(), g(n(pe), {
|
|
190
190
|
key: 0,
|
|
191
191
|
class: "font-bold",
|
|
192
192
|
method: i.value.method
|
|
193
|
-
}, null, 8, ["method"])) :
|
|
193
|
+
}, null, 8, ["method"])) : v("", !0)
|
|
194
194
|
])
|
|
195
195
|
])
|
|
196
196
|
], 2)
|
|
@@ -204,13 +204,13 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
204
204
|
onClick: t[3] || (t[3] = (s) => n(H)(i.value.entity.uid))
|
|
205
205
|
}, [
|
|
206
206
|
u("span", he, [
|
|
207
|
-
|
|
207
|
+
le(e.$slots, "leftIcon", {}, () => [
|
|
208
208
|
u("div", {
|
|
209
209
|
class: m({
|
|
210
210
|
"rotate-90": n(N)[i.value.entity.uid]
|
|
211
211
|
})
|
|
212
212
|
}, [
|
|
213
|
-
|
|
213
|
+
c(n(w), {
|
|
214
214
|
class: "text-c-3 text-sm",
|
|
215
215
|
icon: "ChevronRight",
|
|
216
216
|
size: "sm",
|
|
@@ -218,14 +218,14 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
218
218
|
})
|
|
219
219
|
], 2)
|
|
220
220
|
], !0),
|
|
221
|
-
t[10] || (t[10] =
|
|
221
|
+
t[10] || (t[10] = j(" "))
|
|
222
222
|
]),
|
|
223
223
|
u("div", ye, [
|
|
224
224
|
u("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
|
-
},
|
|
228
|
+
}, z(i.value.title), 3),
|
|
229
229
|
u("div", xe, [
|
|
230
230
|
!n(f) && !G.value ? (p(), g(n($), {
|
|
231
231
|
key: 0,
|
|
@@ -245,19 +245,19 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
245
245
|
))
|
|
246
246
|
}, {
|
|
247
247
|
default: h(() => [
|
|
248
|
-
|
|
248
|
+
c(n(w), {
|
|
249
249
|
icon: "Ellipses",
|
|
250
250
|
size: "sm"
|
|
251
251
|
})
|
|
252
252
|
]),
|
|
253
253
|
_: 1
|
|
254
|
-
}, 8, ["class"])) :
|
|
254
|
+
}, 8, ["class"])) : v("", !0),
|
|
255
255
|
t[11] || (t[11] = u("span", null, " ", -1))
|
|
256
256
|
])
|
|
257
257
|
])
|
|
258
|
-
])) :
|
|
258
|
+
])) : v("", !0),
|
|
259
259
|
Q.value ? (p(), k("div", ke, [
|
|
260
|
-
(p(!0), k(se, null, ae(i.value.children, (s) => (p(), g(
|
|
260
|
+
(p(!0), k(se, null, ae(i.value.children, (s) => (p(), g(l, {
|
|
261
261
|
key: s,
|
|
262
262
|
isDraggable: !n(U)[s],
|
|
263
263
|
isDroppable: Z,
|
|
@@ -275,7 +275,7 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
275
275
|
onClick: t[7] || (t[7] = (s) => ee())
|
|
276
276
|
}, {
|
|
277
277
|
default: h(() => [
|
|
278
|
-
|
|
278
|
+
c(n(w), {
|
|
279
279
|
class: "ml-0.5 h-2.5 w-2.5",
|
|
280
280
|
icon: "Add",
|
|
281
281
|
thickness: "3"
|
|
@@ -283,8 +283,8 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
283
283
|
t[12] || (t[12] = u("span", null, "Add Request", -1))
|
|
284
284
|
]),
|
|
285
285
|
_: 1
|
|
286
|
-
}, 8, ["class"])) :
|
|
287
|
-
])) :
|
|
286
|
+
}, 8, ["class"])) : v("", !0)
|
|
287
|
+
])) : v("", !0)
|
|
288
288
|
];
|
|
289
289
|
}),
|
|
290
290
|
_: 3
|
|
@@ -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":";gBAuEc,OAAO;gBACP,OAAO;;;;;;gBADP,OAAO;gBACP,OAAO;;;;;;AAiNrB,wBAWG"}
|
|
@@ -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
|
|
4
|
+
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-872306be"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as i, openBlock as l, createElementBlock as n, createElementVNode as r, createVNode as m, createBlock as s, unref as d, createCommentVNode as a } from "vue";
|
|
2
2
|
import p from "../../components/AddressBar/AddressBar.vue.js";
|
|
3
3
|
import u from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
|
|
4
4
|
import f from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
5
5
|
import { ScalarIcon as c } from "@scalar/components";
|
|
6
|
-
|
|
6
|
+
import b from "./components/WorkspaceDropdown.vue.js";
|
|
7
|
+
const g = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-1 lg:p-1 flex-wrap t-app__top-container md:border-b-1/2" }, y = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, k = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, $ = /* @__PURE__ */ i({
|
|
7
8
|
__name: "RequestSubpageHeader",
|
|
8
9
|
props: {
|
|
9
10
|
modelValue: { type: Boolean },
|
|
10
11
|
isReadonly: { type: Boolean }
|
|
11
12
|
},
|
|
12
13
|
emits: ["update:modelValue", "hideModal", "importCurl"],
|
|
13
|
-
setup(
|
|
14
|
-
return (o, e) => (l(),
|
|
15
|
-
r("div",
|
|
14
|
+
setup(x) {
|
|
15
|
+
return (o, e) => (l(), n("div", g, [
|
|
16
|
+
r("div", y, [
|
|
16
17
|
m(f, {
|
|
17
18
|
class: "gitbook-hidden",
|
|
18
19
|
modelValue: o.modelValue,
|
|
19
20
|
"onUpdate:modelValue": e[0] || (e[0] = (t) => o.$emit("update:modelValue", t))
|
|
20
21
|
}, null, 8, ["modelValue"]),
|
|
22
|
+
o.isReadonly ? a("", !0) : (l(), s(d(b), { key: 0 })),
|
|
21
23
|
e[3] || (e[3] = r("a", {
|
|
22
24
|
class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
|
|
23
25
|
href: "https://scalar.com/",
|
|
@@ -27,24 +29,24 @@ const b = { class: "lg:min-h-header flex items-center w-full justify-center p-2
|
|
|
27
29
|
m(p, {
|
|
28
30
|
onImportCurl: e[1] || (e[1] = (t) => o.$emit("importCurl", t))
|
|
29
31
|
}),
|
|
30
|
-
r("div",
|
|
31
|
-
o.isReadonly ?
|
|
32
|
-
o.isReadonly ? (l(),
|
|
32
|
+
r("div", k, [
|
|
33
|
+
o.isReadonly ? a("", !0) : (l(), s(u, { key: 0 })),
|
|
34
|
+
o.isReadonly ? (l(), n("button", {
|
|
33
35
|
key: 1,
|
|
34
|
-
class: "text-c-
|
|
36
|
+
class: "text-c-1 hover:bg-b-2 active:text-c-1 p-2 rounded -mr-1.5",
|
|
35
37
|
type: "button",
|
|
36
38
|
onClick: e[2] || (e[2] = (t) => o.$emit("hideModal"))
|
|
37
39
|
}, [
|
|
38
|
-
m(
|
|
40
|
+
m(d(c), {
|
|
39
41
|
icon: "Close",
|
|
40
|
-
size: "
|
|
42
|
+
size: "md",
|
|
41
43
|
thickness: "1.75"
|
|
42
44
|
})
|
|
43
|
-
])) :
|
|
45
|
+
])) : a("", !0)
|
|
44
46
|
])
|
|
45
47
|
]));
|
|
46
48
|
}
|
|
47
49
|
});
|
|
48
50
|
export {
|
|
49
|
-
|
|
51
|
+
$ as default
|
|
50
52
|
};
|
|
@@ -13,7 +13,7 @@ const N = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, q = { cl
|
|
|
13
13
|
s.commandPalette.emit({ commandName: "Create Request" });
|
|
14
14
|
}, c = (n) => {
|
|
15
15
|
n != null && n.openCommandPaletteRequest && m();
|
|
16
|
-
}, x = "2.1.
|
|
16
|
+
}, x = "2.1.24";
|
|
17
17
|
return k(() => s.hotKeys.on(c)), R(() => s.hotKeys.off(c)), (n, e) => (r(), l("div", N, [
|
|
18
18
|
t("div", q, [
|
|
19
19
|
o(f).isReadOnly ? p("", !0) : (r(), l("div", v, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AAqEA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;;aAGrD,MAAM,EAAE;;aAAR,MAAM,EAAE;;AAuInB,wBAMG"}
|
|
@@ -1,55 +1,76 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
import { defineComponent as _, openBlock as e, createBlock as o, withCtx as t, createTextVNode as s, createElementBlock as m, Fragment as i, renderList as x, createVNode as d, toDisplayString as c } from "vue";
|
|
2
|
+
import h from "../../../components/DataTable/DataTable.vue.js";
|
|
3
|
+
import k from "../../../components/DataTable/DataTableRow.vue.js";
|
|
4
|
+
import u from "../../../components/DataTable/DataTableText.vue.js";
|
|
5
|
+
import y from "../../../components/HelpfulLink.vue.js";
|
|
6
|
+
import g from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
|
+
import { httpHeaders as b } from "../../../data/httpHeaders.js";
|
|
8
|
+
const C = {
|
|
7
9
|
key: 1,
|
|
8
10
|
class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
|
|
9
|
-
},
|
|
11
|
+
}, D = /* @__PURE__ */ _({
|
|
10
12
|
__name: "ResponseHeaders",
|
|
11
13
|
props: {
|
|
12
14
|
headers: {}
|
|
13
15
|
},
|
|
14
|
-
setup(
|
|
15
|
-
|
|
16
|
+
setup(w) {
|
|
17
|
+
const l = (r) => b.find(
|
|
18
|
+
(n) => n.name.toLowerCase() === r.toLowerCase()
|
|
19
|
+
);
|
|
20
|
+
return (r, n) => (e(), o(g, {
|
|
16
21
|
defaultOpen: !1,
|
|
17
22
|
itemCount: r.headers.length
|
|
18
23
|
}, {
|
|
19
|
-
title: t(() =>
|
|
20
|
-
|
|
24
|
+
title: t(() => n[0] || (n[0] = [
|
|
25
|
+
s("Headers")
|
|
21
26
|
])),
|
|
22
27
|
default: t(() => [
|
|
23
|
-
r.headers.length ? (e(),
|
|
28
|
+
r.headers.length ? (e(), o(h, {
|
|
24
29
|
key: 0,
|
|
25
30
|
columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
|
|
26
31
|
scroll: ""
|
|
27
32
|
}, {
|
|
28
33
|
default: t(() => [
|
|
29
|
-
(e(!0),
|
|
30
|
-
key:
|
|
34
|
+
(e(!0), m(i, null, x(r.headers, (a, p) => (e(), o(k, {
|
|
35
|
+
key: p,
|
|
31
36
|
class: "text-c-1"
|
|
32
37
|
}, {
|
|
33
38
|
default: t(() => [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
d(u, { class: "sticky left-0 z-1 bg-b-1 max-w-48" }, {
|
|
40
|
+
default: t(() => {
|
|
41
|
+
var f;
|
|
42
|
+
return [
|
|
43
|
+
typeof ((f = l(a.name)) == null ? void 0 : f.url) == "string" ? (e(), o(y, {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "decoration-c-3",
|
|
46
|
+
href: l(a.name).url
|
|
47
|
+
}, {
|
|
48
|
+
default: t(() => [
|
|
49
|
+
s(c(a.name), 1)
|
|
50
|
+
]),
|
|
51
|
+
_: 2
|
|
52
|
+
}, 1032, ["href"])) : (e(), m(i, { key: 1 }, [
|
|
53
|
+
s(c(a.name), 1)
|
|
54
|
+
], 64))
|
|
55
|
+
];
|
|
56
|
+
}),
|
|
57
|
+
_: 2
|
|
58
|
+
}, 1024),
|
|
59
|
+
d(u, {
|
|
39
60
|
class: "z-0",
|
|
40
|
-
text:
|
|
61
|
+
text: a.value
|
|
41
62
|
}, null, 8, ["text"])
|
|
42
63
|
]),
|
|
43
64
|
_: 2
|
|
44
65
|
}, 1024))), 128))
|
|
45
66
|
]),
|
|
46
67
|
_: 1
|
|
47
|
-
})) : (e(),
|
|
68
|
+
})) : (e(), m("div", C, " No Headers "))
|
|
48
69
|
]),
|
|
49
70
|
_: 1
|
|
50
71
|
}, 8, ["itemCount"]));
|
|
51
72
|
}
|
|
52
73
|
});
|
|
53
74
|
export {
|
|
54
|
-
|
|
75
|
+
D as default
|
|
55
76
|
};
|
|
@@ -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":"AAwHA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;;cAU3D,gBAAgB,GAAG,SAAS;;cAA5B,gBAAgB,GAAG,SAAS;;AAgOxC,wBAMG"}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { defineComponent as A, computed as i, ref as C, openBlock as s, createBlock as r, withCtx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import N from "./ResponseBodyVirtual.vue.js";
|
|
1
|
+
import { defineComponent as A, computed as i, ref as C, openBlock as s, createBlock as r, withCtx as u, createElementVNode as d, createTextVNode as B, createCommentVNode as a, createVNode as f, createElementBlock as v, Fragment as _ } from "vue";
|
|
2
|
+
import S from "../../../components/ContextBar.vue.js";
|
|
3
|
+
import H from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import R from "./ResponseBody.vue.js";
|
|
5
|
+
import V from "./ResponseEmpty.vue.js";
|
|
6
|
+
import $ from "./ResponseLoadingOverlay.vue.js";
|
|
7
|
+
import N from "./ResponseMetaInformation.vue.js";
|
|
8
|
+
import g from "./ResponseBodyVirtual.vue.js";
|
|
10
9
|
/* empty css */
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
10
|
+
import E from "./ResponseCookies.vue.js";
|
|
11
|
+
import I from "./ResponseHeaders.vue.js";
|
|
12
|
+
const L = { class: "flex items-center flex-1" }, O = { class: "custom-scroll relative flex flex-1 flex-col px-2 xl:px-4 py-2.5" }, T = 2e4, X = /* @__PURE__ */ A({
|
|
14
13
|
__name: "ResponseSection",
|
|
15
14
|
props: {
|
|
16
15
|
response: {}
|
|
17
16
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
17
|
+
setup(k) {
|
|
18
|
+
const l = k, c = i(() => {
|
|
20
19
|
var t;
|
|
21
|
-
const e = (t =
|
|
20
|
+
const e = (t = l.response) == null ? void 0 : t.headers;
|
|
22
21
|
return e ? Object.keys(e).map((o) => ({
|
|
23
22
|
name: o,
|
|
24
23
|
value: e[o],
|
|
@@ -32,9 +31,9 @@ const T = { class: "flex items-center flex-1" }, z = { class: "custom-scroll rel
|
|
|
32
31
|
}), y = i(
|
|
33
32
|
() => {
|
|
34
33
|
var e;
|
|
35
|
-
return ((e =
|
|
36
|
-
var p,
|
|
37
|
-
const o = (
|
|
34
|
+
return ((e = l.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((t) => {
|
|
35
|
+
var p, m;
|
|
36
|
+
const o = (m = (p = l.response) == null ? void 0 : p.headers) == null ? void 0 : m[t];
|
|
38
37
|
return o ? {
|
|
39
38
|
name: t,
|
|
40
39
|
value: o,
|
|
@@ -42,60 +41,54 @@ const T = { class: "flex items-center flex-1" }, z = { class: "custom-scroll rel
|
|
|
42
41
|
} : [];
|
|
43
42
|
})) ?? [];
|
|
44
43
|
}
|
|
45
|
-
),
|
|
44
|
+
), h = ["All", "Cookies", "Headers", "Body"], n = C("All"), x = i(
|
|
46
45
|
() => {
|
|
47
46
|
var e;
|
|
48
|
-
return (((e =
|
|
47
|
+
return (((e = l.response) == null ? void 0 : e.size) ?? 0) > T;
|
|
49
48
|
}
|
|
50
49
|
);
|
|
51
|
-
return (e, t) => (s(), r(
|
|
52
|
-
title:
|
|
53
|
-
|
|
54
|
-
class: "text-c-3 mr-2 rotate-180",
|
|
55
|
-
icon: "ExternalLink",
|
|
56
|
-
size: "sm",
|
|
57
|
-
thickness: "2.5"
|
|
58
|
-
}),
|
|
59
|
-
f("div", T, [
|
|
50
|
+
return (e, t) => (s(), r(H, null, {
|
|
51
|
+
title: u(() => [
|
|
52
|
+
d("div", L, [
|
|
60
53
|
t[1] || (t[1] = B(" Response ")),
|
|
61
|
-
e.response ? (s(), r(
|
|
54
|
+
e.response ? (s(), r(N, {
|
|
62
55
|
key: 0,
|
|
63
56
|
response: e.response
|
|
64
|
-
}, null, 8, ["response"])) :
|
|
65
|
-
|
|
57
|
+
}, null, 8, ["response"])) : a("", !0),
|
|
58
|
+
f(S, {
|
|
66
59
|
activeSection: n.value,
|
|
67
|
-
sections:
|
|
60
|
+
sections: h,
|
|
68
61
|
onSetActiveSection: t[0] || (t[0] = (o) => n.value = o)
|
|
69
62
|
}, null, 8, ["activeSection"])
|
|
70
63
|
])
|
|
71
64
|
]),
|
|
72
|
-
default:
|
|
65
|
+
default: u(() => {
|
|
73
66
|
var o;
|
|
74
67
|
return [
|
|
75
|
-
|
|
76
|
-
e.response ? (s(), v(
|
|
77
|
-
n.value === "All" || n.value === "Cookies" ? (s(), r(
|
|
68
|
+
d("div", O, [
|
|
69
|
+
e.response ? (s(), v(_, { key: 1 }, [
|
|
70
|
+
n.value === "All" || n.value === "Cookies" ? (s(), r(E, {
|
|
78
71
|
key: 0,
|
|
79
72
|
cookies: y.value
|
|
80
|
-
}, null, 8, ["cookies"])) :
|
|
81
|
-
n.value === "All" || n.value === "Headers" ? (s(), r(
|
|
73
|
+
}, null, 8, ["cookies"])) : a("", !0),
|
|
74
|
+
n.value === "All" || n.value === "Headers" ? (s(), r(I, {
|
|
82
75
|
key: 1,
|
|
83
|
-
headers:
|
|
84
|
-
}, null, 8, ["headers"])) :
|
|
85
|
-
n.value === "All" || n.value === "Body" ? (s(), v(
|
|
86
|
-
|
|
76
|
+
headers: c.value
|
|
77
|
+
}, null, 8, ["headers"])) : a("", !0),
|
|
78
|
+
n.value === "All" || n.value === "Body" ? (s(), v(_, { key: 2 }, [
|
|
79
|
+
x.value ? (s(), r(g, {
|
|
87
80
|
key: 0,
|
|
88
|
-
content:
|
|
89
|
-
}, null, 8, ["content"])) : (s(), r(
|
|
81
|
+
content: l.response.data
|
|
82
|
+
}, null, 8, ["content"])) : (s(), r(R, {
|
|
90
83
|
key: 1,
|
|
91
84
|
active: !0,
|
|
92
|
-
data: (o =
|
|
93
|
-
headers:
|
|
85
|
+
data: (o = l.response) == null ? void 0 : o.data,
|
|
86
|
+
headers: c.value,
|
|
94
87
|
title: "Body"
|
|
95
88
|
}, null, 8, ["data", "headers"]))
|
|
96
|
-
], 64)) :
|
|
97
|
-
], 64)) : (s(), r(
|
|
98
|
-
|
|
89
|
+
], 64)) : a("", !0)
|
|
90
|
+
], 64)) : (s(), r(V, { key: 0 })),
|
|
91
|
+
f($)
|
|
99
92
|
])
|
|
100
93
|
];
|
|
101
94
|
}),
|
|
@@ -104,5 +97,5 @@ const T = { class: "flex items-center flex-1" }, z = { class: "custom-scroll rel
|
|
|
104
97
|
}
|
|
105
98
|
});
|
|
106
99
|
export {
|
|
107
|
-
|
|
100
|
+
X as default
|
|
108
101
|
};
|
|
@@ -4,7 +4,7 @@ import q from "../../../components/Sidebar/Actions/EditSidebarListElement.vue.js
|
|
|
4
4
|
import { useModal as C, ScalarDropdown as $, ScalarDropdownItem as m, ScalarIcon as i, ScalarTooltip as F, ScalarButton as S, ScalarDropdownDivider as P, ScalarModal as N } from "@scalar/components";
|
|
5
5
|
import { useRouter as Y } from "vue-router";
|
|
6
6
|
import { useWorkspace as G } from "../../../store/store.js";
|
|
7
|
-
const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 text-
|
|
7
|
+
const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font-medium m-0 text-xs flex gap-1.5 items-center" }, K = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, Q = { class: "text-ellipsis overflow-hidden" }, X = { class: "flex items-center justify-center h-4 w-4" }, ae = /* @__PURE__ */ O({
|
|
8
8
|
__name: "WorkspaceDropdown",
|
|
9
9
|
setup(Z) {
|
|
10
10
|
const { activeWorkspace: f, workspaces: d, workspaceMutators: g, events: T } = G(), { push: b } = Y(), E = (o) => {
|
|
@@ -159,7 +159,7 @@ const H = { class: "flex items-center text-sm w-[inherit]" }, J = { class: "font
|
|
|
159
159
|
]),
|
|
160
160
|
default: n(() => [
|
|
161
161
|
s(e(S), {
|
|
162
|
-
class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-
|
|
162
|
+
class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-3 hover:bg-b-2 w-fit",
|
|
163
163
|
fullWidth: "",
|
|
164
164
|
variant: "ghost"
|
|
165
165
|
}, {
|