@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,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { Draggable as
|
|
4
|
-
import { RouterLink as
|
|
5
|
-
import { PathId as
|
|
6
|
-
import
|
|
7
|
-
import { useSidebar as
|
|
8
|
-
import { getModifiers as
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as re, useCssVars as ae, computed as m, ref as le, resolveComponent as oe, openBlock as d, createElementBlock as k, normalizeClass as p, unref as n, createVNode as y, withCtx as c, createBlock as v, withModifiers as U, createElementVNode as o, toDisplayString as I, createCommentVNode as g, createTextVNode as j, renderSlot as ue, Fragment as de, renderList as pe } from "vue";
|
|
2
|
+
import { ScalarButton as q, ScalarIcon as x, ScalarTooltip as fe } from "@scalar/components";
|
|
3
|
+
import { Draggable as me } from "@scalar/draggable";
|
|
4
|
+
import { RouterLink as ce } from "vue-router";
|
|
5
|
+
import { PathId as ve } from "../../routes.js";
|
|
6
|
+
import ge from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
7
|
+
import { useSidebar as be } from "../../hooks/useSidebar.js";
|
|
8
|
+
import { getModifiers as he } from "../../libs/hot-keys.js";
|
|
9
|
+
import { useWorkspace as ye } from "../../store/store.js";
|
|
10
|
+
const xe = { class: "flex flex-row gap-1 items-center" }, we = { class: "relative" }, ke = { class: "flex items-start" }, Ue = ["aria-expanded"], qe = { class: "flex h-5 items-center justify-center max-w-[14px]" }, De = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, Re = { class: "relative flex h-fit" }, Ce = { class: "grid gap-1.5 pointer-events-none max-w-10 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, Me = { class: "flex items-center text-c-2" }, Te = { class: "text-pretty break-all" }, Ie = { key: 2 }, B = "hover:bg-sidebar-active-b indent-padding-left", Ve = /* @__PURE__ */ re({
|
|
11
11
|
__name: "RequestSidebarItem",
|
|
12
12
|
props: {
|
|
13
13
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -17,32 +17,32 @@ const he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relativ
|
|
|
17
17
|
menuItem: {}
|
|
18
18
|
},
|
|
19
19
|
emits: ["onDragEnd", "newTab", "openMenu"],
|
|
20
|
-
setup(
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
20
|
+
setup(V, { emit: W }) {
|
|
21
|
+
ae((e) => ({
|
|
22
|
+
"0ba7b02c": K.value,
|
|
23
|
+
"4adbcd94": Q.value
|
|
24
24
|
}));
|
|
25
|
-
const s =
|
|
26
|
-
activeCollection:
|
|
25
|
+
const s = V, A = W, {
|
|
26
|
+
activeCollection: F,
|
|
27
27
|
activeRequest: E,
|
|
28
|
-
activeRouterParams:
|
|
29
|
-
activeWorkspace:
|
|
30
|
-
collections:
|
|
31
|
-
tags:
|
|
32
|
-
isReadOnly:
|
|
28
|
+
activeRouterParams: Y,
|
|
29
|
+
activeWorkspace: w,
|
|
30
|
+
collections: D,
|
|
31
|
+
tags: H,
|
|
32
|
+
isReadOnly: f,
|
|
33
33
|
requests: $,
|
|
34
|
-
requestExamples:
|
|
35
|
-
collectionMutators:
|
|
36
|
-
tagMutators:
|
|
37
|
-
requestMutators:
|
|
34
|
+
requestExamples: R,
|
|
35
|
+
collectionMutators: C,
|
|
36
|
+
tagMutators: z,
|
|
37
|
+
requestMutators: S,
|
|
38
38
|
requestExampleMutators: N,
|
|
39
|
-
router:
|
|
40
|
-
events:
|
|
41
|
-
} =
|
|
42
|
-
var
|
|
43
|
-
const e =
|
|
39
|
+
router: L,
|
|
40
|
+
events: G
|
|
41
|
+
} = ye(), { collapsedSidebarFolders: M, toggleSidebarFolder: J } = be(), i = m(() => {
|
|
42
|
+
var b, a;
|
|
43
|
+
const e = D[s.uid], t = H[s.uid], r = $[s.uid], u = R[s.uid];
|
|
44
44
|
return e ? {
|
|
45
|
-
title: ((
|
|
45
|
+
title: ((b = e.info) == null ? void 0 : b.title) ?? "Unknown title",
|
|
46
46
|
entity: e,
|
|
47
47
|
resourceTitle: "Collection",
|
|
48
48
|
children: e.children,
|
|
@@ -50,24 +50,24 @@ const he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relativ
|
|
|
50
50
|
documentUrl: e.documentUrl,
|
|
51
51
|
watchMode: e.watchMode,
|
|
52
52
|
warning: "This cannot be undone. You’re about to delete the collection and all folders and requests inside it.",
|
|
53
|
-
edit: (
|
|
54
|
-
|
|
53
|
+
edit: (l, h) => {
|
|
54
|
+
C.edit(e.uid, "info.title", l), h && C.edit(e.uid, "x-scalar-icon", h);
|
|
55
55
|
},
|
|
56
|
-
delete: () =>
|
|
56
|
+
delete: () => C.delete(e, w.value)
|
|
57
57
|
} : t ? {
|
|
58
58
|
title: t.name,
|
|
59
59
|
entity: t,
|
|
60
60
|
resourceTitle: "Tag",
|
|
61
61
|
children: t.children,
|
|
62
62
|
warning: "This cannot be undone. You’re about to delete the tag and all requests inside it",
|
|
63
|
-
edit: (
|
|
64
|
-
delete: () =>
|
|
63
|
+
edit: (l) => z.edit(t.uid, "name", l),
|
|
64
|
+
delete: () => z.delete(t, s.parentUids[0])
|
|
65
65
|
} : r ? {
|
|
66
66
|
title: r.summary ?? [r.method, r.path].join(" - "),
|
|
67
67
|
link: {
|
|
68
68
|
name: "request",
|
|
69
69
|
params: {
|
|
70
|
-
workspace:
|
|
70
|
+
workspace: w.value.uid,
|
|
71
71
|
request: r.uid
|
|
72
72
|
}
|
|
73
73
|
},
|
|
@@ -76,48 +76,48 @@ const he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relativ
|
|
|
76
76
|
resourceTitle: "Request",
|
|
77
77
|
warning: "This cannot be undone. You’re about to delete the request.",
|
|
78
78
|
children: r.examples,
|
|
79
|
-
edit: (
|
|
80
|
-
delete: () =>
|
|
79
|
+
edit: (l) => S.edit(r.uid, "summary", l),
|
|
80
|
+
delete: () => S.delete(r, s.parentUids[0])
|
|
81
81
|
} : {
|
|
82
|
-
title:
|
|
82
|
+
title: u.name,
|
|
83
83
|
link: {
|
|
84
84
|
name: "request.examples",
|
|
85
85
|
params: {
|
|
86
|
-
workspace:
|
|
87
|
-
request:
|
|
88
|
-
examples:
|
|
86
|
+
workspace: w.value.uid,
|
|
87
|
+
request: u.requestUid,
|
|
88
|
+
examples: u.uid
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
-
method: (
|
|
92
|
-
entity:
|
|
91
|
+
method: (a = $[u.requestUid]) == null ? void 0 : a.method,
|
|
92
|
+
entity: u,
|
|
93
93
|
resourceTitle: "Example",
|
|
94
94
|
warning: "This cannot be undone. You’re about to delete the example from the request.",
|
|
95
95
|
children: [],
|
|
96
|
-
edit: (
|
|
97
|
-
delete: () => N.delete(
|
|
96
|
+
edit: (l) => N.edit(u.uid, "name", l),
|
|
97
|
+
delete: () => N.delete(u)
|
|
98
98
|
};
|
|
99
|
-
}),
|
|
99
|
+
}), O = m(
|
|
100
100
|
() => i.value.entity.type === "collection" && i.value.title === "Drafts"
|
|
101
|
-
), K =
|
|
101
|
+
), K = m(() => s.parentUids.length ? f.value ? `${(s.parentUids.length - 1) * 12}px` : `${s.parentUids.length * 12}px` : "12px"), Q = m(() => s.parentUids.length ? f.value ? `${(s.parentUids.length - 1) * 12}px` : `${s.parentUids.length * 12}px` : "0px"), X = m(
|
|
102
102
|
() => {
|
|
103
103
|
var e;
|
|
104
|
-
return
|
|
104
|
+
return M[s.uid] || ((e = E.value) == null ? void 0 : e.uid) === s.uid && i.value.entity.examples.length > 1;
|
|
105
105
|
}
|
|
106
|
-
), Z =
|
|
106
|
+
), Z = m(
|
|
107
107
|
() => {
|
|
108
108
|
var e;
|
|
109
|
-
return
|
|
109
|
+
return Y.value[ve.Request] === "default" && ((e = E.value) == null ? void 0 : e.uid) === s.uid;
|
|
110
110
|
}
|
|
111
|
-
),
|
|
111
|
+
), T = le(null), P = m(() => {
|
|
112
112
|
let e = 0.5, t = 0.5;
|
|
113
|
-
if (!
|
|
114
|
-
const { draggingItem: r } =
|
|
115
|
-
return !
|
|
116
|
-
}), _ = (e, t) => !(
|
|
117
|
-
e && (
|
|
113
|
+
if (!T.value) return { ceiling: e, floor: t };
|
|
114
|
+
const { draggingItem: r } = T.value;
|
|
115
|
+
return !D[r == null ? void 0 : r.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 };
|
|
116
|
+
}), _ = (e, t) => !(w.value.isReadOnly || R[t.id] || D[e.id]), ee = (e, t) => {
|
|
117
|
+
e && (he(["default"]).some((b) => e[b]) ? A("newTab", t.title || "", t.entity.uid) : t.link && L.push(t.link));
|
|
118
118
|
};
|
|
119
119
|
function te() {
|
|
120
|
-
|
|
120
|
+
G.commandPalette.emit({
|
|
121
121
|
commandName: "Create Request",
|
|
122
122
|
metaData: {
|
|
123
123
|
itemUid: s.uid,
|
|
@@ -125,77 +125,77 @@ const he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relativ
|
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
const ie =
|
|
129
|
-
const { uid: e, watchModeStatus: t } =
|
|
128
|
+
const ie = m(() => {
|
|
129
|
+
const { uid: e, watchModeStatus: t } = F.value || {};
|
|
130
130
|
return e !== i.value.entity.uid ? "text-c-3" : t === "WATCHING" ? "text-c-1" : t === "ERROR" ? "text-red" : "text-c-3";
|
|
131
|
-
});
|
|
131
|
+
}), ne = m(() => i.value.title == "Drafts" && !f.value && i.value.children.length > 0);
|
|
132
132
|
return (e, t) => {
|
|
133
|
-
const r =
|
|
134
|
-
return
|
|
135
|
-
class:
|
|
136
|
-
n(
|
|
133
|
+
const r = oe("RequestSidebarItem", !0);
|
|
134
|
+
return d(), k("li", {
|
|
135
|
+
class: p(["relative flex flex-row", [
|
|
136
|
+
n(f) && e.parentUids.length > 1 || !n(f) && e.parentUids.length ? "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
137
137
|
]])
|
|
138
138
|
}, [
|
|
139
|
-
|
|
139
|
+
y(n(me), {
|
|
140
140
|
id: i.value.entity.uid,
|
|
141
141
|
ref_key: "draggableRef",
|
|
142
|
-
ref:
|
|
143
|
-
ceiling:
|
|
142
|
+
ref: T,
|
|
143
|
+
ceiling: P.value.ceiling,
|
|
144
144
|
class: "flex flex-1 flex-col gap-[.5px] text-sm",
|
|
145
|
-
floor:
|
|
145
|
+
floor: P.value.floor,
|
|
146
146
|
isDraggable: e.isDraggable,
|
|
147
147
|
isDroppable: e.isDroppable,
|
|
148
148
|
parentIds: e.parentUids,
|
|
149
|
-
onOnDragEnd: t[
|
|
149
|
+
onOnDragEnd: t[9] || (t[9] = (...u) => e.$emit("onDragEnd", ...u))
|
|
150
150
|
}, {
|
|
151
|
-
default:
|
|
152
|
-
var
|
|
151
|
+
default: c(() => {
|
|
152
|
+
var u, b;
|
|
153
153
|
return [
|
|
154
|
-
i.value.link ? (
|
|
154
|
+
i.value.link ? (d(), v(n(ce), {
|
|
155
155
|
key: 0,
|
|
156
156
|
class: "group no-underline",
|
|
157
157
|
to: i.value.link,
|
|
158
|
-
onClick: t[1] || (t[1] =
|
|
159
|
-
(
|
|
158
|
+
onClick: t[1] || (t[1] = U(
|
|
159
|
+
(a) => ee(a, i.value),
|
|
160
160
|
["prevent"]
|
|
161
161
|
))
|
|
162
162
|
}, {
|
|
163
|
-
default:
|
|
164
|
-
var
|
|
163
|
+
default: c(({ isExactActive: a }) => {
|
|
164
|
+
var l, h;
|
|
165
165
|
return [
|
|
166
|
-
|
|
167
|
-
class:
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
o("div", {
|
|
167
|
+
class: p(["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", [
|
|
168
|
+
B,
|
|
169
|
+
a || Z.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
|
|
170
170
|
]])
|
|
171
171
|
}, [
|
|
172
|
-
|
|
173
|
-
class:
|
|
174
|
-
"editable-sidebar-hover-item": !n(
|
|
172
|
+
o("span", {
|
|
173
|
+
class: p(["line-clamp-3 font-medium w-full pl-2 word-break-break-word", {
|
|
174
|
+
"editable-sidebar-hover-item": !n(f)
|
|
175
175
|
}])
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
n(
|
|
176
|
+
}, I(i.value.title), 3),
|
|
177
|
+
o("div", xe, [
|
|
178
|
+
o("div", we, [
|
|
179
|
+
n(f) ? g("", !0) : (d(), v(n(q), {
|
|
180
180
|
key: 0,
|
|
181
|
-
class:
|
|
182
|
-
flex: ((
|
|
181
|
+
class: p(["px-0.5 py-0 hover:bg-b-3 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100 absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
182
|
+
flex: ((h = (l = e.menuItem) == null ? void 0 : l.item) == null ? void 0 : h.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
183
183
|
}]),
|
|
184
184
|
size: "sm",
|
|
185
185
|
type: "button",
|
|
186
186
|
variant: "ghost",
|
|
187
|
-
onClick: t[0] || (t[0] =
|
|
188
|
-
(
|
|
187
|
+
onClick: t[0] || (t[0] = U(
|
|
188
|
+
(se) => e.$emit("openMenu", {
|
|
189
189
|
item: i.value,
|
|
190
190
|
parentUids: e.parentUids,
|
|
191
|
-
targetRef:
|
|
191
|
+
targetRef: se.currentTarget.parentNode,
|
|
192
192
|
open: !0
|
|
193
193
|
}),
|
|
194
194
|
["stop", "prevent"]
|
|
195
195
|
))
|
|
196
196
|
}, {
|
|
197
|
-
default:
|
|
198
|
-
|
|
197
|
+
default: c(() => [
|
|
198
|
+
y(n(x), {
|
|
199
199
|
icon: "Ellipses",
|
|
200
200
|
size: "sm"
|
|
201
201
|
})
|
|
@@ -203,35 +203,35 @@ const he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relativ
|
|
|
203
203
|
_: 1
|
|
204
204
|
}, 8, ["class"]))
|
|
205
205
|
]),
|
|
206
|
-
|
|
207
|
-
t[
|
|
208
|
-
t[
|
|
209
|
-
i.value.method ? (
|
|
206
|
+
o("span", ke, [
|
|
207
|
+
t[10] || (t[10] = j(" ")),
|
|
208
|
+
t[11] || (t[11] = o("span", { class: "sr-only" }, "HTTP Method:", -1)),
|
|
209
|
+
i.value.method ? (d(), v(n(ge), {
|
|
210
210
|
key: 0,
|
|
211
211
|
class: "font-bold",
|
|
212
212
|
method: i.value.method
|
|
213
|
-
}, null, 8, ["method"])) :
|
|
213
|
+
}, null, 8, ["method"])) : g("", !0)
|
|
214
214
|
])
|
|
215
215
|
])
|
|
216
216
|
], 2)
|
|
217
217
|
];
|
|
218
218
|
}),
|
|
219
219
|
_: 1
|
|
220
|
-
}, 8, ["to"])) : !n(
|
|
220
|
+
}, 8, ["to"])) : !n(f) || e.parentUids.length ? (d(), k("button", {
|
|
221
221
|
key: 1,
|
|
222
|
-
"aria-expanded": n(
|
|
223
|
-
class:
|
|
222
|
+
"aria-expanded": n(M)[i.value.entity.uid],
|
|
223
|
+
class: p(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 focus-visible:z-10", B]),
|
|
224
224
|
type: "button",
|
|
225
|
-
onClick: t[
|
|
225
|
+
onClick: t[4] || (t[4] = (a) => n(J)(i.value.entity.uid))
|
|
226
226
|
}, [
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
class:
|
|
231
|
-
"rotate-90": n(
|
|
227
|
+
o("span", qe, [
|
|
228
|
+
ue(e.$slots, "leftIcon", {}, () => [
|
|
229
|
+
o("div", {
|
|
230
|
+
class: p({
|
|
231
|
+
"rotate-90": n(M)[i.value.entity.uid]
|
|
232
232
|
})
|
|
233
233
|
}, [
|
|
234
|
-
|
|
234
|
+
y(n(x), {
|
|
235
235
|
class: "text-c-3 text-sm",
|
|
236
236
|
icon: "ChevronRight",
|
|
237
237
|
size: "sm",
|
|
@@ -239,96 +239,122 @@ const he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relativ
|
|
|
239
239
|
})
|
|
240
240
|
], 2)
|
|
241
241
|
], !0),
|
|
242
|
-
t[
|
|
242
|
+
t[12] || (t[12] = j(" "))
|
|
243
243
|
]),
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
class:
|
|
247
|
-
"editable-sidebar-hover-item": !n(
|
|
244
|
+
o("div", De, [
|
|
245
|
+
o("span", {
|
|
246
|
+
class: p(["line-clamp-3 font-medium text-left w-full word-break-break-word", {
|
|
247
|
+
"editable-sidebar-hover-item": !n(f)
|
|
248
248
|
}])
|
|
249
|
-
},
|
|
250
|
-
|
|
251
|
-
!n(
|
|
249
|
+
}, I(i.value.title), 3),
|
|
250
|
+
o("div", Re, [
|
|
251
|
+
!n(f) && !O.value ? (d(), v(n(q), {
|
|
252
252
|
key: 0,
|
|
253
|
-
class:
|
|
254
|
-
flex: ((
|
|
253
|
+
class: p(["px-0.5 py-0 hover:bg-b-3 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 group-has-[:focus-visible]:opacity-100 absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
254
|
+
flex: ((u = e.menuItem.item) == null ? void 0 : u.entity.uid) === i.value.entity.uid && e.menuItem.open,
|
|
255
255
|
"right-5": i.value.watchMode
|
|
256
256
|
}]),
|
|
257
257
|
size: "sm",
|
|
258
258
|
variant: "ghost",
|
|
259
|
-
onClick: t[2] || (t[2] =
|
|
260
|
-
(
|
|
259
|
+
onClick: t[2] || (t[2] = U(
|
|
260
|
+
(a) => e.$emit("openMenu", {
|
|
261
261
|
item: i.value,
|
|
262
262
|
parentUids: e.parentUids,
|
|
263
|
-
targetRef:
|
|
263
|
+
targetRef: a.currentTarget.parentNode,
|
|
264
264
|
open: !0
|
|
265
265
|
}),
|
|
266
266
|
["stop", "prevent"]
|
|
267
267
|
))
|
|
268
268
|
}, {
|
|
269
|
-
default:
|
|
270
|
-
|
|
269
|
+
default: c(() => [
|
|
270
|
+
y(n(x), {
|
|
271
271
|
icon: "Ellipses",
|
|
272
272
|
size: "sm"
|
|
273
273
|
})
|
|
274
274
|
]),
|
|
275
275
|
_: 1
|
|
276
|
-
}, 8, ["class"])) :
|
|
277
|
-
|
|
276
|
+
}, 8, ["class"])) : g("", !0),
|
|
277
|
+
O.value && ne.value ? (d(), v(n(q), {
|
|
278
278
|
key: 1,
|
|
279
|
+
class: p(["px-0.5 py-0 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
280
|
+
flex: ((b = e.menuItem.item) == null ? void 0 : b.entity.uid) === i.value.entity.uid && e.menuItem.open,
|
|
281
|
+
"right-5": i.value.watchMode
|
|
282
|
+
}]),
|
|
283
|
+
size: "sm",
|
|
284
|
+
variant: "ghost",
|
|
285
|
+
onClick: t[3] || (t[3] = U(
|
|
286
|
+
(a) => e.$emit("openMenu", {
|
|
287
|
+
item: i.value,
|
|
288
|
+
parentUids: e.parentUids,
|
|
289
|
+
targetRef: a.currentTarget.parentNode,
|
|
290
|
+
open: !0
|
|
291
|
+
}),
|
|
292
|
+
["stop", "prevent"]
|
|
293
|
+
))
|
|
294
|
+
}, {
|
|
295
|
+
default: c(() => [
|
|
296
|
+
y(n(x), {
|
|
297
|
+
icon: "Ellipses",
|
|
298
|
+
size: "sm"
|
|
299
|
+
})
|
|
300
|
+
]),
|
|
301
|
+
_: 1
|
|
302
|
+
}, 8, ["class"])) : g("", !0),
|
|
303
|
+
i.value.watchMode ? (d(), v(n(fe), {
|
|
304
|
+
key: 2,
|
|
279
305
|
side: "right",
|
|
280
306
|
sideOffset: 12
|
|
281
307
|
}, {
|
|
282
|
-
trigger:
|
|
283
|
-
|
|
284
|
-
class:
|
|
308
|
+
trigger: c(() => [
|
|
309
|
+
y(n(x), {
|
|
310
|
+
class: p(["text-sm", ie.value]),
|
|
285
311
|
icon: "Watch",
|
|
286
312
|
size: "sm",
|
|
287
313
|
thickness: "2.5"
|
|
288
314
|
}, null, 8, ["class"])
|
|
289
315
|
]),
|
|
290
|
-
content:
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
316
|
+
content: c(() => [
|
|
317
|
+
o("div", Ce, [
|
|
318
|
+
o("div", Me, [
|
|
319
|
+
o("p", Te, " Watching: " + I(i.value.documentUrl), 1)
|
|
294
320
|
])
|
|
295
321
|
])
|
|
296
322
|
]),
|
|
297
323
|
_: 1
|
|
298
|
-
})) :
|
|
299
|
-
t[
|
|
324
|
+
})) : g("", !0),
|
|
325
|
+
t[13] || (t[13] = o("span", null, " ", -1))
|
|
300
326
|
])
|
|
301
327
|
])
|
|
302
|
-
], 8,
|
|
303
|
-
X.value ? (
|
|
304
|
-
(
|
|
305
|
-
key:
|
|
306
|
-
isDraggable: !n(
|
|
328
|
+
], 8, Ue)) : g("", !0),
|
|
329
|
+
X.value ? (d(), k("ul", Ie, [
|
|
330
|
+
(d(!0), k(de, null, pe(i.value.children, (a) => (d(), v(r, {
|
|
331
|
+
key: a,
|
|
332
|
+
isDraggable: !n(R)[a],
|
|
307
333
|
isDroppable: _,
|
|
308
334
|
menuItem: e.menuItem,
|
|
309
335
|
parentUids: [...e.parentUids, e.uid],
|
|
310
|
-
uid:
|
|
311
|
-
onNewTab: t[
|
|
312
|
-
onOnDragEnd: t[
|
|
313
|
-
onOpenMenu: t[
|
|
336
|
+
uid: a,
|
|
337
|
+
onNewTab: t[5] || (t[5] = (l, h) => e.$emit("newTab", l, h)),
|
|
338
|
+
onOnDragEnd: t[6] || (t[6] = (...l) => e.$emit("onDragEnd", ...l)),
|
|
339
|
+
onOpenMenu: t[7] || (t[7] = (l) => e.$emit("openMenu", l))
|
|
314
340
|
}, null, 8, ["isDraggable", "menuItem", "parentUids", "uid"]))), 128)),
|
|
315
|
-
i.value.children.length === 0 ? (
|
|
341
|
+
i.value.children.length === 0 ? (d(), v(n(q), {
|
|
316
342
|
key: 0,
|
|
317
|
-
class:
|
|
343
|
+
class: p(["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" : ""]),
|
|
318
344
|
variant: "ghost",
|
|
319
|
-
onClick: t[
|
|
345
|
+
onClick: t[8] || (t[8] = (a) => te())
|
|
320
346
|
}, {
|
|
321
|
-
default:
|
|
322
|
-
|
|
347
|
+
default: c(() => [
|
|
348
|
+
y(n(x), {
|
|
323
349
|
class: "ml-0.5 h-2.5 w-2.5",
|
|
324
350
|
icon: "Add",
|
|
325
351
|
thickness: "3"
|
|
326
352
|
}),
|
|
327
|
-
t[
|
|
353
|
+
t[14] || (t[14] = o("span", null, "Add Request", -1))
|
|
328
354
|
]),
|
|
329
355
|
_: 1
|
|
330
|
-
}, 8, ["class"])) :
|
|
331
|
-
])) :
|
|
356
|
+
}, 8, ["class"])) : g("", !0)
|
|
357
|
+
])) : g("", !0)
|
|
332
358
|
];
|
|
333
359
|
}),
|
|
334
360
|
_: 3
|
|
@@ -338,5 +364,5 @@ const he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relativ
|
|
|
338
364
|
}
|
|
339
365
|
});
|
|
340
366
|
export {
|
|
341
|
-
|
|
367
|
+
Ve as default
|
|
342
368
|
};
|
|
@@ -5,9 +5,11 @@ type __VLS_Props = {
|
|
|
5
5
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
6
|
closeMenu: () => any;
|
|
7
7
|
toggleWatchMode: (item: import("../../views/Request/types/index.js").SidebarItem | undefined) => any;
|
|
8
|
+
clearDrafts: () => any;
|
|
8
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
10
|
onCloseMenu?: (() => any) | undefined;
|
|
10
11
|
onToggleWatchMode?: ((item: import("../../views/Request/types/index.js").SidebarItem | undefined) => any) | undefined;
|
|
12
|
+
onClearDrafts?: (() => any) | undefined;
|
|
11
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
14
|
export default _default;
|
|
13
15
|
//# sourceMappingURL=RequestSidebarItemMenu.vue.d.ts.map
|
|
@@ -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":"AA0QA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAa5D,KAAK,WAAW,GAAG;IAAE,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAC;;;;;;;;;;AAuiBjD,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./RequestSidebarItemMenu.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */ e
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(e, [["__scopeId", "data-v-c06e6ae9"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|