@scalar/api-client 2.1.2 → 2.1.5
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 +29 -0
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +58 -58
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +63 -62
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +77 -73
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +0 -4
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +214 -162
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +38 -37
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +5 -8
- 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 +164 -153
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +7 -0
- 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 +230 -263
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +8 -30
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +131 -81
- package/dist/views/Request/types/index.d.ts +2 -0
- package/dist/views/Request/types/index.d.ts.map +1 -0
- package/dist/views/Request/types/index.js +1 -0
- package/dist/views/Request/types/sidebar-item.d.ts +23 -0
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -0
- package/package.json +11 -6
|
@@ -1,328 +1,295 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import { useWorkspace as Me } from "../../store/store.js";
|
|
13
|
-
import { commandPaletteBus as Se } from "../../libs/event-busses/command-palette-bus.js";
|
|
14
|
-
const Q = (x) => (we("data-v-1e316c86"), x = x(), xe(), x), Ie = { class: "flex flex-row gap-1 items-center" }, Ee = { class: "relative" }, Ne = { class: "flex items-start" }, ze = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Be = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, Oe = { class: "relative flex h-fit" }, je = /* @__PURE__ */ Q(() => /* @__PURE__ */ s("span", null, " ", -1)), Pe = /* @__PURE__ */ Q(() => /* @__PURE__ */ s("span", null, "Add Request", -1)), K = "hover:bg-sidebar-active-b indent-padding-left", _e = /* @__PURE__ */ pe({
|
|
1
|
+
import { defineComponent as te, useCssVars as ie, computed as c, ref as ne, resolveComponent as re, openBlock as f, createElementBlock as k, normalizeClass as m, unref as n, createVNode as h, withCtx as y, createBlock as b, withModifiers as C, createElementVNode as d, toDisplayString as O, createCommentVNode as g, createTextVNode as B, renderSlot as le, Fragment as se, renderList as ae, pushScopeId as oe, popScopeId as de } from "vue";
|
|
2
|
+
import { PathId as ue } from "../../router.js";
|
|
3
|
+
import { ScalarButton as I, ScalarIcon as w } from "@scalar/components";
|
|
4
|
+
import { Draggable as pe } from "@scalar/draggable";
|
|
5
|
+
import { RouterLink as fe } from "vue-router";
|
|
6
|
+
import me from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
7
|
+
import { useSidebar as ce } from "../../hooks/useSidebar.js";
|
|
8
|
+
import { getModifiers as be } from "../../libs/event-busses/hot-keys-bus.js";
|
|
9
|
+
import { useWorkspace as ge } from "../../store/store.js";
|
|
10
|
+
import { commandPaletteBus as ve } from "../../libs/event-busses/command-palette-bus.js";
|
|
11
|
+
const P = (v) => (oe("data-v-49b059d4"), v = v(), de(), v), he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relative" }, xe = { class: "flex items-start" }, ke = ["disabled"], we = { class: "z-10 flex h-5 items-center justify-center max-w-[14px]" }, Ue = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, qe = { class: "relative flex h-fit" }, De = /* @__PURE__ */ P(() => /* @__PURE__ */ d("span", null, " ", -1)), Ce = { key: 2 }, Ie = /* @__PURE__ */ P(() => /* @__PURE__ */ d("span", null, "Add Request", -1)), j = "hover:bg-sidebar-active-b indent-padding-left", je = /* @__PURE__ */ te({
|
|
15
12
|
__name: "RequestSidebarItem",
|
|
16
13
|
props: {
|
|
17
14
|
isDraggable: { type: Boolean, default: !1 },
|
|
18
15
|
isDroppable: { type: [Boolean, Function], default: !1 },
|
|
19
16
|
parentUids: {},
|
|
20
|
-
uid: {}
|
|
17
|
+
uid: {},
|
|
18
|
+
menuItem: {}
|
|
21
19
|
},
|
|
22
|
-
emits: ["onDragEnd", "newTab"],
|
|
23
|
-
setup(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
20
|
+
emits: ["onDragEnd", "newTab", "openMenu"],
|
|
21
|
+
setup(v, { emit: V }) {
|
|
22
|
+
ie((e) => ({
|
|
23
|
+
"2df59af7": G.value,
|
|
24
|
+
"6a813932": J.value
|
|
27
25
|
}));
|
|
28
|
-
const
|
|
29
|
-
activeRequest:
|
|
30
|
-
activeRouterParams:
|
|
31
|
-
activeWorkspace:
|
|
32
|
-
collections:
|
|
33
|
-
tags:
|
|
34
|
-
isReadOnly:
|
|
35
|
-
requests:
|
|
36
|
-
requestExamples:
|
|
37
|
-
collectionMutators:
|
|
38
|
-
tagMutators:
|
|
39
|
-
requestMutators:
|
|
40
|
-
requestExampleMutators:
|
|
41
|
-
router:
|
|
42
|
-
} =
|
|
43
|
-
var
|
|
44
|
-
const e =
|
|
26
|
+
const r = v, F = V, {
|
|
27
|
+
activeRequest: R,
|
|
28
|
+
activeRouterParams: A,
|
|
29
|
+
activeWorkspace: x,
|
|
30
|
+
collections: U,
|
|
31
|
+
tags: Y,
|
|
32
|
+
isReadOnly: p,
|
|
33
|
+
requests: $,
|
|
34
|
+
requestExamples: q,
|
|
35
|
+
collectionMutators: T,
|
|
36
|
+
tagMutators: M,
|
|
37
|
+
requestMutators: z,
|
|
38
|
+
requestExampleMutators: E,
|
|
39
|
+
router: L
|
|
40
|
+
} = ge(), { collapsedSidebarFolders: S, toggleSidebarFolder: W } = ce(), i = c(() => {
|
|
41
|
+
var s, u;
|
|
42
|
+
const e = U[r.uid], t = Y[r.uid], l = $[r.uid], a = q[r.uid];
|
|
45
43
|
return e ? {
|
|
46
|
-
title: ((
|
|
44
|
+
title: ((s = e.info) == null ? void 0 : s.title) ?? "Unknown title",
|
|
47
45
|
entity: e,
|
|
48
46
|
resourceTitle: "Collection",
|
|
49
47
|
children: e.children,
|
|
50
48
|
warning: "This cannot be undone. You’re about to delete the collection and all folders andrequests inside it.",
|
|
51
|
-
rename: () =>
|
|
52
|
-
delete: () =>
|
|
49
|
+
rename: (o) => T.edit(e.uid, "info.title", o),
|
|
50
|
+
delete: () => T.delete(e, x.value)
|
|
53
51
|
} : t ? {
|
|
54
52
|
title: t.name,
|
|
55
53
|
entity: t,
|
|
56
54
|
resourceTitle: "Tag",
|
|
57
55
|
children: t.children,
|
|
58
56
|
warning: "This cannot be undone. You’re about to delete the tag and all requests inside it",
|
|
59
|
-
rename: () =>
|
|
60
|
-
delete: () =>
|
|
61
|
-
} :
|
|
62
|
-
title:
|
|
63
|
-
link: `/workspace/${
|
|
64
|
-
method:
|
|
65
|
-
entity:
|
|
57
|
+
rename: (o) => M.edit(t.uid, "name", o),
|
|
58
|
+
delete: () => M.delete(t, r.parentUids[0])
|
|
59
|
+
} : l ? {
|
|
60
|
+
title: l.summary ?? [l.method, l.path].join(" - "),
|
|
61
|
+
link: `/workspace/${x.value.uid}/request/${l.uid}`,
|
|
62
|
+
method: l.method,
|
|
63
|
+
entity: l,
|
|
66
64
|
resourceTitle: "Request",
|
|
67
65
|
warning: "This cannot be undone. You’re about to delete the request.",
|
|
68
|
-
children:
|
|
69
|
-
rename: () =>
|
|
70
|
-
delete: () =>
|
|
66
|
+
children: l.examples,
|
|
67
|
+
rename: (o) => z.edit(l.uid, "summary", o),
|
|
68
|
+
delete: () => z.delete(l, r.parentUids[0])
|
|
71
69
|
} : {
|
|
72
70
|
title: a.name,
|
|
73
|
-
link: `/workspace/${
|
|
74
|
-
method: (
|
|
71
|
+
link: `/workspace/${x.value.uid}/request/${a.requestUid}/examples/${a.uid}`,
|
|
72
|
+
method: (u = $[a.requestUid]) == null ? void 0 : u.method,
|
|
75
73
|
entity: a,
|
|
76
74
|
resourceTitle: "Example",
|
|
77
75
|
children: [],
|
|
78
|
-
rename: () =>
|
|
79
|
-
delete: () =>
|
|
76
|
+
rename: (o) => E.edit(a.uid, "name", o),
|
|
77
|
+
delete: () => E.delete(a)
|
|
80
78
|
};
|
|
81
|
-
}),
|
|
82
|
-
() =>
|
|
83
|
-
),
|
|
79
|
+
}), H = c(
|
|
80
|
+
() => i.value.entity.type === "collection" && i.value.title === "Drafts"
|
|
81
|
+
), G = c(() => r.parentUids.length ? p.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "12px"), J = c(() => r.parentUids.length ? p.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "0px"), K = c(
|
|
84
82
|
() => {
|
|
85
83
|
var e;
|
|
86
|
-
return
|
|
84
|
+
return S[r.uid] || ((e = R.value) == null ? void 0 : e.uid) === r.uid && i.value.entity.examples.length > 1;
|
|
87
85
|
}
|
|
88
|
-
),
|
|
86
|
+
), Q = c(
|
|
89
87
|
() => {
|
|
90
88
|
var e;
|
|
91
|
-
return
|
|
89
|
+
return A.value[ue.Request] === "default" && ((e = R.value) == null ? void 0 : e.uid) === r.uid;
|
|
92
90
|
}
|
|
93
|
-
),
|
|
91
|
+
), D = ne(null), N = c(() => {
|
|
94
92
|
let e = 0.5, t = 0.5;
|
|
95
|
-
if (!
|
|
96
|
-
const { draggingItem:
|
|
97
|
-
return !
|
|
98
|
-
}),
|
|
99
|
-
|
|
100
|
-
}, k = () => {
|
|
101
|
-
g.value = l.value.title || "", y.show();
|
|
102
|
-
}, oe = () => {
|
|
103
|
-
l.value.delete(), R.value[S.Request] === n.uid && j(`/workspace/${b.value.uid}/request/default`), R.value[S.Examples] === n.uid && j(`/workspace/${b.value}/request/default`);
|
|
104
|
-
}, ue = (e, t) => {
|
|
105
|
-
e && (Ce(["default"]).some((u) => e[u]) ? Z("newTab", t.title || "", t.entity.uid) : t.link && ee.push(t.link));
|
|
93
|
+
if (!D.value) return { ceiling: e, floor: t };
|
|
94
|
+
const { draggingItem: l } = D.value;
|
|
95
|
+
return !U[l == null ? void 0 : l.id] && i.value.entity.type === "collection" ? (e = 1, t = 0) : i.value.entity.type === "tag" && (e = 0.8, t = 0.2), { ceiling: e, floor: t };
|
|
96
|
+
}), X = (e, t) => !(x.value.isReadOnly || q[t.id] || U[e.id]), Z = (e, t) => {
|
|
97
|
+
e && (be(["default"]).some((s) => e[s]) ? F("newTab", t.title || "", t.entity.uid) : t.link && L.push(t.link));
|
|
106
98
|
};
|
|
107
|
-
function
|
|
108
|
-
|
|
99
|
+
function _() {
|
|
100
|
+
ve.emit({
|
|
109
101
|
commandName: "Create Request",
|
|
110
102
|
metaData: {
|
|
111
|
-
itemUid:
|
|
112
|
-
parentUid:
|
|
103
|
+
itemUid: r.uid,
|
|
104
|
+
parentUid: r.parentUids[0]
|
|
113
105
|
}
|
|
114
106
|
});
|
|
115
107
|
}
|
|
116
108
|
return (e, t) => {
|
|
117
|
-
const
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
109
|
+
const l = re("RequestSidebarItem", !0);
|
|
110
|
+
return f(), k("div", {
|
|
111
|
+
class: m(["relative flex flex-row", [
|
|
112
|
+
n(p) && e.parentUids.length > 1 || !n(p) && e.parentUids.length ? "before:bg-b-3 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:z-10 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
113
|
+
]])
|
|
114
|
+
}, [
|
|
115
|
+
h(n(pe), {
|
|
116
|
+
id: i.value.entity.uid,
|
|
117
|
+
ref_key: "draggableRef",
|
|
118
|
+
ref: D,
|
|
119
|
+
ceiling: N.value.ceiling,
|
|
120
|
+
class: "flex flex-1 flex-col gap-[.5px] text-sm",
|
|
121
|
+
floor: N.value.floor,
|
|
122
|
+
isDraggable: e.isDraggable,
|
|
123
|
+
isDroppable: e.isDroppable,
|
|
124
|
+
parentIds: e.parentUids,
|
|
125
|
+
onOnDragEnd: t[8] || (t[8] = (...a) => e.$emit("onDragEnd", ...a))
|
|
126
|
+
}, {
|
|
127
|
+
default: y(() => {
|
|
128
|
+
var a;
|
|
129
|
+
return [
|
|
130
|
+
i.value.link ? (f(), b(n(fe), {
|
|
138
131
|
key: 0,
|
|
139
132
|
class: "no-underline",
|
|
140
|
-
to:
|
|
141
|
-
onClick: t[
|
|
142
|
-
(
|
|
133
|
+
to: i.value.link,
|
|
134
|
+
onClick: t[1] || (t[1] = C(
|
|
135
|
+
(s) => Z(s, i.value),
|
|
143
136
|
["prevent"]
|
|
144
137
|
))
|
|
145
138
|
}, {
|
|
146
|
-
default:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
139
|
+
default: y(({ isExactActive: s }) => {
|
|
140
|
+
var u, o;
|
|
141
|
+
return [
|
|
142
|
+
d("div", {
|
|
143
|
+
class: m(["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 w-full", [
|
|
144
|
+
j,
|
|
145
|
+
s || Q.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
146
|
+
]]),
|
|
147
|
+
tabindex: "0"
|
|
148
|
+
}, [
|
|
149
|
+
d("span", {
|
|
150
|
+
class: m(["line-clamp-3 z-10 font-medium w-full pl-2 word-break-break-word", {
|
|
151
|
+
"editable-sidebar-hover-item": !n(p)
|
|
152
|
+
}])
|
|
153
|
+
}, O(i.value.title), 3),
|
|
154
|
+
d("div", he, [
|
|
155
|
+
d("div", ye, [
|
|
156
|
+
n(p) ? g("", !0) : (f(), b(n(I), {
|
|
157
|
+
key: 0,
|
|
158
|
+
class: m(["px-0.5 py-0 z-10 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
159
|
+
flex: ((o = (u = e.menuItem) == null ? void 0 : u.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
160
|
+
}]),
|
|
161
|
+
size: "sm",
|
|
162
|
+
type: "button",
|
|
163
|
+
variant: "ghost",
|
|
164
|
+
onClick: t[0] || (t[0] = C(
|
|
165
|
+
(ee) => e.$emit("openMenu", {
|
|
166
|
+
item: i.value,
|
|
167
|
+
parentUids: e.parentUids,
|
|
168
|
+
targetRef: ee.currentTarget.parentNode,
|
|
169
|
+
open: !0
|
|
170
|
+
}),
|
|
171
|
+
["stop", "prevent"]
|
|
172
|
+
))
|
|
173
|
+
}, {
|
|
174
|
+
default: y(() => [
|
|
175
|
+
h(n(w), {
|
|
176
|
+
icon: "Ellipses",
|
|
177
|
+
size: "sm"
|
|
178
|
+
})
|
|
179
|
+
]),
|
|
180
|
+
_: 1
|
|
181
|
+
}, 8, ["class"]))
|
|
182
|
+
]),
|
|
183
|
+
d("span", xe, [
|
|
184
|
+
B(" "),
|
|
185
|
+
i.value.method ? (f(), b(n(me), {
|
|
186
|
+
key: 0,
|
|
187
|
+
class: "font-bold",
|
|
188
|
+
method: i.value.method
|
|
189
|
+
}, null, 8, ["method"])) : g("", !0)
|
|
180
190
|
])
|
|
181
|
-
]
|
|
182
|
-
])
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
item: l.value.entity,
|
|
186
|
-
parentUids: e.parentUids,
|
|
187
|
-
resourceTitle: l.value.resourceTitle,
|
|
188
|
-
static: "",
|
|
189
|
-
onDelete: t[1] || (t[1] = (u) => i(h).show()),
|
|
190
|
-
onRename: k
|
|
191
|
-
}, null, 8, ["item", "parentUids", "resourceTitle"])
|
|
192
|
-
]),
|
|
193
|
-
_: 2
|
|
194
|
-
}, 1032, ["disabled"])
|
|
195
|
-
]),
|
|
191
|
+
])
|
|
192
|
+
], 2)
|
|
193
|
+
];
|
|
194
|
+
}),
|
|
196
195
|
_: 1
|
|
197
|
-
}, 8, ["to"])) : !
|
|
196
|
+
}, 8, ["to"])) : !n(p) || e.parentUids.length ? (f(), k("button", {
|
|
198
197
|
key: 1,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
198
|
+
class: m(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 z-[1]", j]),
|
|
199
|
+
disabled: n(p),
|
|
200
|
+
type: "button",
|
|
201
|
+
onClick: t[3] || (t[3] = (s) => n(W)(i.value.entity.uid))
|
|
202
|
+
}, [
|
|
203
|
+
d("span", we, [
|
|
204
|
+
le(e.$slots, "leftIcon", {}, () => [
|
|
205
|
+
d("div", {
|
|
206
|
+
class: m({
|
|
207
|
+
"rotate-90": n(S)[i.value.entity.uid]
|
|
208
|
+
})
|
|
209
|
+
}, [
|
|
210
|
+
h(n(w), {
|
|
211
|
+
class: "text-c-3 text-sm",
|
|
212
|
+
icon: "ChevronRight",
|
|
213
|
+
size: "sm",
|
|
214
|
+
thickness: "2.5"
|
|
215
|
+
})
|
|
216
|
+
], 2)
|
|
217
|
+
], !0),
|
|
218
|
+
B(" ")
|
|
219
|
+
]),
|
|
220
|
+
d("div", Ue, [
|
|
221
|
+
d("span", {
|
|
222
|
+
class: m(["line-clamp-3 z-10 font-medium text-left w-full word-break-break-word", {
|
|
223
|
+
"editable-sidebar-hover-item": !n(p)
|
|
224
|
+
}])
|
|
225
|
+
}, O(i.value.title), 3),
|
|
226
|
+
d("div", qe, [
|
|
227
|
+
!n(p) && !H.value ? (f(), b(n(I), {
|
|
228
|
+
key: 0,
|
|
229
|
+
class: m(["px-0.5 py-0 z-10 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
230
|
+
flex: ((a = e.menuItem.item) == null ? void 0 : a.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
231
|
+
}]),
|
|
232
|
+
size: "sm",
|
|
233
|
+
variant: "ghost",
|
|
234
|
+
onClick: t[2] || (t[2] = C(
|
|
235
|
+
(s) => e.$emit("openMenu", {
|
|
236
|
+
item: i.value,
|
|
234
237
|
parentUids: e.parentUids,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
targetRef: s.currentTarget.parentNode,
|
|
239
|
+
open: !0
|
|
240
|
+
}),
|
|
241
|
+
["stop", "prevent"]
|
|
242
|
+
))
|
|
243
|
+
}, {
|
|
244
|
+
default: y(() => [
|
|
245
|
+
h(n(w), {
|
|
246
|
+
icon: "Ellipses",
|
|
247
|
+
size: "sm"
|
|
248
|
+
})
|
|
249
|
+
]),
|
|
250
|
+
_: 1
|
|
251
|
+
}, 8, ["class"])) : g("", !0),
|
|
252
|
+
De
|
|
242
253
|
])
|
|
243
|
-
])
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
onDelete: t[5] || (t[5] = (a) => i(h).show()),
|
|
252
|
-
onRename: k
|
|
253
|
-
}, null, 8, ["item", "parentUids", "resourceTitle"])) : w("", !0)
|
|
254
|
-
]),
|
|
255
|
-
default: p(() => [
|
|
256
|
-
M(" > ")
|
|
257
|
-
]),
|
|
258
|
-
_: 3
|
|
259
|
-
}, 8, ["disabled"])) : w("", !0),
|
|
260
|
-
be(s("div", null, [
|
|
261
|
-
(d(!0), A(Y, null, ge(l.value.children, (a) => (d(), f(r, {
|
|
262
|
-
key: a,
|
|
263
|
-
isDraggable: !i($)[a],
|
|
264
|
-
isDroppable: re,
|
|
254
|
+
])
|
|
255
|
+
], 8, ke)) : g("", !0),
|
|
256
|
+
K.value ? (f(), k("div", Ce, [
|
|
257
|
+
(f(!0), k(se, null, ae(i.value.children, (s) => (f(), b(l, {
|
|
258
|
+
key: s,
|
|
259
|
+
isDraggable: !n(q)[s],
|
|
260
|
+
isDroppable: X,
|
|
261
|
+
menuItem: e.menuItem,
|
|
265
262
|
parentUids: [...e.parentUids, e.uid],
|
|
266
|
-
uid:
|
|
267
|
-
onNewTab: t[
|
|
268
|
-
onOnDragEnd: t[
|
|
269
|
-
|
|
270
|
-
|
|
263
|
+
uid: s,
|
|
264
|
+
onNewTab: t[4] || (t[4] = (u, o) => e.$emit("newTab", u, o)),
|
|
265
|
+
onOnDragEnd: t[5] || (t[5] = (...u) => e.$emit("onDragEnd", ...u)),
|
|
266
|
+
onOpenMenu: t[6] || (t[6] = (u) => e.$emit("openMenu", u))
|
|
267
|
+
}, null, 8, ["isDraggable", "menuItem", "parentUids", "uid"]))), 128)),
|
|
268
|
+
i.value.children.length === 0 ? (f(), b(n(I), {
|
|
271
269
|
key: 0,
|
|
272
|
-
class:
|
|
270
|
+
class: m(["mb-[.5px] flex gap-1.5 h-8 text-c-1 py-0 justify-start text-xs w-full hover:bg-b-2", e.parentUids.length ? "pl-9" : ""]),
|
|
273
271
|
variant: "ghost",
|
|
274
|
-
onClick: t[
|
|
272
|
+
onClick: t[7] || (t[7] = (s) => _())
|
|
275
273
|
}, {
|
|
276
|
-
default:
|
|
277
|
-
|
|
274
|
+
default: y(() => [
|
|
275
|
+
h(n(w), {
|
|
278
276
|
class: "ml-0.5 h-2.5 w-2.5",
|
|
279
277
|
icon: "Add",
|
|
280
278
|
thickness: "3"
|
|
281
279
|
}),
|
|
282
|
-
|
|
280
|
+
Ie
|
|
283
281
|
]),
|
|
284
282
|
_: 1
|
|
285
|
-
}, 8, ["class"])) :
|
|
286
|
-
],
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
], 2),
|
|
293
|
-
m(i(J), {
|
|
294
|
-
size: "xxs",
|
|
295
|
-
state: i(h),
|
|
296
|
-
title: `Delete ${l.value.resourceTitle}`
|
|
297
|
-
}, {
|
|
298
|
-
default: p(() => [
|
|
299
|
-
m(ye, {
|
|
300
|
-
variableName: l.value.title,
|
|
301
|
-
warningMessage: l.value.warning,
|
|
302
|
-
onClose: t[10] || (t[10] = (a) => i(h).hide()),
|
|
303
|
-
onDelete: oe
|
|
304
|
-
}, null, 8, ["variableName", "warningMessage"])
|
|
305
|
-
]),
|
|
306
|
-
_: 1
|
|
307
|
-
}, 8, ["state", "title"]),
|
|
308
|
-
m(i(J), {
|
|
309
|
-
size: "xxs",
|
|
310
|
-
state: i(y),
|
|
311
|
-
title: `Rename ${l.value.resourceTitle}`
|
|
312
|
-
}, {
|
|
313
|
-
default: p(() => [
|
|
314
|
-
m(ke, {
|
|
315
|
-
name: l.value.title,
|
|
316
|
-
onClose: t[11] || (t[11] = (a) => i(y).hide()),
|
|
317
|
-
onRename: se
|
|
318
|
-
}, null, 8, ["name"])
|
|
319
|
-
]),
|
|
320
|
-
_: 1
|
|
321
|
-
}, 8, ["state", "title"])
|
|
322
|
-
], 64);
|
|
283
|
+
}, 8, ["class"])) : g("", !0)
|
|
284
|
+
])) : g("", !0)
|
|
285
|
+
];
|
|
286
|
+
}),
|
|
287
|
+
_: 3
|
|
288
|
+
}, 8, ["id", "ceiling", "floor", "isDraggable", "isDroppable", "parentIds"])
|
|
289
|
+
], 2);
|
|
323
290
|
};
|
|
324
291
|
}
|
|
325
292
|
});
|
|
326
293
|
export {
|
|
327
|
-
|
|
294
|
+
je as default
|
|
328
295
|
};
|
|
@@ -1,36 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
|
3
|
-
|
|
4
|
-
item: Collection | Tag | Request | RequestExample;
|
|
5
|
-
resourceTitle: string;
|
|
6
|
-
static?: boolean;
|
|
7
|
-
}>, {
|
|
8
|
-
static: boolean;
|
|
1
|
+
import type { SidebarMenuItem } from '../../views/Request/types/index.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
|
+
menuItem: SidebarMenuItem;
|
|
9
4
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/** Both inidicate the level and provide a way to traverse upwards */
|
|
14
|
-
item: Collection | Tag | Request | RequestExample;
|
|
15
|
-
resourceTitle: string;
|
|
16
|
-
static?: boolean;
|
|
17
|
-
}>, {
|
|
18
|
-
static: boolean;
|
|
5
|
+
closeMenu: () => void;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
7
|
+
menuItem: SidebarMenuItem;
|
|
19
8
|
}>>> & {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, {
|
|
23
|
-
static: boolean;
|
|
24
|
-
}, {}>;
|
|
9
|
+
onCloseMenu?: (() => any) | undefined;
|
|
10
|
+
}, {}, {}>;
|
|
25
11
|
export default _default;
|
|
26
|
-
type __VLS_WithDefaults<P, D> = {
|
|
27
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
28
|
-
default: D[K];
|
|
29
|
-
}> : P[K];
|
|
30
|
-
};
|
|
31
|
-
type __VLS_Prettify<T> = {
|
|
32
|
-
[K in keyof T]: T[K];
|
|
33
|
-
} & {};
|
|
34
12
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
35
13
|
type __VLS_TypePropsToOption<T> = {
|
|
36
14
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AA4KA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;;cAa1B,eAAe;;;;cAAf,eAAe;;;;AA+YjD,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 t from "./RequestSidebarItemMenu.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ e(t, [["__scopeId", "data-v-59cf3dad"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|