@scalar/api-client 2.2.35 → 2.2.37

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 (78) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue2.js +18 -18
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -0
  5. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  6. package/dist/components/CodeInput/CodeInput.vue.js +1 -1
  7. package/dist/components/CodeInput/CodeInput.vue2.js +114 -108
  8. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +1 -0
  9. package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
  10. package/dist/components/CommandPalette/CommandActionInput.vue.js +21 -18
  11. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  12. package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
  13. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +2 -2
  14. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  15. package/dist/components/DataTable/DataTableInput.vue.js +2 -2
  16. package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
  17. package/dist/components/DataTable/DataTableInputSelect.vue.js +43 -43
  18. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  19. package/dist/components/Form/Form.vue.js +3 -3
  20. package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
  21. package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
  22. package/dist/components/TopNav/TopNav.vue.js +27 -27
  23. package/dist/layouts/App/create-api-client-app.d.ts +4 -58
  24. package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
  25. package/dist/layouts/Modal/create-api-client-modal.d.ts +8 -116
  26. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  27. package/dist/layouts/Web/create-api-client-web.d.ts +4 -58
  28. package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
  29. package/dist/libs/create-client.d.ts +4 -58
  30. package/dist/libs/create-client.d.ts.map +1 -1
  31. package/dist/libs/index.js +18 -19
  32. package/dist/libs/send-request/index.js +3 -4
  33. package/dist/libs/send-request/send-request.d.ts +0 -14
  34. package/dist/libs/send-request/send-request.d.ts.map +1 -1
  35. package/dist/libs/send-request/send-request.js +120 -142
  36. package/dist/libs/send-request/set-request-cookies.d.ts +27 -0
  37. package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -0
  38. package/dist/libs/send-request/set-request-cookies.js +54 -0
  39. package/dist/store/active-entities.d.ts.map +1 -1
  40. package/dist/store/active-entities.js +15 -12
  41. package/dist/store/cookies.d.ts +4 -58
  42. package/dist/store/cookies.d.ts.map +1 -1
  43. package/dist/store/cookies.js +5 -17
  44. package/dist/store/store.d.ts +4 -58
  45. package/dist/store/store.d.ts.map +1 -1
  46. package/dist/style.css +1 -1
  47. package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
  48. package/dist/views/Cookies/CookieForm.vue.js +24 -37
  49. package/dist/views/Cookies/CookieModal.vue.d.ts +21 -0
  50. package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -0
  51. package/dist/views/Cookies/CookieModal.vue.js +7 -0
  52. package/dist/views/Cookies/CookieModal.vue2.js +88 -0
  53. package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
  54. package/dist/views/Cookies/Cookies.vue2.js +98 -119
  55. package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
  56. package/dist/views/Request/RequestSection/RequestBody.vue2.js +34 -34
  57. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
  58. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  59. package/dist/views/Request/RequestSection/RequestParams.vue.js +79 -66
  60. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
  61. package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
  62. package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -64
  63. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +9 -2
  64. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  65. package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
  66. package/dist/views/Request/RequestSection/RequestTable.vue2.js +168 -130
  67. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  68. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +5 -64
  69. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +46 -2
  70. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +19 -17
  71. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  72. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +31 -31
  73. package/dist/views/Request/libs/request.d.ts +12 -0
  74. package/dist/views/Request/libs/request.d.ts.map +1 -0
  75. package/dist/views/Request/libs/request.js +4 -0
  76. package/package.json +11 -13
  77. package/dist/views/Cookies/CookieRaw.vue.js +0 -28
  78. package/dist/views/Cookies/CookieRaw.vue2.js +0 -4
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as ae, computed as w, ref as te, watch as $, openBlock as g, createBlock as x, withCtx as m, createTextVNode as H, toDisplayString as _, createVNode as v, unref as c, createElementVNode as D, createCommentVNode as oe, createElementBlock as V, Fragment as ne, nextTick as le } from "vue";
2
2
  import re from "../../../components/CodeInput/CodeInput.vue.js";
3
- import ie from "../../../components/DataTable/DataTable.vue.js";
4
- import ue from "../../../components/DataTable/DataTableHeader.vue.js";
3
+ import ue from "../../../components/DataTable/DataTable.vue.js";
4
+ import ie from "../../../components/DataTable/DataTableHeader.vue.js";
5
5
  import P from "../../../components/DataTable/DataTableRow.vue.js";
