@scalar/api-client 2.0.42 → 2.0.44

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 (40) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
  3. package/dist/components/AddressBar/AddressBarHistory.vue.js +43 -46
  4. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  5. package/dist/components/CodeInput/CodeInput.vue.js +2 -2
  6. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  7. package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
  8. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +3 -2
  9. package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
  10. package/dist/components/SubpageHeader.vue.js +2 -2
  11. package/dist/components/SubpageHeader.vue2.js +10 -9
  12. package/dist/layouts/App/create-api-client-app.d.ts +36 -36
  13. package/dist/layouts/Modal/create-api-client-modal.d.ts +72 -72
  14. package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
  15. package/dist/layouts/Modal/create-api-client-modal.js +26 -18
  16. package/dist/libs/create-client.d.ts +39 -37
  17. package/dist/libs/create-client.d.ts.map +1 -1
  18. package/dist/libs/normalizeHeaders.d.ts +12 -0
  19. package/dist/libs/normalizeHeaders.d.ts.map +1 -0
  20. package/dist/libs/normalizeHeaders.js +25 -0
  21. package/dist/libs/sendRequest.d.ts.map +1 -1
  22. package/dist/libs/sendRequest.js +22 -20
  23. package/dist/store/workspace.d.ts +121 -120
  24. package/dist/store/workspace.d.ts.map +1 -1
  25. package/dist/store/workspace.js +274 -274
  26. package/dist/style.css +1 -1
  27. package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
  28. package/dist/views/Request/RequestSection/RequestAuth.vue.js +2 -2
  29. package/dist/views/Request/RequestSection/RequestAuth.vue2.js +147 -117
  30. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  31. package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
  32. package/dist/views/Request/RequestSection/RequestTable.vue2.js +47 -44
  33. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
  34. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +30 -28
  35. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts +7 -10
  36. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
  37. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +23 -24
  38. package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
  39. package/dist/views/Request/consts/mediaTypes.js +5 -0
  40. package/package.json +6 -6
@@ -1,81 +1,87 @@
1
- import { defineComponent as O, ref as Q, computed as I, openBlock as i, createBlock as x, withCtx as l, createElementVNode as b, toDisplayString as h, createVNode as u, unref as n, createElementBlock as _, Fragment as v, renderList as j, createTextVNode as c, withModifiers as H, createCommentVNode as $, capitalize as B, pushScopeId as z, popScopeId as E } from "vue";
2
- import L from "../../../components/DataTable/DataTableCell.vue.js";
3
- import K from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
- import { useWorkspace as G } from "../../../store/workspace.js";
5
- import y from "./RequestAuthDataTableInput.vue.js";
6
- import { ScalarComboboxMultiselect as J, ScalarButton as N, ScalarIcon as X } from "@scalar/components";
7
- import { camelToTitleWords as Y } from "@scalar/oas-utils/helpers";
8
- import { ADD_AUTH_OPTIONS as Z, ADD_AUTH_DICT as ee } from "../consts/new-auth-options.js";
9
- import te from "../../../components/DataTable/DataTable.vue.js";
1
+ import { defineComponent as H, ref as E, computed as I, openBlock as i, createBlock as b, withCtx as a, createElementVNode as _, toDisplayString as k, createVNode as u, unref as n, createElementBlock as p, Fragment as v, renderList as A, createTextVNode as f, withModifiers as B, createCommentVNode as $, capitalize as F, pushScopeId as K, popScopeId as L } from "vue";
2
+ import G from "../../../components/DataTable/DataTableCell.vue.js";
3
+ import J from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
4
+ import { useWorkspace as X } from "../../../store/workspace.js";
5
+ import x from "./RequestAuthDataTableInput.vue.js";
6
+ import { ScalarComboboxMultiselect as Y, ScalarButton as W, ScalarIcon as P } from "@scalar/components";
7
+ import { camelToTitleWords as Z } from "@scalar/oas-utils/helpers";
8
+ import { ADD_AUTH_OPTIONS as ee, ADD_AUTH_DICT as te } from "../consts/new-auth-options.js";
9
+ import le from "../../../components/DataTable/DataTable.vue.js";
10
10
  import m from "../../../components/DataTable/DataTableRow.vue.js";
