@scalar/api-client 2.2.1 → 2.2.2
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.
- package/CHANGELOG.md +16 -0
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +33 -34
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +30 -30
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +42 -44
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +23 -23
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestBody.vue"],"names":[],"mappings":"AAyhBA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAuzBF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestBody.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-68fbfb14"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
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
|
|
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
2
|
import I from "../../../components/CodeInput/CodeInput.vue.js";
|
|
3
3
|
import ee from "../../../components/DataTable/DataTable.vue.js";
|
|
4
4
|
import ae from "../../../components/DataTable/DataTableHeader.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import R from "../../../components/DataTable/DataTableRow.vue.js";
|
|
6
6
|
import te from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
7
|
import { useActiveEntities as oe } from "../../../store/active-entities.js";
|
|
8
|
-
import { ScalarListbox as ne, ScalarButton as
|
|
8
|
+
import { ScalarListbox as ne, ScalarButton as k, ScalarIcon as L } from "@scalar/components";
|
|
9
9
|
import { requestExampleParametersSchema as M } from "@scalar/oas-utils/entities/spec";
|
|
10
10
|
import { canMethodHaveBody as le } from "@scalar/oas-utils/helpers";
|
|
11
|
-
import
|
|
11
|
+
import W from "./RequestTable.vue.js";
|
|
12
12
|
import { useWorkspace as re } from "../../../store/store.js";
|
|
13
|
-
import { useFileDialog as
|
|
13
|
+
import { useFileDialog as z } from "../../../hooks/useFileDialog.js";
|
|
14
14
|
const ie = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "text-c-3 flex min-h-10 w-full items-center justify-center p-2 text-sm"
|
|
@@ -23,7 +23,7 @@ const ie = {
|
|
|
23
23
|
title: {}
|
|
24
24
|
},
|
|
25
25
|
setup(se) {
|
|
26
|
-
const { activeRequest: d, activeExample: a } = oe(), { requestExampleMutators: r } = re(),
|
|
26
|
+
const { activeRequest: d, activeExample: a } = oe(), { requestExampleMutators: r } = re(), A = {
|
|
27
27
|
json: "json",
|
|
28
28
|
xml: "xml",
|
|
29
29
|
yaml: "yaml",
|
|
@@ -54,12 +54,12 @@ const ie = {
|
|
|
54
54
|
}
|
|
55
55
|
}), g = K(null), O = w(() => {
|
|
56
56
|
const e = m.value.id;
|
|
57
|
-
return
|
|
57
|
+
return A[e] ?? "plaintext";
|
|
58
58
|
});
|
|
59
|
-
function
|
|
59
|
+
function _() {
|
|
60
60
|
console.log("deleteRow");
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const U = (e, t, o) => {
|
|
63
63
|
if (!d.value || !a.value) return;
|
|
64
64
|
const l = v.value;
|
|
65
65
|
if (l.length > e) {
|
|
@@ -81,12 +81,13 @@ const ie = {
|
|
|
81
81
|
(y = g.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || y.focus();
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
+
e === l.length - 1 && E();
|
|
84
85
|
}, v = w(
|
|
85
86
|
() => {
|
|
86
87
|
var e, t, o;
|
|
87
88
|
return ((o = (t = (e = a.value) == null ? void 0 : e.body) == null ? void 0 : t.formData) == null ? void 0 : o.value) ?? [];
|
|
88
89
|
}
|
|
89
|
-
),
|
|
90
|
+
), T = () => v.value.length === 0 && E(), E = () => {
|
|
90
91
|
if (!d.value || !a.value) return;
|
|
91
92
|
const e = M.parse({
|
|
92
93
|
enabled: !1
|
|
@@ -179,7 +180,7 @@ const ie = {
|
|
|
179
180
|
n
|
|
180
181
|
);
|
|
181
182
|
}, j = async (e) => {
|
|
182
|
-
const { open: t } =
|
|
183
|
+
const { open: t } = z({
|
|
183
184
|
onChange: async (o) => {
|
|
184
185
|
const l = o == null ? void 0 : o[0];
|
|
185
186
|
if (l && d.value && a.value) {
|
|
@@ -215,7 +216,7 @@ const ie = {
|
|
|
215
216
|
);
|
|
216
217
|
}
|
|
217
218
|
function X() {
|
|
218
|
-
const { open: e } =
|
|
219
|
+
const { open: e } = z({
|
|
219
220
|
onChange: async (t) => {
|
|
220
221
|
const o = t == null ? void 0 : t[0];
|
|
221
222
|
o && d.value && a.value && r.edit(
|
|
@@ -232,7 +233,7 @@ const ie = {
|
|
|
232
233
|
return S(
|
|
233
234
|
m,
|
|
234
235
|
(e) => {
|
|
235
|
-
["multipartForm", "formUrlEncoded"].includes(e == null ? void 0 : e.id) &&
|
|
236
|
+
["multipartForm", "formUrlEncoded"].includes(e == null ? void 0 : e.id) && T();
|
|
236
237
|
},
|
|
237
238
|
{ immediate: !0 }
|
|
238
239
|
), S(
|
|
@@ -244,17 +245,17 @@ const ie = {
|
|
|
244
245
|
var e;
|
|
245
246
|
(e = d.value) != null && e.method && le(d.value.method) && C(B.value), ["multipartForm", "formUrlEncoded"].includes(
|
|
246
247
|
B.value
|
|
247
|
-
) &&
|
|
248
|
+
) && T();
|
|
248
249
|
},
|
|
249
250
|
{ immediate: !0 }
|
|
250
251
|
), (e, t) => (f(), b(te, null, {
|
|
251
252
|
title: u(() => [
|
|
252
|
-
q(
|
|
253
|
+
q(D(e.title), 1)
|
|
253
254
|
]),
|
|
254
255
|
default: u(() => [
|
|
255
256
|
s(ee, { columns: [""] }, {
|
|
256
257
|
default: u(() => [
|
|
257
|
-
s(
|
|
258
|
+
s(R, null, {
|
|
258
259
|
default: u(() => [
|
|
259
260
|
s(ae, { class: "relative col-span-full flex h-8 cursor-pointer items-center !p-0" }, {
|
|
260
261
|
default: u(() => [
|
|
@@ -266,7 +267,7 @@ const ie = {
|
|
|
266
267
|
teleport: ""
|
|
267
268
|
}, {
|
|
268
269
|
default: u(() => [
|
|
269
|
-
s(c(
|
|
270
|
+
s(c(k), {
|
|
270
271
|
class: "flex gap-1.5 h-full px-2 text-c-2 font-normal hover:text-c-1",
|
|
271
272
|
fullWidth: "",
|
|
272
273
|
variant: "ghost"
|
|
@@ -274,7 +275,7 @@ const ie = {
|
|
|
274
275
|
default: u(() => {
|
|
275
276
|
var o;
|
|
276
277
|
return [
|
|
277
|
-
x("span", null,
|
|
278
|
+
x("span", null, D((o = m.value) == null ? void 0 : o.label), 1),
|
|
278
279
|
s(c(L), {
|
|
279
280
|
icon: "ChevronDown",
|
|
280
281
|
size: "xs",
|
|
@@ -293,16 +294,16 @@ const ie = {
|
|
|
293
294
|
]),
|
|
294
295
|
_: 1
|
|
295
296
|
}),
|
|
296
|
-
s(
|
|
297
|
+
s(R, null, {
|
|
297
298
|
default: u(() => {
|
|
298
299
|
var o, l, n, i, p;
|
|
299
300
|
return [
|
|
300
|
-
m.value.id === "none" ? (f(),
|
|
301
|
+
m.value.id === "none" ? (f(), F("div", ie, t[1] || (t[1] = [
|
|
301
302
|
x("span", null, "No Body", -1)
|
|
302
|
-
]))) : m.value.id === "binaryFile" ? (f(),
|
|
303
|
-
(o = c(a)) != null && o.body.binary ? (f(),
|
|
304
|
-
x("span", ue,
|
|
305
|
-
s(c(
|
|
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), {
|
|
306
307
|
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
|
|
307
308
|
size: "sm",
|
|
308
309
|
variant: "outlined",
|
|
@@ -313,7 +314,7 @@ const ie = {
|
|
|
313
314
|
])),
|
|
314
315
|
_: 1
|
|
315
316
|
})
|
|
316
|
-
], 64)) : (f(), b(c(
|
|
317
|
+
], 64)) : (f(), b(c(k), {
|
|
317
318
|
key: 1,
|
|
318
319
|
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 shadow-none",
|
|
319
320
|
size: "sm",
|
|
@@ -331,7 +332,7 @@ const ie = {
|
|
|
331
332
|
]),
|
|
332
333
|
_: 1
|
|
333
334
|
}))
|
|
334
|
-
])) : m.value.id == "multipartForm" ? (f(), b(
|
|
335
|
+
])) : m.value.id == "multipartForm" ? (f(), b(W, {
|
|
335
336
|
key: 2,
|
|
336
337
|
ref_key: "tableWrapperRef",
|
|
337
338
|
ref: g,
|
|
@@ -339,13 +340,12 @@ const ie = {
|
|
|
339
340
|
columns: ["32px", "", "", "61px"],
|
|
340
341
|
items: v.value,
|
|
341
342
|
showUploadButton: "",
|
|
342
|
-
|
|
343
|
-
onDeleteRow: U,
|
|
343
|
+
onDeleteRow: _,
|
|
344
344
|
onRemoveFile: V,
|
|
345
345
|
onToggleRow: P,
|
|
346
|
-
onUpdateRow:
|
|
346
|
+
onUpdateRow: U,
|
|
347
347
|
onUploadFile: j
|
|
348
|
-
}, null, 8, ["items"])) : m.value.id == "formUrlEncoded" ? (f(), b(
|
|
348
|
+
}, null, 8, ["items"])) : m.value.id == "formUrlEncoded" ? (f(), b(W, {
|
|
349
349
|
key: 3,
|
|
350
350
|
ref_key: "tableWrapperRef",
|
|
351
351
|
ref: g,
|
|
@@ -353,11 +353,10 @@ const ie = {
|
|
|
353
353
|
columns: ["32px", "", "", "61px"],
|
|
354
354
|
items: v.value,
|
|
355
355
|
showUploadButton: "",
|
|
356
|
-
|
|
357
|
-
onDeleteRow: U,
|
|
356
|
+
onDeleteRow: _,
|
|
358
357
|
onRemoveFile: V,
|
|
359
358
|
onToggleRow: P,
|
|
360
|
-
onUpdateRow:
|
|
359
|
+
onUpdateRow: U,
|
|
361
360
|
onUploadFile: j
|
|
362
361
|
}, null, 8, ["items"])) : (f(), b(I, {
|
|
363
362
|
key: 4,
|
|
@@ -372,7 +371,7 @@ const ie = {
|
|
|
372
371
|
}),
|
|
373
372
|
_: 1
|
|
374
373
|
}),
|
|
375
|
-
s(
|
|
374
|
+
s(R)
|
|
376
375
|
]),
|
|
377
376
|
_: 1
|
|
378
377
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AA+LA,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;;AAmSF,wBAOG"}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, computed as y, onMounted as w, ref as x, watch as E, openBlock as A, createBlock as S, withCtx as i, createTextVNode as h, toDisplayString as g, createElementVNode as c, createVNode as R, unref as T, withModifiers as B, nextTick as k } from "vue";
|
|
2
2
|
import M from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
3
|
import { useActiveEntities as N } from "../../../store/active-entities.js";
|
|
4
4
|
import V from "./RequestTable.vue.js";
|
|
5
5
|
import { ScalarButton as W } from "@scalar/components";
|
|
6
6
|
import { requestExampleParametersSchema as _ } from "@scalar/oas-utils/entities/spec";
|
|
7
7
|
import { useWorkspace as z } from "../../../store/store.js";
|
|
8
|
-
const D = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, U = { class: "sr-only" }, Y = /* @__PURE__ */
|
|
8
|
+
const D = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, U = { class: "sr-only" }, Y = /* @__PURE__ */ $({
|
|
9
9
|
__name: "RequestParams",
|
|
10
10
|
props: {
|
|
11
11
|
title: {},
|
|
12
12
|
paramKey: {}
|
|
13
13
|
},
|
|
14
14
|
setup(b) {
|
|
15
|
-
const r = b, { activeRequest:
|
|
15
|
+
const r = b, { activeRequest: o, activeExample: a } = N(), { requestExampleMutators: n } = z(), l = y(
|
|
16
16
|
() => {
|
|
17
17
|
var e;
|
|
18
18
|
return ((e = a.value) == null ? void 0 : e.parameters[r.paramKey]) ?? [];
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
w(() => {
|
|
22
|
+
f();
|
|
23
23
|
});
|
|
24
24
|
const u = () => {
|
|
25
|
-
if (!
|
|
25
|
+
if (!o.value || !a.value) return;
|
|
26
26
|
const e = _.parse({ enabled: !1 }), t = [...l.value, e];
|
|
27
|
-
|
|
27
|
+
n.edit(
|
|
28
28
|
a.value.uid,
|
|
29
29
|
`parameters.${r.paramKey}`,
|
|
30
30
|
t
|
|
31
31
|
);
|
|
32
|
-
}, p = x(null), q = (e, t,
|
|
33
|
-
if (!
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
const s = [...
|
|
37
|
-
s[e] = { ...s[e], [t]:
|
|
32
|
+
}, p = x(null), q = (e, t, v) => {
|
|
33
|
+
if (!o.value || !a.value) return;
|
|
34
|
+
const m = l.value;
|
|
35
|
+
if (m.length > e) {
|
|
36
|
+
const s = [...m];
|
|
37
|
+
s[e] = { ...s[e], [t]: v }, (s[e].key !== "" || s[e].value !== "") && (s[e].enabled = !0), s[e].key === "" && s[e].value === "" && s.splice(e, 1), n.edit(
|
|
38
38
|
a.value.uid,
|
|
39
39
|
`parameters.${r.paramKey}`,
|
|
40
40
|
s
|
|
41
41
|
);
|
|
42
42
|
} else {
|
|
43
|
-
const s = [_.parse({ [t]:
|
|
44
|
-
|
|
43
|
+
const s = [_.parse({ [t]: v })];
|
|
44
|
+
n.edit(
|
|
45
45
|
a.value.uid,
|
|
46
46
|
`parameters.${r.paramKey}`,
|
|
47
47
|
s
|
|
@@ -51,16 +51,17 @@ const D = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
51
51
|
(d = p.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || d.focus();
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
e === m.length - 1 && u();
|
|
55
|
+
}, P = (e, t) => o.value && a.value && n.edit(
|
|
55
56
|
a.value.uid,
|
|
56
57
|
`parameters.${r.paramKey}.${e}.enabled`,
|
|
57
58
|
t
|
|
58
|
-
),
|
|
59
|
-
if (!
|
|
59
|
+
), C = () => {
|
|
60
|
+
if (!o.value || !a.value) return;
|
|
60
61
|
const e = l.value.filter(
|
|
61
62
|
(t) => t.enabled || t.required
|
|
62
63
|
);
|
|
63
|
-
|
|
64
|
+
n.edit(
|
|
64
65
|
a.value.uid,
|
|
65
66
|
`parameters.${r.paramKey}`,
|
|
66
67
|
e
|
|
@@ -68,7 +69,7 @@ const D = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
68
69
|
u();
|
|
69
70
|
});
|
|
70
71
|
};
|
|
71
|
-
function
|
|
72
|
+
function f() {
|
|
72
73
|
if (l.value.length === 0)
|
|
73
74
|
u();
|
|
74
75
|
else if (l.value.length >= 1) {
|
|
@@ -76,40 +77,40 @@ const D = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
76
77
|
e.key !== "" && e.value !== "" && u();
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
|
-
const
|
|
80
|
+
const K = y(
|
|
80
81
|
() => l.value.filter((e) => e.key || e.value).length
|
|
81
82
|
);
|
|
82
|
-
return
|
|
83
|
+
return E(
|
|
83
84
|
() => a.value,
|
|
84
85
|
(e, t) => {
|
|
85
|
-
e !== t &&
|
|
86
|
+
e !== t && f();
|
|
86
87
|
},
|
|
87
88
|
{ immediate: !0 }
|
|
88
|
-
), (e, t) => (
|
|
89
|
+
), (e, t) => (A(), S(M, {
|
|
89
90
|
class: "group/params",
|
|
90
|
-
itemCount:
|
|
91
|
+
itemCount: K.value
|
|
91
92
|
}, {
|
|
92
93
|
title: i(() => [
|
|
93
94
|
h(g(e.title), 1)
|
|
94
95
|
]),
|
|
95
96
|
actions: i(() => [
|
|
96
|
-
|
|
97
|
+
c("div", D, [
|
|
97
98
|
R(T(W), {
|
|
98
99
|
class: "px-1 transition-none",
|
|
99
100
|
size: "sm",
|
|
100
101
|
variant: "ghost",
|
|
101
|
-
onClick: B(
|
|
102
|
+
onClick: B(C, ["stop"])
|
|
102
103
|
}, {
|
|
103
104
|
default: i(() => [
|
|
104
105
|
t[0] || (t[0] = h(" Clear")),
|
|
105
|
-
|
|
106
|
+
c("span", U, "All " + g(e.title), 1)
|
|
106
107
|
]),
|
|
107
108
|
_: 1
|
|
108
109
|
})
|
|
109
110
|
])
|
|
110
111
|
]),
|
|
111
112
|
default: i(() => [
|
|
112
|
-
|
|
113
|
+
c("div", {
|
|
113
114
|
ref_key: "tableWrapperRef",
|
|
114
115
|
ref: p
|
|
115
116
|
}, [
|
|
@@ -117,7 +118,6 @@ const D = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
117
118
|
class: "flex-1",
|
|
118
119
|
columns: ["32px", "", ""],
|
|
119
120
|
items: l.value,
|
|
120
|
-
onAddRow: u,
|
|
121
121
|
onToggleRow: P,
|
|
122
122
|
onUpdateRow: q
|
|
123
123
|
}, null, 8, ["items"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAiNA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AAO9E,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACjC,8BAA8B;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;;;;;;;;;;;;;;;qBAFkB,OAAO;sBACN,OAAO;;AA8a9B,wBASG"}
|
|
@@ -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-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-79278ac7"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as C, openBlock as u, createBlock as s, unref as p, withCtx as r, createElementBlock as y, Fragment as V, renderList as S, createElementVNode as d, createCommentVNode as m, createVNode as i, normalizeClass as U, createSlots as h, createTextVNode as E, toDisplayString as k, computed as T } from "vue";
|
|
2
|
+
import w from "../../../components/CodeInput/CodeInput.vue.js";
|
|
3
|
+
import N from "../../../components/DataTable/DataTable.vue.js";
|
|
4
|
+
import c from "../../../components/DataTable/DataTableCell.vue.js";
|
|
5
|
+
import q from "../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
6
|
+
import I from "../../../components/DataTable/DataTableRow.vue.js";
|
|
7
7
|
import { ScalarButton as z, ScalarIcon as D } from "@scalar/components";
|
|
8
8
|
import H from "./RequestTableTooltip.vue.js";
|
|
9
|
-
const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, O = ["onClick"], X = /* @__PURE__ */
|
|
9
|
+
const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, O = ["onClick"], X = /* @__PURE__ */ C({
|
|
10
10
|
__name: "RequestTable",
|
|
11
11
|
props: {
|
|
12
12
|
items: {},
|
|
@@ -14,12 +14,12 @@ const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hi
|
|
|
14
14
|
showUploadButton: { type: Boolean, default: !1 }
|
|
15
15
|
},
|
|
16
16
|
emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
|
|
17
|
-
setup(g, { emit:
|
|
18
|
-
const
|
|
17
|
+
setup(g, { emit: x }) {
|
|
18
|
+
const B = g, a = x, _ = B.isEnabledHidden ? ["", ""] : ["", "", "36px"], f = (e, o, l) => {
|
|
19
19
|
a("updateRow", e, o, l);
|
|
20
20
|
}, F = (e) => {
|
|
21
21
|
a("uploadFile", e);
|
|
22
|
-
}, b = (e) => !!(e.description || e.type || e.default || e.format), v = (e) =>
|
|
22
|
+
}, b = (e) => !!(e.description || e.type || e.default || e.format), v = (e) => T(() => {
|
|
23
23
|
if (e.type === "integer" && e.value !== void 0) {
|
|
24
24
|
const o = Number(e.value);
|
|
25
25
|
if (e.minimum !== void 0 && o < e.minimum)
|
|
@@ -28,26 +28,26 @@ const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hi
|
|
|
28
28
|
return `Max is ${e.maximum}`;
|
|
29
29
|
}
|
|
30
30
|
return !1;
|
|
31
|
-
}),
|
|
32
|
-
return (e, o) => (u(),
|
|
31
|
+
}), R = (e) => Array.isArray(e.default) && e.default.length === 1 ? e.default[0] : e.default;
|
|
32
|
+
return (e, o) => (u(), s(N, {
|
|
33
33
|
class: "flex-1",
|
|
34
|
-
columns: p(
|
|
34
|
+
columns: p(_)
|
|
35
35
|
}, {
|
|
36
|
-
default:
|
|
37
|
-
(u(!0), y(
|
|
38
|
-
default:
|
|
36
|
+
default: r(() => [
|
|
37
|
+
(u(!0), y(V, null, S(e.items, (l, t) => (u(), s(I, { key: t }, {
|
|
38
|
+
default: r(() => [
|
|
39
39
|
d("label", A, [
|
|
40
40
|
o[4] || (o[4] = d("span", { class: "sr-only" }, "Row Enabled", -1)),
|
|
41
|
-
e.isEnabledHidden ? m("", !0) : (u(),
|
|
41
|
+
e.isEnabledHidden ? m("", !0) : (u(), s(q, {
|
|
42
42
|
key: 0,
|
|
43
43
|
class: "!border-r-1/2",
|
|
44
44
|
modelValue: l.enabled,
|
|
45
45
|
"onUpdate:modelValue": (n) => a("toggleRow", t, n)
|
|
46
46
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))
|
|
47
47
|
]),
|
|
48
|
-
i(
|
|
49
|
-
default:
|
|
50
|
-
i(
|
|
48
|
+
i(c, null, {
|
|
49
|
+
default: r(() => [
|
|
50
|
+
i(w, {
|
|
51
51
|
disableCloseBrackets: "",
|
|
52
52
|
disableEnter: "",
|
|
53
53
|
disableTabIndent: "",
|
|
@@ -56,17 +56,16 @@ const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hi
|
|
|
56
56
|
required: l.required,
|
|
57
57
|
onBlur: o[0] || (o[0] = (n) => a("inputBlur")),
|
|
58
58
|
onFocus: o[1] || (o[1] = (n) => a("inputFocus")),
|
|
59
|
-
|
|
60
|
-
onSelectVariable: (n) => c(t, "key", n),
|
|
59
|
+
onSelectVariable: (n) => f(t, "key", n),
|
|
61
60
|
"onUpdate:modelValue": (n) => a("updateRow", t, "key", n)
|
|
62
|
-
}, null, 8, ["modelValue", "required", "
|
|
61
|
+
}, null, 8, ["modelValue", "required", "onSelectVariable", "onUpdate:modelValue"])
|
|
63
62
|
]),
|
|
64
63
|
_: 2
|
|
65
64
|
}, 1024),
|
|
66
|
-
i(
|
|
67
|
-
default:
|
|
68
|
-
i(
|
|
69
|
-
class:
|
|
65
|
+
i(c, null, {
|
|
66
|
+
default: r(() => [
|
|
67
|
+
i(w, {
|
|
68
|
+
class: U({
|
|
70
69
|
"pr-6": b(l)
|
|
71
70
|
}),
|
|
72
71
|
default: l.default,
|
|
@@ -82,53 +81,52 @@ const A = { class: "contents" }, M = { class: "text-c-2 max-w-[100%] overflow-hi
|
|
|
82
81
|
type: l.type,
|
|
83
82
|
onBlur: o[2] || (o[2] = (n) => a("inputBlur")),
|
|
84
83
|
onFocus: o[3] || (o[3] = (n) => a("inputFocus")),
|
|
85
|
-
|
|
86
|
-
onSelectVariable: (n) => c(t, "value", n),
|
|
84
|
+
onSelectVariable: (n) => f(t, "value", n),
|
|
87
85
|
"onUpdate:modelValue": (n) => a("updateRow", t, "value", n)
|
|
88
|
-
},
|
|
89
|
-
icon:
|
|
90
|
-
b(l) ? (u(),
|
|
86
|
+
}, h({
|
|
87
|
+
icon: r(() => [
|
|
88
|
+
b(l) ? (u(), s(H, {
|
|
91
89
|
key: 0,
|
|
92
|
-
item: { ...l, default:
|
|
90
|
+
item: { ...l, default: R(l) }
|
|
93
91
|
}, null, 8, ["item"])) : m("", !0)
|
|
94
92
|
]),
|
|
95
93
|
_: 2
|
|
96
94
|
}, [
|
|
97
95
|
v(l).value ? {
|
|
98
96
|
name: "warning",
|
|
99
|
-
fn:
|
|
100
|
-
E(
|
|
97
|
+
fn: r(() => [
|
|
98
|
+
E(k(v(l).value), 1)
|
|
101
99
|
]),
|
|
102
100
|
key: "0"
|
|
103
101
|
} : void 0
|
|
104
|
-
]), 1032, ["class", "default", "enum", "max", "min", "modelValue", "nullable", "type", "
|
|
102
|
+
]), 1032, ["class", "default", "enum", "max", "min", "modelValue", "nullable", "type", "onSelectVariable", "onUpdate:modelValue"])
|
|
105
103
|
]),
|
|
106
104
|
_: 2
|
|
107
105
|
}, 1024),
|
|
108
|
-
e.showUploadButton ? (u(),
|
|
106
|
+
e.showUploadButton ? (u(), s(c, {
|
|
109
107
|
key: 0,
|
|
110
108
|
class: "group/upload p-1 overflow-hidden relative text-ellipsis whitespace-nowrap"
|
|
111
109
|
}, {
|
|
112
|
-
default:
|
|
110
|
+
default: r(() => {
|
|
113
111
|
var n;
|
|
114
112
|
return [
|
|
115
|
-
l.file ? (u(), y(
|
|
113
|
+
l.file ? (u(), y(V, { key: 0 }, [
|
|
116
114
|
d("div", M, [
|
|
117
|
-
d("span", null,
|
|
115
|
+
d("span", null, k((n = l.file) == null ? void 0 : n.name), 1)
|
|
118
116
|
]),
|
|
119
117
|
d("button", {
|
|
120
118
|
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",
|
|
121
119
|
type: "button",
|
|
122
|
-
onClick: (
|
|
120
|
+
onClick: ($) => a("removeFile", t)
|
|
123
121
|
}, " Delete ", 8, O)
|
|
124
|
-
], 64)) : (u(),
|
|
122
|
+
], 64)) : (u(), s(p(z), {
|
|
125
123
|
key: 1,
|
|
126
124
|
class: "bg-b-2 hover:bg-b-3 border-0 py-px text-c-2 shadow-none",
|
|
127
125
|
size: "sm",
|
|
128
126
|
variant: "outlined",
|
|
129
|
-
onClick: (
|
|
127
|
+
onClick: ($) => F(t)
|
|
130
128
|
}, {
|
|
131
|
-
default:
|
|
129
|
+
default: r(() => [
|
|
132
130
|
o[5] || (o[5] = d("span", null, "File", -1)),
|
|
133
131
|
i(p(D), {
|
|
134
132
|
class: "ml-1",
|
|
@@ -17,7 +17,7 @@ const B = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, E = {
|
|
|
17
17
|
a.commandPalette.emit({ commandName: "Create Request" });
|
|
18
18
|
}, y = (i) => {
|
|
19
19
|
i != null && i.createNew && v.name === "request" && f();
|
|
20
|
-
}, h = "2.2.
|
|
20
|
+
}, h = "2.2.2";
|
|
21
21
|
return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (n(), l("div", B, [
|
|
22
22
|
o("div", {
|
|
23
23
|
class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA6MA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AASvE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AA6MA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AASvE,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAA;CACvC,CAAC;;AA4RF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseSection.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-
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4c842dc1"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|