@scalar/api-client 2.0.46 → 2.0.47
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 +19 -0
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue2.js +10 -10
- package/dist/components/Search/SearchModal.vue.d.ts.map +1 -1
- package/dist/components/Search/SearchModal.vue.js +1 -1
- package/dist/components/Search/SearchModal.vue2.js +43 -41
- 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 +22 -19
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +2 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +22 -21
- package/dist/layouts/App/create-api-client-app.d.ts +11 -11
- package/dist/layouts/Modal/create-api-client-modal.d.ts +22 -22
- package/dist/libs/create-client.d.ts +11 -11
- package/dist/store/workspace.d.ts +22 -22
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -15
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +114 -55
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +21 -20
- 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 +117 -117
- 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 +19 -19
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +4 -4
- package/package.json +7 -7
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { commandPaletteBus as
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
import
|
|
1
|
+
import { defineComponent as ie, ref as ae, watch as F, onMounted as le, onBeforeUnmount as ne, openBlock as h, createElementBlock as U, Fragment as N, createElementVNode as v, normalizeClass as b, unref as s, createVNode as c, createCommentVNode as R, withCtx as p, withDirectives as de, createSlots as ce, withModifiers as P, renderList as ue, createBlock as O, createTextVNode as me, vShow as fe, pushScopeId as pe, popScopeId as ve } from "vue";
|
|
2
|
+
import he from "../../components/AddressBar/AddressBar.vue.js";
|
|
3
|
+
import be from "../../components/Search/SearchButton.vue.js";
|
|
4
|
+
import xe from "../../components/Search/SearchModal.vue.js";
|
|
5
|
+
import ye from "../../components/Sidebar/SidebarButton.vue.js";
|
|
6
|
+
import ge from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
7
|
+
import we from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
8
|
+
import _e from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
9
|
+
import { commandPaletteBus as W } from "../../libs/event-busses/command-palette.js";
|
|
10
|
+
import { useWorkspace as ke } from "../../store/workspace.js";
|
|
11
|
+
import Se from "./RequestSection/RequestSection.vue.js";
|
|
12
12
|
/* empty css */
|
|
13
|
-
import
|
|
14
|
-
import { useModal as
|
|
15
|
-
import { useToasts as
|
|
16
|
-
import { isMacOS as
|
|
17
|
-
import { useMagicKeys as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
13
|
+
import Ue from "./ResponseSection/ResponseSection.vue.js";
|
|
14
|
+
import { useModal as Re, ScalarIcon as C } from "@scalar/components";
|
|
15
|
+
import { useToasts as Oe } from "@scalar/use-toasts";
|
|
16
|
+
import { isMacOS as z } from "@scalar/use-tooltip";
|
|
17
|
+
import { useMediaQuery as Ce, useMagicKeys as Me, useEventListener as qe } from "@vueuse/core";
|
|
18
|
+
import De from "./RequestSidebarItem.vue.js";
|
|
19
|
+
import Be from "../../components/Sidebar/Sidebar.vue.js";
|
|
20
20
|
/* empty css */
|
|
21
|
-
import
|
|
22
|
-
import { useSidebar as
|
|
23
|
-
import { sendRequest as
|
|
24
|
-
import { executeRequestBus as
|
|
21
|
+
import Ie from "./components/WorkspaceDropdown.vue.js";
|
|
22
|
+
import { useSidebar as Ve } from "../../hooks/useSidebar.js";
|
|
23
|
+
import { sendRequest as $e } from "../../libs/sendRequest.js";
|
|
24
|
+
import { executeRequestBus as L } from "../../libs/event-busses/execute-requestBus.js";
|
|
25
25
|
import { requestStatusBus as k } from "../../libs/event-busses/request-status-bus.js";
|
|
26
|
-
const
|
|
26
|
+
const Ee = (g) => (pe("data-v-660ba379"), g = g(), ve(), g), Fe = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, Ne = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, Pe = /* @__PURE__ */ Ee(() => /* @__PURE__ */ v("a", {
|
|
27
27
|
class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
|
|
28
28
|
href: "https://scalar.com/",
|
|
29
29
|
target: "_blank"
|
|
30
|
-
}, " Powered by Scalar.com ", -1)),
|
|
30
|
+
}, " Powered by Scalar.com ", -1)), We = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, mt = /* @__PURE__ */ ie({
|
|
31
31
|
__name: "Request",
|
|
32
32
|
setup(g) {
|
|
33
33
|
var E;
|
|
34
34
|
const {
|
|
35
35
|
activeExample: w,
|
|
36
|
-
activeRequest:
|
|
37
|
-
activeSecuritySchemes:
|
|
36
|
+
activeRequest: f,
|
|
37
|
+
activeSecuritySchemes: j,
|
|
38
38
|
activeWorkspace: l,
|
|
39
|
-
activeWorkspaceCollections:
|
|
40
|
-
activeWorkspaceServers:
|
|
41
|
-
activeWorkspaceRequests:
|
|
42
|
-
collectionMutators:
|
|
39
|
+
activeWorkspaceCollections: T,
|
|
40
|
+
activeWorkspaceServers: A,
|
|
41
|
+
activeWorkspaceRequests: H,
|
|
42
|
+
collectionMutators: M,
|
|
43
43
|
collections: u,
|
|
44
|
-
cookies:
|
|
45
|
-
environments:
|
|
46
|
-
findRequestFolders:
|
|
44
|
+
cookies: J,
|
|
45
|
+
environments: K,
|
|
46
|
+
findRequestFolders: Q,
|
|
47
47
|
folders: x,
|
|
48
|
-
folderMutators:
|
|
48
|
+
folderMutators: q,
|
|
49
49
|
modalState: G,
|
|
50
|
-
requestMutators:
|
|
51
|
-
workspaceMutators:
|
|
52
|
-
} =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
(
|
|
56
|
-
|
|
57
|
-
(
|
|
50
|
+
requestMutators: X,
|
|
51
|
+
workspaceMutators: D
|
|
52
|
+
} = ke(), { collapsedSidebarFolders: Y, setCollapsedSidebarFolder: Z } = Ve(), { toast: B } = Oe(), I = Re(), ee = Ce("(max-width: 780px)"), m = ae(!((E = l.value) != null && E.isReadOnly));
|
|
53
|
+
F(ee, (t) => m.value = !t), F(
|
|
54
|
+
f,
|
|
55
|
+
(t) => {
|
|
56
|
+
t && Q(t.uid).forEach(
|
|
57
|
+
(o) => Z(o, !0)
|
|
58
58
|
);
|
|
59
59
|
},
|
|
60
60
|
{ immediate: !0 }
|
|
61
61
|
);
|
|
62
62
|
const V = async () => {
|
|
63
63
|
var i;
|
|
64
|
-
if (!
|
|
64
|
+
if (!f.value || !w.value) {
|
|
65
65
|
console.warn(
|
|
66
66
|
"There is no request active at the moment. Please select one then try again."
|
|
67
67
|
);
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
let
|
|
71
|
-
const
|
|
70
|
+
let t = w.value.url;
|
|
71
|
+
const o = Object.values(K).reduce(
|
|
72
72
|
(e, a) => {
|
|
73
73
|
try {
|
|
74
74
|
return { ...e, ...JSON.parse(a.raw) };
|
|
@@ -77,22 +77,22 @@ const Ve = (g) => (fe("data-v-29657ccc"), g = g(), pe(), g), $e = { class: "lg:m
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
{}
|
|
80
|
-
),
|
|
81
|
-
|
|
80
|
+
), r = /\{\{(.*?)\}\}/g;
|
|
81
|
+
t = t.replace(r, (e, a) => (A.value.forEach((n) => {
|
|
82
82
|
if (n.url === a)
|
|
83
83
|
return a;
|
|
84
|
-
}),
|
|
84
|
+
}), o[a] || a)), k.emit("start");
|
|
85
85
|
try {
|
|
86
|
-
const { request: e, response: a, error: n } = await
|
|
87
|
-
|
|
86
|
+
const { request: e, response: a, error: n } = await $e(
|
|
87
|
+
f.value,
|
|
88
88
|
w.value,
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
t,
|
|
90
|
+
j.value,
|
|
91
91
|
(i = l.value) == null ? void 0 : i.proxyUrl,
|
|
92
|
-
|
|
92
|
+
J
|
|
93
93
|
);
|
|
94
|
-
e && a ? (
|
|
95
|
-
...
|
|
94
|
+
e && a ? (X.edit(f.value.uid, "history", [
|
|
95
|
+
...f.value.history,
|
|
96
96
|
{
|
|
97
97
|
request: e,
|
|
98
98
|
response: a,
|
|
@@ -104,70 +104,70 @@ const Ve = (g) => (fe("data-v-29657ccc"), g = g(), pe(), g), $e = { class: "lg:m
|
|
|
104
104
|
${e}`, "error"), k.emit("abort");
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
-
|
|
108
|
-
const $ = (
|
|
109
|
-
u[
|
|
110
|
-
},
|
|
111
|
-
if (!
|
|
112
|
-
const { id:
|
|
113
|
-
if (i ? u[i] ?
|
|
107
|
+
le(() => L.on(V)), ne(() => L.off(V));
|
|
108
|
+
const $ = (t, o) => {
|
|
109
|
+
u[t] ? M.edit(t, "childUids", o) : x[t] && q.edit(t, "childUids", o);
|
|
110
|
+
}, te = (t, o) => {
|
|
111
|
+
if (!t || !o) return;
|
|
112
|
+
const { id: r, parentId: i } = t, { id: e, parentId: a, offset: n } = o;
|
|
113
|
+
if (i ? u[i] ? M.edit(
|
|
114
114
|
i,
|
|
115
115
|
"childUids",
|
|
116
116
|
u[i].childUids.filter(
|
|
117
|
-
(d) => d !==
|
|
117
|
+
(d) => d !== r
|
|
118
118
|
)
|
|
119
|
-
) : x[i] &&
|
|
119
|
+
) : x[i] && q.edit(
|
|
120
120
|
i,
|
|
121
121
|
"childUids",
|
|
122
|
-
x[i].childUids.filter((d) => d !==
|
|
123
|
-
) :
|
|
122
|
+
x[i].childUids.filter((d) => d !== r)
|
|
123
|
+
) : D.edit(
|
|
124
124
|
l.value.uid,
|
|
125
125
|
"collectionUids",
|
|
126
|
-
l.value.collectionUids.filter((d) => d !==
|
|
126
|
+
l.value.collectionUids.filter((d) => d !== r)
|
|
127
127
|
), n === 2) {
|
|
128
128
|
const d = u[e] || x[e];
|
|
129
|
-
$(e, [...d.childUids,
|
|
129
|
+
$(e, [...d.childUids, r]);
|
|
130
130
|
} else if (a) {
|
|
131
|
-
const y = [...(u[a] || x[a]).childUids], S = y.findIndex((
|
|
132
|
-
y.splice(S + n, 0,
|
|
131
|
+
const y = [...(u[a] || x[a]).childUids], S = y.findIndex((se) => e === se) ?? 0;
|
|
132
|
+
y.splice(S + n, 0, r), $(a, y);
|
|
133
133
|
} else {
|
|
134
134
|
const d = [...l.value.collectionUids], y = d.findIndex((S) => e === S) ?? 0;
|
|
135
|
-
d.splice(y + n, 0,
|
|
135
|
+
d.splice(y + n, 0, r), D.edit(
|
|
136
136
|
l.value.uid,
|
|
137
137
|
"collectionUids",
|
|
138
138
|
d
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
(
|
|
141
|
+
}, oe = () => W.emit(), _ = Me();
|
|
142
|
+
qe(document, "keydown", (t) => {
|
|
143
|
+
(z() ? _.meta.value : _.ctrl.value) && t.key === "b" && (m.value = !m.value), !l.value.isReadOnly && (z() ? _.meta.value : _.ctrl.value) && t.key === "k" && W.emit();
|
|
144
144
|
});
|
|
145
|
-
const
|
|
146
|
-
var
|
|
147
|
-
return !(l.value.isReadOnly || !u[
|
|
145
|
+
const re = (t, o) => {
|
|
146
|
+
var r, i, e;
|
|
147
|
+
return !(l.value.isReadOnly || !u[t.id] && o.offset !== 2 || u[t.id] && ((e = (i = (r = u[o.id]) == null ? void 0 : r.spec) == null ? void 0 : i.info) == null ? void 0 : e.title) === "Drafts");
|
|
148
148
|
};
|
|
149
|
-
return (
|
|
149
|
+
return (t, o) => (h(), U(N, null, [
|
|
150
150
|
v("div", {
|
|
151
151
|
class: b(["flex flex-1 flex-col rounded pt-0 h-full bg-b-1 relative border-1/2 rounded mr-1.5 mb-1.5 overflow-hidden", {
|
|
152
152
|
"!mr-0 !mb-0 !border-0": s(l).isReadOnly
|
|
153
153
|
}])
|
|
154
154
|
}, [
|
|
155
|
-
v("div",
|
|
156
|
-
v("div",
|
|
157
|
-
c(
|
|
158
|
-
modelValue:
|
|
159
|
-
"onUpdate:modelValue":
|
|
155
|
+
v("div", Fe, [
|
|
156
|
+
v("div", Ne, [
|
|
157
|
+
c(ge, {
|
|
158
|
+
modelValue: m.value,
|
|
159
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => m.value = r),
|
|
160
160
|
class: "gitbook-hidden"
|
|
161
161
|
}, null, 8, ["modelValue"]),
|
|
162
|
-
|
|
162
|
+
Pe
|
|
163
163
|
]),
|
|
164
|
-
c(
|
|
165
|
-
v("div",
|
|
164
|
+
c(he),
|
|
165
|
+
v("div", We, [
|
|
166
166
|
s(l).isReadOnly ? (h(), U("button", {
|
|
167
167
|
key: 0,
|
|
168
168
|
class: "text-c-3 hover:bg-b-2 active:text-c-1 p-2 rounded",
|
|
169
169
|
type: "button",
|
|
170
|
-
onClick:
|
|
170
|
+
onClick: o[1] || (o[1] = (r) => s(G).hide())
|
|
171
171
|
}, [
|
|
172
172
|
c(s(C), {
|
|
173
173
|
icon: "Close",
|
|
@@ -177,33 +177,33 @@ ${e}`, "error"), k.emit("abort");
|
|
|
177
177
|
])) : R("", !0)
|
|
178
178
|
])
|
|
179
179
|
]),
|
|
180
|
-
c(
|
|
180
|
+
c(we, null, {
|
|
181
181
|
default: p(() => [
|
|
182
|
-
|
|
183
|
-
class: b([
|
|
184
|
-
},
|
|
182
|
+
de(c(s(Be), {
|
|
183
|
+
class: b([m.value ? "sidebar-active-width" : ""])
|
|
184
|
+
}, ce({
|
|
185
185
|
content: p(() => [
|
|
186
|
-
c(
|
|
187
|
-
onOpenSearchModal:
|
|
186
|
+
c(be, {
|
|
187
|
+
onOpenSearchModal: o[2] || (o[2] = (r) => s(I).show())
|
|
188
188
|
}),
|
|
189
189
|
v("div", {
|
|
190
190
|
class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
191
191
|
"pb-14": !s(l).isReadOnly
|
|
192
192
|
}]),
|
|
193
|
-
onDragenter:
|
|
193
|
+
onDragenter: o[3] || (o[3] = P(() => {
|
|
194
194
|
}, ["prevent"])),
|
|
195
|
-
onDragover:
|
|
195
|
+
onDragover: o[4] || (o[4] = P(() => {
|
|
196
196
|
}, ["prevent"]))
|
|
197
197
|
}, [
|
|
198
|
-
(h(!0), U(
|
|
198
|
+
(h(!0), U(N, null, ue(s(T), (r) => {
|
|
199
199
|
var i, e;
|
|
200
|
-
return h(), O(
|
|
201
|
-
key:
|
|
202
|
-
isDraggable: !s(l).isReadOnly && ((e = (i =
|
|
203
|
-
isDroppable:
|
|
204
|
-
item:
|
|
200
|
+
return h(), O(De, {
|
|
201
|
+
key: r.uid,
|
|
202
|
+
isDraggable: !s(l).isReadOnly && ((e = (i = r.spec) == null ? void 0 : i.info) == null ? void 0 : e.title) !== "Drafts",
|
|
203
|
+
isDroppable: re,
|
|
204
|
+
item: r,
|
|
205
205
|
parentUids: [],
|
|
206
|
-
onOnDragEnd:
|
|
206
|
+
onOnDragEnd: te
|
|
207
207
|
}, {
|
|
208
208
|
leftIcon: p(() => [
|
|
209
209
|
c(s(C), {
|
|
@@ -214,7 +214,7 @@ ${e}`, "error"), k.emit("abort");
|
|
|
214
214
|
}),
|
|
215
215
|
v("div", {
|
|
216
216
|
class: b({
|
|
217
|
-
"rotate-90": s(
|
|
217
|
+
"rotate-90": s(Y)[r.uid]
|
|
218
218
|
})
|
|
219
219
|
}, [
|
|
220
220
|
c(s(C), {
|
|
@@ -230,15 +230,15 @@ ${e}`, "error"), k.emit("abort");
|
|
|
230
230
|
], 34)
|
|
231
231
|
]),
|
|
232
232
|
button: p(() => [
|
|
233
|
-
s(l).isReadOnly ? R("", !0) : (h(), O(
|
|
233
|
+
s(l).isReadOnly ? R("", !0) : (h(), O(ye, {
|
|
234
234
|
key: 0,
|
|
235
235
|
class: b({
|
|
236
|
-
"empty-sidebar-item": s(
|
|
236
|
+
"empty-sidebar-item": s(H).length === 1
|
|
237
237
|
}),
|
|
238
|
-
click:
|
|
238
|
+
click: oe
|
|
239
239
|
}, {
|
|
240
240
|
title: p(() => [
|
|
241
|
-
|
|
241
|
+
me("Add Item")
|
|
242
242
|
]),
|
|
243
243
|
_: 1
|
|
244
244
|
}, 8, ["class"]))
|
|
@@ -248,23 +248,23 @@ ${e}`, "error"), k.emit("abort");
|
|
|
248
248
|
s(l).isReadOnly ? void 0 : {
|
|
249
249
|
name: "header",
|
|
250
250
|
fn: p(() => [
|
|
251
|
-
c(s(
|
|
251
|
+
c(s(Ie))
|
|
252
252
|
]),
|
|
253
253
|
key: "0"
|
|
254
254
|
}
|
|
255
255
|
]), 1032, ["class"]), [
|
|
256
|
-
[
|
|
256
|
+
[fe, m.value]
|
|
257
257
|
]),
|
|
258
|
-
s(w) ? (h(), O(
|
|
258
|
+
s(w) ? (h(), O(_e, {
|
|
259
259
|
key: 0,
|
|
260
|
-
class: b(["flex-1", [
|
|
260
|
+
class: b(["flex-1", [m.value ? "sidebar-active-hide-layout" : ""]])
|
|
261
261
|
}, {
|
|
262
262
|
default: p(() => {
|
|
263
|
-
var
|
|
263
|
+
var r, i, e, a, n;
|
|
264
264
|
return [
|
|
265
|
-
c(
|
|
266
|
-
c(
|
|
267
|
-
response: (n = (a = (
|
|
265
|
+
c(Se),
|
|
266
|
+
c(Ue, {
|
|
267
|
+
response: (n = (a = (r = s(f)) == null ? void 0 : r.history) == null ? void 0 : a[((e = (i = s(f)) == null ? void 0 : i.history) == null ? void 0 : e.length) - 1]) == null ? void 0 : n.response
|
|
268
268
|
}, null, 8, ["response"])
|
|
269
269
|
];
|
|
270
270
|
}),
|
|
@@ -274,10 +274,10 @@ ${e}`, "error"), k.emit("abort");
|
|
|
274
274
|
_: 1
|
|
275
275
|
})
|
|
276
276
|
], 2),
|
|
277
|
-
c(
|
|
277
|
+
c(xe, { modalState: s(I) }, null, 8, ["modalState"])
|
|
278
278
|
], 64));
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
281
|
export {
|
|
282
|
-
|
|
282
|
+
mt as default
|
|
283
283
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AA+TA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAA;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AACzE,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;AAgKlD,iBAAS,cAAc;gBA7HT,IAAI;;gBAAJ,IAAI;
|
|
1
|
+
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AA+TA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAA;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AACzE,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;AAgKlD,iBAAS,cAAc;gBA7HT,IAAI;;gBAAJ,IAAI;EA0cjB;AACD,QAAA,MAAM,eAAe;IArejB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;IAdpD;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;;iBATtC,OAAO;MAuevB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,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"}
|
|
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-481dd9cc"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as H, useCssVars as G, computed as
|
|
1
|
+
import { defineComponent as H, useCssVars as G, computed as l, ref as J, resolveComponent as K, openBlock as o, createElementBlock as m, normalizeClass as d, unref as i, createVNode as U, withCtx as C, createBlock as c, createElementVNode as s, toDisplayString as I, createCommentVNode as b, createTextVNode as E, renderSlot as Q, withDirectives as X, Fragment as Y, renderList as Z, vShow as ee, pushScopeId as te, popScopeId as ie } from "vue";
|
|
2
2
|
import { PathId as re } from "../../router.js";
|
|
3
3
|
import { useWorkspace as se } from "../../store/workspace.js";
|
|
4
|
-
import { ScalarIcon as
|
|
5
|
-
import { Draggable as
|
|
4
|
+
import { ScalarIcon as ae } from "@scalar/components";
|
|
5
|
+
import { Draggable as le } from "@scalar/draggable";
|
|
6
6
|
import { RouterLink as ne } from "vue-router";
|
|
7
7
|
import z from "./RequestSidebarItemMenu.vue.js";
|
|
8
8
|
import oe from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
9
9
|
import { useSidebar as de } from "../../hooks/useSidebar.js";
|
|
10
|
-
const ue = (u) => (te("data-v-
|
|
10
|
+
const ue = (u) => (te("data-v-481dd9cc"), u = u(), ie(), u), pe = { class: "flex flex-row gap-1 items-center" }, fe = { class: "relative" }, me = { class: "flex items-start" }, ce = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, be = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, ge = { class: "relative flex h-fit" }, ve = /* @__PURE__ */ ue(() => /* @__PURE__ */ s("span", null, " ", -1)), he = { key: 2 }, O = "hover:bg-sidebar-active-b indent-padding-left", $e = /* @__PURE__ */ H({
|
|
11
11
|
__name: "RequestSidebarItem",
|
|
12
12
|
props: {
|
|
13
13
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -18,8 +18,8 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
|
|
|
18
18
|
emits: ["onDragEnd"],
|
|
19
19
|
setup(u) {
|
|
20
20
|
G((e) => ({
|
|
21
|
-
"
|
|
22
|
-
|
|
21
|
+
"9215ea88": N.value,
|
|
22
|
+
"602f2182": _.value
|
|
23
23
|
}));
|
|
24
24
|
const t = u, {
|
|
25
25
|
activeRequest: w,
|
|
@@ -27,20 +27,20 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
|
|
|
27
27
|
activeWorkspace: g,
|
|
28
28
|
collections: D,
|
|
29
29
|
folders: V,
|
|
30
|
-
isReadOnly:
|
|
30
|
+
isReadOnly: a,
|
|
31
31
|
requests: k,
|
|
32
32
|
requestExamples: v
|
|
33
|
-
} = se(), { collapsedSidebarFolders: y, toggleSidebarFolder: j } = de(), F =
|
|
33
|
+
} = se(), { collapsedSidebarFolders: y, toggleSidebarFolder: j } = de(), F = l(() => "childUids" in t.item), q = l(() => "spec" in t.item), x = l(() => "summary" in t.item), N = l(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "12px"), _ = l(() => t.parentUids.length ? a.value ? `${(t.parentUids.length - 1) * 12}px` : `${t.parentUids.length * 12}px` : "0px"), R = (e) => {
|
|
34
34
|
var r;
|
|
35
35
|
return "spec" in e ? (r = e.spec.info) == null ? void 0 : r.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
|
|
36
|
-
}, L =
|
|
36
|
+
}, L = l(() => ("requestUid" in t.item ? k[t.item.requestUid] : t.item).method), M = l(
|
|
37
37
|
() => {
|
|
38
38
|
var e;
|
|
39
39
|
return y[t.item.uid] || ((e = w.value) == null ? void 0 : e.uid) === t.item.uid && t.item.childUids.length > 1;
|
|
40
40
|
}
|
|
41
|
-
), P = () => "requestUid" in t.item ? `/workspace/${g.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${g.value.uid}/request/${t.item.uid}`, T =
|
|
41
|
+
), P = () => "requestUid" in t.item ? `/workspace/${g.value.uid}/request/${t.item.requestUid}/examples/${t.item.uid}` : `/workspace/${g.value.uid}/request/${t.item.uid}`, T = l(
|
|
42
42
|
() => B.value[re.Request] === "default" && w.value.uid === t.item.uid
|
|
43
|
-
), h = J(null), S =
|
|
43
|
+
), h = J(null), S = l(() => {
|
|
44
44
|
let e = 0.5, r = 0.5;
|
|
45
45
|
if (!h.value) return { ceiling: e, floor: r };
|
|
46
46
|
const { draggingItem: p } = h.value;
|
|
@@ -50,10 +50,10 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
|
|
|
50
50
|
const p = K("RequestSidebarItem", !0);
|
|
51
51
|
return o(), m("div", {
|
|
52
52
|
class: d(["relative flex flex-row", [
|
|
53
|
-
i(
|
|
53
|
+
i(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" : ""
|
|
54
54
|
]])
|
|
55
55
|
}, [
|
|
56
|
-
U(i(
|
|
56
|
+
U(i(le), {
|
|
57
57
|
id: e.item.uid,
|
|
58
58
|
ref_key: "draggableRef",
|
|
59
59
|
ref: h,
|
|
@@ -83,12 +83,12 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
|
|
|
83
83
|
}, [
|
|
84
84
|
s("span", {
|
|
85
85
|
class: d(["z-10 font-medium w-full pl-2 word-break-break-word", {
|
|
86
|
-
"editable-sidebar-hover-item": !i(
|
|
86
|
+
"editable-sidebar-hover-item": !i(a)
|
|
87
87
|
}])
|
|
88
88
|
}, I(R(e.item)), 3),
|
|
89
89
|
s("div", pe, [
|
|
90
90
|
s("div", fe, [
|
|
91
|
-
i(
|
|
91
|
+
i(a) ? b("", !0) : (o(), c(z, {
|
|
92
92
|
key: 0,
|
|
93
93
|
item: e.item,
|
|
94
94
|
parentUids: e.parentUids
|
|
@@ -105,7 +105,7 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
|
|
|
105
105
|
], 2)
|
|
106
106
|
]),
|
|
107
107
|
_: 1
|
|
108
|
-
}, 8, ["to"])) : !i(
|
|
108
|
+
}, 8, ["to"])) : !i(a) || e.parentUids.length ? (o(), m("button", {
|
|
109
109
|
key: 1,
|
|
110
110
|
class: d(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", O]),
|
|
111
111
|
type: "button",
|
|
@@ -118,7 +118,7 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
|
|
|
118
118
|
"rotate-90": i(y)[e.item.uid]
|
|
119
119
|
})
|
|
120
120
|
}, [
|
|
121
|
-
U(i(
|
|
121
|
+
U(i(ae), {
|
|
122
122
|
class: "text-c-3 text-sm",
|
|
123
123
|
icon: "ChevronRight",
|
|
124
124
|
size: "sm",
|
|
@@ -131,11 +131,11 @@ const ue = (u) => (te("data-v-149f8145"), u = u(), ie(), u), pe = { class: "flex
|
|
|
131
131
|
s("div", be, [
|
|
132
132
|
s("span", {
|
|
133
133
|
class: d(["z-10 font-medium text-left w-full word-break-break-word", {
|
|
134
|
-
"editable-sidebar-hover-item": !i(
|
|
134
|
+
"editable-sidebar-hover-item": !i(a)
|
|
135
135
|
}])
|
|
136
136
|
}, I(R(e.item)), 3),
|
|
137
137
|
s("div", ge, [
|
|
138
|
-
!i(
|
|
138
|
+
!i(a) && (($ = (f = e.item.spec) == null ? void 0 : f.info) == null ? void 0 : $.title) !== "Drafts" ? (o(), c(z, {
|
|
139
139
|
key: 0,
|
|
140
140
|
item: e.item,
|
|
141
141
|
parentUids: e.parentUids
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WorkspaceDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/components/WorkspaceDropdown.vue"],"names":[],"mappings":";AAqWA,wBAKG"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as k, openBlock as c, createElementBlock as i, createVNode as t, unref as e, withCtx as o, Fragment as w, renderList as v, createBlock as g, withModifiers as C, createElementVNode as r, normalizeClass as b, createTextVNode as
|
|
1
|
+
import { defineComponent as k, openBlock as c, createElementBlock as i, createVNode as t, unref as e, withCtx as o, Fragment as w, renderList as v, createBlock as g, withModifiers as C, createElementVNode as r, normalizeClass as b, createTextVNode as p, toDisplayString as m } from "vue";
|
|
2
2
|
import { useWorkspace as y } from "../../../store/workspace.js";
|
|
3
3
|
import { ScalarDropdown as D, ScalarDropdownItem as d, ScalarIcon as l, ScalarDropdownDivider as S, ScalarButton as W } from "@scalar/components";
|
|
4
4
|
import { useRouter as B } from "vue-router";
|
|
5
5
|
import { commandPaletteBus as N } from "../../../libs/event-busses/command-palette.js";
|
|
6
|
-
const j = { class: "xl:min-h-header py-2.5 flex items-center border-b
|
|
6
|
+
const j = { class: "xl:min-h-header xl:py-2.5 py-1 flex items-center border-b px-2.5 text-sm" }, z = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, V = { class: "flex items-center justify-center h-4 w-4" }, E = /* @__PURE__ */ r("span", null, "Create new workspace", -1), T = /* @__PURE__ */ k({
|
|
7
7
|
__name: "WorkspaceDropdown",
|
|
8
8
|
setup(I) {
|
|
9
9
|
const { activeWorkspace: s, workspaces: u } = y(), { push: f } = B(), h = (a) => {
|
|
@@ -30,7 +30,7 @@ const j = { class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-2.5
|
|
|
30
30
|
thickness: "3.5"
|
|
31
31
|
})
|
|
32
32
|
], 2),
|
|
33
|
-
|
|
33
|
+
p(" " + m(_.name), 1)
|
|
34
34
|
]),
|
|
35
35
|
_: 2
|
|
36
36
|
}, 1032, ["onClick"]))), 128)),
|
|
@@ -59,7 +59,7 @@ const j = { class: "xl:min-h-header py-2.5 flex items-center border-b-1/2 px-2.5
|
|
|
59
59
|
}, {
|
|
60
60
|
default: o(() => [
|
|
61
61
|
r("h2", z, [
|
|
62
|
-
m(
|
|
62
|
+
p(m(e(s).name) + " ", 1),
|
|
63
63
|
t(e(l), {
|
|
64
64
|
class: "size-2.5",
|
|
65
65
|
icon: "ChevronDown",
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.0.
|
|
21
|
+
"version": "2.0.47",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -127,14 +127,14 @@
|
|
|
127
127
|
"vue-router": "^4.3.0",
|
|
128
128
|
"whatwg-mimetype": "^4.0.0",
|
|
129
129
|
"zod": "^3.22.4",
|
|
130
|
-
"@scalar/components": "0.12.
|
|
130
|
+
"@scalar/components": "0.12.29",
|
|
131
131
|
"@scalar/draggable": "0.1.4",
|
|
132
|
-
"@scalar/object-utils": "1.1.
|
|
133
|
-
"@scalar/
|
|
134
|
-
"@scalar/
|
|
132
|
+
"@scalar/object-utils": "1.1.6",
|
|
133
|
+
"@scalar/oas-utils": "0.2.28",
|
|
134
|
+
"@scalar/themes": "0.9.22",
|
|
135
135
|
"@scalar/use-codemirror": "0.11.10",
|
|
136
|
-
"@scalar/use-
|
|
137
|
-
"@scalar/use-
|
|
136
|
+
"@scalar/use-tooltip": "1.0.2",
|
|
137
|
+
"@scalar/use-toasts": "0.7.5"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
140
140
|
"@types/content-type": "^1.1.8",
|