11
- import le from "../../../components/DataTable/DataTableHeader.vue.js";
12
- import ae from "../components/OAuth2.vue.js";
13
- const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex gap-1" }, ne = /* @__PURE__ */ oe(() => /* @__PURE__ */ b("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), re = { class: "custom-scroll mr-1.5 pl-2" }, de = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/delete:opacity-100 request-meta-buttons pr-2" }, ke = /* @__PURE__ */ O({
11
+ import ae from "../../../components/DataTable/DataTableHeader.vue.js";
12
+ import oe from "../components/OAuth2.vue.js";
13
+ const w = (h) => (K("data-v-411d2b35"), h = h(), L(), h), ue = { class: "flex gap-1" }, ne = /* @__PURE__ */ w(() => /* @__PURE__ */ _("div", { class: "text-c-2 h-8 flex min-w-[120px] items-center border-r-1/2 pr-0 pl-2" }, " Auth Type ", -1)), ie = {
14
+ key: 0,
15
+ class: "flex relative scroll-timeline-x w-full"
16
+ }, de = /* @__PURE__ */ w(() => /* @__PURE__ */ _("div", { class: "fade-left" }, null, -1)), re = { class: "flex flex-1 gap-0.75 mr-1.5" }, se = /* @__PURE__ */ w(() => /* @__PURE__ */ _("div", { class: "fade-right" }, null, -1)), ce = {
17
+ key: 1,
18
+ class: "pl-2"
19
+ }, pe = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/delete:opacity-100 request-meta-buttons pr-2" }, Ue = /* @__PURE__ */ H({
14
20
  __name: "RequestAuth",
15
21
  props: {
16
22
  title: {}
17
23
  },
