@scalar/api-client 2.1.25 → 2.1.27

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