@scalar/api-client 2.1.47 → 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.
Files changed (60) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/assets/keycap.ascii.js +25 -0
  3. package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
  4. package/dist/components/AddressBar/AddressBar.vue.js +2 -2
  5. package/dist/components/AddressBar/AddressBar.vue2.js +6 -6
  6. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  8. package/dist/components/CodeInput/codeVariableWidget.js +12 -12
  9. package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
  10. package/dist/components/DataTable/DataTable.vue.js +1 -1
  11. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  12. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +13 -13
  13. package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
  14. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
  15. package/dist/layouts/Modal/ApiClientModal.vue.d.ts +1 -3
  16. package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
  17. package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
  18. package/dist/layouts/Modal/ApiClientModal.vue2.js +11 -11
  19. package/dist/store/import-spec.d.ts.map +1 -1
  20. package/dist/store/requests.d.ts +40 -0
  21. package/dist/store/requests.d.ts.map +1 -1
  22. package/dist/store/requests.js +65 -55
  23. package/dist/store/workspace.d.ts.map +1 -1
  24. package/dist/store/workspace.js +24 -29
  25. package/dist/style.css +1 -1
  26. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +7 -0
  27. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
  28. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
  29. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +71 -71
  30. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +23 -23
  31. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  32. package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
  33. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +18 -18
  34. package/dist/views/Request/RequestSidebar.vue.d.ts +2 -0
  35. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  36. package/dist/views/Request/RequestSidebar.vue.js +2 -2
  37. package/dist/views/Request/RequestSidebar.vue2.js +169 -133
  38. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  39. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  40. package/dist/views/Request/RequestSidebarItem.vue2.js +181 -155
  41. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +2 -0
  42. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  43. package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
  44. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +155 -96
  45. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
  47. package/dist/views/Request/RequestSubpageHeader.vue2.js +26 -21
  48. package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
  49. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +5 -97
  50. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +97 -2
  51. package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +1 -1
  52. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
  53. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  54. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
  55. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +74 -34
  56. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  57. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +1 -1
  58. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
  59. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +15 -15
  60. package/package.json +7 -7