18
- setup(k) {
24
+ setup(h) {
19
25
  const {
20
26
  activeCollection: S,
21
27
  activeRequest: V,
22
- activeSecurityRequirements: F,
23
- activeSecuritySchemes: w,
24
- isReadOnly: U,
25
- requestMutators: A,
26
- securitySchemeMutators: g,
28
+ activeSecurityRequirements: q,
29
+ activeSecuritySchemes: C,
30
+ isReadOnly: g,
31
+ requestMutators: O,
32
+ securitySchemeMutators: U,
27
33
  securitySchemes: T
28
- } = G(), C = Q(null), D = (a) => {
29
- switch (a == null ? void 0 : a.type) {
34
+ } = X(), D = E(null), R = (l) => {
35
+ switch (l == null ? void 0 : l.type) {
30
36
  case "apiKey":
31
- return `${B(a.in)}`;
37
+ return `${F(l.in)}`;
32
38
  case "http":
33
- return `${B(a.scheme)} Authentication`;
39
+ return `${F(l.scheme)} Authentication`;
34
40
  case "oauth2":
35
- return Y(a.flow.type);
41
+ return Z(l.flow.type);
36
42
  case "openIdConnect":
37
43
  return "Open ID Connect";
38
44
  default:
39
45
  return "None";
40
46
  }
41
- }, R = I(
47
+ }, M = I(
42
48
  () => {
43
49
  var e;
44
- const a = (e = S.value) == null ? void 0 : e.securitySchemeDict, o = F.value.flatMap((r) => {
50
+ const l = (e = S.value) == null ? void 0 : e.securitySchemeDict, o = q.value.flatMap((r) => {
45
51
  const t = Object.keys(r);
46
- return t.length === 0 && U.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((d) => {
47
- if (!a) return [];
48
- const s = a[d], q = T[s], M = D(q);
52
+ return t.length === 0 && g.value ? { id: "none", label: "None", labelWithoutId: "None" } : t.flatMap((s) => {
53
+ if (!l) return [];
54
+ const c = l[s], z = T[c], N = R(z);
49
55
  return {
50
- id: s,
51
- label: `${M} (${d})`,
52
- labelWithoutId: M
56
+ id: c,
57
+ label: `${N} (${s})`,
58
+ labelWithoutId: N
53
59
  };
54
60
  });
55
61
  });
56
- if (U.value)
62
+ if (g.value)
57
63
  return o;
58
64
  {
59
65
  const r = V.value.securitySchemeUids.map((t) => {
60
- const d = T[t], s = D(d);
66
+ const s = T[t], c = R(s);
61
67
  return {
62
68
  id: t,
63
- label: "name" in d && d.name.length ? `${s} (${d.name})` : s,
64
- labelWithoutId: s
69
+ label: "name" in s && s.name.length ? `${c} (${s.name})` : c,
70
+ labelWithoutId: c
65
71
  };
66
72
  });
67
73
  return [
68
74
  { label: "Select auth", options: [...o, ...r] },
69
75
  {
70
76
  label: "Add new auth",
71
- options: Z
77
+ options: ee
72
78
  }
73
79
  ];
74
80
  }
75
81
  }
76
- ), p = I({
82
+ ), d = I({
77
83
  // Grab the selected OR first security scheme
78
- get: () => R.value.flatMap(
84
+ get: () => M.value.flatMap(
79
85
  (o) => "options" in o ? o.options : o
80
86
  ).filter(
81
87
  ({ id: o }) => {
@@ -86,64 +92,88 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
86
92
  }
87
93
  ),
88
94
  // Update the selected auth per this request
89
- set: (a) => {
90
- var e, r, t, d;
91
- const o = a.find(
92
- (s) => ee[s.id]
95
+ set: (l) => {
96
+ var e, r, t, s;
97
+ const o = l.find(
98
+ (c) => te[c.id]
93
99
  );
94
- o != null && o.payload && S.value ? ((d = (t = (r = (e = C.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : r.popoverButtonRef) == null ? void 0 : t.el) == null || d.click(), g.add(
100
+ o != null && o.payload && S.value ? ((s = (t = (r = (e = D.value) == null ? void 0 : e.comboboxPopoverRef) == null ? void 0 : r.popoverButtonRef) == null ? void 0 : t.el) == null || s.click(), U.add(
95
101
  o.payload,
96
102
  S.value.uid,
97
103
  V.value,
98
104
  !0
99
- )) : A.edit(
105
+ )) : O.edit(
100
106
  V.value.uid,
101
107
  "selectedSecuritySchemeUids",
102
- a.map((s) => s.id)
108
+ l.map((c) => c.id)
103
109
  );
104
110
  }
105
- }), f = (a, o, e) => g.edit(a.uid ?? "", o, e), P = I(() => p.value.length > 1 ? p.value.map(({ labelWithoutId: a }) => a).join(", ") : p.value.length ? p.value[0].label : "None"), W = (a) => g.delete(a, V.value);
106
- return (a, o) => (i(), x(K, {
111
+ }), y = (l, o, e) => U.edit(l.uid ?? "", o, e);
112
+ I(() => d.value.length > 1 ? d.value.map(({ labelWithoutId: l }) => l).join(", ") : d.value.length ? d.value[0].label : "None");
113
+ const Q = (l) => U.delete(l, V.value), j = (l) => {
114
+ const o = d.value.filter(
115
+ (e) => e.id !== l
116
+ );
117
+ d.value = o;
118
+ };
119
+ return (l, o) => (i(), b(J, {
107
120
  class: "group/params",
108
- itemCount: p.value.length
121
+ itemCount: d.value.length
109
122
  }, {
110
- title: l(() => [
111
- b("div", ue, h(a.title), 1)
123
+ title: a(() => [
124
+ _("div", ue, k(l.title), 1)
112
125
  ]),
113
- default: l(() => [
114
- b("form", null, [
115
- u(n(te), {
126
+ default: a(() => [
127
+ _("form", null, [
128
+ u(n(le), {
116
129
  class: "flex-1",
117
130
  columns: [""]
118
131
  }, {
119
- default: l(() => [
132
+ default: a(() => [
120
133
  u(n(m), null, {
121
- default: l(() => [
122
- u(n(le), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
123
- default: l(() => [
124
- u(n(J), {
134
+ default: a(() => [
135
+ u(n(ae), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
136
+ default: a(() => [
137
+ u(n(Y), {
125
138
  ref_key: "comboboxRef",
126
- ref: C,
127
- modelValue: p.value,
128
- "onUpdate:modelValue": o[0] || (o[0] = (e) => p.value = e),
139
+ ref: D,
140
+ modelValue: d.value,
141
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => d.value = e),
129
142
  class: "text-xs w-full",
130
143
  fullWidth: "",
131
144
  multiple: "",
132
- options: R.value,
145
+ options: M.value,
133
146
  style: { "margin-left": "120px" },
134
147
  teleport: ""
135
148
  }, {
136
- default: l(() => [
137
- u(n(N), {
149
+ default: a(() => [
150
+ u(n(W), {
138
151
  class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start",
139
152
  fullWidth: "",
140
153
  variant: "ghost"
141
154
  }, {
142
- default: l(() => [
155
+ default: a(() => [
143
156
  ne,
144
- b("span", re, h(P.value), 1),
145
- u(n(X), {
146
- class: "mr-2.5",
157
+ d.value.length ? (i(), p("div", ie, [
158
+ de,
159
+ _("div", re, [
160
+ (i(!0), p(v, null, A(d.value, (e) => (i(), p("span", {
161
+ key: e.id,
162
+ class: "cm-pill flex items-center mx-0"
163
+ }, [
164
+ f(k(e.labelWithoutId) + " ", 1),
165
+ u(n(P), {
166
+ class: "ml-1 cursor-pointer hover:text-c-1",
167
+ icon: "Close",
168
+ size: "xs",
169
+ onClick: B((r) => j(e.id), ["stop"])
170
+ }, null, 8, ["onClick"])
171
+ ]))), 128))
172
+ ]),
173
+ se
174
+ ])) : (i(), p("div", ce, " None ")),
175
+ u(n(P), {
176
+ class: "min-w-3 ml-auto mr-2.5",
147
177
  icon: "ChevronDown",
148
178
  size: "xs"
149
179
  })
@@ -159,28 +189,28 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
159
189
  ]),
160
190
  _: 1
161
191
  }),
162
- (i(!0), _(v, null, j(n(w), (e, r) => (i(), _(v, {
192
+ (i(!0), p(v, null, A(n(C), (e, r) => (i(), p(v, {
163
193
  key: e.uid
164
194
  }, [
165
- n(w).length > 1 ? (i(), x(n(m), {
195
+ n(C).length > 1 ? (i(), b(n(m), {
166
196
  key: 0,
167
197
  class: "group/delete"
168
198
  }, {
169
- default: l(() => [
170
- u(L, { class: "text-c-2 pl-2 text-xs font-medium flex items-center justify-between bg-b-2" }, {
171
- default: l(() => {
199
+ default: a(() => [
200
+ u(G, { class: "text-c-2 pl-2 text-xs font-medium flex items-center justify-between bg-b-2" }, {
201
+ default: a(() => {
172
202
  var t;
173
203
  return [
174
- c(h((t = p.value[r]) == null ? void 0 : t.label) + " ", 1),
175
- b("div", de, [
176
- u(n(N), {
204
+ f(k((t = d.value[r]) == null ? void 0 : t.label) + " ", 1),
205
+ _("div", pe, [
206
+ u(n(W), {
177
207
  class: "px-1 transition-none",
178
208
  size: "sm",
179
209
  variant: "ghost",
180
- onClick: H((d) => W(e), ["stop"])
210
+ onClick: B((s) => Q(e), ["stop"])
181
211
  }, {
182
- default: l(() => [
183
- c(" Delete ")
212
+ default: a(() => [
213
+ f(" Delete ")
184
214
  ]),
185
215
  _: 2
186
216
  }, 1032, ["onClick"])
@@ -192,36 +222,36 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
192
222
  ]),
193
223
  _: 2
194
224
  }, 1024)) : $("", !0),
195
- e.type === "http" ? (i(), _(v, { key: 1 }, [
196
- e.scheme === "bearer" ? (i(), x(n(m), { key: 0 }, {
197
- default: l(() => [
198
- u(y, {
225
+ e.type === "http" ? (i(), p(v, { key: 1 }, [
226
+ e.scheme === "bearer" ? (i(), b(n(m), { key: 0 }, {
227
+ default: a(() => [
228
+ u(x, {
199
229
  id: `http-bearer-token-${e.uid}`,
200
230
  modelValue: e.value,
201
231
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
202
232
  type: "password",
203
- "onUpdate:modelValue": (t) => f(e, "value", t)
233
+ "onUpdate:modelValue": (t) => y(e, "value", t)
204
234
  }, {
205
- default: l(() => [
206
- c(" Bearer Token ")
235
+ default: a(() => [
236
+ f(" Bearer Token ")
207
237
  ]),
208
238
  _: 2
209
239
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
210
240
  ]),
211
241
  _: 2
212
- }, 1024)) : e.scheme === "basic" ? (i(), _(v, { key: 1 }, [
242
+ }, 1024)) : e.scheme === "basic" ? (i(), p(v, { key: 1 }, [
213
243
  u(n(m), null, {
214
- default: l(() => [
215
- u(y, {
244
+ default: a(() => [
245
+ u(x, {
216
246
  id: `http-basic-username-${e.uid}`,
217
247
  class: "text-c-2",
218
248
  modelValue: e.value,
219
249
  placeholder: "ScalarEnjoyer01",
220
250
  required: "",
221
- "onUpdate:modelValue": (t) => f(e, "value", t)
251
+ "onUpdate:modelValue": (t) => y(e, "value", t)
222
252
  }, {
223
- default: l(() => [
224
- c(" Username ")
253
+ default: a(() => [
254
+ f(" Username ")
225
255
  ]),
226
256
  _: 2
227
257
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -229,16 +259,16 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
229
259
  _: 2
230
260
  }, 1024),
231
261
  u(n(m), null, {
232
- default: l(() => [
233
- u(y, {
262
+ default: a(() => [
263
+ u(x, {
234
264
  id: `http-basic-password-${e.uid}`,
235
265
  modelValue: e.secondValue,
236
266
  placeholder: "xxxxxx",
237
267
  type: "password",
238
- "onUpdate:modelValue": (t) => f(e, "secondValue", t)
268
+ "onUpdate:modelValue": (t) => y(e, "secondValue", t)
239
269
  }, {
240
- default: l(() => [
241
- c(" Password ")
270
+ default: a(() => [
271
+ f(" Password ")
242
272
  ]),
243
273
  _: 2
244
274
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -246,33 +276,33 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
246
276
  _: 2
247
277
  }, 1024)
248
278
  ], 64)) : $("", !0)
249
- ], 64)) : e.type === "apiKey" ? (i(), _(v, { key: 2 }, [
250
- n(U) ? (i(), x(n(m), { key: 1 }, {
251
- default: l(() => [
252
- u(y, {
279
+ ], 64)) : e.type === "apiKey" ? (i(), p(v, { key: 2 }, [
280
+ n(g) ? (i(), b(n(m), { key: 1 }, {
281
+ default: a(() => [
282
+ u(x, {
253
283
  id: `api-key-value-${e.uid}`,
254
284
  modelValue: e.value,
255
285
  placeholder: "Value",
256
- "onUpdate:modelValue": (t) => f(e, "value", t)
286
+ "onUpdate:modelValue": (t) => y(e, "value", t)
257
287
  }, {
258
- default: l(() => [
259
- c(h(e.name), 1)
288
+ default: a(() => [
289
+ f(k(e.name), 1)
260
290
  ]),
261
291
  _: 2
262
292
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
263
293
  ]),
264
294
  _: 2
265
- }, 1024)) : (i(), _(v, { key: 0 }, [
295
+ }, 1024)) : (i(), p(v, { key: 0 }, [
266
296
  u(n(m), null, {
267
- default: l(() => [
268
- u(y, {
297
+ default: a(() => [
298
+ u(x, {
269
299
  id: `api-key-name-${e.uid}`,
270
300
  modelValue: e.name,
271
301
  placeholder: "api-key",
272
- "onUpdate:modelValue": (t) => f(e, "name", t)
302
+ "onUpdate:modelValue": (t) => y(e, "name", t)
273
303
  }, {
274
- default: l(() => [
275
- c(" Name ")
304
+ default: a(() => [
305
+ f(" Name ")
276
306
  ]),
277
307
  _: 2
278
308
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -280,15 +310,15 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
280
310
  _: 2
281
311
  }, 1024),
282
312
  u(n(m), null, {
283
- default: l(() => [
284
- u(y, {
313
+ default: a(() => [
314
+ u(x, {
285
315
  id: `api-key-value-add-${e.uid}`,
286
316
  modelValue: e.value,
287
317
  placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
288
- "onUpdate:modelValue": (t) => f(e, "value", t)
318
+ "onUpdate:modelValue": (t) => y(e, "value", t)
289
319
  }, {
290
- default: l(() => [
291
- c(" Value ")
320
+ default: a(() => [
321
+ f(" Value ")
292
322
  ]),
293
323
  _: 2
294
324
  }, 1032, ["id", "modelValue", "onUpdate:modelValue"])
@@ -296,7 +326,7 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
296
326
  _: 2
297
327
  }, 1024)
298
328
  ], 64))
299
- ], 64)) : e.type === "oauth2" ? (i(), x(n(ae), {
329
+ ], 64)) : e.type === "oauth2" ? (i(), b(n(oe), {
300
330
  key: 3,
301
331
  scheme: e
302
332
  }, null, 8, ["scheme"])) : $("", !0)
@@ -311,5 +341,5 @@ const oe = (k) => (z("data-v-0c0af13e"), k = k(), E(), k), ue = { class: "flex g
311
341
  }
312
342
  });
313
343
  export {
314
- ke as default
344
+ Ue as default
315
345
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAmMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAQ5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;AA4c9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAsMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAQ5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;AAqd9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./RequestTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2b656c55"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0c169f89"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as F, openBlock as u, createBlock as r, unref as m, withCtx as d, createElementBlock as y, Fragment as w, renderList as I, createCommentVNode as c, createVNode as i, createSlots as C, createTextVNode as U, toDisplayString as V, createElementVNode as p, computed as x, pushScopeId as E, popScopeId as T } from "vue";
2
- import k from "../../../components/CodeInput/CodeInput.vue.js";
3
- import N from "../../../components/DataTable/DataTable.vue.js";
1
+ import { defineComponent as F, openBlock as u, createBlock as r, unref as m, withCtx as d, createElementBlock as w, Fragment as V, renderList as C, createCommentVNode as c, createVNode as i, normalizeClass as I, createSlots as U, createTextVNode as x, toDisplayString as k, createElementVNode as p, computed as E, pushScopeId as T, popScopeId as N } from "vue";
2
+ import g from "../../../components/CodeInput/CodeInput.vue.js";
3
+ import q from "../../../components/DataTable/DataTable.vue.js";
4
4
  import f from "../../../components/DataTable/DataTableCell.vue.js";
5
- import q from "../../../components/DataTable/DataTableCheckbox.vue.js";
5
+ import z from "../../../components/DataTable/DataTableCheckbox.vue.js";
6
6
  import D from "../../../components/DataTable/DataTableRow.vue.js";
7
- import { ScalarButton as H, ScalarIcon as z } from "@scalar/components";
8
- import A from "./RequestTableTooltip.vue.js";
9
- const M = (s) => (E("data-v-2b656c55"), s = s(), T(), s), O = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, j = ["onClick"], K = /* @__PURE__ */ M(() => /* @__PURE__ */ p("span", null, "File", -1)), Z = /* @__PURE__ */ F({
7
+ import { ScalarButton as H, ScalarIcon as A } from "@scalar/components";
8
+ import M from "./RequestTableTooltip.vue.js";
9
+ const O = (s) => (T("data-v-0c169f89"), s = s(), N(), s), j = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, K = ["onClick"], L = /* @__PURE__ */ O(() => /* @__PURE__ */ p("span", null, "File", -1)), ee = /* @__PURE__ */ F({
10
10
  __name: "RequestTable",
11
11
  props: {
12
12
  items: {},
@@ -14,12 +14,12 @@ const M = (s) => (E("data-v-2b656c55"), s = s(), T(), s), O = { class: "text-c-2
14
14
  showUploadButton: { type: Boolean, default: !1 }
15
15
  },
16
16
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
17
- setup(s, { emit: g }) {
18
- const h = s, t = g, B = h.isEnabledHidden ? ["", ""] : ["", "", "36px"], b = (e, n, l) => {
19
- t("updateRow", e, n, l);
20
- }, _ = (e) => {
21
- t("uploadFile", e);
22
- }, $ = (e) => !!(e.description || e.type || e.default || e.format), v = (e) => x(() => {
17
+ setup(s, { emit: h }) {
18
+ const B = s, a = h, _ = B.isEnabledHidden ? ["", ""] : ["", "", "36px"], b = (e, n, l) => {
19
+ a("updateRow", e, n, l);
20
+ }, $ = (e) => {
21
+ a("uploadFile", e);
22
+ }, v = (e) => !!(e.description || e.type || e.default || e.format), y = (e) => E(() => {
23
23
  if (e.type === "integer" && e.value !== void 0) {
24
24
  const n = Number(e.value);
25
25
  if (e.minimum !== void 0 && n < e.minimum)
@@ -29,39 +29,42 @@ const M = (s) => (E("data-v-2b656c55"), s = s(), T(), s), O = { class: "text-c-2
29
29
  }
30
30
  return !1;
31
31
  }), R = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
32
- return (e, n) => (u(), r(N, {
32
+ return (e, n) => (u(), r(q, {
33
33
  class: "flex-1",
34
- columns: m(B)
34
+ columns: m(_)
35
35
  }, {
36
36
  default: d(() => [
37
- (u(!0), y(w, null, I(e.items, (l, a) => (u(), r(D, { key: a }, {
37
+ (u(!0), w(V, null, C(e.items, (l, t) => (u(), r(D, { key: t }, {
38
38
  default: d(() => [
39
- e.isEnabledHidden ? c("", !0) : (u(), r(q, {
39
+ e.isEnabledHidden ? c("", !0) : (u(), r(z, {
40
40
  key: 0,
41
41
  modelValue: l.enabled,
42
- "onUpdate:modelValue": (o) => t("toggleRow", a, o)
42
+ "onUpdate:modelValue": (o) => a("toggleRow", t, o)
43
43
  }, null, 8, ["modelValue", "onUpdate:modelValue"])),
44
44
  i(f, null, {
45
45
  default: d(() => [
46
- i(k, {
46
+ i(g, {
47
47
  disableCloseBrackets: "",
48
48
  disableEnter: "",
49
49
  disableTabIndent: "",
50
50
  modelValue: l.key,
51
51
  placeholder: "Key",
52
52
  required: l.required,
53
- onBlur: n[0] || (n[0] = (o) => t("inputBlur")),
54
- onFocus: n[1] || (n[1] = (o) => t("inputFocus")),
55
- onInput: (o) => e.items && a === e.items.length - 1 && t("addRow"),
56
- onSelectVariable: (o) => b(a, "key", o),
57
- "onUpdate:modelValue": (o) => t("updateRow", a, "key", o)
53
+ onBlur: n[0] || (n[0] = (o) => a("inputBlur")),
54
+ onFocus: n[1] || (n[1] = (o) => a("inputFocus")),
55
+ onInput: (o) => e.items && t === e.items.length - 1 && a("addRow"),
56
+ onSelectVariable: (o) => b(t, "key", o),
57
+ "onUpdate:modelValue": (o) => a("updateRow", t, "key", o)
58
58
  }, null, 8, ["modelValue", "required", "onInput", "onSelectVariable", "onUpdate:modelValue"])
59
59
  ]),
60
60
  _: 2
61
61
  }, 1024),
62
62
  i(f, null, {
63
63
  default: d(() => [
64
- i(k, {
64
+ i(g, {
65
+ class: I({
66
+ "pr-6": v(l)
67
+ }),
65
68
  disableCloseBrackets: "",
66
69
  disableEnter: "",
67
70
  disableTabIndent: "",
@@ -72,28 +75,28 @@ const M = (s) => (E("data-v-2b656c55"), s = s(), T(), s), O = { class: "text-c-2
72
75
  nullable: l.nullable,
73
76
  placeholder: "Value",
74
77
  type: l.type,
75
- onBlur: n[2] || (n[2] = (o) => t("inputBlur")),
76
- onFocus: n[3] || (n[3] = (o) => t("inputFocus")),
77
- onInput: (o) => e.items && a === e.items.length - 1 && t("addRow"),
78
- onSelectVariable: (o) => b(a, "value", o),
79
- "onUpdate:modelValue": (o) => t("updateRow", a, "value", o)
80
- }, C({
78
+ onBlur: n[2] || (n[2] = (o) => a("inputBlur")),
79
+ onFocus: n[3] || (n[3] = (o) => a("inputFocus")),
80
+ onInput: (o) => e.items && t === e.items.length - 1 && a("addRow"),
81
+ onSelectVariable: (o) => b(t, "value", o),
82
+ "onUpdate:modelValue": (o) => a("updateRow", t, "value", o)
83
+ }, U({
81
84
  icon: d(() => [
82
- $(l) ? (u(), r(A, {
85
+ v(l) ? (u(), r(M, {
83
86
  key: 0,
84
87
  item: { ...l, default: R(l) }
85
88
  }, null, 8, ["item"])) : c("", !0)
86
89
  ]),
87
90
  _: 2
88
91
  }, [
89
- v(l).value ? {
92
+ y(l).value ? {
90
93
  name: "warning",
91
94
  fn: d(() => [
92
- U(V(v(l).value), 1)
95
+ x(k(y(l).value), 1)
93
96
  ]),
94
97
  key: "0"
95
98
  } : void 0
96
- ]), 1032, ["enum", "max", "min", "modelValue", "nullable", "type", "onInput", "onSelectVariable", "onUpdate:modelValue"])
99
+ ]), 1032, ["class", "enum", "max", "min", "modelValue", "nullable", "type", "onInput", "onSelectVariable", "onUpdate:modelValue"])
97
100
  ]),
98
101
  _: 2
99
102
  }, 1024),
@@ -104,25 +107,25 @@ const M = (s) => (E("data-v-2b656c55"), s = s(), T(), s), O = { class: "text-c-2
104
107
  default: d(() => {
105
108
  var o;
106
109
  return [
107
- l.file ? (u(), y(w, { key: 0 }, [
108
- p("div", O, [
109
- p("span", null, V((o = l.file) == null ? void 0 : o.name), 1)
110
+ l.file ? (u(), w(V, { key: 0 }, [
111
+ p("div", j, [
112
+ p("span", null, k((o = l.file) == null ? void 0 : o.name), 1)
110
113
  ]),
111
114
  p("button", {
112
115
  class: "absolute bg-b-2 font-medium centered-x centered-y hidden rounded text-center p-0.5 w-[calc(100%_-_8px)] group-hover/upload:block text-xs",
113
116
  type: "button",
114
- onClick: (S) => t("removeFile", a)
115
- }, " Delete ", 8, j)
117
+ onClick: (S) => a("removeFile", t)
118
+ }, " Delete ", 8, K)
116
119
  ], 64)) : (u(), r(m(H), {
117
120
  key: 1,
118
121
  class: "bg-b-2 hover:bg-b-3 border-0 py-px text-c-2 shadow-none",
119
122
  size: "sm",
120
123
  variant: "outlined",
121
- onClick: (S) => _(a)
124
+ onClick: (S) => $(t)
122
125
  }, {
123
126
  default: d(() => [
124
- K,
125
- i(m(z), {
127
+ L,
128
+ i(m(A), {
126
129
  class: "ml-1",
127
130
  icon: "UploadSimple",
128
131
  size: "xs",
@@ -144,5 +147,5 @@ const M = (s) => (E("data-v-2b656c55"), s = s(), T(), s), O = { class: "text-c-2
144
147
  }
145
148
  });
146
149
  export {
147
- Z as default
150
+ ee as default
148
151
  };