@scalar/api-client 2.1.4 → 2.1.6
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 +30 -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 +25 -25
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +5 -87
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +87 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +6 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +38 -37
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +6 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- 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 +5 -5
- package/dist/hooks/useFileDialog.d.ts +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +2 -313
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +25 -647
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +14 -325
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/errors.d.ts +1 -1
- package/dist/libs/errors.js +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +40 -24
- package/dist/store/collections.d.ts +0 -63
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +0 -13
- package/dist/store/cookies.d.ts.map +1 -1
- package/dist/store/environment.d.ts +0 -7
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +2 -102
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +0 -32
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +0 -55
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/servers.d.ts +0 -8
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +25 -647
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +0 -14
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +0 -19
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +49 -47
- 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 +47 -49
- 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 +50 -50
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +20 -20
- package/package.json +8 -8
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as G, computed as w, ref as K, watch as
|
|
1
|
+
import { defineComponent as G, computed as w, ref as K, watch as S, openBlock as p, createBlock as b, withCtx as u, createTextVNode as q, toDisplayString as D, createVNode as s, unref as c, createElementVNode as x, createElementBlock as F, Fragment as Q, nextTick as Z } from "vue";
|
|
2
2
|
import I from "../../../components/CodeInput/CodeInput.vue.js";
|
|
3
3
|
import ee from "../../../components/DataTable/DataTable.vue.js";
|
|
4
4
|
import ae from "../../../components/DataTable/DataTableHeader.vue.js";
|
|
5
5
|
import R from "../../../components/DataTable/DataTableRow.vue.js";
|
|
6
6
|
import te from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
|
-
import { ScalarListbox as oe, ScalarButton as
|
|
8
|
-
import { requestExampleParametersSchema as
|
|
7
|
+
import { ScalarListbox as oe, ScalarButton as k, ScalarIcon as L } from "@scalar/components";
|
|
8
|
+
import { requestExampleParametersSchema as M } from "@scalar/oas-utils/entities/spec";
|
|
9
9
|
import { canMethodHaveBody as ne } from "@scalar/oas-utils/helpers";
|
|
10
|
-
import
|
|
10
|
+
import W from "./RequestTable.vue.js";
|
|
11
11
|
import { useWorkspace as le } from "../../../store/store.js";
|
|
12
|
-
import { useFileDialog as
|
|
12
|
+
import { useFileDialog as A } from "../../../hooks/useFileDialog.js";
|
|
13
13
|
const re = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "text-c-3 flex min-h-10 w-full items-center justify-center p-2 text-sm"
|
|
@@ -18,13 +18,13 @@ const re = {
|
|
|
18
18
|
], ue = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "flex items-center justify-center p-1.5 overflow-hidden"
|
|
21
|
-
}, se = { class: "text-c-2 text-xs w-full border rounded p-1 max-w-full overflow-hidden whitespace-nowrap" }, ce = /* @__PURE__ */ x("span", null, "Upload File", -1),
|
|
21
|
+
}, se = { class: "text-c-2 text-xs w-full border rounded p-1 max-w-full overflow-hidden whitespace-nowrap" }, ce = /* @__PURE__ */ x("span", null, "Upload File", -1), Re = /* @__PURE__ */ G({
|
|
22
22
|
__name: "RequestBody",
|
|
23
23
|
props: {
|
|
24
24
|
title: {}
|
|
25
25
|
},
|
|
26
26
|
setup(me) {
|
|
27
|
-
const { activeRequest: i, activeExample: a, requestExampleMutators: r } = le(),
|
|
27
|
+
const { activeRequest: i, activeExample: a, requestExampleMutators: r } = le(), z = {
|
|
28
28
|
json: "json",
|
|
29
29
|
xml: "xml",
|
|
30
30
|
yaml: "yaml",
|
|
@@ -43,19 +43,19 @@ const re = {
|
|
|
43
43
|
}).map(([e, o]) => ({
|
|
44
44
|
id: e,
|
|
45
45
|
label: o
|
|
46
|
-
})),
|
|
46
|
+
})), _ = w(() => {
|
|
47
47
|
var e, o;
|
|
48
48
|
return a.value ? a.value.body.activeBody === "formData" ? ((e = a.value.body.formData) == null ? void 0 : e.encoding) === "urlencoded" ? "formUrlEncoded" : "multipartForm" : a.value.body.activeBody === "binary" ? "binaryFile" : a.value.body.activeBody === "raw" && ((o = a.value.body.raw) != null && o.encoding) ? a.value.body.raw.encoding === "html" ? "other" : a.value.body.raw.encoding : "none" : "none";
|
|
49
49
|
}), m = w({
|
|
50
50
|
get: () => h.find(
|
|
51
|
-
(e) => e.id ===
|
|
51
|
+
(e) => e.id === _.value
|
|
52
52
|
) ?? h[h.length - 1],
|
|
53
53
|
set: (e) => {
|
|
54
|
-
e != null && e.id &&
|
|
54
|
+
e != null && e.id && C(e.id);
|
|
55
55
|
}
|
|
56
|
-
}), g = K(null),
|
|
56
|
+
}), g = K(null), O = w(() => {
|
|
57
57
|
const e = m.value.id;
|
|
58
|
-
return
|
|
58
|
+
return z[e] ?? "plaintext";
|
|
59
59
|
});
|
|
60
60
|
function U() {
|
|
61
61
|
console.log("deleteRow");
|
|
@@ -71,7 +71,7 @@ const re = {
|
|
|
71
71
|
n
|
|
72
72
|
);
|
|
73
73
|
} else {
|
|
74
|
-
const n = [
|
|
74
|
+
const n = [M.parse({ [o]: t })];
|
|
75
75
|
r.edit(
|
|
76
76
|
a.value.uid,
|
|
77
77
|
"body.formData.value",
|
|
@@ -87,9 +87,9 @@ const re = {
|
|
|
87
87
|
var e, o, t;
|
|
88
88
|
return ((t = (o = (e = a.value) == null ? void 0 : e.body) == null ? void 0 : o.formData) == null ? void 0 : t.value) ?? [];
|
|
89
89
|
}
|
|
90
|
-
),
|
|
90
|
+
), E = () => v.value.length === 0 && B(), B = () => {
|
|
91
91
|
if (!i.value || !a.value) return;
|
|
92
|
-
const e =
|
|
92
|
+
const e = M.parse({
|
|
93
93
|
enabled: !1
|
|
94
94
|
}), o = [...v.value, e];
|
|
95
95
|
a.value.body.formData ? r.edit(
|
|
@@ -145,7 +145,7 @@ const re = {
|
|
|
145
145
|
activeBody: "raw",
|
|
146
146
|
encoding: "html",
|
|
147
147
|
header: "application/html"
|
|
148
|
-
} : { activeBody: "raw", encoding: void 0, header: void 0 },
|
|
148
|
+
} : { activeBody: "raw", encoding: void 0, header: void 0 }, C = (e) => {
|
|
149
149
|
var f, y;
|
|
150
150
|
if (!a.value) return;
|
|
151
151
|
const { activeBody: o, encoding: t, header: l } = H(e);
|
|
@@ -164,11 +164,11 @@ const re = {
|
|
|
164
164
|
value: ((y = a.value.body.formData) == null ? void 0 : y.value) ?? []
|
|
165
165
|
});
|
|
166
166
|
else if (!t) {
|
|
167
|
-
const { raw:
|
|
167
|
+
const { raw: N, ...Y } = a.value.body;
|
|
168
168
|
r.edit(a.value.uid, "body", Y);
|
|
169
169
|
}
|
|
170
170
|
const n = [...a.value.parameters.headers], d = n.findIndex(
|
|
171
|
-
(
|
|
171
|
+
(N) => N.key.toLowerCase() === "content-type"
|
|
172
172
|
);
|
|
173
173
|
d >= 0 ? l ? n[d].value = l : n.splice(d, 1) : l && n.unshift({
|
|
174
174
|
key: "Content-Type",
|
|
@@ -179,8 +179,8 @@ const re = {
|
|
|
179
179
|
"parameters.headers",
|
|
180
180
|
n
|
|
181
181
|
);
|
|
182
|
-
},
|
|
183
|
-
const { open: o } =
|
|
182
|
+
}, j = async (e) => {
|
|
183
|
+
const { open: o } = A({
|
|
184
184
|
onChange: async (t) => {
|
|
185
185
|
const l = t == null ? void 0 : t[0];
|
|
186
186
|
if (l && i.value && a.value) {
|
|
@@ -203,7 +203,7 @@ const re = {
|
|
|
203
203
|
function J() {
|
|
204
204
|
!i.value || !a.value || r.edit(a.value.uid, "body.binary", void 0);
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function V(e) {
|
|
207
207
|
if (!i.value || !a.value) return;
|
|
208
208
|
const t = [...v.value];
|
|
209
209
|
t[e] = {
|
|
@@ -216,7 +216,7 @@ const re = {
|
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
function X() {
|
|
219
|
-
const { open: e } =
|
|
219
|
+
const { open: e } = A({
|
|
220
220
|
onChange: async (o) => {
|
|
221
221
|
const t = o == null ? void 0 : o[0];
|
|
222
222
|
t && i.value && a.value && r.edit(
|
|
@@ -230,25 +230,27 @@ const re = {
|
|
|
230
230
|
});
|
|
231
231
|
e();
|
|
232
232
|
}
|
|
233
|
-
return
|
|
233
|
+
return S(
|
|
234
234
|
m,
|
|
235
235
|
(e) => {
|
|
236
|
-
["multipartForm", "formUrlEncoded"].includes(e == null ? void 0 : e.id) &&
|
|
236
|
+
["multipartForm", "formUrlEncoded"].includes(e == null ? void 0 : e.id) && E();
|
|
237
237
|
},
|
|
238
238
|
{ immediate: !0 }
|
|
239
|
-
),
|
|
239
|
+
), S(
|
|
240
240
|
() => {
|
|
241
241
|
var e;
|
|
242
242
|
return (e = a.value) == null ? void 0 : e.uid;
|
|
243
243
|
},
|
|
244
244
|
() => {
|
|
245
245
|
var e;
|
|
246
|
-
(e = i.value) != null && e.method && ne(i.value.method) &&
|
|
246
|
+
(e = i.value) != null && e.method && ne(i.value.method) && C(_.value), ["multipartForm", "formUrlEncoded"].includes(
|
|
247
|
+
_.value
|
|
248
|
+
) && E();
|
|
247
249
|
},
|
|
248
250
|
{ immediate: !0 }
|
|
249
251
|
), (e, o) => (p(), b(te, null, {
|
|
250
252
|
title: u(() => [
|
|
251
|
-
|
|
253
|
+
q(D(e.title), 1)
|
|
252
254
|
]),
|
|
253
255
|
default: u(() => [
|
|
254
256
|
s(ee, { columns: [""] }, {
|
|
@@ -266,7 +268,7 @@ const re = {
|
|
|
266
268
|
teleport: ""
|
|
267
269
|
}, {
|
|
268
270
|
default: u(() => [
|
|
269
|
-
s(c(
|
|
271
|
+
s(c(k), {
|
|
270
272
|
class: "flex gap-1.5 h-auto px-1.5 text-c-2 font-normal hover:text-c-1",
|
|
271
273
|
fullWidth: "",
|
|
272
274
|
variant: "ghost"
|
|
@@ -274,8 +276,8 @@ const re = {
|
|
|
274
276
|
default: u(() => {
|
|
275
277
|
var t;
|
|
276
278
|
return [
|
|
277
|
-
x("span", null,
|
|
278
|
-
s(c(
|
|
279
|
+
x("span", null, D((t = m.value) == null ? void 0 : t.label), 1),
|
|
280
|
+
s(c(L), {
|
|
279
281
|
icon: "ChevronDown",
|
|
280
282
|
size: "xs",
|
|
281
283
|
thickness: "2.5"
|
|
@@ -297,21 +299,21 @@ const re = {
|
|
|
297
299
|
default: u(() => {
|
|
298
300
|
var t, l, n, d, f;
|
|
299
301
|
return [
|
|
300
|
-
m.value.id === "none" ? (p(),
|
|
301
|
-
(t = c(a)) != null && t.body.binary ? (p(),
|
|
302
|
-
x("span", se,
|
|
303
|
-
s(c(
|
|
302
|
+
m.value.id === "none" ? (p(), F("div", re, ie)) : m.value.id === "binaryFile" ? (p(), F("div", ue, [
|
|
303
|
+
(t = c(a)) != null && t.body.binary ? (p(), F(Q, { key: 0 }, [
|
|
304
|
+
x("span", se, D(((l = c(a)) == null ? void 0 : l.body.binary).name), 1),
|
|
305
|
+
s(c(k), {
|
|
304
306
|
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
|
|
305
307
|
size: "sm",
|
|
306
308
|
variant: "outlined",
|
|
307
309
|
onClick: J
|
|
308
310
|
}, {
|
|
309
311
|
default: u(() => [
|
|
310
|
-
|
|
312
|
+
q(" Delete ")
|
|
311
313
|
]),
|
|
312
314
|
_: 1
|
|
313
315
|
})
|
|
314
|
-
], 64)) : (p(), b(c(
|
|
316
|
+
], 64)) : (p(), b(c(k), {
|
|
315
317
|
key: 1,
|
|
316
318
|
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 shadow-none",
|
|
317
319
|
size: "sm",
|
|
@@ -320,7 +322,7 @@ const re = {
|
|
|
320
322
|
}, {
|
|
321
323
|
default: u(() => [
|
|
322
324
|
ce,
|
|
323
|
-
s(c(
|
|
325
|
+
s(c(L), {
|
|
324
326
|
class: "ml-1",
|
|
325
327
|
icon: "UploadSimple",
|
|
326
328
|
size: "xs",
|
|
@@ -329,7 +331,7 @@ const re = {
|
|
|
329
331
|
]),
|
|
330
332
|
_: 1
|
|
331
333
|
}))
|
|
332
|
-
])) : m.value.id == "multipartForm" ? (p(), b(
|
|
334
|
+
])) : m.value.id == "multipartForm" ? (p(), b(W, {
|
|
333
335
|
key: 2,
|
|
334
336
|
ref_key: "tableWrapperRef",
|
|
335
337
|
ref: g,
|
|
@@ -337,13 +339,13 @@ const re = {
|
|
|
337
339
|
columns: ["32px", "", "", "61px"],
|
|
338
340
|
items: v.value,
|
|
339
341
|
showUploadButton: "",
|
|
340
|
-
onAddRow:
|
|
342
|
+
onAddRow: B,
|
|
341
343
|
onDeleteRow: U,
|
|
342
|
-
onRemoveFile:
|
|
344
|
+
onRemoveFile: V,
|
|
343
345
|
onToggleRow: P,
|
|
344
346
|
onUpdateRow: T,
|
|
345
|
-
onUploadFile:
|
|
346
|
-
}, null, 8, ["items"])) : m.value.id == "formUrlEncoded" ? (p(), b(
|
|
347
|
+
onUploadFile: j
|
|
348
|
+
}, null, 8, ["items"])) : m.value.id == "formUrlEncoded" ? (p(), b(W, {
|
|
347
349
|
key: 3,
|
|
348
350
|
ref_key: "tableWrapperRef",
|
|
349
351
|
ref: g,
|
|
@@ -351,16 +353,16 @@ const re = {
|
|
|
351
353
|
columns: ["32px", "", "", "61px"],
|
|
352
354
|
items: v.value,
|
|
353
355
|
showUploadButton: "",
|
|
354
|
-
onAddRow:
|
|
356
|
+
onAddRow: B,
|
|
355
357
|
onDeleteRow: U,
|
|
356
|
-
onRemoveFile:
|
|
358
|
+
onRemoveFile: V,
|
|
357
359
|
onToggleRow: P,
|
|
358
360
|
onUpdateRow: T,
|
|
359
|
-
onUploadFile:
|
|
361
|
+
onUploadFile: j
|
|
360
362
|
}, null, 8, ["items"])) : (p(), b(I, {
|
|
361
363
|
key: 4,
|
|
362
364
|
content: "",
|
|
363
|
-
language:
|
|
365
|
+
language: O.value,
|
|
364
366
|
lineNumbers: "",
|
|
365
367
|
lint: "",
|
|
366
368
|
modelValue: ((f = (d = (n = c(a)) == null ? void 0 : n.body) == null ? void 0 : d.raw) == null ? void 0 : f.value) ?? "",
|
|
@@ -380,5 +382,5 @@ const re = {
|
|
|
380
382
|
}
|
|
381
383
|
});
|
|
382
384
|
export {
|
|
383
|
-
|
|
385
|
+
Re as default
|
|
384
386
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBA4Oe,OAAO;gBACR,OAAO;;;;cAMkB,MAAM;aAAO,MAAM;;;iBAP3C,OAAO;gBACR,OAAO;;;cAMkB,MAAM;aAAO,MAAM;;;;AAqgB1D,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4163cb67"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineComponent as J, reactive as Q, watch as X,
|
|
2
|
-
import
|
|
3
|
-
import { useSearch as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { dragHandlerFactory as
|
|
7
|
-
import { ScalarSearchInput as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useSidebar as
|
|
12
|
-
import { useWorkspace as
|
|
13
|
-
import { hotKeyBus as
|
|
1
|
+
import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as r, createElementBlock as c, Fragment as b, withDirectives as _, createVNode as l, unref as t, normalizeClass as f, createSlots as ee, withCtx as a, createElementVNode as h, isRef as te, withKeys as S, withModifiers as u, createBlock as m, renderList as I, createTextVNode as D, toDisplayString as oe, createCommentVNode as $, vShow as se } from "vue";
|
|
2
|
+
import re from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
3
|
+
import { useSearch as ae } from "../../components/Search/useSearch.js";
|
|
4
|
+
import ne from "../../components/Sidebar/SidebarButton.vue.js";
|
|
5
|
+
import ie from "./RequestSidebarItemMenu.vue.js";
|
|
6
|
+
import { dragHandlerFactory as le } from "./handle-drag.js";
|
|
7
|
+
import { ScalarSearchInput as de, ScalarSearchResultList as ue, ScalarSearchResultItem as me, ScalarIcon as x } from "@scalar/components";
|
|
8
|
+
import pe from "./RequestSidebarItem.vue.js";
|
|
9
|
+
import fe from "../../components/Sidebar/Sidebar.vue.js";
|
|
10
|
+
import ce from "./components/WorkspaceDropdown.vue.js";
|
|
11
|
+
import { useSidebar as be } from "../../hooks/useSidebar.js";
|
|
12
|
+
import { useWorkspace as he } from "../../store/store.js";
|
|
13
|
+
import { hotKeyBus as B } from "../../libs/event-busses/hot-keys-bus.js";
|
|
14
14
|
import { commandPaletteBus as V } from "../../libs/event-busses/command-palette-bus.js";
|
|
15
|
-
const
|
|
15
|
+
const Se = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, qe = /* @__PURE__ */ J({
|
|
16
16
|
__name: "RequestSidebar",
|
|
17
17
|
props: {
|
|
18
18
|
showSidebar: { type: Boolean },
|
|
19
19
|
isReadonly: { type: Boolean }
|
|
20
20
|
},
|
|
21
21
|
emits: ["update:showSidebar", "newTab"],
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
activeWorkspaceCollections:
|
|
25
|
-
activeRequest:
|
|
26
|
-
activeWorkspaceRequests:
|
|
27
|
-
findRequestParents:
|
|
28
|
-
isReadOnly:
|
|
29
|
-
} = R, { handleDragEnd: z, isDroppable: K } =
|
|
22
|
+
setup(F, { emit: q }) {
|
|
23
|
+
const E = F, v = q, R = he(), {
|
|
24
|
+
activeWorkspaceCollections: M,
|
|
25
|
+
activeRequest: N,
|
|
26
|
+
activeWorkspaceRequests: O,
|
|
27
|
+
findRequestParents: P,
|
|
28
|
+
isReadOnly: T
|
|
29
|
+
} = R, { handleDragEnd: z, isDroppable: K } = le(R), { collapsedSidebarFolders: U, setCollapsedSidebarFolder: W } = be(), d = Q({ open: !1 });
|
|
30
30
|
X(
|
|
31
|
-
|
|
31
|
+
N,
|
|
32
32
|
(s) => {
|
|
33
|
-
s &&
|
|
33
|
+
s && P(s).forEach(
|
|
34
34
|
(e) => W(e, !0)
|
|
35
35
|
);
|
|
36
36
|
},
|
|
@@ -46,27 +46,25 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
|
|
|
46
46
|
searchResultRefs: j,
|
|
47
47
|
navigateSearchResults: y,
|
|
48
48
|
selectSearchResult: A
|
|
49
|
-
} =
|
|
49
|
+
} = ae(), C = (s) => {
|
|
50
50
|
var e;
|
|
51
|
-
s.toggleSidebar && v("update:showSidebar",
|
|
51
|
+
s.toggleSidebar && v("update:showSidebar", E.showSidebar), s.openCommandPalette && (s.openCommandPalette.preventDefault(), V.emit()), s.focusRequestSearch && ((e = k.value) == null || e.focus());
|
|
52
52
|
};
|
|
53
|
-
return Y(() =>
|
|
54
|
-
|
|
55
|
-
}), _(() => {
|
|
56
|
-
x.off(C);
|
|
53
|
+
return Y(() => B.on(C)), Z(() => {
|
|
54
|
+
B.off(C);
|
|
57
55
|
}), (s, e) => (r(), c(b, null, [
|
|
58
|
-
|
|
56
|
+
_(l(t(fe), {
|
|
59
57
|
class: f([s.showSidebar ? "sidebar-active-width" : ""]),
|
|
60
58
|
showSidebar: s.showSidebar,
|
|
61
59
|
"onUpdate:showSidebar": e[8] || (e[8] = (o) => s.$emit("update:showSidebar", o))
|
|
62
|
-
},
|
|
60
|
+
}, ee({
|
|
63
61
|
content: a(() => [
|
|
64
|
-
h("div",
|
|
65
|
-
l(t(
|
|
62
|
+
h("div", Se, [
|
|
63
|
+
l(t(de), {
|
|
66
64
|
ref_key: "searchInputRef",
|
|
67
65
|
ref: k,
|
|
68
66
|
modelValue: t(p),
|
|
69
|
-
"onUpdate:modelValue": e[0] || (e[0] = (o) =>
|
|
67
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => te(p) ? p.value = o : null),
|
|
70
68
|
sidebar: "",
|
|
71
69
|
onInput: t(L),
|
|
72
70
|
onKeydown: [
|
|
@@ -85,13 +83,13 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
|
|
|
85
83
|
onDragover: e[7] || (e[7] = u(() => {
|
|
86
84
|
}, ["prevent"]))
|
|
87
85
|
}, [
|
|
88
|
-
t(p) ? (r(), m(t(
|
|
86
|
+
t(p) ? (r(), m(t(ue), {
|
|
89
87
|
key: 0,
|
|
90
88
|
class: "gap-px custom-scroll",
|
|
91
89
|
noResults: !t(w).length
|
|
92
90
|
}, {
|
|
93
91
|
default: a(() => [
|
|
94
|
-
(r(!0), c(b, null, I(t(w), (o, i) => (r(), m(t(
|
|
92
|
+
(r(!0), c(b, null, I(t(w), (o, i) => (r(), m(t(me), {
|
|
95
93
|
id: `#search-input-${o.item.id}`,
|
|
96
94
|
key: o.refIndex,
|
|
97
95
|
ref_for: !0,
|
|
@@ -102,21 +100,21 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
|
|
|
102
100
|
onFocus: (n) => g.value = i
|
|
103
101
|
}, {
|
|
104
102
|
addon: a(() => [
|
|
105
|
-
l(
|
|
103
|
+
l(re, {
|
|
106
104
|
class: "font-bold",
|
|
107
105
|
method: o.item.httpVerb ?? "get"
|
|
108
106
|
}, null, 8, ["method"])
|
|
109
107
|
]),
|
|
110
108
|
default: a(() => [
|
|
111
|
-
D(
|
|
109
|
+
D(oe(o.item.title) + " ", 1)
|
|
112
110
|
]),
|
|
113
111
|
_: 2
|
|
114
112
|
}, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
|
|
115
113
|
]),
|
|
116
114
|
_: 1
|
|
117
|
-
}, 8, ["noResults"])) : (r(!0), c(b, { key: 1 }, I(t(
|
|
115
|
+
}, 8, ["noResults"])) : (r(!0), c(b, { key: 1 }, I(t(M), (o) => {
|
|
118
116
|
var i;
|
|
119
|
-
return r(), m(
|
|
117
|
+
return r(), m(pe, {
|
|
120
118
|
key: o.uid,
|
|
121
119
|
isDraggable: !s.isReadonly && ((i = o.info) == null ? void 0 : i.title) !== "Drafts",
|
|
122
120
|
isDroppable: t(K),
|
|
@@ -128,7 +126,7 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
|
|
|
128
126
|
onOpenMenu: e[5] || (e[5] = (n) => Object.assign(d, n))
|
|
129
127
|
}, {
|
|
130
128
|
leftIcon: a(() => [
|
|
131
|
-
l(t(
|
|
129
|
+
l(t(x), {
|
|
132
130
|
class: "text-sidebar-c-2 text-sm group-hover:hidden",
|
|
133
131
|
icon: "CodeFolder",
|
|
134
132
|
size: "sm",
|
|
@@ -139,7 +137,7 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
|
|
|
139
137
|
"rotate-90": t(U)[o.uid]
|
|
140
138
|
})
|
|
141
139
|
}, [
|
|
142
|
-
l(t(
|
|
140
|
+
l(t(x), {
|
|
143
141
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
144
142
|
icon: "ChevronRight",
|
|
145
143
|
size: "sm"
|
|
@@ -152,10 +150,10 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
|
|
|
152
150
|
], 34)
|
|
153
151
|
]),
|
|
154
152
|
button: a(() => [
|
|
155
|
-
s.isReadonly ? $("", !0) : (r(), m(
|
|
153
|
+
s.isReadonly ? $("", !0) : (r(), m(ne, {
|
|
156
154
|
key: 0,
|
|
157
155
|
class: f({
|
|
158
|
-
"empty-sidebar-item": t(
|
|
156
|
+
"empty-sidebar-item": t(O).length === 1
|
|
159
157
|
}),
|
|
160
158
|
click: t(V).emit
|
|
161
159
|
}, {
|
|
@@ -170,14 +168,14 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
|
|
|
170
168
|
s.isReadonly ? void 0 : {
|
|
171
169
|
name: "header",
|
|
172
170
|
fn: a(() => [
|
|
173
|
-
l(t(
|
|
171
|
+
l(t(ce))
|
|
174
172
|
]),
|
|
175
173
|
key: "0"
|
|
176
174
|
}
|
|
177
175
|
]), 1032, ["class", "showSidebar"]), [
|
|
178
|
-
[
|
|
176
|
+
[se, s.showSidebar]
|
|
179
177
|
]),
|
|
180
|
-
!t(
|
|
178
|
+
!t(T) && d ? (r(), m(ie, {
|
|
181
179
|
key: 0,
|
|
182
180
|
menuItem: d,
|
|
183
181
|
onCloseMenu: e[9] || (e[9] = (o) => d.open = !1)
|
|
@@ -186,5 +184,5 @@ const ve = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Me = /
|
|
|
186
184
|
}
|
|
187
185
|
});
|
|
188
186
|
export {
|
|
189
|
-
|
|
187
|
+
qe as default
|
|
190
188
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAybA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAqO1B,iBAAS,cAAc;gBA9LT,IAAI;;gBAAJ,IAAI;EA2vBjB;AACD,QAAA,MAAM,eAAe;IA3xBjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;;;;;IAjBzB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;;;;;;iBAZX,OAAO;MA6xBvB,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
|
|
5
|
+
const d = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4a6dd4d2"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
d as default
|
|
8
8
|
};
|