@scalar/api-client 2.2.3 → 2.2.4

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 (58) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +1 -1
  3. package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +24 -24
  5. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
  6. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +36 -45
  7. package/dist/components/ImportCollection/ImportNowButton.vue.js +3 -3
  8. package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
  9. package/dist/components/TopNav/TopNav.vue.js +72 -70
  10. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  11. package/dist/components/TopNav/TopNavItem.vue.js +1 -1
  12. package/dist/components/TopNav/TopNavItem.vue2.js +83 -81
  13. package/dist/layouts/App/create-api-client-app.d.ts +2 -2
  14. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  15. package/dist/layouts/App/create-api-client-app.js +6 -6
  16. package/dist/layouts/Modal/create-api-client-modal.d.ts +4 -4
  17. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  18. package/dist/layouts/Modal/create-api-client-modal.js +1 -1
  19. package/dist/layouts/Web/create-api-client-web.d.ts +2 -2
  20. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  21. package/dist/layouts/Web/create-api-client-web.js +4 -4
  22. package/dist/libs/create-client.d.ts +4 -4
  23. package/dist/libs/create-client.d.ts.map +1 -1
  24. package/dist/libs/create-client.js +5 -5
  25. package/dist/libs/index.d.ts +1 -2
  26. package/dist/libs/index.d.ts.map +1 -1
  27. package/dist/libs/index.js +20 -20
  28. package/dist/libs/send-request/index.d.ts +2 -0
  29. package/dist/libs/send-request/index.d.ts.map +1 -0
  30. package/dist/libs/send-request/index.js +9 -0
  31. package/dist/libs/{send-request.d.ts → send-request/send-request.d.ts} +6 -6
  32. package/dist/libs/send-request/send-request.d.ts.map +1 -0
  33. package/dist/libs/{send-request.js → send-request/send-request.js} +29 -29
  34. package/dist/store/events.d.ts +1 -1
  35. package/dist/store/import-spec.d.ts +1 -1
  36. package/dist/store/import-spec.d.ts.map +1 -1
  37. package/dist/store/import-spec.js +1 -1
  38. package/dist/store/store.d.ts +3 -3
  39. package/dist/store/store.d.ts.map +1 -1
  40. package/dist/style.css +1 -1
  41. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  42. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +76 -72
  43. package/dist/views/Request/Request.vue.js +1 -1
  44. package/dist/views/Request/Request.vue2.js +30 -30
  45. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
  46. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  47. package/dist/views/Request/RequestSection/RequestBody.vue2.js +245 -189
  48. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  49. package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
  50. package/dist/views/Request/RequestSidebarItem.vue2.js +4 -4
  51. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
  52. package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
  53. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +153 -147
  54. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  55. package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
  56. package/dist/views/Request/components/WorkspaceDropdown.vue.js +48 -54
  57. package/package.json +15 -10
  58. package/dist/libs/send-request.d.ts.map +0 -1
