@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.
- package/CHANGELOG.md +24 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +43 -46
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +3 -2
- package/dist/components/SubpageHeader.vue.d.ts.map +1 -1
- package/dist/components/SubpageHeader.vue.js +2 -2
- package/dist/components/SubpageHeader.vue2.js +10 -9
- package/dist/layouts/App/create-api-client-app.d.ts +36 -36
- package/dist/layouts/Modal/create-api-client-modal.d.ts +72 -72
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +26 -18
- package/dist/libs/create-client.d.ts +39 -37
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/normalizeHeaders.d.ts +12 -0
- package/dist/libs/normalizeHeaders.d.ts.map +1 -0
- package/dist/libs/normalizeHeaders.js +25 -0
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +22 -20
- package/dist/store/workspace.d.ts +121 -120
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +274 -274
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth.vue2.js +147 -117
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +47 -44
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +30 -28
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts +7 -10
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +23 -24
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
- package/dist/views/Request/consts/mediaTypes.js +5 -0
- package/package.json +6 -6
|
@@ -1,81 +1,87 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useWorkspace as
|
|
5
|
-
import
|
|
6
|
-
import { ScalarComboboxMultiselect as
|
|
7
|
-
import { camelToTitleWords as
|
|
8
|
-
import { ADD_AUTH_OPTIONS as
|
|
9
|
-
import
|
|
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
|
|
12
|
-
import
|
|
13
|
-
const
|
|
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(
|
|
24
|
+
setup(h) {
|
|
19
25
|
const {
|
|
20
26
|
activeCollection: S,
|
|
21
27
|
activeRequest: V,
|
|
22
|
-
activeSecurityRequirements:
|
|
23
|
-
activeSecuritySchemes:
|
|
24
|
-
isReadOnly:
|
|
25
|
-
requestMutators:
|
|
26
|
-
securitySchemeMutators:
|
|
28
|
+
activeSecurityRequirements: q,
|
|
29
|
+
activeSecuritySchemes: C,
|
|
30
|
+
isReadOnly: g,
|
|
31
|
+
requestMutators: O,
|
|
32
|
+
securitySchemeMutators: U,
|
|
27
33
|
securitySchemes: T
|
|
28
|
-
} =
|
|
29
|
-
switch (
|
|
34
|
+
} = X(), D = E(null), R = (l) => {
|
|
35
|
+
switch (l == null ? void 0 : l.type) {
|
|
30
36
|
case "apiKey":
|
|
31
|
-
return `${
|
|
37
|
+
return `${F(l.in)}`;
|
|
32
38
|
case "http":
|
|
33
|
-
return `${
|
|
39
|
+
return `${F(l.scheme)} Authentication`;
|
|
34
40
|
case "oauth2":
|
|
35
|
-
return
|
|
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
|
-
},
|
|
47
|
+
}, M = I(
|
|
42
48
|
() => {
|
|
43
49
|
var e;
|
|
44
|
-
const
|
|
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 &&
|
|
47
|
-
if (!
|
|
48
|
-
const
|
|
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:
|
|
51
|
-
label: `${
|
|
52
|
-
labelWithoutId:
|
|
56
|
+
id: c,
|
|
57
|
+
label: `${N} (${s})`,
|
|
58
|
+
labelWithoutId: N
|
|
53
59
|
};
|
|
54
60
|
});
|
|
55
61
|
});
|
|
56
|
-
if (
|
|
62
|
+
if (g.value)
|
|
57
63
|
return o;
|
|
58
64
|
{
|
|
59
65
|
const r = V.value.securitySchemeUids.map((t) => {
|
|
60
|
-
const
|
|
66
|
+
const s = T[t], c = R(s);
|
|
61
67
|
return {
|
|
62
68
|
id: t,
|
|
63
|
-
label: "name" in
|
|
64
|
-
labelWithoutId:
|
|
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:
|
|
77
|
+
options: ee
|
|
72
78
|
}
|
|
73
79
|
];
|
|
74
80
|
}
|
|
75
81
|
}
|
|
76
|
-
),
|
|
82
|
+
), d = I({
|
|
77
83
|
// Grab the selected OR first security scheme
|
|
78
|
-
get: () =>
|
|
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: (
|
|
90
|
-
var e, r, t,
|
|
91
|
-
const o =
|
|
92
|
-
(
|
|
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 ? ((
|
|
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
|
-
)) :
|
|
105
|
+
)) : O.edit(
|
|
100
106
|
V.value.uid,
|
|
101
107
|
"selectedSecuritySchemeUids",
|
|
102
|
-
|
|
108
|
+
l.map((c) => c.id)
|
|
103
109
|
);
|
|
104
110
|
}
|
|
105
|
-
}),
|
|
106
|
-
|
|
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:
|
|
121
|
+
itemCount: d.value.length
|
|
109
122
|
}, {
|
|
110
|
-
title:
|
|
111
|
-
|
|
123
|
+
title: a(() => [
|
|
124
|
+
_("div", ue, k(l.title), 1)
|
|
112
125
|
]),
|
|
113
|
-
default:
|
|
114
|
-
|
|
115
|
-
u(n(
|
|
126
|
+
default: a(() => [
|
|
127
|
+
_("form", null, [
|
|
128
|
+
u(n(le), {
|
|
116
129
|
class: "flex-1",
|
|
117
130
|
columns: [""]
|
|
118
131
|
}, {
|
|
119
|
-
default:
|
|
132
|
+
default: a(() => [
|
|
120
133
|
u(n(m), null, {
|
|
121
|
-
default:
|
|
122
|
-
u(n(
|
|
123
|
-
default:
|
|
124
|
-
u(n(
|
|
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:
|
|
127
|
-
modelValue:
|
|
128
|
-
"onUpdate:modelValue": o[0] || (o[0] = (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:
|
|
145
|
+
options: M.value,
|
|
133
146
|
style: { "margin-left": "120px" },
|
|
134
147
|
teleport: ""
|
|
135
148
|
}, {
|
|
136
|
-
default:
|
|
137
|
-
u(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:
|
|
155
|
+
default: a(() => [
|
|
143
156
|
ne,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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),
|
|
192
|
+
(i(!0), p(v, null, A(n(C), (e, r) => (i(), p(v, {
|
|
163
193
|
key: e.uid
|
|
164
194
|
}, [
|
|
165
|
-
n(
|
|
195
|
+
n(C).length > 1 ? (i(), b(n(m), {
|
|
166
196
|
key: 0,
|
|
167
197
|
class: "group/delete"
|
|
168
198
|
}, {
|
|
169
|
-
default:
|
|
170
|
-
u(
|
|
171
|
-
default:
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
u(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:
|
|
210
|
+
onClick: B((s) => Q(e), ["stop"])
|
|
181
211
|
}, {
|
|
182
|
-
default:
|
|
183
|
-
|
|
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(),
|
|
196
|
-
e.scheme === "bearer" ? (i(),
|
|
197
|
-
default:
|
|
198
|
-
u(
|
|
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) =>
|
|
233
|
+
"onUpdate:modelValue": (t) => y(e, "value", t)
|
|
204
234
|
}, {
|
|
205
|
-
default:
|
|
206
|
-
|
|
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(),
|
|
242
|
+
}, 1024)) : e.scheme === "basic" ? (i(), p(v, { key: 1 }, [
|
|
213
243
|
u(n(m), null, {
|
|
214
|
-
default:
|
|
215
|
-
u(
|
|
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) =>
|
|
251
|
+
"onUpdate:modelValue": (t) => y(e, "value", t)
|
|
222
252
|
}, {
|
|
223
|
-
default:
|
|
224
|
-
|
|
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:
|
|
233
|
-
u(
|
|
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) =>
|
|
268
|
+
"onUpdate:modelValue": (t) => y(e, "secondValue", t)
|
|
239
269
|
}, {
|
|
240
|
-
default:
|
|
241
|
-
|
|
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(),
|
|
250
|
-
n(
|
|
251
|
-
default:
|
|
252
|
-
u(
|
|
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) =>
|
|
286
|
+
"onUpdate:modelValue": (t) => y(e, "value", t)
|
|
257
287
|
}, {
|
|
258
|
-
default:
|
|
259
|
-
|
|
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(),
|
|
295
|
+
}, 1024)) : (i(), p(v, { key: 0 }, [
|
|
266
296
|
u(n(m), null, {
|
|
267
|
-
default:
|
|
268
|
-
u(
|
|
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) =>
|
|
302
|
+
"onUpdate:modelValue": (t) => y(e, "name", t)
|
|
273
303
|
}, {
|
|
274
|
-
default:
|
|
275
|
-
|
|
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:
|
|
284
|
-
u(
|
|
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) =>
|
|
318
|
+
"onUpdate:modelValue": (t) => y(e, "value", t)
|
|
289
319
|
}, {
|
|
290
|
-
default:
|
|
291
|
-
|
|
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(),
|
|
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
|
-
|
|
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":"
|
|
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
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0c169f89"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
|
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
|
|
8
|
-
import
|
|
9
|
-
const
|
|
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:
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
},
|
|
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(
|
|
32
|
+
return (e, n) => (u(), r(q, {
|
|
33
33
|
class: "flex-1",
|
|
34
|
-
columns: m(
|
|
34
|
+
columns: m(_)
|
|
35
35
|
}, {
|
|
36
36
|
default: d(() => [
|
|
37
|
-
(u(!0),
|
|
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(
|
|
39
|
+
e.isEnabledHidden ? c("", !0) : (u(), r(z, {
|
|
40
40
|
key: 0,
|
|
41
41
|
modelValue: l.enabled,
|
|
42
|
-
"onUpdate:modelValue": (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(
|
|
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) =>
|
|
54
|
-
onFocus: n[1] || (n[1] = (o) =>
|
|
55
|
-
onInput: (o) => e.items &&
|
|
56
|
-
onSelectVariable: (o) => b(
|
|
57
|
-
"onUpdate:modelValue": (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(
|
|
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) =>
|
|
76
|
-
onFocus: n[3] || (n[3] = (o) =>
|
|
77
|
-
onInput: (o) => e.items &&
|
|
78
|
-
onSelectVariable: (o) => b(
|
|
79
|
-
"onUpdate:modelValue": (o) =>
|
|
80
|
-
},
|
|
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
|
-
|
|
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
|
-
|
|
92
|
+
y(l).value ? {
|
|
90
93
|
name: "warning",
|
|
91
94
|
fn: d(() => [
|
|
92
|
-
|
|
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(),
|
|
108
|
-
p("div",
|
|
109
|
-
p("span", null,
|
|
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) =>
|
|
115
|
-
}, " Delete ", 8,
|
|
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) =>
|
|
124
|
+
onClick: (S) => $(t)
|
|
122
125
|
}, {
|
|
123
126
|
default: d(() => [
|
|
124
|
-
|
|
125
|
-
i(m(
|
|
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
|
-
|
|
150
|
+
ee as default
|
|
148
151
|
};
|