@scalar/api-client 2.1.48 → 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 +14 -0
- package/dist/assets/keycap.ascii.js +25 -0
- package/dist/components/CodeInput/codeVariableWidget.js +12 -12
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
- 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/RequestPathParams.vue.js +23 -23
- 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/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +74 -34
- package/package.json +5 -5
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as _, computed as $, watch as K, openBlock as d, createBlock as h, withCtx as y, createTextVNode as x, toDisplayString as q, createElementBlock as C, createElementVNode as P } from "vue";
|
|
2
|
+
import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
3
|
import V from "./RequestTable.vue.js";
|
|
4
|
-
import {
|
|
4
|
+
import { REGEX as M } from "@scalar/oas-utils/helpers";
|
|
5
5
|
import { useWorkspace as B } from "../../../store/store.js";
|
|
6
6
|
const N = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
|
|
9
|
-
},
|
|
9
|
+
}, D = /* @__PURE__ */ _({
|
|
10
10
|
__name: "RequestPathParams",
|
|
11
11
|
props: {
|
|
12
12
|
title: {},
|
|
13
13
|
paramKey: {}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const o =
|
|
15
|
+
setup(b) {
|
|
16
|
+
const o = b, {
|
|
17
17
|
activeRequest: s,
|
|
18
18
|
activeExample: n,
|
|
19
|
-
requestMutators:
|
|
20
|
-
requestExampleMutators:
|
|
21
|
-
} = B(), i =
|
|
19
|
+
requestMutators: v,
|
|
20
|
+
requestExampleMutators: f
|
|
21
|
+
} = B(), i = $(() => {
|
|
22
22
|
const e = n.value;
|
|
23
23
|
return e ? e.parameters[o.paramKey].map((a) => {
|
|
24
24
|
var r;
|
|
@@ -27,7 +27,7 @@ const N = {
|
|
|
27
27
|
enum: a.enum || ((r = e.serverVariables) == null ? void 0 : r[a.key])
|
|
28
28
|
};
|
|
29
29
|
}) : [];
|
|
30
|
-
}),
|
|
30
|
+
}), g = (e, a, r) => {
|
|
31
31
|
var u, t;
|
|
32
32
|
if (!s.value || !n.value) return;
|
|
33
33
|
const p = n.value.parameters[o.paramKey], l = (u = p[e]) == null ? void 0 : u.key;
|
|
@@ -35,18 +35,18 @@ const N = {
|
|
|
35
35
|
if ((t = p[e]) != null && t.required)
|
|
36
36
|
return;
|
|
37
37
|
if (r) {
|
|
38
|
-
const c = encodeURIComponent(l), m = encodeURIComponent(r),
|
|
39
|
-
|
|
38
|
+
const c = encodeURIComponent(l), m = encodeURIComponent(r), E = new RegExp(`(?<=/):${c}(?=[/?#]|$)`, "g"), R = s.value.path.replace(
|
|
39
|
+
E,
|
|
40
40
|
`:${m}`
|
|
41
41
|
);
|
|
42
|
-
|
|
42
|
+
v.edit(s.value.uid, "path", R);
|
|
43
43
|
} else {
|
|
44
44
|
p.splice(e, 1);
|
|
45
45
|
const c = new RegExp(`/:${encodeURIComponent(l)}(?=[/?#]|$)`, "g"), m = s.value.path.replace(c, "");
|
|
46
|
-
|
|
46
|
+
v.edit(s.value.uid, "path", m);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
f.edit(
|
|
50
50
|
n.value.uid,
|
|
51
51
|
`parameters.${o.paramKey}.${e}.${a}`,
|
|
52
52
|
r
|
|
@@ -54,18 +54,18 @@ const N = {
|
|
|
54
54
|
}, k = (e) => {
|
|
55
55
|
var u;
|
|
56
56
|
if (!n.value) return;
|
|
57
|
-
const a = ((u = e.match(M)) == null ? void 0 : u.map((t) => t.slice(1, -1))) || [], r = n.value.parameters[o.paramKey], p = new Map(r.map((t) => [t.key, t])), l = a.map(
|
|
57
|
+
const a = ((u = e.match(M.PATH)) == null ? void 0 : u.map((t) => t.slice(1, -1))) || [], r = n.value.parameters[o.paramKey], p = new Map(r.map((t) => [t.key, t])), l = a.map(
|
|
58
58
|
(t) => p.get(t) || { key: t, value: "", enabled: !0 }
|
|
59
59
|
);
|
|
60
60
|
r.forEach((t) => {
|
|
61
61
|
!a.includes(t.key) && (t.value || t.required) && l.push(t);
|
|
62
|
-
}), r.splice(0, r.length, ...l),
|
|
62
|
+
}), r.splice(0, r.length, ...l), f.edit(
|
|
63
63
|
n.value.uid,
|
|
64
64
|
`parameters.${o.paramKey}`,
|
|
65
65
|
r
|
|
66
66
|
);
|
|
67
67
|
};
|
|
68
|
-
return
|
|
68
|
+
return K(
|
|
69
69
|
() => {
|
|
70
70
|
var e;
|
|
71
71
|
return (e = s.value) == null ? void 0 : e.path;
|
|
@@ -73,22 +73,22 @@ const N = {
|
|
|
73
73
|
(e) => {
|
|
74
74
|
e && k(e);
|
|
75
75
|
}
|
|
76
|
-
), (e, a) => (d(),
|
|
76
|
+
), (e, a) => (d(), h(w, {
|
|
77
77
|
itemCount: i.value.length
|
|
78
78
|
}, {
|
|
79
79
|
title: y(() => [
|
|
80
80
|
x(q(e.title), 1)
|
|
81
81
|
]),
|
|
82
82
|
default: y(() => [
|
|
83
|
-
i.value.length ? (d(),
|
|
83
|
+
i.value.length ? (d(), h(V, {
|
|
84
84
|
key: 0,
|
|
85
85
|
class: "flex-1",
|
|
86
86
|
isEnabledHidden: "",
|
|
87
87
|
items: i.value,
|
|
88
|
-
onUpdateRow:
|
|
88
|
+
onUpdateRow: g
|
|
89
89
|
}, null, 8, ["items"])) : (d(), C("div", N, a[0] || (a[0] = [
|
|
90
90
|
x(" You can use variables in your path: "),
|
|
91
|
-
|
|
91
|
+
P("code", { class: "bg-b-2 ml-1 px-1 rounded" }, "/endpoint/{my_path_variable}", -1)
|
|
92
92
|
])))
|
|
93
93
|
]),
|
|
94
94
|
_: 1
|
|
@@ -96,5 +96,5 @@ const N = {
|
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
export {
|
|
99
|
-
|
|
99
|
+
D as default
|
|
100
100
|
};
|
|
@@ -3,12 +3,14 @@ type __VLS_Props = {
|
|
|
3
3
|
isReadonly: boolean;
|
|
4
4
|
};
|
|
5
5
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
clearDrafts: () => any;
|
|
6
7
|
newTab: (args_0: {
|
|
7
8
|
name: string;
|
|
8
9
|
uid: string;
|
|
9
10
|
}) => any;
|
|
10
11
|
"update:showSidebar": (v: boolean) => any;
|
|
11
12
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onClearDrafts?: (() => any) | undefined;
|
|
12
14
|
onNewTab?: ((args_0: {
|
|
13
15
|
name: string;
|
|
14
16
|
uid: string;
|
|
@@ -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":"AAmaA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;cAKqC,MAAM;aAAO,MAAM;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAgoB1D,wBAOG"}
|
|
@@ -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-3c33a096"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,172 +1,195 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useSearch as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
1
|
+
import { defineComponent as oe, useId as re, reactive as ae, watch as ne, onMounted as ie, onBeforeUnmount as le, computed as de, openBlock as a, createElementBlock as h, Fragment as w, withDirectives as ue, createVNode as u, unref as o, normalizeClass as m, createSlots as ce, withCtx as l, createElementVNode as i, isRef as pe, withKeys as g, withModifiers as c, createBlock as d, renderList as B, createTextVNode as y, toDisplayString as me, createCommentVNode as I, vShow as fe } from "vue";
|
|
2
|
+
import be from "../../assets/rabbit.ascii.js";
|
|
3
|
+
import he from "../../assets/rabbitjump.ascii.js";
|
|
4
|
+
import ve from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
5
|
+
import E from "../../components/ScalarAsciiArt.vue.js";
|
|
6
|
+
import { useSearch as Se } from "../../components/Search/useSearch.js";
|
|
7
|
+
import Re from "../../components/Sidebar/SidebarButton.vue.js";
|
|
8
|
+
import { createInitialRequest as ke } from "../../store/requests.js";
|
|
9
|
+
import we from "./RequestSidebarItemMenu.vue.js";
|
|
10
|
+
import { dragHandlerFactory as ge } from "./handle-drag.js";
|
|
11
|
+
import { ScalarSearchInput as ye, ScalarSearchResultList as Ie, ScalarSearchResultItem as qe, ScalarIcon as O, ScalarButton as Ce } from "@scalar/components";
|
|
12
|
+
import { LibraryIcon as De } from "@scalar/icons";
|
|
13
|
+
import { useRouter as xe } from "vue-router";
|
|
14
|
+
import $e from "./RequestSidebarItem.vue.js";
|
|
15
|
+
import Me from "../../components/Sidebar/Sidebar.vue.js";
|
|
16
|
+
import { useWorkspace as Te } from "../../store/store.js";
|
|
17
|
+
import { useSidebar as Pe } from "../../hooks/useSidebar.js";
|
|
18
|
+
const Ve = {
|
|
17
19
|
class: "search-button-fade sticky px-3 py-2.5 top-0 z-10",
|
|
18
20
|
role: "search"
|
|
19
|
-
},
|
|
21
|
+
}, Be = {
|
|
20
22
|
key: 1,
|
|
21
23
|
class: "contents"
|
|
22
|
-
},
|
|
24
|
+
}, Ee = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, Oe = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, et = /* @__PURE__ */ oe({
|
|
23
25
|
__name: "RequestSidebar",
|
|
24
26
|
props: {
|
|
25
27
|
showSidebar: { type: Boolean },
|
|
26
28
|
isReadonly: { type: Boolean }
|
|
27
29
|
},
|
|
28
|
-
emits: ["update:showSidebar", "newTab"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
activeWorkspaceCollections:
|
|
32
|
-
activeRequest:
|
|
33
|
-
activeWorkspaceRequests:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
emits: ["update:showSidebar", "newTab", "clearDrafts"],
|
|
31
|
+
setup(W, { emit: F }) {
|
|
32
|
+
const K = W, q = F, C = Te(), {
|
|
33
|
+
activeWorkspaceCollections: v,
|
|
34
|
+
activeRequest: N,
|
|
35
|
+
activeWorkspaceRequests: S,
|
|
36
|
+
activeWorkspace: D,
|
|
37
|
+
findRequestParents: A,
|
|
38
|
+
isReadOnly: U,
|
|
39
|
+
events: f,
|
|
40
|
+
requestMutators: x,
|
|
41
|
+
requests: z
|
|
42
|
+
} = C, { handleDragEnd: H, isDroppable: L } = ge(C), { collapsedSidebarFolders: j, setCollapsedSidebarFolder: G } = Pe(), { replace: $ } = xe(), J = () => {
|
|
43
|
+
f.commandPalette.emit({ commandName: "Import from OpenAPI/Swagger" });
|
|
44
|
+
}, M = re(), p = ae({ open: !1 });
|
|
45
|
+
ne(
|
|
46
|
+
N,
|
|
47
|
+
(t) => {
|
|
48
|
+
t && A(t).forEach(
|
|
49
|
+
(e) => G(e, !0)
|
|
43
50
|
);
|
|
44
51
|
},
|
|
45
52
|
{ immediate: !0 }
|
|
46
53
|
);
|
|
47
54
|
const {
|
|
48
|
-
searchText:
|
|
49
|
-
searchResultsWithPlaceholderResults:
|
|
50
|
-
selectedSearchResult:
|
|
51
|
-
onSearchResultClick:
|
|
52
|
-
fuseSearch:
|
|
53
|
-
searchInputRef:
|
|
54
|
-
searchResultRefs:
|
|
55
|
-
navigateSearchResults:
|
|
56
|
-
selectSearchResult:
|
|
57
|
-
} =
|
|
55
|
+
searchText: b,
|
|
56
|
+
searchResultsWithPlaceholderResults: R,
|
|
57
|
+
selectedSearchResult: k,
|
|
58
|
+
onSearchResultClick: Q,
|
|
59
|
+
fuseSearch: X,
|
|
60
|
+
searchInputRef: T,
|
|
61
|
+
searchResultRefs: Y,
|
|
62
|
+
navigateSearchResults: P,
|
|
63
|
+
selectSearchResult: Z
|
|
64
|
+
} = Se(), V = (t) => {
|
|
58
65
|
var e;
|
|
59
|
-
|
|
66
|
+
t && (t.toggleSidebar && q("update:showSidebar", K.showSidebar), t.focusRequestSearch && ((e = T.value) == null || e.focus()));
|
|
60
67
|
};
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
ie(() => f.hotKeys.on(V)), le(() => {
|
|
69
|
+
f.hotKeys.off(V);
|
|
63
70
|
});
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
},
|
|
71
|
+
const _ = (t) => {
|
|
72
|
+
t != null && t.documentUrl && (t.watchMode = !t.watchMode);
|
|
73
|
+
}, ee = de(() => {
|
|
67
74
|
var e;
|
|
68
|
-
const
|
|
69
|
-
return (e =
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
const t = R.value[k.value];
|
|
76
|
+
return (e = t == null ? void 0 : t.item) != null && e.id ? `#search-input-${t.item.id}` : void 0;
|
|
77
|
+
}), te = () => {
|
|
78
|
+
const t = v.value.find(
|
|
79
|
+
(s) => {
|
|
80
|
+
var r;
|
|
81
|
+
return ((r = s.info) == null ? void 0 : r.title) === "Drafts";
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
if (t && t.requests.forEach((s) => {
|
|
85
|
+
x.delete(z[s], t.uid);
|
|
86
|
+
}), S.value.length) {
|
|
87
|
+
const s = v.value[0], r = s == null ? void 0 : s.requests[0];
|
|
88
|
+
r && $(`/workspace/${D.value.uid}/request/${r}`);
|
|
89
|
+
} else {
|
|
90
|
+
const { request: s } = ke();
|
|
91
|
+
t && (x.add(s, t.uid), $(`/workspace/${D.value.uid}/request/${s.uid}`));
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
return (t, e) => (a(), h(w, null, [
|
|
95
|
+
ue(u(o(Me), {
|
|
96
|
+
class: m([t.showSidebar ? "sidebar-active-width" : ""]),
|
|
97
|
+
showSidebar: t.showSidebar,
|
|
98
|
+
"onUpdate:showSidebar": e[8] || (e[8] = (s) => t.$emit("update:showSidebar", s))
|
|
99
|
+
}, ce({
|
|
100
|
+
content: l(() => [
|
|
101
|
+
i("div", Ve, [
|
|
102
|
+
u(o(ye), {
|
|
80
103
|
ref_key: "searchInputRef",
|
|
81
|
-
ref:
|
|
82
|
-
modelValue:
|
|
83
|
-
"onUpdate:modelValue": e[0] || (e[0] = (s) =>
|
|
84
|
-
"aria-activedescendant":
|
|
85
|
-
"aria-controls":
|
|
104
|
+
ref: T,
|
|
105
|
+
modelValue: o(b),
|
|
106
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => pe(b) ? b.value = s : null),
|
|
107
|
+
"aria-activedescendant": ee.value,
|
|
108
|
+
"aria-controls": o(M),
|
|
86
109
|
sidebar: "",
|
|
87
|
-
onInput:
|
|
110
|
+
onInput: o(X),
|
|
88
111
|
onKeydown: [
|
|
89
|
-
e[1] || (e[1] =
|
|
90
|
-
e[2] || (e[2] =
|
|
91
|
-
e[3] || (e[3] =
|
|
112
|
+
e[1] || (e[1] = g(c((s) => o(P)("down"), ["stop"]), ["down"])),
|
|
113
|
+
e[2] || (e[2] = g(c((s) => o(Z)(), ["stop"]), ["enter"])),
|
|
114
|
+
e[3] || (e[3] = g(c((s) => o(P)("up"), ["stop"]), ["up"]))
|
|
92
115
|
]
|
|
93
116
|
}, null, 8, ["modelValue", "aria-activedescendant", "aria-controls", "onInput"])
|
|
94
117
|
]),
|
|
95
|
-
|
|
96
|
-
class:
|
|
97
|
-
"pb-14": !
|
|
118
|
+
i("div", {
|
|
119
|
+
class: m(["flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
120
|
+
"pb-14": !t.isReadonly
|
|
98
121
|
}]),
|
|
99
|
-
onDragenter: e[6] || (e[6] =
|
|
122
|
+
onDragenter: e[6] || (e[6] = c(() => {
|
|
100
123
|
}, ["prevent"])),
|
|
101
|
-
onDragover: e[7] || (e[7] =
|
|
124
|
+
onDragover: e[7] || (e[7] = c(() => {
|
|
102
125
|
}, ["prevent"]))
|
|
103
126
|
}, [
|
|
104
|
-
|
|
127
|
+
o(b) ? (a(), d(o(Ie), {
|
|
105
128
|
key: 0,
|
|
106
|
-
id:
|
|
129
|
+
id: o(M),
|
|
107
130
|
"aria-label": "Search Results",
|
|
108
131
|
class: "gap-px",
|
|
109
|
-
noResults: !
|
|
132
|
+
noResults: !o(R).length
|
|
110
133
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
(
|
|
134
|
+
default: l(() => [
|
|
135
|
+
(a(!0), h(w, null, B(o(R), (s, r) => (a(), d(o(qe), {
|
|
113
136
|
id: `#search-input-${s.item.id}`,
|
|
114
137
|
key: s.refIndex,
|
|
115
138
|
ref_for: !0,
|
|
116
|
-
ref: (
|
|
117
|
-
active:
|
|
139
|
+
ref: (n) => o(Y)[r] = n,
|
|
140
|
+
active: o(k) === r,
|
|
118
141
|
class: "px-2",
|
|
119
142
|
href: s.item.link,
|
|
120
|
-
onClick:
|
|
121
|
-
onFocus: (
|
|
143
|
+
onClick: c((n) => o(Q)(s), ["prevent"]),
|
|
144
|
+
onFocus: (n) => k.value = r
|
|
122
145
|
}, {
|
|
123
|
-
addon:
|
|
124
|
-
e[10] || (e[10] =
|
|
125
|
-
u(
|
|
146
|
+
addon: l(() => [
|
|
147
|
+
e[10] || (e[10] = i("span", { class: "sr-only" }, "HTTP Method:", -1)),
|
|
148
|
+
u(ve, {
|
|
126
149
|
class: "font-bold",
|
|
127
150
|
method: s.item.httpVerb ?? "get"
|
|
128
151
|
}, null, 8, ["method"])
|
|
129
152
|
]),
|
|
130
|
-
default:
|
|
131
|
-
|
|
153
|
+
default: l(() => [
|
|
154
|
+
y(me(s.item.title) + " ", 1)
|
|
132
155
|
]),
|
|
133
156
|
_: 2
|
|
134
157
|
}, 1032, ["id", "active", "href", "onClick", "onFocus"]))), 128))
|
|
135
158
|
]),
|
|
136
159
|
_: 1
|
|
137
|
-
}, 8, ["id", "noResults"])) : (
|
|
138
|
-
(
|
|
139
|
-
var
|
|
140
|
-
return
|
|
160
|
+
}, 8, ["id", "noResults"])) : (a(), h("nav", Be, [
|
|
161
|
+
(a(!0), h(w, null, B(o(v), (s) => {
|
|
162
|
+
var r;
|
|
163
|
+
return a(), d($e, {
|
|
141
164
|
key: s.uid,
|
|
142
|
-
isDraggable: !
|
|
143
|
-
isDroppable:
|
|
144
|
-
menuItem:
|
|
165
|
+
isDraggable: !t.isReadonly && ((r = s.info) == null ? void 0 : r.title) !== "Drafts",
|
|
166
|
+
isDroppable: o(L),
|
|
167
|
+
menuItem: p,
|
|
145
168
|
parentUids: [],
|
|
146
169
|
uid: s.uid,
|
|
147
|
-
onNewTab: e[4] || (e[4] = (
|
|
148
|
-
onOnDragEnd:
|
|
149
|
-
onOpenMenu: e[5] || (e[5] = (
|
|
170
|
+
onNewTab: e[4] || (e[4] = (n, se) => q("newTab", { name: n, uid: se })),
|
|
171
|
+
onOnDragEnd: o(H),
|
|
172
|
+
onOpenMenu: e[5] || (e[5] = (n) => Object.assign(p, n))
|
|
150
173
|
}, {
|
|
151
|
-
leftIcon:
|
|
152
|
-
var
|
|
174
|
+
leftIcon: l(() => {
|
|
175
|
+
var n;
|
|
153
176
|
return [
|
|
154
|
-
((
|
|
177
|
+
((n = s.info) == null ? void 0 : n.title) === "Drafts" ? (a(), d(o(O), {
|
|
155
178
|
key: 0,
|
|
156
179
|
class: "text-sidebar-c-2 group-hover:hidden",
|
|
157
180
|
icon: "Scribble",
|
|
158
181
|
thickness: "2.25"
|
|
159
|
-
})) : (
|
|
182
|
+
})) : (a(), d(o(De), {
|
|
160
183
|
key: 1,
|
|
161
184
|
class: "text-sidebar-c-2 size-3.5 stroke-[2.25] group-hover:hidden",
|
|
162
185
|
src: s["x-scalar-icon"] || "interface-content-folder"
|
|
163
186
|
}, null, 8, ["src"])),
|
|
164
|
-
|
|
165
|
-
class:
|
|
166
|
-
"rotate-90":
|
|
187
|
+
i("div", {
|
|
188
|
+
class: m({
|
|
189
|
+
"rotate-90": o(j)[s.uid]
|
|
167
190
|
})
|
|
168
191
|
}, [
|
|
169
|
-
u(
|
|
192
|
+
u(o(O), {
|
|
170
193
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
171
194
|
icon: "ChevronRight",
|
|
172
195
|
size: "sm",
|
|
@@ -181,35 +204,47 @@ const Ie = {
|
|
|
181
204
|
]))
|
|
182
205
|
], 34)
|
|
183
206
|
]),
|
|
184
|
-
button:
|
|
185
|
-
|
|
186
|
-
class:
|
|
187
|
-
"empty-sidebar-item":
|
|
207
|
+
button: l(() => [
|
|
208
|
+
i("div", {
|
|
209
|
+
class: m({
|
|
210
|
+
"empty-sidebar-item": o(S).length <= 1
|
|
188
211
|
})
|
|
189
212
|
}, [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
u(
|
|
193
|
-
art:
|
|
213
|
+
i("div", Ee, [
|
|
214
|
+
i("div", Oe, [
|
|
215
|
+
u(E, {
|
|
216
|
+
art: o(be),
|
|
194
217
|
class: "font-bold rabbitsit"
|
|
195
218
|
}, null, 8, ["art"]),
|
|
196
|
-
u(
|
|
197
|
-
art:
|
|
219
|
+
u(E, {
|
|
220
|
+
art: o(he),
|
|
198
221
|
class: "font-bold absolute top-0 left-0 rabbitjump"
|
|
199
222
|
}, null, 8, ["art"])
|
|
200
223
|
]),
|
|
201
|
-
e[11] || (e[11] =
|
|
202
|
-
|
|
203
|
-
|
|
224
|
+
e[11] || (e[11] = i("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
|
|
225
|
+
i("b", { class: "font-medium" }, "Let's Get Started"),
|
|
226
|
+
i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
|
|
204
227
|
], -1))
|
|
205
228
|
]),
|
|
206
|
-
|
|
229
|
+
t.isReadonly ? I("", !0) : (a(), d(o(Ce), {
|
|
207
230
|
key: 0,
|
|
208
|
-
|
|
231
|
+
class: m(["mb-1.5 w-full h-fit hidden opacity-0 p-1.5", {
|
|
232
|
+
"flex opacity-100": o(S).length <= 1
|
|
233
|
+
}]),
|
|
234
|
+
onClick: J
|
|
235
|
+
}, {
|
|
236
|
+
default: l(() => e[12] || (e[12] = [
|
|
237
|
+
y(" Import Collection ")
|
|
238
|
+
])),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, ["class"])),
|
|
241
|
+
t.isReadonly ? I("", !0) : (a(), d(Re, {
|
|
242
|
+
key: 1,
|
|
243
|
+
click: o(f).commandPalette.emit,
|
|
209
244
|
hotkey: "K"
|
|
210
245
|
}, {
|
|
211
|
-
title:
|
|
212
|
-
|
|
246
|
+
title: l(() => e[13] || (e[13] = [
|
|
247
|
+
y("Add Item")
|
|
213
248
|
])),
|
|
214
249
|
_: 1
|
|
215
250
|
}, 8, ["click"]))
|
|
@@ -217,23 +252,24 @@ const Ie = {
|
|
|
217
252
|
]),
|
|
218
253
|
_: 2
|
|
219
254
|
}, [
|
|
220
|
-
|
|
255
|
+
t.isReadonly ? void 0 : {
|
|
221
256
|
name: "header",
|
|
222
|
-
fn:
|
|
257
|
+
fn: l(() => []),
|
|
223
258
|
key: "0"
|
|
224
259
|
}
|
|
225
260
|
]), 1032, ["class", "showSidebar"]), [
|
|
226
|
-
[
|
|
261
|
+
[fe, t.showSidebar]
|
|
227
262
|
]),
|
|
228
|
-
!
|
|
263
|
+
!o(U) && p ? (a(), d(we, {
|
|
229
264
|
key: 0,
|
|
230
|
-
menuItem:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
265
|
+
menuItem: p,
|
|
266
|
+
onClearDrafts: te,
|
|
267
|
+
onCloseMenu: e[9] || (e[9] = (s) => p.open = !1),
|
|
268
|
+
onToggleWatchMode: _
|
|
269
|
+
}, null, 8, ["menuItem"])) : I("", !0)
|
|
234
270
|
], 64));
|
|
235
271
|
}
|
|
236
272
|
});
|
|
237
273
|
export {
|
|
238
|
-
|
|
274
|
+
et as default
|
|
239
275
|
};
|
|
@@ -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":"AA4gBA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAO1B,KAAK,WAAW,GAAG;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC3C,oEAAoE;IACpE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAC;AAiPJ,iBAAS,cAAc;WA4hBT,OAAO,IAA6B;;oBA/vBpC,IAAI;;oBAAJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCApDlB,KAjeI;;;;;;;oCAieJ,KA3dyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA0wBK,GAAG,8CAIjC,GADE,yBACF,GAAG,6DACa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAogBlB;AAkCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;iBAl0BH,OAAO;uFA20BvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,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-f7895948"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|