@scalar/api-client 2.0.12 → 2.0.14
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 +26 -0
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +51 -28
- package/dist/Modal/api-client-modal.d.ts +2 -1
- package/dist/Modal/api-client-modal.d.ts.map +1 -1
- package/dist/Modal/api-client-modal.js +49 -40
- package/dist/components/ActionModal/ActionModalFolder.vue.js +37 -35
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +44 -44
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts +1 -14
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +54 -59
- package/dist/components/CodeInput/CodeInput.vue.d.ts +2 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +16 -14
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +15 -17
- package/dist/components/Sidebar/Sidebar.vue.js +5 -5
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +12 -12
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +1 -1
- package/dist/components/TopNav/TopNavItem.vue2.js +10 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -9
- package/dist/libs/index.d.ts +1 -0
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +10 -8
- package/dist/libs/local-storage.d.ts +9 -0
- package/dist/libs/local-storage.d.ts.map +1 -0
- package/dist/libs/local-storage.js +36 -0
- package/dist/router.d.ts +2 -2
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +13 -13
- package/dist/store/workspace.d.ts +511 -269
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +213 -157
- package/dist/style.css +1 -1
- 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 +105 -102
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -0
- 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 +25 -25
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +56 -56
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +11 -11
- package/package.json +7 -7
|
@@ -1,146 +1,149 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
import
|
|
1
|
+
import { defineComponent as P, ref as G, onMounted as J, onBeforeUnmount as Q, computed as X, openBlock as p, createElementBlock as _, Fragment as q, createElementVNode as d, createVNode as r, unref as e, createCommentVNode as k, withCtx as m, withDirectives as Y, normalizeClass as S, createTextVNode as $, toDisplayString as Z, withModifiers as E, renderList as ee, createBlock as C, vShow as te } from "vue";
|
|
2
|
+
import oe from "../../components/ActionModal/ActionModal.vue.js";
|
|
3
|
+
import se from "../../components/AddressBar/AddressBar.vue.js";
|
|
4
|
+
import re from "../../components/Search/SearchButton.vue.js";
|
|
5
|
+
import ne from "../../components/Search/SearchModal.vue.js";
|
|
6
|
+
import ae from "../../components/Sidebar/SidebarButton.vue.js";
|
|
7
|
+
import le from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
8
|
+
import ie from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
9
|
+
import { useWorkspace as ue } from "../../store/workspace.js";
|
|
10
|
+
import ce from "./RequestSection/RequestSection.vue.js";
|
|
11
11
|
/* empty css */
|
|
12
|
-
import
|
|
13
|
-
import { useModal as
|
|
14
|
-
import { isMacOS as
|
|
15
|
-
import { useMagicKeys as
|
|
16
|
-
import
|
|
17
|
-
import { useActionModal as
|
|
18
|
-
import
|
|
12
|
+
import de from "./ResponseSection/ResponseSection.vue.js";
|
|
13
|
+
import { useModal as me, ScalarIcon as b } from "@scalar/components";
|
|
14
|
+
import { isMacOS as I } from "@scalar/use-tooltip";
|
|
15
|
+
import { useMagicKeys as pe, useEventListener as fe } from "@vueuse/core";
|
|
16
|
+
import ve from "./RequestSidebarItem.vue.js";
|
|
17
|
+
import { useActionModal as ge } from "../../hooks/useActionModal.js";
|
|
18
|
+
import xe from "../../components/Sidebar/Sidebar.vue.js";
|
|
19
19
|
/* empty css */
|
|
20
|
-
import { useSidebar as
|
|
21
|
-
import { sendRequest as
|
|
22
|
-
import { executeRequestBus as
|
|
23
|
-
const
|
|
20
|
+
import { useSidebar as he } from "../../hooks/useSidebar.js";
|
|
21
|
+
import { sendRequest as be } from "../../libs/sendRequest.js";
|
|
22
|
+
import { executeRequestBus as V } from "../../libs/eventBusses/executeRequestBus.js";
|
|
23
|
+
const ye = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full" }, we = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, _e = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, ke = { 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" }, Pe = /* @__PURE__ */ P({
|
|
24
24
|
__name: "Request",
|
|
25
|
-
setup(
|
|
25
|
+
setup(Se) {
|
|
26
|
+
var O;
|
|
26
27
|
const {
|
|
27
|
-
activeExample:
|
|
28
|
-
activeRequest:
|
|
29
|
-
activeServer:
|
|
28
|
+
activeExample: y,
|
|
29
|
+
activeRequest: i,
|
|
30
|
+
activeServer: x,
|
|
30
31
|
activeSecurityScheme: z,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} =
|
|
35
|
-
w.tab =
|
|
32
|
+
activeWorkspace: u,
|
|
33
|
+
collections: N,
|
|
34
|
+
modalState: j
|
|
35
|
+
} = ue(), { collapsedSidebarFolders: A } = he(), w = ge(), f = me(), l = G(!((O = u.value) != null && O.isReadOnly)), L = (s) => {
|
|
36
|
+
w.tab = s;
|
|
36
37
|
}, D = async () => {
|
|
37
|
-
var n,
|
|
38
|
-
if (!
|
|
38
|
+
var n, c, v, g;
|
|
39
|
+
if (!i.value || !y.value) {
|
|
39
40
|
console.warn(
|
|
40
41
|
"There is no request active at the moment. Please select one then try again."
|
|
41
42
|
);
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
|
-
let
|
|
45
|
-
if ((
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
var R, M,
|
|
49
|
-
const a = (M = (R =
|
|
50
|
-
return (a == null ? void 0 : a.value) || (a == null ? void 0 : a.default) || ((
|
|
45
|
+
let s = (n = x.value) != null && n.url ? ((c = x.value) == null ? void 0 : c.url) + i.value.path : i.value.path;
|
|
46
|
+
if ((v = x.value) != null && v.variables) {
|
|
47
|
+
const W = /{\s*([\w.-]+)\s*}/g;
|
|
48
|
+
s = s.replace(W, (H, K) => {
|
|
49
|
+
var R, M, B;
|
|
50
|
+
const a = (M = (R = x.value) == null ? void 0 : R.variables) == null ? void 0 : M[K];
|
|
51
|
+
return (a == null ? void 0 : a.value) || (a == null ? void 0 : a.default) || ((B = a == null ? void 0 : a.enum) == null ? void 0 : B[0]) || H;
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
|
-
const { request: o, response: t } = await
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
const { request: o, response: t } = await be(
|
|
55
|
+
i.value,
|
|
56
|
+
y.value,
|
|
57
|
+
s,
|
|
57
58
|
z.value,
|
|
58
|
-
|
|
59
|
+
(g = u.value) == null ? void 0 : g.proxyUrl
|
|
59
60
|
);
|
|
60
|
-
o && t ?
|
|
61
|
+
o && t ? i.value.history.push({
|
|
61
62
|
request: o,
|
|
62
63
|
response: t,
|
|
63
64
|
timestamp: Date.now()
|
|
64
65
|
}) : console.warn("No response or request was returned");
|
|
65
66
|
};
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
()
|
|
69
|
-
|
|
70
|
-
},
|
|
67
|
+
J(() => V.on(D)), Q(() => V.off(D));
|
|
68
|
+
const U = X(() => {
|
|
69
|
+
const s = Object.values(N), o = s.findIndex((n) => n.uid === "drafts"), [t] = s.splice(o, 1);
|
|
70
|
+
return s.push(t), s;
|
|
71
|
+
}), F = (s, o, t, n) => {
|
|
72
|
+
}, T = () => {
|
|
71
73
|
w.show();
|
|
72
|
-
},
|
|
73
|
-
return
|
|
74
|
-
(
|
|
75
|
-
}), (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
}, h = pe();
|
|
75
|
+
return fe(document, "keydown", (s) => {
|
|
76
|
+
(I() ? h.meta.value : h.ctrl.value) && s.key === "b" && (l.value = !l.value), (I() ? h.meta.value : h.ctrl.value) && s.key === "k" && (f.open ? f.hide() : f.show());
|
|
77
|
+
}), (s, o) => (p(), _(q, null, [
|
|
78
|
+
d("div", ye, [
|
|
79
|
+
d("div", we, [
|
|
80
|
+
d("div", _e, [
|
|
81
|
+
d("button", {
|
|
80
82
|
class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
|
|
81
83
|
type: "button",
|
|
82
|
-
onClick: o[0] || (o[0] = (t) =>
|
|
84
|
+
onClick: o[0] || (o[0] = (t) => l.value = !l.value)
|
|
83
85
|
}, [
|
|
84
|
-
|
|
85
|
-
icon:
|
|
86
|
+
r(e(b), {
|
|
87
|
+
icon: l.value ? "SideBarOpen" : "SideBarClosed",
|
|
86
88
|
size: "sm"
|
|
87
89
|
}, null, 8, ["icon"])
|
|
88
90
|
])
|
|
89
91
|
]),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
e(
|
|
92
|
+
r(se),
|
|
93
|
+
d("div", ke, [
|
|
94
|
+
e(u).isReadOnly ? (p(), _("button", {
|
|
93
95
|
key: 0,
|
|
94
96
|
class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
|
|
95
97
|
type: "button",
|
|
96
|
-
onClick: o[1] || (o[1] = (t) => e(
|
|
98
|
+
onClick: o[1] || (o[1] = (t) => e(j).hide())
|
|
97
99
|
}, [
|
|
98
|
-
|
|
100
|
+
r(e(b), {
|
|
101
|
+
class: "stroke-[1.75]",
|
|
99
102
|
icon: "Close",
|
|
100
|
-
size: "
|
|
103
|
+
size: "lg"
|
|
101
104
|
})
|
|
102
105
|
])) : k("", !0)
|
|
103
106
|
])
|
|
104
107
|
]),
|
|
105
|
-
|
|
106
|
-
default:
|
|
107
|
-
|
|
108
|
-
class: S([
|
|
108
|
+
r(le, null, {
|
|
109
|
+
default: m(() => [
|
|
110
|
+
Y(r(e(xe), {
|
|
111
|
+
class: S([l.value ? "sidebar-active-width" : ""])
|
|
109
112
|
}, {
|
|
110
|
-
title:
|
|
111
|
-
|
|
113
|
+
title: m(() => [
|
|
114
|
+
$(Z(e(u).name), 1)
|
|
112
115
|
]),
|
|
113
|
-
content:
|
|
114
|
-
|
|
116
|
+
content: m(() => [
|
|
117
|
+
r(re, {
|
|
115
118
|
onOpenSearchModal: o[2] || (o[2] = (t) => e(f).show())
|
|
116
119
|
}),
|
|
117
|
-
|
|
120
|
+
d("div", {
|
|
118
121
|
class: "custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-12 pt-2.5",
|
|
119
122
|
onDragenter: o[3] || (o[3] = E(() => {
|
|
120
123
|
}, ["prevent"])),
|
|
121
124
|
onDragover: o[4] || (o[4] = E(() => {
|
|
122
125
|
}, ["prevent"]))
|
|
123
126
|
}, [
|
|
124
|
-
(p(!0), _(
|
|
127
|
+
(p(!0), _(q, null, ee(U.value, (t, n) => (p(), C(ve, {
|
|
125
128
|
key: t.uid,
|
|
126
|
-
isDraggable:
|
|
127
|
-
isDroppable:
|
|
129
|
+
isDraggable: !e(u).isReadOnly,
|
|
130
|
+
isDroppable: !e(u).isReadOnly,
|
|
128
131
|
item: t,
|
|
129
132
|
parentUids: [],
|
|
130
|
-
onOnDragEnd: (...
|
|
133
|
+
onOnDragEnd: (...c) => F(t, n, ...c)
|
|
131
134
|
}, {
|
|
132
|
-
leftIcon:
|
|
133
|
-
|
|
135
|
+
leftIcon: m(() => [
|
|
136
|
+
r(e(b), {
|
|
134
137
|
class: "text-sidebar-c-2 stroke-[1] text-sm group-hover:hidden",
|
|
135
138
|
icon: "CodeFolder",
|
|
136
139
|
size: "sm"
|
|
137
140
|
}),
|
|
138
|
-
|
|
141
|
+
d("div", {
|
|
139
142
|
class: S({
|
|
140
|
-
"rotate-90": e(
|
|
143
|
+
"rotate-90": e(A)[t.uid]
|
|
141
144
|
})
|
|
142
145
|
}, [
|
|
143
|
-
|
|
146
|
+
r(e(b), {
|
|
144
147
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
145
148
|
icon: "ChevronRight",
|
|
146
149
|
size: "sm"
|
|
@@ -151,48 +154,48 @@ const he = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
151
154
|
}, 1032, ["isDraggable", "isDroppable", "item", "onOnDragEnd"]))), 128))
|
|
152
155
|
], 32)
|
|
153
156
|
]),
|
|
154
|
-
button:
|
|
155
|
-
e(
|
|
157
|
+
button: m(() => [
|
|
158
|
+
e(u).isReadOnly ? k("", !0) : (p(), C(ae, {
|
|
156
159
|
key: 0,
|
|
157
|
-
click:
|
|
160
|
+
click: T
|
|
158
161
|
}, {
|
|
159
|
-
title:
|
|
160
|
-
|
|
162
|
+
title: m(() => [
|
|
163
|
+
$("Add Item")
|
|
161
164
|
]),
|
|
162
165
|
_: 1
|
|
163
166
|
}))
|
|
164
167
|
]),
|
|
165
168
|
_: 1
|
|
166
169
|
}, 8, ["class"]), [
|
|
167
|
-
[
|
|
170
|
+
[te, l.value]
|
|
168
171
|
]),
|
|
169
|
-
e(
|
|
172
|
+
e(y) ? (p(), C(ie, {
|
|
170
173
|
key: 0,
|
|
171
|
-
class: S(["flex-1", [
|
|
174
|
+
class: S(["flex-1", [l.value ? "sidebar-active-hide-layout" : ""]])
|
|
172
175
|
}, {
|
|
173
|
-
default:
|
|
174
|
-
var t, n,
|
|
176
|
+
default: m(() => {
|
|
177
|
+
var t, n, c, v, g;
|
|
175
178
|
return [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
response: (
|
|
179
|
+
r(ce),
|
|
180
|
+
r(de, {
|
|
181
|
+
response: (g = (v = (t = e(i)) == null ? void 0 : t.history) == null ? void 0 : v[((c = (n = e(i)) == null ? void 0 : n.history) == null ? void 0 : c.length) - 1]) == null ? void 0 : g.response
|
|
179
182
|
}, null, 8, ["response"])
|
|
180
183
|
];
|
|
181
184
|
}),
|
|
182
185
|
_: 1
|
|
183
186
|
}, 8, ["class"])) : k("", !0),
|
|
184
|
-
|
|
187
|
+
r(oe, {
|
|
185
188
|
state: e(w),
|
|
186
|
-
"onUpdate:tab":
|
|
189
|
+
"onUpdate:tab": L
|
|
187
190
|
}, null, 8, ["state"])
|
|
188
191
|
]),
|
|
189
192
|
_: 1
|
|
190
193
|
})
|
|
191
194
|
]),
|
|
192
|
-
|
|
195
|
+
r(ne, { modalState: e(f) }, null, 8, ["modalState"])
|
|
193
196
|
], 64));
|
|
194
197
|
}
|
|
195
198
|
});
|
|
196
199
|
export {
|
|
197
|
-
|
|
200
|
+
Pe as default
|
|
198
201
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":";WAobS,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;WAFT,MAAM;WACN,MAAM;eACF,GAAG,EAAE;;AAkwBlB,wBAMG;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 +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":"AAmOA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAA;AACjF,OAAO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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,8 +1,8 @@
|
|
|
1
1
|
import t from "./RequestSidebarItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
const a = /* @__PURE__ */
|
|
4
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b4b0220b"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as V, useCssVars as x, computed as l, resolveComponent as O, openBlock as o, createElementBlock as d, normalizeClass as p, unref as r, createVNode as u, withCtx as U, createBlock as f, createElementVNode as n, toDisplayString as y, createCommentVNode as b, createTextVNode as q, renderSlot as j, withDirectives as F, Fragment as L, renderList as T, vShow as K } from "vue";
|
|
2
2
|
import { useWorkspace as W } from "../../store/workspace.js";
|
|
3
3
|
import { ScalarIcon as A } from "@scalar/components";
|
|
4
4
|
import { Draggable as G } from "@scalar/draggable";
|
|
@@ -6,7 +6,7 @@ import { useRouter as H, RouterLink as J } from "vue-router";
|
|
|
6
6
|
import M from "./RequestSidebarItemMenu.vue.js";
|
|
7
7
|
import P from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
8
8
|
import { useSidebar as Q } from "../../hooks/useSidebar.js";
|
|
9
|
-
const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y = { class: "relative" }, Z = { class: "flex" }, _ = { class: "z-10 mr-[-.5px] flex h-fit items-center justify-center" }, ee = { class: "z-10 font-medium" }, te = { key: 2 },
|
|
9
|
+
const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y = { class: "relative" }, Z = { class: "flex" }, _ = { class: "z-10 mr-[-.5px] flex h-fit items-center justify-center" }, ee = { class: "z-10 font-medium" }, te = { key: 2 }, k = "hover:before:bg-sidebar-active-b before:absolute before:inset-0 before:rounded before-left-offset", pe = /* @__PURE__ */ V({
|
|
10
10
|
__name: "RequestSidebarItem",
|
|
11
11
|
props: {
|
|
12
12
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -16,25 +16,25 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
|
|
|
16
16
|
},
|
|
17
17
|
emits: ["onDragEnd"],
|
|
18
18
|
setup(w) {
|
|
19
|
-
|
|
20
|
-
"
|
|
19
|
+
x((e) => ({
|
|
20
|
+
"1aa238fc": R.value
|
|
21
21
|
}));
|
|
22
|
-
const s = w, { activeRequest: g, folders: C,
|
|
23
|
-
e.metaKey ? window.open(`/request/${t}`, "_blank") :
|
|
22
|
+
const s = w, { activeRequest: g, folders: C, isReadOnly: a, requests: c, requestExamples: $ } = W(), { collapsedSidebarFolders: h, toggleSidebarFolder: S } = Q(), E = H(), v = l(() => "childUids" in s.item), R = l(() => s.parentUids.length ? a ? `-${(s.parentUids.length - 1) * 16}px` : `-${s.parentUids.length * 16}px` : "0px"), z = (e, t) => {
|
|
23
|
+
e.metaKey ? window.open(`/request/${t}`, "_blank") : E.push(`/request/${t}`);
|
|
24
24
|
}, D = (e) => {
|
|
25
25
|
var t;
|
|
26
26
|
return "spec" in e ? (t = e.spec.info) == null ? void 0 : t.title : "summary" in e ? e.summary || e.path : "name" in e ? e.name : "";
|
|
27
|
-
},
|
|
27
|
+
}, I = l(() => ("requestUid" in s.item ? c[s.item.requestUid] : s.item).method), B = l(
|
|
28
28
|
() => {
|
|
29
29
|
var e;
|
|
30
30
|
return h[s.item.uid] || ((e = g.value) == null ? void 0 : e.uid) === s.item.uid && s.item.childUids.length > 1;
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
return (e, t) => {
|
|
34
|
-
const
|
|
34
|
+
const N = O("RequestSidebarItem", !0);
|
|
35
35
|
return o(), d("div", {
|
|
36
36
|
class: p(["relative flex flex-row", [
|
|
37
|
-
r(a)
|
|
37
|
+
r(a) && e.parentUids.length > 1 || !r(a) && e.parentUids.length ? "before:bg-b-3 pl-4 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-px mb-[.5px] last:mb-0" : ""
|
|
38
38
|
]])
|
|
39
39
|
}, [
|
|
40
40
|
u(r(G), {
|
|
@@ -47,35 +47,35 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
|
|
|
47
47
|
parentIds: e.parentUids,
|
|
48
48
|
onOnDragEnd: t[3] || (t[3] = (...i) => e.$emit("onDragEnd", ...i))
|
|
49
49
|
}, {
|
|
50
|
-
default:
|
|
50
|
+
default: U(() => [
|
|
51
51
|
"summary" in e.item || "requestUid" in e.item ? (o(), f(r(J), {
|
|
52
52
|
key: 0,
|
|
53
53
|
custom: "",
|
|
54
54
|
to: `/request/${e.item.uid}`
|
|
55
55
|
}, {
|
|
56
|
-
default:
|
|
56
|
+
default: U(() => {
|
|
57
57
|
var i;
|
|
58
58
|
return [
|
|
59
59
|
n("div", {
|
|
60
60
|
class: p(["group relative flex min-h-8 cursor-pointer flex-row items-start justify-between gap-2 py-1.5 pr-2 rounded editable-sidebar-hover", [
|
|
61
|
-
|
|
61
|
+
k,
|
|
62
62
|
((i = r(g)) == null ? void 0 : i.uid) === e.item.uid ? "before:bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2",
|
|
63
63
|
(e.isDroppable, "pl-3")
|
|
64
64
|
]]),
|
|
65
65
|
tabindex: "0",
|
|
66
|
-
onClick: t[0] || (t[0] = (m) =>
|
|
66
|
+
onClick: t[0] || (t[0] = (m) => z(m, e.item.uid))
|
|
67
67
|
}, [
|
|
68
|
-
n("span", X,
|
|
68
|
+
n("span", X, y(D(e.item)), 1),
|
|
69
69
|
n("div", Y, [
|
|
70
|
-
r(a)
|
|
70
|
+
r(a) ? b("", !0) : (o(), f(M, {
|
|
71
71
|
key: 0,
|
|
72
72
|
item: e.item
|
|
73
73
|
}, null, 8, ["item"])),
|
|
74
74
|
n("span", Z, [
|
|
75
|
-
|
|
75
|
+
q(" "),
|
|
76
76
|
u(r(P), {
|
|
77
77
|
class: "font-bold",
|
|
78
|
-
method:
|
|
78
|
+
method: I.value
|
|
79
79
|
}, null, 8, ["method"])
|
|
80
80
|
])
|
|
81
81
|
])
|
|
@@ -83,11 +83,11 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
|
|
|
83
83
|
];
|
|
84
84
|
}),
|
|
85
85
|
_: 1
|
|
86
|
-
}, 8, ["to"])) : !r(a)
|
|
86
|
+
}, 8, ["to"])) : !r(a) || e.parentUids.length ? (o(), d("button", {
|
|
87
87
|
key: 1,
|
|
88
|
-
class: p(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]",
|
|
88
|
+
class: p(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", k]),
|
|
89
89
|
type: "button",
|
|
90
|
-
onClick: t[1] || (t[1] = (i) => r(
|
|
90
|
+
onClick: t[1] || (t[1] = (i) => r(S)(e.item.uid))
|
|
91
91
|
}, [
|
|
92
92
|
n("span", _, [
|
|
93
93
|
j(e.$slots, "leftIcon", {}, () => [
|
|
@@ -103,21 +103,21 @@ const X = { class: "z-10 font-medium w-full editable-sidebar-hover-item" }, Y =
|
|
|
103
103
|
})
|
|
104
104
|
], 2)
|
|
105
105
|
], !0),
|
|
106
|
-
|
|
106
|
+
q(" ")
|
|
107
107
|
]),
|
|
108
|
-
n("span", ee,
|
|
108
|
+
n("span", ee, y(D(e.item)), 1)
|
|
109
109
|
])) : b("", !0),
|
|
110
110
|
"childUids" in e.item ? F((o(), d("div", te, [
|
|
111
|
-
(o(!0), d(L, null, T(e.item.childUids, (i) => (o(), f(
|
|
111
|
+
(o(!0), d(L, null, T(e.item.childUids, (i) => (o(), f(N, {
|
|
112
112
|
key: i,
|
|
113
113
|
isDraggable: e.isDraggable,
|
|
114
114
|
isDroppable: e.isDroppable,
|
|
115
|
-
item: r(C)[i] || r(c)[i] || r(
|
|
115
|
+
item: r(C)[i] || r(c)[i] || r($)[i],
|
|
116
116
|
parentUids: [...e.parentUids, e.item.uid],
|
|
117
117
|
onOnDragEnd: t[2] || (t[2] = (...m) => e.$emit("onDragEnd", ...m))
|
|
118
118
|
}, null, 8, ["isDraggable", "isDroppable", "item", "parentUids"]))), 128))
|
|
119
119
|
], 512)), [
|
|
120
|
-
[K,
|
|
120
|
+
[K, B.value]
|
|
121
121
|
]) : b("", !0)
|
|
122
122
|
]),
|
|
123
123
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBody.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResponseBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseBody.vue"],"names":[],"mappings":";WA4KW,MAAM;YACL,OAAO;UACT,GAAG;aACA;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;;;;WAHtD,MAAM;YACL,OAAO;UACT,GAAG;aACA;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC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
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|