@@ -1,13 +1,13 @@
1
- import { defineComponent as ne, useCssVars as se, computed as c, ref as re, resolveComponent as le, openBlock as p, createElementBlock as k, normalizeClass as f, unref as n, createVNode as h, withCtx as g, createBlock as b, withModifiers as M, createElementVNode as a, toDisplayString as T, createCommentVNode as v, createTextVNode as P, renderSlot as ae, Fragment as oe, renderList as ue } from "vue";
2
- import { ScalarButton as I, ScalarIcon as y, ScalarTooltip as de } from "@scalar/components";
3
- import { Draggable as pe } from "@scalar/draggable";
4
- import { RouterLink as fe } from "vue-router";
5
- import { PathId as me } from "../../routes.js";
6
- import ce from "../../components/HttpMethod/HttpMethod.vue.js";
7
- import { useSidebar as ge } from "../../hooks/useSidebar.js";
8
- import { getModifiers as be } from "../../libs/hot-keys.js";
9
- import { useWorkspace as ve } from "../../store/store.js";
10
- const he = { class: "flex flex-row gap-1 items-center" }, ye = { class: "relative" }, xe = { class: "flex items-start" }, we = ["aria-expanded"], ke = { class: "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 = { 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" }, Ce = { class: "flex items-center text-c-2" }, Re = { class: "text-pretty break-all" }, Me = { key: 2 }, j = "hover:bg-sidebar-active-b indent-padding-left", je = /* @__PURE__ */ ne({
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(B, { emit: V }) {
21
- se((e) => ({
22
- "9b98f448": K.value,
23
- "27ad5b3c": Q.value
20
+ setup(V, { emit: W }) {
21
+ ae((e) => ({
22
+ "0ba7b02c": K.value,
23
+ "4adbcd94": Q.value
24
24
  }));
25
- const s = B, W = V, {
26
- activeCollection: A,
25
+ const s = V, A = W, {
26
+ activeCollection: F,
27
27
  activeRequest: E,
28
- activeRouterParams: F,
29
- activeWorkspace: x,
30
- collections: U,
31
- tags: Y,
32
- isReadOnly: m,
28
+ activeRouterParams: Y,
29
+ activeWorkspace: w,
30
+ collections: D,
31
+ tags: H,
32
+ isReadOnly: f,
33
33
  requests: $,
34
- requestExamples: q,
35
- collectionMutators: D,
36
- tagMutators: S,
37
- requestMutators: z,
34
+ requestExamples: R,
35
+ collectionMutators: C,
36
+ tagMutators: z,
37
+ requestMutators: S,
38
38
  requestExampleMutators: N,
39
- router: H,
40
- events: L
41
- } = ve(), { collapsedSidebarFolders: C, toggleSidebarFolder: G } = ge(), i = c(() => {
42
- var l, d;
43
- const e = U[s.uid], t = Y[s.uid], r = $[s.uid], o = q[s.uid];
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: ((l = e.info) == null ? void 0 : l.title) ?? "Unknown 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: (u, w) => {
54
- D.edit(e.uid, "info.title", u), w && D.edit(e.uid, "x-scalar-icon", w);
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: () => D.delete(e, x.value)
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: (u) => S.edit(t.uid, "name", u),
64
- delete: () => S.delete(t, s.parentUids[0])
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: x.value.uid,
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: (u) => z.edit(r.uid, "summary", u),
80
- delete: () => z.delete(r, s.parentUids[0])
79
+ edit: (l) => S.edit(r.uid, "summary", l),
80
+ delete: () => S.delete(r, s.parentUids[0])
81
81
  } : {
82
- title: o.name,
82
+ title: u.name,
83
83
  link: {
84
84
  name: "request.examples",
85
85
  params: {
86
- workspace: x.value.uid,
87
- request: o.requestUid,
88
- examples: o.uid
86
+ workspace: w.value.uid,
87
+ request: u.requestUid,
88
+ examples: u.uid
89
89
  }
90
90
  },
91
- method: (d = $[o.requestUid]) == null ? void 0 : d.method,
92
- entity: o,
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: (u) => N.edit(o.uid, "name", u),
97
- delete: () => N.delete(o)
96
+ edit: (l) => N.edit(u.uid, "name", l),
97
+ delete: () => N.delete(u)
98
98
  };
99
- }), J = c(
99
+ }), O = m(
100
100
  () => i.value.entity.type === "collection" && i.value.title === "Drafts"
101
- ), K = c(() => s.parentUids.length ? m.value ? `${(s.parentUids.length - 1) * 12}px` : `${s.parentUids.length * 12}px` : "12px"), Q = c(() => s.parentUids.length ? m.value ? `${(s.parentUids.length - 1) * 12}px` : `${s.parentUids.length * 12}px` : "0px"), X = c(
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 C[s.uid] || ((e = E.value) == null ? void 0 : e.uid) === s.uid && i.value.entity.examples.length > 1;
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 = c(
106
+ ), Z = m(
107
107
  () => {
108
108
  var e;
109
- return F.value[me.Request] === "default" && ((e = E.value) == null ? void 0 : e.uid) === s.uid;
109
+ return Y.value[ve.Request] === "default" && ((e = E.value) == null ? void 0 : e.uid) === s.uid;
110
110
  }
111
- ), R = re(null), O = c(() => {
111
+ ), T = le(null), P = m(() => {
112
112
  let e = 0.5, t = 0.5;
113
- if (!R.value) return { ceiling: e, floor: t };
114
- const { draggingItem: r } = R.value;
115
- return !U[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) => !(x.value.isReadOnly || q[t.id] || U[e.id]), ee = (e, t) => {
117
- e && (be(["default"]).some((l) => e[l]) ? W("newTab", t.title || "", t.entity.uid) : t.link && H.push(t.link));
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
- L.commandPalette.emit({
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 = c(() => {
129
- const { uid: e, watchModeStatus: t } = A.value || {};
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 = le("RequestSidebarItem", !0);
134
- return p(), k("li", {
135
- class: f(["relative flex flex-row", [
136
- n(m) && e.parentUids.length > 1 || !n(m) && 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" : ""
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
- h(n(pe), {
139
+ y(n(me), {
140
140
  id: i.value.entity.uid,
141
141
  ref_key: "draggableRef",
142
- ref: R,
143
- ceiling: O.value.ceiling,
142
+ ref: T,
143
+ ceiling: P.value.ceiling,
144
144
  class: "flex flex-1 flex-col gap-[.5px] text-sm",
145
- floor: O.value.floor,
145
+ floor: P.value.floor,
146
146
  isDraggable: e.isDraggable,
147
147
  isDroppable: e.isDroppable,
148
148
  parentIds: e.parentUids,
149
- onOnDragEnd: t[8] || (t[8] = (...o) => e.$emit("onDragEnd", ...o))
149
+ onOnDragEnd: t[9] || (t[9] = (...u) => e.$emit("onDragEnd", ...u))
150
150
  }, {
151
- default: g(() => {
152
- var o;
151
+ default: c(() => {
152
+ var u, b;
153
153
  return [
154
- i.value.link ? (p(), b(n(fe), {
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] = M(
159
- (l) => ee(l, i.value),
158
+ onClick: t[1] || (t[1] = U(
159
+ (a) => ee(a, i.value),
160
160
  ["prevent"]
161
161
  ))
162
162
  }, {
163
- default: g(({ isExactActive: l }) => {
164
- var d, u;
163
+ default: c(({ isExactActive: a }) => {
164
+ var l, h;
165
165
  return [
166
- a("div", {
167
- class: f(["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
- j,
169
- l || Z.value ? "bg-sidebar-active-b text-sidebar-active-c transition-none" : "text-sidebar-c-2"
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
- a("span", {
173
- class: f(["line-clamp-3 font-medium w-full pl-2 word-break-break-word", {
174
- "editable-sidebar-hover-item": !n(m)
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
- }, T(i.value.title), 3),
177
- a("div", he, [
178
- a("div", ye, [
179
- n(m) ? v("", !0) : (p(), b(n(I), {
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: f(["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: ((u = (d = e.menuItem) == null ? void 0 : d.item) == null ? void 0 : u.entity.uid) === i.value.entity.uid && e.menuItem.open
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] = M(
188
- (w) => e.$emit("openMenu", {
187
+ onClick: t[0] || (t[0] = U(
188
+ (se) => e.$emit("openMenu", {
189
189
  item: i.value,
190
190
  parentUids: e.parentUids,
191
- targetRef: w.currentTarget.parentNode,
191
+ targetRef: se.currentTarget.parentNode,
192
192
  open: !0
193
193
  }),
194
194
  ["stop", "prevent"]
195
195
  ))
196
196
  }, {
197
- default: g(() => [
198
- h(n(y), {
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
- a("span", xe, [
207
- t[9] || (t[9] = P("   ")),
208
- t[10] || (t[10] = a("span", { class: "sr-only" }, "HTTP Method:", -1)),
209
- i.value.method ? (p(), b(n(ce), {
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"])) : v("", !0)
213
+ }, null, 8, ["method"])) : g("", !0)
214
214
  ])
215
215
  ])
216
216
  ], 2)
217
217
  ];
218
218
  }),
219
219
  _: 1
220
- }, 8, ["to"])) : !n(m) || e.parentUids.length ? (p(), k("button", {
220
+ }, 8, ["to"])) : !n(f) || e.parentUids.length ? (d(), k("button", {
221
221
  key: 1,
222
- "aria-expanded": n(C)[i.value.entity.uid],
223
- class: f(["hover:bg-b-2 group relative flex w-full flex-row justify-start gap-1.5 rounded p-1.5 focus-visible:z-10", j]),
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[3] || (t[3] = (l) => n(G)(i.value.entity.uid))
225
+ onClick: t[4] || (t[4] = (a) => n(J)(i.value.entity.uid))
226
226
  }, [
227
- a("span", ke, [
228
- ae(e.$slots, "leftIcon", {}, () => [
229
- a("div", {
230
- class: f({
231
- "rotate-90": n(C)[i.value.entity.uid]
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
- h(n(y), {
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[11] || (t[11] = P("   "))
242
+ t[12] || (t[12] = j("   "))
243
243
  ]),
244
- a("div", Ue, [
245
- a("span", {
246
- class: f(["line-clamp-3 font-medium text-left w-full word-break-break-word", {
247
- "editable-sidebar-hover-item": !n(m)
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
- }, T(i.value.title), 3),
250
- a("div", qe, [
251
- !n(m) && !J.value ? (p(), b(n(I), {
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: f(["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: ((o = e.menuItem.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open,
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] = M(
260
- (l) => e.$emit("openMenu", {
259
+ onClick: t[2] || (t[2] = U(
260
+ (a) => e.$emit("openMenu", {
261
261
  item: i.value,
262
262
  parentUids: e.parentUids,
263
- targetRef: l.currentTarget.parentNode,
263
+ targetRef: a.currentTarget.parentNode,
264
264
  open: !0
265
265
  }),
266
266
  ["stop", "prevent"]
267
267
  ))
268
268
  }, {
269
- default: g(() => [
270
- h(n(y), {
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"])) : v("", !0),
277
- i.value.watchMode ? (p(), b(n(de), {
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: g(() => [
283
- h(n(y), {
284
- class: f(["text-sm", ie.value]),
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: g(() => [
291
- a("div", De, [
292
- a("div", Ce, [
293
- a("p", Re, " Watching: " + T(i.value.documentUrl), 1)
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
- })) : v("", !0),
299
- t[12] || (t[12] = a("span", null, " ", -1))
324
+ })) : g("", !0),
325
+ t[13] || (t[13] = o("span", null, " ", -1))
300
326
  ])
301
327
  ])
302
- ], 8, we)) : v("", !0),
303
- X.value ? (p(), k("ul", Me, [
304
- (p(!0), k(oe, null, ue(i.value.children, (l) => (p(), b(r, {
305
- key: l,
306
- isDraggable: !n(q)[l],
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: l,
311
- onNewTab: t[4] || (t[4] = (d, u) => e.$emit("newTab", d, u)),
312
- onOnDragEnd: t[5] || (t[5] = (...d) => e.$emit("onDragEnd", ...d)),
313
- onOpenMenu: t[6] || (t[6] = (d) => e.$emit("openMenu", d))
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 ? (p(), b(n(I), {
341
+ i.value.children.length === 0 ? (d(), v(n(q), {
316
342
  key: 0,
317
- class: f(["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" : ""]),
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[7] || (t[7] = (l) => te())
345
+ onClick: t[8] || (t[8] = (a) => te())
320
346
  }, {
321
- default: g(() => [
322
- h(n(y), {
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[13] || (t[13] = a("span", null, "Add Request", -1))
353
+ t[14] || (t[14] = o("span", null, "Add Request", -1))
328
354
  ]),
329
355
  _: 1
330
- }, 8, ["class"])) : v("", !0)
331
- ])) : v("", !0)
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
- je as default
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":"AA4MA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAa5D,KAAK,WAAW,GAAG;IAAE,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAC;;;;;;;;AA+ajD,wBAOG"}
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 t from "./RequestSidebarItemMenu.vue2.js";
1
+ import e from "./RequestSidebarItemMenu.vue2.js";
2
2
  /* empty css */
3
- import e from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ e(t, [["__scopeId", "data-v-a29cdf25"]]);
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
  };