6
6
  import de from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
7
7
  import { useActiveEntities as se } from "../../../store/active-entities.js";
@@ -23,7 +23,7 @@ const ve = {
23
23
  title: {}
24
24
  },
25
25
  setup(ye) {
26
- const { activeRequest: f, activeExample: o } = se(), { requestExampleMutators: u } = me(), Q = {
26
+ const { activeRequest: f, activeExample: o } = se(), { requestExampleMutators: i } = me(), Q = {
27
27
  json: "json",
28
28
  xml: "xml",
29
29
  yaml: "yaml",
@@ -61,7 +61,7 @@ const ve = {
61
61
  console.log("deleteRow");
62
62
  }
63
63
  const S = (e, a, t) => {
64
- var l, r, d, i, p, h, k;
64
+ var l, r, d, u, p, h, k;
65
65
  if (!f.value || !o.value) return;
66
66
  const n = b.value;
67
67
  if (n.length > e) {
@@ -72,14 +72,14 @@ const ve = {
72
72
  key: ((r = s[e]) == null ? void 0 : r.key) || "",
73
73
  enabled: ((d = s[e]) == null ? void 0 : d.enabled) ?? !1,
74
74
  [a]: t || ""
75
- }, (((i = s[e]) == null ? void 0 : i.key) !== "" || ((p = s[e]) == null ? void 0 : p.value) !== "") && (s[e].enabled = !0), ((h = s[e]) == null ? void 0 : h.key) === "" && ((k = s[e]) == null ? void 0 : k.value) === "" && s.splice(e, 1), u.edit(
75
+ }, (((u = s[e]) == null ? void 0 : u.key) !== "" || ((p = s[e]) == null ? void 0 : p.value) !== "") && (s[e].enabled = !0), ((h = s[e]) == null ? void 0 : h.key) === "" && ((k = s[e]) == null ? void 0 : k.value) === "" && s.splice(e, 1), i.edit(
76
76
  o.value.uid,
77
77
  "body.formData.value",
78
78
  s
79
79
  );
80
80
  } else {
81
81
  const s = [Y.parse({ [a]: t })];
82
- u.edit(
82
+ i.edit(
83
83
  o.value.uid,
84
84
  "body.formData.value",
85
85
  s
@@ -103,11 +103,11 @@ const ve = {
103
103
  const e = Y.parse({
104
104
  enabled: !1
105
105
  }), a = [...b.value, e];
106
- o.value.body.formData ? u.edit(
106
+ o.value.body.formData ? i.edit(
107
107
  o.value.uid,
108
108
  "body.formData.value",
109
109
  a
110
- ) : u.edit(o.value.uid, "body.formData", {
110
+ ) : i.edit(o.value.uid, "body.formData", {
111
111
  value: a,
112
112
  encoding: "form-data"
113
113
  });
@@ -116,14 +116,14 @@ const ve = {
116
116
  const t = b.value;
117
117
  if (t.length > e) {
118
118
  const n = [...t];
119
- n[e] && (n[e].enabled = a), u.edit(
119
+ n[e] && (n[e].enabled = a), i.edit(
120
120
  o.value.uid,
121
121
  "body.formData.value",
122
122
  n
123
123
  );
124
124
  }
125
125
  }, L = (e) => {
126
- !f.value || !o.value || u.edit(o.value.uid, "body.raw.value", e);
126
+ !f.value || !o.value || i.edit(o.value.uid, "body.raw.value", e);
127
127
  }, M = (e) => e === "multipartForm" ? {
128
128
  activeBody: "formData",
129
129
  encoding: "form-data",
@@ -157,35 +157,35 @@ const ve = {
157
157
  encoding: "html",
158
158
  header: "application/html"
159
159
  } : { activeBody: "raw", encoding: void 0, header: void 0 }, W = (e) => {
160
- var d, i;
160
+ var d, u;
161
161
  if (!o.value) return;
162
162
  const { activeBody: a, encoding: t, header: n } = M(e);
163
- if (u.edit(
163
+ if (i.edit(
164
164
  o.value.uid,
165
165
  "body.activeBody",
166
166
  a
167
167
  ), t && a === "raw")
168
- u.edit(o.value.uid, "body.raw", {
168
+ i.edit(o.value.uid, "body.raw", {
169
169
  encoding: t,
170
170
  value: ((d = o.value.body.raw) == null ? void 0 : d.value) ?? ""
171
171
  });
172
172
  else if (t && a === "formData")
173
- u.edit(o.value.uid, "body.formData", {
173
+ i.edit(o.value.uid, "body.formData", {
174
174
  encoding: t,
175
- value: ((i = o.value.body.formData) == null ? void 0 : i.value) ?? []
175
+ value: ((u = o.value.body.formData) == null ? void 0 : u.value) ?? []
176
176
  });
177
177
  else if (!t && a !== "binary") {
178
178
  const { raw: p, ...h } = o.value.body;
179
- u.edit(o.value.uid, "body", h);
179
+ i.edit(o.value.uid, "body", h);
180
180
  }
181
181
  const l = [...o.value.parameters.headers], r = l.findIndex(
182
182
  (p) => p.key.toLowerCase() === "content-type"
183
183
  );
184
- r >= 0 ? n && l[r] ? l[r].value = n : l[r] && l.splice(r, 1) : n && l.unshift({
184
+ r >= 0 ? n && l[r] ? l[r].value = n : l[r] && l.splice(r, 1) : n && l.push({
185
185
  key: "Content-Type",
186
186
  value: n,
187
187
  enabled: !0
188
- }), u.edit(
188
+ }), i.edit(
189
189
  o.value.uid,
190
190
  "parameters.headers",
191
191
  l
@@ -196,17 +196,17 @@ const ve = {
196
196
  var l, r;
197
197
  const n = t == null ? void 0 : t[0];
198
198
  if (n && f.value && o.value) {
199
- const i = [...b.value];
200
- i[e] = {
201
- ...i[e],
199
+ const u = [...b.value];
200
+ u[e] = {
201
+ ...u[e],
202
202
  file: n,
203
- value: ((l = i[e]) == null ? void 0 : l.value) || n.name,
204
- key: ((r = i[e]) == null ? void 0 : r.key) || n.name,
203
+ value: ((l = u[e]) == null ? void 0 : l.value) || n.name,
204
+ key: ((r = u[e]) == null ? void 0 : r.key) || n.name,
205
205
  enabled: !0
206
- }, u.edit(
206
+ }, i.edit(
207
207
  o.value.uid,
208
208
  "body.formData.value",
209
- i
209
+ u
210
210
  );
211
211
  }
212
212
  },
@@ -216,7 +216,7 @@ const ve = {
216
216
  a();
217
217
  };
218
218
  function I() {
219
- !f.value || !o.value || u.edit(o.value.uid, "body.binary", void 0);
219
+ !f.value || !o.value || i.edit(o.value.uid, "body.binary", void 0);
220
220
  }
221
221
  function J(e) {
222
222
  if (!f.value || !o.value) return;
@@ -227,7 +227,7 @@ const ve = {
227
227
  value: "",
228
228
  key: "",
229
229
  enabled: !1
230
- }, u.edit(
230
+ }, i.edit(
231
231
  o.value.uid,
232
232
  "body.formData.value",
233
233
  t
@@ -237,7 +237,7 @@ const ve = {
237
237
  const { open: e } = K({
238
238
  onChange: async (a) => {
239
239
  const t = a == null ? void 0 : a[0];
240
- t && f.value && o.value && u.edit(
240
+ t && f.value && o.value && i.edit(
241
241
  o.value.uid,
242
242
  "body.binary",
243
243
  t
@@ -268,8 +268,8 @@ const ve = {
268
268
  { immediate: !0 }
269
269
  );
270
270
  const B = w(() => {
271
- var l, r, d, i;
272
- const e = (l = y.value) == null ? void 0 : l.id, { header: a } = M(e), t = ((d = (r = f.value) == null ? void 0 : r.requestBody) == null ? void 0 : d.content) || {}, n = a ? ((i = t[a]) == null ? void 0 : i.examples) || {} : {};
271
+ var l, r, d, u;
272
+ const e = (l = y.value) == null ? void 0 : l.id, { header: a } = M(e), t = ((d = (r = f.value) == null ? void 0 : r.requestBody) == null ? void 0 : d.content) || {}, n = a ? ((u = t[a]) == null ? void 0 : u.examples) || {} : {};
273
273
  return Object.entries(n).map(([p, h]) => ({
274
274
  id: p,
275
275
  label: p,
@@ -301,11 +301,11 @@ const ve = {
301
301
  H(_(e.title), 1)
302
302
  ]),
303
303
  default: m(() => [
304
- v(ie, { columns: [""] }, {
304
+ v(ue, { columns: [""] }, {
305
305
  default: m(() => [
306
306
  v(P, null, {
307
307
  default: m(() => [
308
- v(ue, { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between !p-0" }, {
308
+ v(ie, { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between !p-0" }, {
309
309
  default: m(() => [
310
310
  v(c(X), {
311
311
  modelValue: y.value,
@@ -371,7 +371,7 @@ const ve = {
371
371
  }),
372
372
  v(P, null, {
373
373
  default: m(() => {
374
- var t, n, l, r, d, i, p, h, k;
374
+ var t, n, l, r, d, u, p, h, k;
375
375
  return [
376
376
  ((t = y.value) == null ? void 0 : t.id) === "none" ? (g(), V("div", ve, a[2] || (a[2] = [
377
377
  D("span", null, "No Body", -1)
@@ -420,7 +420,7 @@ const ve = {
420
420
  onToggleRow: q,
421
421
  onUpdateRow: S,
422
422
  onUploadFile: z
423
- }, null, 8, ["items"])) : ((i = y.value) == null ? void 0 : i.id) == "formUrlEncoded" ? (g(), x(G, {
423
+ }, null, 8, ["items"])) : ((u = y.value) == null ? void 0 : u.id) == "formUrlEncoded" ? (g(), x(G, {
424
424
  key: 3,
425
425
  ref_key: "tableWrapperRef",
426
426
  ref: R,
@@ -1,7 +1,14 @@
1
1
  import { type RequestExample } from '@scalar/oas-utils/entities/spec';
2
+ import type { RouteLocationRaw } from 'vue-router';
2
3
  type __VLS_Props = {
3
4
  title: string;
4
5
  paramKey: keyof RequestExample['parameters'];
6
+ readOnlyEntries?: {
7
+ key: string;
8
+ value: string;
9
+ enabled: boolean;
10
+ route: RouteLocationRaw;
11
+ }[];
5
12
  };
6
13
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
14
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAiNA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AAKxC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;CAC7C,CAAC;;AA4UF,wBAOG"}
1
+ {"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAqOA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;CACJ,CAAC;;AAwVF,wBAOG"}
@@ -1,74 +1,75 @@
1
- import { defineComponent as E, computed as f, onMounted as S, ref as A, watch as N, openBlock as y, createBlock as h, withCtx as n, createTextVNode as k, toDisplayString as R, createElementVNode as o, unref as x, createVNode as b, withModifiers as V, createCommentVNode as z, nextTick as _ } from "vue";
2
- import B from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
- import { useActiveEntities as M } from "../../../store/active-entities.js";
4
- import W from "./RequestTable.vue.js";
5
- import { ScalarTooltip as D, ScalarButton as O } from "@scalar/components";
6
- import { requestExampleParametersSchema as C } from "@scalar/oas-utils/entities/spec";
1
+ import { defineComponent as A, computed as m, onMounted as N, ref as V, watch as B, openBlock as v, createBlock as d, withCtx as r, createTextVNode as R, toDisplayString as k, createElementVNode as i, unref as b, createVNode as x, withModifiers as M, createCommentVNode as C, nextTick as E } from "vue";
2
+ import W from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
3
+ import { useActiveEntities as z } from "../../../store/active-entities.js";
4
+ import _ from "./RequestTable.vue.js";
5
+ import { ScalarTooltip as D, ScalarButton as G } from "@scalar/components";
6
+ import { requestExampleParametersSchema as q } from "@scalar/oas-utils/entities/spec";
7
7
  import { useWorkspace as U } from "../../../store/store.js";
8
- const j = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, F = { class: "sr-only" }, ee = /* @__PURE__ */ E({
8
+ const j = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, F = { class: "sr-only" }, te = /* @__PURE__ */ A({
9
9
  __name: "RequestParams",
10
10
  props: {
11
11
  title: {},
12
- paramKey: {}
12
+ paramKey: {},
13
+ readOnlyEntries: {}
13
14
  },
14
- setup(q) {
15
- const r = q, { activeRequest: u, activeExample: s } = M(), { requestExampleMutators: i } = U(), l = f(
15
+ setup(w) {
16
+ const n = w, { activeRequest: u, activeExample: s } = z(), { requestExampleMutators: o } = U(), l = m(
16
17
  () => {
17
18
  var e;
18
- return ((e = s.value) == null ? void 0 : e.parameters[r.paramKey]) ?? [];
19
+ return ((e = s.value) == null ? void 0 : e.parameters[n.paramKey]) ?? [];
19
20
  }
20
21
  );
21
- S(() => {
22
- v();
22
+ N(() => {
23
+ y();
23
24
  });
24
25
  const p = () => {
25
26
  if (!u.value || !s.value) return;
26
- const e = C.parse({ enabled: !1 }), t = [...l.value, e];
27
- i.edit(
27
+ const e = q.parse({ enabled: !1 }), t = [...l.value, e];
28
+ o.edit(
28
29
  s.value.uid,
29
- `parameters.${r.paramKey}`,
30
+ `parameters.${n.paramKey}`,
30
31
  t
31
32
  );
32
- }, m = A(null), w = (e, t, d) => {
33
+ }, c = V(null), P = (e, t, g) => {
33
34
  if (!u.value || !s.value) return;
34
- const c = l.value;
35
- if (c.length > e) {
36
- const a = [...c];
35
+ const f = l.value;
36
+ if (f.length > e) {
37
+ const a = [...f];
37
38
  if (!a[e]) return;
38
- a[e] = { ...a[e], [t]: d }, (a[e].key !== "" || a[e].value !== "") && (a[e].enabled = !0), a[e].key === "" && a[e].value === "" && a.splice(e, 1), i.edit(
39
+ a[e] = { ...a[e], [t]: g }, (a[e].key !== "" || a[e].value !== "") && (a[e].enabled = !0), a[e].key === "" && a[e].value === "" && a.splice(e, 1), o.edit(
39
40
  s.value.uid,
40
- `parameters.${r.paramKey}`,
41
+ `parameters.${n.paramKey}`,
41
42
  a
42
43
  );
43
44
  } else {
44
- const a = [C.parse({ [t]: d })];
45
- i.edit(
45
+ const a = [q.parse({ [t]: g })];
46
+ o.edit(
46
47
  s.value.uid,
47
- `parameters.${r.paramKey}`,
48
+ `parameters.${n.paramKey}`,
48
49
  a
49
- ), _(() => {
50
- var g;
51
- if (!m.value) return;
52
- (g = m.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || g.focus();
50
+ ), E(() => {
51
+ var h;
52
+ if (!c.value) return;
53
+ (h = c.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || h.focus();
53
54
  });
54
55
  }
55
- e === c.length - 1 && p();
56
- }, P = (e, t) => u.value && s.value && i.edit(
56
+ e === f.length - 1 && p();
57
+ }, K = (e, t) => u.value && s.value && o.edit(
57
58
  s.value.uid,
58
- `parameters.${r.paramKey}.${e}.enabled`,
59
+ `parameters.${n.paramKey}.${e}.enabled`,
59
60
  t
60
- ), K = () => {
61
+ ), $ = () => {
61
62
  if (!u.value || !s.value) return;
62
63
  const e = l.value.filter((t) => t.required);
63
- i.edit(
64
+ o.edit(
64
65
  s.value.uid,
65
- `parameters.${r.paramKey}`,
66
+ `parameters.${n.paramKey}`,
66
67
  e
67
- ), _(() => {
68
+ ), E(() => {
68
69
  p();
69
70
  });
70
71
  };
71
- function v() {
72
+ function y() {
72
73
  if (l.value.length === 0)
73
74
  p();
74
75
  else if (l.value.length >= 1) {
@@ -76,65 +77,77 @@ const j = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
76
77
  e && e.key !== "" && e.value !== "" && p();
77
78
  }
78
79
  }
79
- const $ = f(
80
+ const O = m(
80
81
  () => l.value.filter((e) => e.key || e.value).length
81
- ), T = f(() => l.value.length > 1);
82
- return N(
82
+ ), T = m(() => l.value.length > 1);
83
+ B(
83
84
  () => s.value,
84
85
  (e, t) => {
85
- e !== t && v();
86
+ e !== t && y();
86
87
  },
87
88
  { immediate: !0 }
88
- ), (e, t) => (y(), h(B, {
89
+ );
90
+ const S = m(
91
+ () => (n.readOnlyEntries ?? []).length > 0
92
+ );
93
+ return (e, t) => (v(), d(W, {
89
94
  class: "group/params",
90
- itemCount: $.value
95
+ itemCount: O.value
91
96
  }, {
92
- title: n(() => [
93
- k(R(e.title), 1)
97
+ title: r(() => [
98
+ R(k(e.title), 1)
94
99
  ]),
95
- actions: n(() => [
96
- o("div", j, [
97
- T.value ? (y(), h(x(D), {
100
+ actions: r(() => [
101
+ i("div", j, [
102
+ T.value ? (v(), d(b(D), {
98
103
  key: 0,
99
104
  side: "right",
100
105
  sideOffset: 12
101
106
  }, {
102
- trigger: n(() => [
103
- b(x(O), {
107
+ trigger: r(() => [
108
+ x(b(G), {
104
109
  class: "px-1 transition-none",
105
110
  size: "sm",
106
111
  variant: "ghost",
107
- onClick: V(K, ["stop"])
112
+ onClick: M($, ["stop"])
108
113
  }, {
109
- default: n(() => [
110
- t[0] || (t[0] = k(" Clear ")),
111
- o("span", F, "All " + R(e.title), 1)
114
+ default: r(() => [
115
+ t[0] || (t[0] = R(" Clear ")),
116
+ i("span", F, "All " + k(e.title), 1)
112
117
  ]),
113
118
  _: 1
114
119
  })
115
120
  ]),
116
- content: n(() => t[1] || (t[1] = [
117
- o("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-context p-2 text-xxs leading-5 z-10 text-c-1" }, [
118
- o("div", { class: "flex items-center text-c-2" }, [
119
- o("span", null, "Clear optional parameters")
121
+ content: r(() => t[1] || (t[1] = [
122
+ i("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 p-2 text-xxs leading-5 z-10 text-c-1" }, [
123
+ i("div", { class: "flex items-center text-c-2" }, [
124
+ i("span", null, "Clear optional parameters")
120
125
  ])
121
126
  ], -1)
122
127
  ])),
123
128
  _: 1
124
- })) : z("", !0)
129
+ })) : C("", !0)
125
130
  ])
126
131
  ]),
127
- default: n(() => [
128
- o("div", {
132
+ default: r(() => [
133
+ i("div", {
129
134
  ref_key: "tableWrapperRef",
130
- ref: m
135
+ ref: c
131
136
  }, [
132
- b(W, {
137
+ S.value ? (v(), d(_, {
138
+ key: 0,
139
+ class: "flex-1",
140
+ columns: ["32px", "", ""],
141
+ isGlobal: "",
142
+ isReadOnly: "",
143
+ items: e.readOnlyEntries
144
+ }, null, 8, ["items"])) : C("", !0),
145
+ x(_, {
133
146
  class: "flex-1",
134
147
  columns: ["32px", "", ""],
135
148
  items: l.value,
136
- onToggleRow: P,
137
- onUpdateRow: w
149
+ onToggleRow: K,
150
+ onUpdateRow: P
138
151
  }, null, 8, ["items"])
139
152
  ], 512)
140
153
  ]),
@@ -143,5 +156,5 @@ const j = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
143
156
  }
144
157
  });
145
158
  export {
146
- ee as default
159
+ te as default
147
160
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AA4KA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AAkQF,wBAOG"}
1
+ {"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AA4MA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AA8RF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestSection.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4daacc06"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-582c4535"]]);
5
5
  export {
6
- r as default
6
+ m as default
7
7
  };