@@ -1,35 +1,35 @@
1
- import { defineComponent as G, computed as w, ref as K, watch as S, openBlock as f, createBlock as b, withCtx as u, createTextVNode as q, toDisplayString as D, createVNode as s, unref as c, createElementVNode as x, createElementBlock as F, Fragment as Q, nextTick as Z } from "vue";
2
- import I from "../../../components/CodeInput/CodeInput.vue.js";
3
- import ee from "../../../components/DataTable/DataTable.vue.js";
4
- import ae from "../../../components/DataTable/DataTableHeader.vue.js";
5
- import R from "../../../components/DataTable/DataTableRow.vue.js";
6
- import te from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
- import { useActiveEntities as oe } from "../../../store/active-entities.js";
8
- import { ScalarListbox as ne, ScalarButton as k, ScalarIcon as L } from "@scalar/components";
9
- import { requestExampleParametersSchema as M } from "@scalar/oas-utils/entities/spec";
10
- import { canMethodHaveBody as le } from "@scalar/oas-utils/helpers";
11
- import W from "./RequestTable.vue.js";
12
- import { useWorkspace as re } from "../../../store/store.js";
13
- import { useFileDialog as z } from "../../../hooks/useFileDialog.js";
14
- const ie = {
1
+ import { defineComponent as Z, computed as b, ref as I, watch as W, openBlock as f, createBlock as h, withCtx as d, createTextVNode as z, toDisplayString as k, createVNode as s, unref as u, createElementVNode as w, createCommentVNode as ee, createElementBlock as U, Fragment as ae, nextTick as te } from "vue";
2
+ import oe from "../../../components/CodeInput/CodeInput.vue.js";
3
+ import ne from "../../../components/DataTable/DataTable.vue.js";
4
+ import le from "../../../components/DataTable/DataTableHeader.vue.js";
5
+ import T from "../../../components/DataTable/DataTableRow.vue.js";
6
+ import re from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
+ import { useActiveEntities as ie } from "../../../store/active-entities.js";
8
+ import { ScalarListbox as A, ScalarButton as F, ScalarIcon as E } from "@scalar/components";
9
+ import { requestExampleParametersSchema as J } from "@scalar/oas-utils/entities/spec";
10
+ import { canMethodHaveBody as ue } from "@scalar/oas-utils/helpers";
11
+ import $ from "./RequestTable.vue.js";
12
+ import { useWorkspace as de } from "../../../store/store.js";
13
+ import { useFileDialog as H } from "../../../hooks/useFileDialog.js";
14
+ const se = {
15
15
  key: 0,
16
16
  class: "text-c-3 flex min-h-10 w-full items-center justify-center p-2 text-sm"
17
- }, de = {
17
+ }, ce = {
18
18
  key: 1,
19
19
  class: "flex items-center justify-center p-1.5 overflow-hidden"
20
- }, ue = { class: "text-c-2 text-xs w-full border rounded p-1 max-w-full overflow-hidden whitespace-nowrap" }, Re = /* @__PURE__ */ G({
20
+ }, me = { class: "text-c-2 text-xs w-full border rounded p-1 max-w-full overflow-hidden whitespace-nowrap" }, Ue = /* @__PURE__ */ Z({
21
21
  __name: "RequestBody",
22
22
  props: {
23
23
  title: {}
24
24
  },
25
- setup(se) {
26
- const { activeRequest: d, activeExample: a } = oe(), { requestExampleMutators: r } = re(), A = {
25
+ setup(ve) {
26
+ const { activeRequest: c, activeExample: o } = ie(), { requestExampleMutators: i } = de(), X = {
27
27
  json: "json",
28
28
  xml: "xml",
29
29
  yaml: "yaml",
30
30
  edn: "edn",
31
31
  other: "html"
32
- }, h = Object.entries({
32
+ }, x = Object.entries({
33
33
  multipartForm: "Multipart Form",
34
34
  formUrlEncoded: "Form URL Encoded",
35
35
  binaryFile: "Binary File",
@@ -39,81 +39,81 @@ const ie = {
39
39
  edn: "EDN",
40
40
  other: "Other",
41
41
  none: "None"
42
- }).map(([e, t]) => ({
42
+ }).map(([e, a]) => ({
43
43
  id: e,
44
- label: t
45
- })), B = w(() => {
46
- var e, t;
47
- return a.value ? a.value.body.activeBody === "formData" ? ((e = a.value.body.formData) == null ? void 0 : e.encoding) === "urlencoded" ? "formUrlEncoded" : "multipartForm" : a.value.body.activeBody === "binary" ? "binaryFile" : a.value.body.activeBody === "raw" && ((t = a.value.body.raw) != null && t.encoding) ? a.value.body.raw.encoding === "html" ? "other" : a.value.body.raw.encoding : "none" : "none";
48
- }), m = w({
49
- get: () => h.find(
50
- (e) => e.id === B.value
51
- ) ?? h[h.length - 1],
44
+ label: a
45
+ })), R = b(() => {
46
+ var e, a;
47
+ return o.value ? o.value.body.activeBody === "formData" ? ((e = o.value.body.formData) == null ? void 0 : e.encoding) === "urlencoded" ? "formUrlEncoded" : "multipartForm" : o.value.body.activeBody === "binary" ? "binaryFile" : o.value.body.activeBody === "raw" && ((a = o.value.body.raw) != null && a.encoding) ? o.value.body.raw.encoding === "html" ? "other" : o.value.body.raw.encoding : "none" : "none";
48
+ }), v = b({
49
+ get: () => x.find(
50
+ (e) => e.id === R.value
51
+ ) ?? x[x.length - 1],
52
52
  set: (e) => {
53
- e != null && e.id && C(e.id);
53
+ e != null && e.id && q(e.id);
54
54
  }
55
- }), g = K(null), O = w(() => {
56
- const e = m.value.id;
57
- return A[e] ?? "plaintext";
55
+ }), B = I(null), Y = b(() => {
56
+ const e = v.value.id;
57
+ return X[e] ?? "plaintext";
58
58
  });
59
- function _() {
59
+ function V() {
60
60
  console.log("deleteRow");
61
61
  }
62
- const U = (e, t, o) => {
63
- if (!d.value || !a.value) return;
64
- const l = v.value;
62
+ const C = (e, a, t) => {
63
+ if (!c.value || !o.value) return;
64
+ const l = p.value;
65
65
  if (l.length > e) {
66
66
  const n = [...l];
67
- n[e] = { ...n[e], [t]: o }, (n[e].key !== "" || n[e].value !== "") && (n[e].enabled = !0), n[e].key === "" && n[e].value === "" && n.splice(e, 1), r.edit(
68
- a.value.uid,
67
+ n[e] = { ...n[e], [a]: t }, (n[e].key !== "" || n[e].value !== "") && (n[e].enabled = !0), n[e].key === "" && n[e].value === "" && n.splice(e, 1), i.edit(
68
+ o.value.uid,
69
69
  "body.formData.value",
70
70
  n
71
71
  );
72
72
  } else {
73
- const n = [M.parse({ [t]: o })];
74
- r.edit(
75
- a.value.uid,
73
+ const n = [J.parse({ [a]: t })];
74
+ i.edit(
75
+ o.value.uid,
76
76
  "body.formData.value",
77
77
  n
78
- ), Z(() => {
78
+ ), te(() => {
79
79
  var y;
80
- if (!g.value) return;
81
- (y = g.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || y.focus();
80
+ if (!B.value) return;
81
+ (y = B.value.querySelectorAll("input")[a === "key" ? 0 : 1]) == null || y.focus();
82
82
  });
83
83
  }
84
- e === l.length - 1 && E();
85
- }, v = w(
84
+ e === l.length - 1 && j();
85
+ }, p = b(
86
86
  () => {
87
- var e, t, o;
88
- return ((o = (t = (e = a.value) == null ? void 0 : e.body) == null ? void 0 : t.formData) == null ? void 0 : o.value) ?? [];
87
+ var e, a, t;
88
+ return ((t = (a = (e = o.value) == null ? void 0 : e.body) == null ? void 0 : a.formData) == null ? void 0 : t.value) ?? [];
89
89
  }
90
- ), T = () => v.value.length === 0 && E(), E = () => {
91
- if (!d.value || !a.value) return;
92
- const e = M.parse({
90
+ ), P = () => p.value.length === 0 && j(), j = () => {
91
+ if (!c.value || !o.value) return;
92
+ const e = J.parse({
93
93
  enabled: !1
94
- }), t = [...v.value, e];
95
- a.value.body.formData ? r.edit(
96
- a.value.uid,
94
+ }), a = [...p.value, e];
95
+ o.value.body.formData ? i.edit(
96
+ o.value.uid,
97
97
  "body.formData.value",
98
- t
99
- ) : r.edit(a.value.uid, "body.formData", {
100
- value: t,
98
+ a
99
+ ) : i.edit(o.value.uid, "body.formData", {
100
+ value: a,
101
101
  encoding: "form-data"
102
102
  });
103
- }, P = (e, t) => {
104
- if (!d.value || !a.value) return;
105
- const o = v.value;
106
- if (o.length > e) {
107
- const l = [...o];
108
- l[e].enabled = t, r.edit(
109
- a.value.uid,
103
+ }, N = (e, a) => {
104
+ if (!c.value || !o.value) return;
105
+ const t = p.value;
106
+ if (t.length > e) {
107
+ const l = [...t];
108
+ l[e].enabled = a, i.edit(
109
+ o.value.uid,
110
110
  "body.formData.value",
111
111
  l
112
112
  );
113
113
  }
114
- }, $ = (e) => {
115
- !d.value || !a.value || r.edit(a.value.uid, "body.raw.value", e);
116
- }, H = (e) => e === "multipartForm" ? {
114
+ }, O = (e) => {
115
+ !c.value || !o.value || i.edit(o.value.uid, "body.raw.value", e);
116
+ }, S = (e) => e === "multipartForm" ? {
117
117
  activeBody: "formData",
118
118
  encoding: "form-data",
119
119
  header: "multipart/form-data"
@@ -145,84 +145,84 @@ const ie = {
145
145
  activeBody: "raw",
146
146
  encoding: "html",
147
147
  header: "application/html"
148
- } : { activeBody: "raw", encoding: void 0, header: void 0 }, C = (e) => {
149
- var p, y;
150
- if (!a.value) return;
151
- const { activeBody: t, encoding: o, header: l } = H(e);
152
- if (r.edit(
153
- a.value.uid,
148
+ } : { activeBody: "raw", encoding: void 0, header: void 0 }, q = (e) => {
149
+ var m, y;
150
+ if (!o.value) return;
151
+ const { activeBody: a, encoding: t, header: l } = S(e);
152
+ if (i.edit(
153
+ o.value.uid,
154
154
  "body.activeBody",
155
- t
156
- ), o && t === "raw")
157
- r.edit(a.value.uid, "body.raw", {
158
- encoding: o,
159
- value: ((p = a.value.body.raw) == null ? void 0 : p.value) ?? ""
155
+ a
156
+ ), t && a === "raw")
157
+ i.edit(o.value.uid, "body.raw", {
158
+ encoding: t,
159
+ value: ((m = o.value.body.raw) == null ? void 0 : m.value) ?? ""
160
160
  });
161
- else if (o && t === "formData")
162
- r.edit(a.value.uid, "body.formData", {
163
- encoding: o,
164
- value: ((y = a.value.body.formData) == null ? void 0 : y.value) ?? []
161
+ else if (t && a === "formData")
162
+ i.edit(o.value.uid, "body.formData", {
163
+ encoding: t,
164
+ value: ((y = o.value.body.formData) == null ? void 0 : y.value) ?? []
165
165
  });
166
- else if (!o) {
167
- const { raw: N, ...Y } = a.value.body;
168
- r.edit(a.value.uid, "body", Y);
166
+ else if (!t) {
167
+ const { raw: D, ...Q } = o.value.body;
168
+ i.edit(o.value.uid, "body", Q);
169
169
  }
170
- const n = [...a.value.parameters.headers], i = n.findIndex(
171
- (N) => N.key.toLowerCase() === "content-type"
170
+ const n = [...o.value.parameters.headers], r = n.findIndex(
171
+ (D) => D.key.toLowerCase() === "content-type"
172
172
  );
173
- i >= 0 ? l ? n[i].value = l : n.splice(i, 1) : l && n.unshift({
173
+ r >= 0 ? l ? n[r].value = l : n.splice(r, 1) : l && n.unshift({
174
174
  key: "Content-Type",
175
175
  value: l,
176
176
  enabled: !0
177
- }), r.edit(
178
- a.value.uid,
177
+ }), i.edit(
178
+ o.value.uid,
179
179
  "parameters.headers",
180
180
  n
181
181
  );
182
- }, j = async (e) => {
183
- const { open: t } = z({
184
- onChange: async (o) => {
185
- const l = o == null ? void 0 : o[0];
186
- if (l && d.value && a.value) {
187
- const i = [...v.value];
188
- i[e] = {
189
- ...i[e],
182
+ }, L = async (e) => {
183
+ const { open: a } = H({
184
+ onChange: async (t) => {
185
+ const l = t == null ? void 0 : t[0];
186
+ if (l && c.value && o.value) {
187
+ const r = [...p.value];
188
+ r[e] = {
189
+ ...r[e],
190
190
  file: l
191
- }, r.edit(
192
- a.value.uid,
191
+ }, i.edit(
192
+ o.value.uid,
193
193
  "body.formData.value",
194
- i
194
+ r
195
195
  );
196
196
  }
197
197
  },
198
198
  multiple: !1,
199
199
  accept: "*/*"
200
200
  });
201
- t();
201
+ a();
202
202
  };
203
- function J() {
204
- !d.value || !a.value || r.edit(a.value.uid, "body.binary", void 0);
203
+ function G() {
204
+ !c.value || !o.value || i.edit(o.value.uid, "body.binary", void 0);
205
205
  }
206
- function V(e) {
207
- if (!d.value || !a.value) return;
208
- const o = [...v.value];
209
- o[e] = {
210
- ...o[e],
206
+ function M(e) {
207
+ if (!c.value || !o.value) return;
208
+ const t = [...p.value];
209
+ t[e] = {
210
+ ...t[e],
211
211
  file: void 0
212
- }, r.edit(
213
- a.value.uid,
212
+ }, i.edit(
213
+ o.value.uid,
214
214
  "body.formData.value",
215
- o
215
+ t
216
216
  );
217
217
  }
218
- function X() {
219
- const { open: e } = z({
220
- onChange: async (t) => {
221
- const o = t == null ? void 0 : t[0];
222
- o && d.value && a.value && r.edit(
223
- a.value.uid,
218
+ function K() {
219
+ const { open: e } = H({
220
+ onChange: async (a) => {
221
+ const t = a == null ? void 0 : a[0];
222
+ t && c.value && o.value && i.edit(
223
+ o.value.uid,
224
224
  "body.binary",
225
- o
225
+ t
226
226
  );
227
227
  },
228
228
  multiple: !1,
@@ -230,53 +230,109 @@ const ie = {
230
230
  });
231
231
  e();
232
232
  }
233
- return S(
234
- m,
233
+ W(
234
+ v,
235
235
  (e) => {
236
- ["multipartForm", "formUrlEncoded"].includes(e == null ? void 0 : e.id) && T();
236
+ ["multipartForm", "formUrlEncoded"].includes(e == null ? void 0 : e.id) && P();
237
237
  },
238
238
  { immediate: !0 }
239
- ), S(
239
+ ), W(
240
240
  () => {
241
241
  var e;
242
- return (e = a.value) == null ? void 0 : e.uid;
242
+ return (e = o.value) == null ? void 0 : e.uid;
243
243
  },
244
244
  () => {
245
245
  var e;
246
- (e = d.value) != null && e.method && le(d.value.method) && C(B.value), ["multipartForm", "formUrlEncoded"].includes(
247
- B.value
248
- ) && T();
246
+ (e = c.value) != null && e.method && ue(c.value.method) && q(R.value), ["multipartForm", "formUrlEncoded"].includes(
247
+ R.value
248
+ ) && P();
249
249
  },
250
250
  { immediate: !0 }
251
- ), (e, t) => (f(), b(te, null, {
252
- title: u(() => [
253
- q(D(e.title), 1)
251
+ );
252
+ const g = b(() => {
253
+ var n, r, m;
254
+ const e = v.value.id, { header: a } = S(e), t = ((r = (n = c.value) == null ? void 0 : n.requestBody) == null ? void 0 : r.content) || {}, l = a ? ((m = t[a]) == null ? void 0 : m.examples) || {} : {};
255
+ return Object.entries(l).map(([y, D]) => ({
256
+ id: y,
257
+ label: y,
258
+ value: D
259
+ }));
260
+ }), _ = b({
261
+ get: () => {
262
+ var n, r;
263
+ const e = ((r = (n = o.value) == null ? void 0 : n.body.raw) == null ? void 0 : r.value) ?? "{}", a = JSON.parse(e), [t] = Object.keys(a), l = a[t];
264
+ return g.value.find((m) => m.id === l) ?? g.value[0];
265
+ },
266
+ set: (e) => {
267
+ if (e != null && e.id) {
268
+ const a = g.value.find(
269
+ (t) => t.id === e.id
270
+ );
271
+ if (a) {
272
+ const t = a.value;
273
+ O(JSON.stringify(t.value, null, 2));
274
+ }
275
+ }
276
+ }
277
+ });
278
+ return (e, a) => (f(), h(re, null, {
279
+ title: d(() => [
280
+ z(k(e.title), 1)
254
281
  ]),
255
- default: u(() => [
256
- s(ee, { columns: [""] }, {
257
- default: u(() => [
258
- s(R, null, {
259
- default: u(() => [
260
- s(ae, { class: "relative col-span-full flex h-8 cursor-pointer items-center !p-0" }, {
261
- default: u(() => [
262
- s(c(ne), {
263
- modelValue: m.value,
264
- "onUpdate:modelValue": t[0] || (t[0] = (o) => m.value = o),
265
- class: "text-xxs",
266
- options: c(h),
282
+ default: d(() => [
283
+ s(ne, { columns: [""] }, {
284
+ default: d(() => [
285
+ s(T, null, {
286
+ default: d(() => [
287
+ s(le, { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between !p-0" }, {
288
+ default: d(() => [
289
+ s(u(A), {
290
+ modelValue: v.value,
291
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => v.value = t),
292
+ options: u(x),
293
+ teleport: ""
294
+ }, {
295
+ default: d(() => [
296
+ s(u(F), {
297
+ class: "flex gap-1.5 h-full px-2 text-c-2 font-normal hover:text-c-1 w-fit",
298
+ fullWidth: "",
299
+ variant: "ghost"
300
+ }, {
301
+ default: d(() => {
302
+ var t;
303
+ return [
304
+ w("span", null, k((t = v.value) == null ? void 0 : t.label), 1),
305
+ s(u(E), {
306
+ icon: "ChevronDown",
307
+ size: "xs",
308
+ thickness: "2.5"
309
+ })
310
+ ];
311
+ }),
312
+ _: 1
313
+ })
314
+ ]),
315
+ _: 1
316
+ }, 8, ["modelValue", "options"]),
317
+ g.value.length > 0 ? (f(), h(u(A), {
318
+ key: 0,
319
+ modelValue: _.value,
320
+ "onUpdate:modelValue": a[1] || (a[1] = (t) => _.value = t),
321
+ options: g.value,
322
+ side: "left",
267
323
  teleport: ""
268
324
  }, {
269
- default: u(() => [
270
- s(c(k), {
271
- class: "flex gap-1.5 h-full px-2 text-c-2 font-normal hover:text-c-1",
325
+ default: d(() => [
326
+ s(u(F), {
327
+ class: "flex gap-1.5 h-full px-2 text-c-2 font-normal hover:text-c-1 w-fit",
272
328
  fullWidth: "",
273
329
  variant: "ghost"
274
330
  }, {
275
- default: u(() => {
276
- var o;
331
+ default: d(() => {
332
+ var t;
277
333
  return [
278
- x("span", null, D((o = m.value) == null ? void 0 : o.label), 1),
279
- s(c(L), {
334
+ w("span", null, k((t = _.value) == null ? void 0 : t.label), 1),
335
+ s(u(E), {
280
336
  icon: "ChevronDown",
281
337
  size: "xs",
282
338
  thickness: "2.5"
@@ -287,43 +343,43 @@ const ie = {
287
343
  })
288
344
  ]),
289
345
  _: 1
290
- }, 8, ["modelValue", "options"])
346
+ }, 8, ["modelValue", "options"])) : ee("", !0)
291
347
  ]),
292
348
  _: 1
293
349
  })
294
350
  ]),
295
351
  _: 1
296
352
  }),
297
- s(R, null, {
298
- default: u(() => {
299
- var o, l, n, i, p;
353
+ s(T, null, {
354
+ default: d(() => {
355
+ var t, l, n, r, m;
300
356
  return [
301
- m.value.id === "none" ? (f(), F("div", ie, t[1] || (t[1] = [
302
- x("span", null, "No Body", -1)
303
- ]))) : m.value.id === "binaryFile" ? (f(), F("div", de, [
304
- (o = c(a)) != null && o.body.binary ? (f(), F(Q, { key: 0 }, [
305
- x("span", ue, D(((l = c(a)) == null ? void 0 : l.body.binary).name), 1),
306
- s(c(k), {
357
+ v.value.id === "none" ? (f(), U("div", se, a[2] || (a[2] = [
358
+ w("span", null, "No Body", -1)
359
+ ]))) : v.value.id === "binaryFile" ? (f(), U("div", ce, [
360
+ (t = u(o)) != null && t.body.binary ? (f(), U(ae, { key: 0 }, [
361
+ w("span", me, k(((l = u(o)) == null ? void 0 : l.body.binary).name), 1),
362
+ s(u(F), {
307
363
  class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
308
364
  size: "sm",
309
365
  variant: "outlined",
310
- onClick: J
366
+ onClick: G
311
367
  }, {
312
- default: u(() => t[2] || (t[2] = [
313
- q(" Delete ")
368
+ default: d(() => a[3] || (a[3] = [
369
+ z(" Delete ")
314
370
  ])),
315
371
  _: 1
316
372
  })
317
- ], 64)) : (f(), b(c(k), {
373
+ ], 64)) : (f(), h(u(F), {
318
374
  key: 1,
319
375
  class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 shadow-none",
320
376
  size: "sm",
321
377
  variant: "outlined",
322
- onClick: X
378
+ onClick: K
323
379
  }, {
324
- default: u(() => [
325
- t[3] || (t[3] = x("span", null, "Upload File", -1)),
326
- s(c(L), {
380
+ default: d(() => [
381
+ a[4] || (a[4] = w("span", null, "Upload File", -1)),
382
+ s(u(E), {
327
383
  class: "ml-1",
328
384
  icon: "UploadSimple",
329
385
  size: "xs",
@@ -332,46 +388,46 @@ const ie = {
332
388
  ]),
333
389
  _: 1
334
390
  }))
335
- ])) : m.value.id == "multipartForm" ? (f(), b(W, {
391
+ ])) : v.value.id == "multipartForm" ? (f(), h($, {
336
392
  key: 2,
337
393
  ref_key: "tableWrapperRef",
338
- ref: g,
394
+ ref: B,
339
395
  class: "!m-0 rounded-t-none shadow-none border-l-0 border-r-0 border-t-0 border-b-0",
340
396
  columns: ["32px", "", "", "61px"],
341
- items: v.value,
397
+ items: p.value,
342
398
  showUploadButton: "",
343
- onDeleteRow: _,
344
- onRemoveFile: V,
345
- onToggleRow: P,
346
- onUpdateRow: U,
347
- onUploadFile: j
348
- }, null, 8, ["items"])) : m.value.id == "formUrlEncoded" ? (f(), b(W, {
399
+ onDeleteRow: V,
400
+ onRemoveFile: M,
401
+ onToggleRow: N,
402
+ onUpdateRow: C,
403
+ onUploadFile: L
404
+ }, null, 8, ["items"])) : v.value.id == "formUrlEncoded" ? (f(), h($, {
349
405
  key: 3,
350
406
  ref_key: "tableWrapperRef",
351
- ref: g,
407
+ ref: B,
352
408
  class: "!m-0 rounded-t-none border-t-0 shadow-none border-l-0 border-r-0 border-t-0 border-b-0",
353
409
  columns: ["32px", "", "", "61px"],
354
- items: v.value,
410
+ items: p.value,
355
411
  showUploadButton: "",
356
- onDeleteRow: _,
357
- onRemoveFile: V,
358
- onToggleRow: P,
359
- onUpdateRow: U,
360
- onUploadFile: j
361
- }, null, 8, ["items"])) : (f(), b(I, {
412
+ onDeleteRow: V,
413
+ onRemoveFile: M,
414
+ onToggleRow: N,
415
+ onUpdateRow: C,
416
+ onUploadFile: L
417
+ }, null, 8, ["items"])) : (f(), h(oe, {
362
418
  key: 4,
363
419
  content: "",
364
- language: O.value,
420
+ language: Y.value,
365
421
  lineNumbers: "",
366
422
  lint: "",
367
- modelValue: ((p = (i = (n = c(a)) == null ? void 0 : n.body) == null ? void 0 : i.raw) == null ? void 0 : p.value) ?? "",
368
- "onUpdate:modelValue": $
423
+ modelValue: ((m = (r = (n = u(o)) == null ? void 0 : n.body) == null ? void 0 : r.raw) == null ? void 0 : m.value) ?? "",
424
+ "onUpdate:modelValue": O
369
425
  }, null, 8, ["language", "modelValue"]))
370
426
  ];
371
427
  }),
372
428
  _: 1
373
429
  }),
374
- s(R)
430
+ s(T)
375
431
  ]),
376
432
  _: 1
377
433
  })
@@ -381,5 +437,5 @@ const ie = {
381
437
  }
382
438
  });
383
439
  export {
384
- Re as default
440
+ Ue as default
385
441
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAghBA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAO1B,KAAK,WAAW,GAAG;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC3C,oEAAoE;IACpE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAC;AAmPJ,iBAAS,cAAc;WA4hBT,OAAO,IAA6B;;oBAjwBpC,IAAI;;oBAAJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCArDlB,KAresB;;;;;;;oCAqetB,KA9diC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA8wBtB,GAAG,8CACD,GAAG,yBACb,GAAG,6DACD,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwgBN;AAkCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;iBAp0BH,OAAO;uFA60BvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAghBA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAO1B,KAAK,WAAW,GAAG;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC3C,oEAAoE;IACpE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAC;AAmPJ,iBAAS,cAAc;WA4hBT,OAAO,IAA6B;;oBAjwBpC,IAAI;;oBAAJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCArDlB,KAresB;;;;;;;oCAqetB,KA9diC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA8wBrB,GAAG,8CACD,GAAG,yBACZ,GAAE,6DACF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwgBP;AAkCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;iBAp0BH,OAAO;uFA60BvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAgBpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import o from "../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f013e160"]]);
5
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-2f2489cb"]]);
6
6
  export {
7
7
  a as default
8
8
  };
@@ -20,8 +20,8 @@ const we = { class: "flex flex-row gap-1 items-center" }, ke = { class: "relativ
20
20
  emits: ["onDragEnd", "newTab", "openMenu"],
21
21
  setup(A, { emit: V }) {
22
22
  le((e) => ({
23
- "65be547c": K.value,
24
- "726e30bc": Q.value
23
+ "4dc1c246": K.value,
24
+ "1951c5b8": Q.value
25
25
  }));
26
26
  const s = A, W = V, {
27
27
  activeCollection: F,
@@ -190,8 +190,8 @@ const we = { class: "flex flex-row gap-1 items-center" }, ke = { class: "relativ
190
190
  (se) => e.$emit("openMenu", {
191
191
  item: i.value,
192
192
  parentUids: e.parentUids,
193
- targetRef: se.currentTarget.parentNode,
194
- open: !0
193
+ targetRef: se.currentTarget,
194
+ open: !e.menuItem.open
195
195
  }),
196
196
  ["stop", "prevent"]
197
197
  ))
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AA2QA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAa5D,KAAK,WAAW,GAAG;IAAE,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAC;;;;;;;;;;AAsiBjD,wBAOG"}
1
+ {"version":3,"file":"RequestSidebarItemMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItemMenu.vue"],"names":[],"mappings":"AA8QA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAe5D,KAAK,WAAW,GAAG;IAAE,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAC;;;;;;;;;;AA+iBjD,wBAOG"}