@scalar/api-client 2.0.12 → 2.0.13
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 +11 -0
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +38 -27
- 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 +42 -42
- 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 +50 -55
- package/dist/components/Sidebar/Sidebar.vue.js +5 -5
- 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 +2 -2
- package/dist/views/Request/Request.vue2.js +93 -91
- 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 +4 -4
|
@@ -1,61 +1,65 @@
|
|
|
1
|
-
import { defineComponent as K, ref as P, onMounted 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 K, ref as P, onMounted as G, onBeforeUnmount as J, computed as Q, openBlock as c, createElementBlock as h, Fragment as q, unref as e, createElementVNode as p, createVNode as r, createCommentVNode as b, withCtx as d, withDirectives as X, normalizeClass as S, createTextVNode as $, toDisplayString as Y, withModifiers as E, renderList as Z, createBlock as C, vShow as ee } from "vue";
|
|
2
|
+
import te from "../../components/ActionModal/ActionModal.vue.js";
|
|
3
|
+
import oe from "../../components/AddressBar/AddressBar.vue.js";
|
|
4
|
+
import re from "../../components/Search/SearchButton.vue.js";
|
|
5
|
+
import se from "../../components/Search/SearchModal.vue.js";
|
|
6
|
+
import ne from "../../components/Sidebar/SidebarButton.vue.js";
|
|
7
|
+
import ae from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
8
|
+
import le from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
9
|
+
import { useWorkspace as ie } from "../../store/workspace.js";
|
|
10
|
+
import ue 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 ce from "./ResponseSection/ResponseSection.vue.js";
|
|
13
|
+
import { useModal as de, ScalarIcon as y } from "@scalar/components";
|
|
14
|
+
import { isMacOS as I } from "@scalar/use-tooltip";
|
|
15
|
+
import { useMagicKeys as me, useEventListener as pe } from "@vueuse/core";
|
|
16
|
+
import fe from "./RequestSidebarItem.vue.js";
|
|
17
|
+
import { useActionModal as ve } from "../../hooks/useActionModal.js";
|
|
18
|
+
import ge 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 xe } from "../../hooks/useSidebar.js";
|
|
21
|
+
import { sendRequest as he } from "../../libs/sendRequest.js";
|
|
22
|
+
import { executeRequestBus as V } from "../../libs/eventBusses/executeRequestBus.js";
|
|
23
|
+
const be = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full"
|
|
26
|
+
}, ye = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, we = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, _e = { 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" }, Ke = /* @__PURE__ */ K({
|
|
24
27
|
__name: "Request",
|
|
25
|
-
setup(
|
|
28
|
+
setup(ke) {
|
|
29
|
+
var R;
|
|
26
30
|
const {
|
|
27
|
-
activeExample:
|
|
31
|
+
activeExample: w,
|
|
28
32
|
activeRequest: m,
|
|
29
|
-
activeServer:
|
|
33
|
+
activeServer: _,
|
|
30
34
|
activeSecurityScheme: z,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} =
|
|
35
|
-
|
|
35
|
+
activeWorkspace: l,
|
|
36
|
+
collections: N,
|
|
37
|
+
modalState: A
|
|
38
|
+
} = ie(), { collapsedSidebarFolders: L } = xe(), k = ve(), f = de(), i = P(!((R = l.value) != null && R.isReadOnly)), U = (s) => {
|
|
39
|
+
k.tab = s;
|
|
36
40
|
}, D = async () => {
|
|
37
|
-
var n, u;
|
|
38
|
-
if (!m.value || !
|
|
41
|
+
var n, u, v;
|
|
42
|
+
if (!m.value || !w.value) {
|
|
39
43
|
console.warn(
|
|
40
44
|
"There is no request active at the moment. Please select one then try again."
|
|
41
45
|
);
|
|
42
46
|
return;
|
|
43
47
|
}
|
|
44
|
-
let
|
|
45
|
-
if ((u =
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
const a = (
|
|
50
|
-
return (a == null ? void 0 : a.value) || (a == null ? void 0 : a.default) || ((
|
|
48
|
+
let s = ((n = _.value) == null ? void 0 : n.url) + m.value.path;
|
|
49
|
+
if ((u = _.value) != null && u.variables) {
|
|
50
|
+
const x = /{\s*([\w.-]+)\s*}/g;
|
|
51
|
+
s = s.replace(x, (W, H) => {
|
|
52
|
+
var M, O, B;
|
|
53
|
+
const a = (O = (M = _.value) == null ? void 0 : M.variables) == null ? void 0 : O[H];
|
|
54
|
+
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]) || W;
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
|
-
const { request: o, response: t } = await
|
|
57
|
+
const { request: o, response: t } = await he(
|
|
54
58
|
m.value,
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
w.value,
|
|
60
|
+
s,
|
|
57
61
|
z.value,
|
|
58
|
-
l.proxyUrl
|
|
62
|
+
(v = l.value) == null ? void 0 : v.proxyUrl
|
|
59
63
|
);
|
|
60
64
|
o && t ? m.value.history.push({
|
|
61
65
|
request: o,
|
|
@@ -63,84 +67,82 @@ const he = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
63
67
|
timestamp: Date.now()
|
|
64
68
|
}) : console.warn("No response or request was returned");
|
|
65
69
|
};
|
|
66
|
-
|
|
67
|
-
const F =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
c("div", ye, [
|
|
79
|
-
c("button", {
|
|
70
|
+
G(() => V.on(D)), J(() => V.off(D));
|
|
71
|
+
const j = Q(() => Object.values(N)), F = (s, o, t, n) => {
|
|
72
|
+
}, T = () => {
|
|
73
|
+
k.show();
|
|
74
|
+
}, g = me();
|
|
75
|
+
return pe(document, "keydown", (s) => {
|
|
76
|
+
(I() ? g.meta.value : g.ctrl.value) && s.key === "b" && (i.value = !i.value), (I() ? g.meta.value : g.ctrl.value) && s.key === "k" && (f.open ? f.hide() : f.show());
|
|
77
|
+
}), (s, o) => (c(), h(q, null, [
|
|
78
|
+
e(l) ? (c(), h("div", be, [
|
|
79
|
+
p("div", ye, [
|
|
80
|
+
p("div", we, [
|
|
81
|
+
p("button", {
|
|
80
82
|
class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
|
|
81
83
|
type: "button",
|
|
82
84
|
onClick: o[0] || (o[0] = (t) => i.value = !i.value)
|
|
83
85
|
}, [
|
|
84
|
-
|
|
86
|
+
r(e(y), {
|
|
85
87
|
icon: i.value ? "SideBarOpen" : "SideBarClosed",
|
|
86
88
|
size: "sm"
|
|
87
89
|
}, null, 8, ["icon"])
|
|
88
90
|
])
|
|
89
91
|
]),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
e(l).isReadOnly ? (
|
|
92
|
+
r(oe),
|
|
93
|
+
p("div", _e, [
|
|
94
|
+
e(l).isReadOnly ? (c(), h("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(A).hide())
|
|
97
99
|
}, [
|
|
98
|
-
|
|
100
|
+
r(e(y), {
|
|
99
101
|
icon: "Close",
|
|
100
102
|
size: "xs"
|
|
101
103
|
})
|
|
102
|
-
])) :
|
|
104
|
+
])) : b("", !0)
|
|
103
105
|
])
|
|
104
106
|
]),
|
|
105
|
-
|
|
107
|
+
r(ae, null, {
|
|
106
108
|
default: d(() => [
|
|
107
|
-
|
|
109
|
+
X(r(e(ge), {
|
|
108
110
|
class: S([i.value ? "sidebar-active-width" : ""])
|
|
109
111
|
}, {
|
|
110
112
|
title: d(() => [
|
|
111
|
-
|
|
113
|
+
$(Y(e(l).name), 1)
|
|
112
114
|
]),
|
|
113
115
|
content: d(() => [
|
|
114
|
-
|
|
116
|
+
r(re, {
|
|
115
117
|
onOpenSearchModal: o[2] || (o[2] = (t) => e(f).show())
|
|
116
118
|
}),
|
|
117
|
-
|
|
119
|
+
p("div", {
|
|
118
120
|
class: "custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-12 pt-2.5",
|
|
119
121
|
onDragenter: o[3] || (o[3] = E(() => {
|
|
120
122
|
}, ["prevent"])),
|
|
121
123
|
onDragover: o[4] || (o[4] = E(() => {
|
|
122
124
|
}, ["prevent"]))
|
|
123
125
|
}, [
|
|
124
|
-
(
|
|
126
|
+
(c(!0), h(q, null, Z(j.value, (t, n) => (c(), C(fe, {
|
|
125
127
|
key: t.uid,
|
|
126
|
-
isDraggable:
|
|
127
|
-
isDroppable:
|
|
128
|
+
isDraggable: !e(l).isReadOnly,
|
|
129
|
+
isDroppable: !e(l).isReadOnly,
|
|
128
130
|
item: t,
|
|
129
131
|
parentUids: [],
|
|
130
|
-
onOnDragEnd: (...u) =>
|
|
132
|
+
onOnDragEnd: (...u) => F(t, n, ...u)
|
|
131
133
|
}, {
|
|
132
134
|
leftIcon: d(() => [
|
|
133
|
-
|
|
135
|
+
r(e(y), {
|
|
134
136
|
class: "text-sidebar-c-2 stroke-[1] text-sm group-hover:hidden",
|
|
135
137
|
icon: "CodeFolder",
|
|
136
138
|
size: "sm"
|
|
137
139
|
}),
|
|
138
|
-
|
|
140
|
+
p("div", {
|
|
139
141
|
class: S({
|
|
140
|
-
"rotate-90": e(
|
|
142
|
+
"rotate-90": e(L)[t.uid]
|
|
141
143
|
})
|
|
142
144
|
}, [
|
|
143
|
-
|
|
145
|
+
r(e(y), {
|
|
144
146
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
145
147
|
icon: "ChevronRight",
|
|
146
148
|
size: "sm"
|
|
@@ -152,44 +154,44 @@ const he = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
152
154
|
], 32)
|
|
153
155
|
]),
|
|
154
156
|
button: d(() => [
|
|
155
|
-
e(l).isReadOnly ?
|
|
157
|
+
e(l).isReadOnly ? b("", !0) : (c(), C(ne, {
|
|
156
158
|
key: 0,
|
|
157
|
-
click:
|
|
159
|
+
click: T
|
|
158
160
|
}, {
|
|
159
161
|
title: d(() => [
|
|
160
|
-
|
|
162
|
+
$("Add Item")
|
|
161
163
|
]),
|
|
162
164
|
_: 1
|
|
163
165
|
}))
|
|
164
166
|
]),
|
|
165
167
|
_: 1
|
|
166
168
|
}, 8, ["class"]), [
|
|
167
|
-
[
|
|
169
|
+
[ee, i.value]
|
|
168
170
|
]),
|
|
169
|
-
e(
|
|
171
|
+
e(w) ? (c(), C(le, {
|
|
170
172
|
key: 0,
|
|
171
173
|
class: S(["flex-1", [i.value ? "sidebar-active-hide-layout" : ""]])
|
|
172
174
|
}, {
|
|
173
175
|
default: d(() => {
|
|
174
|
-
var t, n, u,
|
|
176
|
+
var t, n, u, v, x;
|
|
175
177
|
return [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
response: (x = (
|
|
178
|
+
r(ue),
|
|
179
|
+
r(ce, {
|
|
180
|
+
response: (x = (v = (t = e(m)) == null ? void 0 : t.history) == null ? void 0 : v[((u = (n = e(m)) == null ? void 0 : n.history) == null ? void 0 : u.length) - 1]) == null ? void 0 : x.response
|
|
179
181
|
}, null, 8, ["response"])
|
|
180
182
|
];
|
|
181
183
|
}),
|
|
182
184
|
_: 1
|
|
183
|
-
}, 8, ["class"])) :
|
|
184
|
-
|
|
185
|
-
state: e(
|
|
186
|
-
"onUpdate:tab":
|
|
185
|
+
}, 8, ["class"])) : b("", !0),
|
|
186
|
+
r(te, {
|
|
187
|
+
state: e(k),
|
|
188
|
+
"onUpdate:tab": U
|
|
187
189
|
}, null, 8, ["state"])
|
|
188
190
|
]),
|
|
189
191
|
_: 1
|
|
190
192
|
})
|
|
191
|
-
]),
|
|
192
|
-
|
|
193
|
+
])) : b("", !0),
|
|
194
|
+
r(se, { modalState: e(f) }, null, 8, ["modalState"])
|
|
193
195
|
], 64));
|
|
194
196
|
}
|
|
195
197
|
});
|
|
@@ -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,KAAK,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AACzE,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACf,MAAM,2CAA2C,CAAA;AA0GlD,iBAAS,cAAc;gBAvET,IAAI;;gBAAJ,IAAI;EAwVjB;AACD,QAAA,MAAM,eAAe;IAnXjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,OAAO;IACrB,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;IAdpD;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,OAAO;IACrB,qEAAqE;gBACzD,MAAM,EAAE;UACd,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,cAAc;;;;;;;;iBATtC,OAAO;iBAMP,OAAO;MA+WvB,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"}
|
|
@@ -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,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE;;;;;UADvD,GAAG;YADD,OAAO;;AAsQnB,wBAMG;AAOH,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,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 "./ResponseBody.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cc2ae6a8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|