@scalar/api-client 2.3.8 → 2.3.9
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 +20 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- 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 +8 -8
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/ScalarHotkey.vue.d.ts +1 -1
- package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +2 -2
- package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts +2 -0
- package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts.map +1 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +8 -8
- package/dist/layouts/App/create-api-client-app.d.ts +638 -466
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1297 -953
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +638 -466
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +631 -459
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/find-request.d.ts +4 -4
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +2 -2
- package/dist/libs/send-request/build-request-security.d.ts +2 -2
- package/dist/libs/send-request/create-request-operation.test.d.ts +49 -47
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +65 -61
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts +30 -30
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +18 -18
- package/dist/store/environment.d.ts +9 -9
- package/dist/store/import-spec.d.ts +154 -2
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +272 -272
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +44 -44
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +10 -10
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/servers.d.ts +50 -30
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +635 -463
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +10 -10
- package/dist/store/workspace.d.ts +44 -44
- package/dist/style.css +1 -1
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +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/RequestCodeExample.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestSection.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +26 -19
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
- 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 +191 -193
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts +2 -0
- package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +50 -47
- package/package.json +12 -12
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarTooltip as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
1
|
+
import { defineComponent as _, openBlock as d, createBlock as p, withCtx as n, createVNode as t, createElementVNode as s, createTextVNode as k, createElementBlock as m, Fragment as f, renderList as I, normalizeClass as w, unref as i, toDisplayString as V, createCommentVNode as x } from "vue";
|
|
2
|
+
import { ScalarTooltip as z, ScalarIcon as g, ScalarButton as D } from "@scalar/components";
|
|
3
|
+
import { RouterLink as E } from "vue-router";
|
|
4
|
+
import B from "../../../components/CodeInput/CodeInput.vue.js";
|
|
5
|
+
import q from "../../../components/DataTable/DataTable.vue.js";
|
|
6
|
+
import c from "../../../components/DataTable/DataTableCell.vue.js";
|
|
7
|
+
import G from "../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
8
|
+
import v from "../../../components/DataTable/DataTableHeader.vue.js";
|
|
9
|
+
import R from "../../../components/DataTable/DataTableRow.vue.js";
|
|
10
|
+
import { parameterIsInvalid as N, hasItemProperties as C } from "../libs/request.js";
|
|
11
|
+
import P from "./RequestTableTooltip.vue.js";
|
|
12
|
+
const j = { class: "contents" }, O = { class: "sr-only" }, A = { class: "text-c-2 filemask flex w-full max-w-[100%] items-end justify-end overflow-hidden p-1" }, K = ["onClick"], L = {
|
|
12
13
|
key: 1,
|
|
13
14
|
class: "p-0.5"
|
|
14
|
-
}, oe = /* @__PURE__ */
|
|
15
|
+
}, oe = /* @__PURE__ */ _({
|
|
15
16
|
__name: "RequestTable",
|
|
16
17
|
props: {
|
|
17
18
|
items: {},
|
|
@@ -25,196 +26,193 @@ const L = { class: "contents" }, O = { class: "sr-only" }, A = { class: "text-c-
|
|
|
25
26
|
invalidParams: {}
|
|
26
27
|
},
|
|
27
28
|
emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
|
|
28
|
-
setup(
|
|
29
|
-
const b =
|
|
30
|
-
r("updateRow", a,
|
|
31
|
-
},
|
|
29
|
+
setup(h, { emit: F }) {
|
|
30
|
+
const b = h, r = F, U = ["", "", "36px"], y = (a, l, e) => {
|
|
31
|
+
r("updateRow", a, l, e);
|
|
32
|
+
}, S = (a) => {
|
|
32
33
|
r("uploadFile", a);
|
|
33
34
|
}, $ = (a) => Array.isArray(a.default) && a.default.length === 1 ? a.default[0] : a.default;
|
|
34
|
-
return (a,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
])),
|
|
59
|
-
_: 1
|
|
60
|
-
})
|
|
61
|
-
]),
|
|
62
|
-
_: 1
|
|
63
|
-
}),
|
|
64
|
-
(d(!0), m(f, null, D(a.items, (l, u) => (d(), p(C, {
|
|
65
|
-
id: l.key,
|
|
66
|
-
key: u,
|
|
67
|
-
class: V({
|
|
68
|
-
alert: i(P)(l).value,
|
|
69
|
-
error: a.invalidParams && a.invalidParams.has(l.key)
|
|
35
|
+
return (a, l) => (d(), p(q, {
|
|
36
|
+
class: "group/table flex-1",
|
|
37
|
+
columns: U
|
|
38
|
+
}, {
|
|
39
|
+
default: n(() => [
|
|
40
|
+
t(R, { class: "sr-only !block" }, {
|
|
41
|
+
default: n(() => [
|
|
42
|
+
t(v, null, {
|
|
43
|
+
default: n(() => l[4] || (l[4] = [
|
|
44
|
+
s("span", { class: "sr-only" }, "Enabled", -1)
|
|
45
|
+
])),
|
|
46
|
+
_: 1
|
|
47
|
+
}),
|
|
48
|
+
t(v, null, {
|
|
49
|
+
default: n(() => l[5] || (l[5] = [
|
|
50
|
+
k("Key")
|
|
51
|
+
])),
|
|
52
|
+
_: 1
|
|
53
|
+
}),
|
|
54
|
+
t(v, null, {
|
|
55
|
+
default: n(() => l[6] || (l[6] = [
|
|
56
|
+
k("Value")
|
|
57
|
+
])),
|
|
58
|
+
_: 1
|
|
70
59
|
})
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
size: "xs"
|
|
90
|
-
})
|
|
91
|
-
]),
|
|
92
|
-
content: n(() => e[7] || (e[7] = [
|
|
93
|
-
s("div", { class: "w-content bg-b-1 text-xxs text-c-1 z-100 pointer-events-none z-10 grid max-w-[320px] gap-1.5 rounded p-2 leading-5 shadow-lg" }, [
|
|
94
|
-
s("div", { class: "text-c-1 flex items-center" }, [
|
|
95
|
-
s("span", { class: "text-pretty" }, " Global cookies are shared across the whole workspace. ")
|
|
96
|
-
])
|
|
97
|
-
], -1)
|
|
98
|
-
])),
|
|
99
|
-
_: 1
|
|
100
|
-
})
|
|
101
|
-
]),
|
|
102
|
-
_: 2
|
|
103
|
-
}, 1032, ["to"])) : (d(), m(f, { key: 1 }, [
|
|
104
|
-
s("span", O, " Row " + x(l.enabled ? "Enabled" : "Disabled"), 1),
|
|
105
|
-
t(N, {
|
|
106
|
-
class: "!border-r-1/2",
|
|
107
|
-
disabled: b.hasCheckboxDisabled,
|
|
108
|
-
modelValue: l.enabled,
|
|
109
|
-
"onUpdate:modelValue": (o) => r("toggleRow", u, o)
|
|
110
|
-
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])
|
|
111
|
-
], 64))
|
|
112
|
-
]),
|
|
113
|
-
t(v, null, {
|
|
114
|
-
default: n(() => [
|
|
115
|
-
t(R, {
|
|
116
|
-
disableCloseBrackets: "",
|
|
117
|
-
disabled: b.isReadOnly,
|
|
118
|
-
disableEnter: "",
|
|
119
|
-
disableTabIndent: "",
|
|
120
|
-
envVariables: a.envVariables,
|
|
121
|
-
environment: a.environment,
|
|
122
|
-
modelValue: l.key,
|
|
123
|
-
placeholder: "Key",
|
|
124
|
-
required: !!l.required,
|
|
125
|
-
workspace: a.workspace,
|
|
126
|
-
onBlur: e[0] || (e[0] = (o) => r("inputBlur")),
|
|
127
|
-
onFocus: e[1] || (e[1] = (o) => r("inputFocus")),
|
|
128
|
-
onSelectVariable: (o) => y(u, "key", o),
|
|
129
|
-
"onUpdate:modelValue": (o) => r("updateRow", u, "key", o)
|
|
130
|
-
}, null, 8, ["disabled", "envVariables", "environment", "modelValue", "required", "workspace", "onSelectVariable", "onUpdate:modelValue"])
|
|
131
|
-
]),
|
|
132
|
-
_: 2
|
|
133
|
-
}, 1024),
|
|
134
|
-
t(v, null, {
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
}),
|
|
63
|
+
(d(!0), m(f, null, I(a.items, (e, u) => (d(), p(R, {
|
|
64
|
+
id: e.key,
|
|
65
|
+
key: u,
|
|
66
|
+
class: w({
|
|
67
|
+
alert: i(N)(e).value,
|
|
68
|
+
error: a.invalidParams && a.invalidParams.has(e.key)
|
|
69
|
+
})
|
|
70
|
+
}, {
|
|
71
|
+
default: n(() => [
|
|
72
|
+
s("label", j, [
|
|
73
|
+
a.isGlobal ? (d(), p(i(E), {
|
|
74
|
+
key: 0,
|
|
75
|
+
class: "!border-r-1/2 border-t-1/2 text-c-2 flex items-center justify-center",
|
|
76
|
+
to: e.route ?? {}
|
|
77
|
+
}, {
|
|
135
78
|
default: n(() => [
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
default: l.default,
|
|
141
|
-
disableCloseBrackets: "",
|
|
142
|
-
disabled: b.isReadOnly,
|
|
143
|
-
disableEnter: "",
|
|
144
|
-
disableTabIndent: "",
|
|
145
|
-
enum: l.enum ?? [],
|
|
146
|
-
envVariables: a.envVariables,
|
|
147
|
-
environment: a.environment,
|
|
148
|
-
examples: l.examples ?? [],
|
|
149
|
-
max: l.maximum,
|
|
150
|
-
min: l.minimum,
|
|
151
|
-
modelValue: l.value,
|
|
152
|
-
nullable: !!l.nullable,
|
|
153
|
-
placeholder: "Value",
|
|
154
|
-
type: l.type,
|
|
155
|
-
workspace: a.workspace,
|
|
156
|
-
onBlur: e[2] || (e[2] = (o) => r("inputBlur")),
|
|
157
|
-
onFocus: e[3] || (e[3] = (o) => r("inputFocus")),
|
|
158
|
-
onSelectVariable: (o) => y(u, "value", o),
|
|
159
|
-
"onUpdate:modelValue": (o) => r("updateRow", u, "value", o)
|
|
79
|
+
l[8] || (l[8] = s("span", { class: "sr-only" }, "Global", -1)),
|
|
80
|
+
t(i(z), {
|
|
81
|
+
as: "div",
|
|
82
|
+
side: "top"
|
|
160
83
|
}, {
|
|
161
|
-
|
|
162
|
-
i(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
84
|
+
trigger: n(() => [
|
|
85
|
+
t(i(g), {
|
|
86
|
+
class: "text-c-1",
|
|
87
|
+
icon: "Globe",
|
|
88
|
+
size: "xs"
|
|
89
|
+
})
|
|
166
90
|
]),
|
|
167
|
-
|
|
168
|
-
|
|
91
|
+
content: n(() => l[7] || (l[7] = [
|
|
92
|
+
s("div", { class: "w-content bg-b-1 text-xxs text-c-1 z-100 pointer-events-none z-10 grid max-w-[320px] gap-1.5 rounded p-2 leading-5 shadow-lg" }, [
|
|
93
|
+
s("div", { class: "text-c-1 flex items-center" }, [
|
|
94
|
+
s("span", { class: "text-pretty" }, " Global cookies are shared across the whole workspace. ")
|
|
95
|
+
])
|
|
96
|
+
], -1)
|
|
97
|
+
])),
|
|
98
|
+
_: 1
|
|
99
|
+
})
|
|
169
100
|
]),
|
|
170
101
|
_: 2
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
s("div", A, [
|
|
181
|
-
s("span", null, x((o = l.file) == null ? void 0 : o.name), 1)
|
|
182
|
-
]),
|
|
183
|
-
s("button", {
|
|
184
|
-
class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
|
|
185
|
-
type: "button",
|
|
186
|
-
onClick: (T) => r("removeFile", u)
|
|
187
|
-
}, " Delete ", 8, K)
|
|
188
|
-
], 64)) : (d(), m("div", H, [
|
|
189
|
-
t(i(q), {
|
|
190
|
-
class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
|
|
191
|
-
size: "sm",
|
|
192
|
-
variant: "outlined",
|
|
193
|
-
onClick: (T) => _(u)
|
|
194
|
-
}, {
|
|
195
|
-
default: n(() => [
|
|
196
|
-
e[9] || (e[9] = s("span", null, "Upload File", -1)),
|
|
197
|
-
t(i(B), {
|
|
198
|
-
class: "ml-1",
|
|
199
|
-
icon: "UploadSimple",
|
|
200
|
-
size: "xs",
|
|
201
|
-
thickness: "2.5"
|
|
202
|
-
})
|
|
203
|
-
]),
|
|
204
|
-
_: 2
|
|
205
|
-
}, 1032, ["onClick"])
|
|
206
|
-
]))
|
|
207
|
-
];
|
|
208
|
-
}),
|
|
209
|
-
_: 2
|
|
210
|
-
}, 1024)) : g("", !0)
|
|
102
|
+
}, 1032, ["to"])) : (d(), m(f, { key: 1 }, [
|
|
103
|
+
s("span", O, " Row " + V(e.enabled ? "Enabled" : "Disabled"), 1),
|
|
104
|
+
t(G, {
|
|
105
|
+
class: "!border-r-1/2",
|
|
106
|
+
disabled: b.hasCheckboxDisabled,
|
|
107
|
+
modelValue: e.enabled,
|
|
108
|
+
"onUpdate:modelValue": (o) => r("toggleRow", u, o)
|
|
109
|
+
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"])
|
|
110
|
+
], 64))
|
|
211
111
|
]),
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
112
|
+
t(c, null, {
|
|
113
|
+
default: n(() => [
|
|
114
|
+
t(B, {
|
|
115
|
+
disableCloseBrackets: "",
|
|
116
|
+
disabled: b.isReadOnly,
|
|
117
|
+
disableEnter: "",
|
|
118
|
+
disableTabIndent: "",
|
|
119
|
+
envVariables: a.envVariables,
|
|
120
|
+
environment: a.environment,
|
|
121
|
+
modelValue: e.key,
|
|
122
|
+
placeholder: "Key",
|
|
123
|
+
required: !!e.required,
|
|
124
|
+
workspace: a.workspace,
|
|
125
|
+
onBlur: l[0] || (l[0] = (o) => r("inputBlur")),
|
|
126
|
+
onFocus: l[1] || (l[1] = (o) => r("inputFocus")),
|
|
127
|
+
onSelectVariable: (o) => y(u, "key", o),
|
|
128
|
+
"onUpdate:modelValue": (o) => r("updateRow", u, "key", o)
|
|
129
|
+
}, null, 8, ["disabled", "envVariables", "environment", "modelValue", "required", "workspace", "onSelectVariable", "onUpdate:modelValue"])
|
|
130
|
+
]),
|
|
131
|
+
_: 2
|
|
132
|
+
}, 1024),
|
|
133
|
+
t(c, null, {
|
|
134
|
+
default: n(() => [
|
|
135
|
+
t(B, {
|
|
136
|
+
class: w({
|
|
137
|
+
"pr-6": i(C)(e)
|
|
138
|
+
}),
|
|
139
|
+
default: e.default,
|
|
140
|
+
disableCloseBrackets: "",
|
|
141
|
+
disabled: b.isReadOnly,
|
|
142
|
+
disableEnter: "",
|
|
143
|
+
disableTabIndent: "",
|
|
144
|
+
enum: e.enum ?? [],
|
|
145
|
+
envVariables: a.envVariables,
|
|
146
|
+
environment: a.environment,
|
|
147
|
+
examples: e.examples ?? [],
|
|
148
|
+
max: e.maximum,
|
|
149
|
+
min: e.minimum,
|
|
150
|
+
modelValue: e.value,
|
|
151
|
+
nullable: !!e.nullable,
|
|
152
|
+
placeholder: "Value",
|
|
153
|
+
type: e.type,
|
|
154
|
+
workspace: a.workspace,
|
|
155
|
+
onBlur: l[2] || (l[2] = (o) => r("inputBlur")),
|
|
156
|
+
onFocus: l[3] || (l[3] = (o) => r("inputFocus")),
|
|
157
|
+
onSelectVariable: (o) => y(u, "value", o),
|
|
158
|
+
"onUpdate:modelValue": (o) => r("updateRow", u, "value", o)
|
|
159
|
+
}, {
|
|
160
|
+
icon: n(() => [
|
|
161
|
+
i(C)(e) ? (d(), p(P, {
|
|
162
|
+
key: 0,
|
|
163
|
+
item: { ...e, default: $(e) }
|
|
164
|
+
}, null, 8, ["item"])) : x("", !0)
|
|
165
|
+
]),
|
|
166
|
+
_: 2
|
|
167
|
+
}, 1032, ["class", "default", "disabled", "enum", "envVariables", "environment", "examples", "max", "min", "modelValue", "nullable", "type", "workspace", "onSelectVariable", "onUpdate:modelValue"])
|
|
168
|
+
]),
|
|
169
|
+
_: 2
|
|
170
|
+
}, 1024),
|
|
171
|
+
a.showUploadButton ? (d(), p(c, {
|
|
172
|
+
key: 0,
|
|
173
|
+
class: "group/upload flex items-center justify-center whitespace-nowrap"
|
|
174
|
+
}, {
|
|
175
|
+
default: n(() => {
|
|
176
|
+
var o;
|
|
177
|
+
return [
|
|
178
|
+
e.file ? (d(), m(f, { key: 0 }, [
|
|
179
|
+
s("div", A, [
|
|
180
|
+
s("span", null, V((o = e.file) == null ? void 0 : o.name), 1)
|
|
181
|
+
]),
|
|
182
|
+
s("button", {
|
|
183
|
+
class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
|
|
184
|
+
type: "button",
|
|
185
|
+
onClick: (T) => r("removeFile", u)
|
|
186
|
+
}, " Delete ", 8, K)
|
|
187
|
+
], 64)) : (d(), m("div", L, [
|
|
188
|
+
t(i(D), {
|
|
189
|
+
class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
|
|
190
|
+
size: "sm",
|
|
191
|
+
variant: "outlined",
|
|
192
|
+
onClick: (T) => S(u)
|
|
193
|
+
}, {
|
|
194
|
+
default: n(() => [
|
|
195
|
+
l[9] || (l[9] = s("span", null, "Upload File", -1)),
|
|
196
|
+
t(i(g), {
|
|
197
|
+
class: "ml-1",
|
|
198
|
+
icon: "UploadSimple",
|
|
199
|
+
size: "xs",
|
|
200
|
+
thickness: "2.5"
|
|
201
|
+
})
|
|
202
|
+
]),
|
|
203
|
+
_: 2
|
|
204
|
+
}, 1032, ["onClick"])
|
|
205
|
+
]))
|
|
206
|
+
];
|
|
207
|
+
}),
|
|
208
|
+
_: 2
|
|
209
|
+
}, 1024)) : x("", !0)
|
|
210
|
+
]),
|
|
211
|
+
_: 2
|
|
212
|
+
}, 1032, ["id", "class"]))), 128))
|
|
213
|
+
]),
|
|
214
|
+
_: 1
|
|
215
|
+
}));
|
|
218
216
|
}
|
|
219
217
|
});
|
|
220
218
|
export {
|
|
@@ -37,7 +37,7 @@ const P = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, T = {
|
|
|
37
37
|
}));
|
|
38
38
|
}, y = (s) => {
|
|
39
39
|
s != null && s.createNew && w.name === "request" && k();
|
|
40
|
-
}, N = "2.3.
|
|
40
|
+
}, N = "2.3.9";
|
|
41
41
|
return B(() => r.hotKeys.on(y)), E(() => r.hotKeys.off(y)), (s, e) => (u(), i("div", P, [
|
|
42
42
|
o("div", {
|
|
43
43
|
class: q(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseSection.test.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseSection.vue"],"names":[],"mappings":"AAuOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAgBvE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,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
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-19922b4d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as j, computed as
|
|
1
|
+
import { defineComponent as j, computed as c, ref as T, useId as g, openBlock as n, createBlock as i, withCtx as v, createElementVNode as d, normalizeClass as y, createCommentVNode as u, createVNode as h, createElementBlock as k, Fragment as A } from "vue";
|
|
2
2
|
import I from "../../../components/SectionFilter.vue.js";
|
|
3
3
|
import V from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
4
|
import H from "./ResponseBody.vue.js";
|
|
@@ -9,49 +9,49 @@ import $ from "./ResponseBodyVirtual.vue.js";
|
|
|
9
9
|
/* empty css */
|
|
10
10
|
import w from "./ResponseCookies.vue.js";
|
|
11
11
|
import z from "./ResponseHeaders.vue.js";
|
|
12
|
-
const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"],
|
|
12
|
+
const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], b = 2e5, J = /* @__PURE__ */ j({
|
|
13
13
|
__name: "ResponseSection",
|
|
14
14
|
props: {
|
|
15
15
|
numWorkspaceRequests: {},
|
|
16
16
|
response: {}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const m =
|
|
20
|
-
var
|
|
21
|
-
const e = (
|
|
22
|
-
return e ? Object.keys(e).map((
|
|
23
|
-
name:
|
|
24
|
-
value: e[
|
|
18
|
+
setup(t) {
|
|
19
|
+
const m = c(() => {
|
|
20
|
+
var a;
|
|
21
|
+
const e = (a = t.response) == null ? void 0 : a.headers;
|
|
22
|
+
return e ? Object.keys(e).map((o) => ({
|
|
23
|
+
name: o,
|
|
24
|
+
value: e[o] ?? "",
|
|
25
25
|
required: !1
|
|
26
26
|
})).filter(
|
|
27
|
-
(
|
|
27
|
+
(o) => ![
|
|
28
28
|
"rest-api-client-content-length",
|
|
29
29
|
"X-API-Client-Content-Length"
|
|
30
|
-
].includes(
|
|
30
|
+
].includes(o.name)
|
|
31
31
|
) : [];
|
|
32
|
-
}),
|
|
32
|
+
}), x = c(
|
|
33
33
|
() => {
|
|
34
34
|
var e;
|
|
35
|
-
return ((e =
|
|
36
|
-
var
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
-
name:
|
|
40
|
-
value:
|
|
35
|
+
return ((e = t.response) == null ? void 0 : e.cookieHeaderKeys.flatMap((a) => {
|
|
36
|
+
var l, r;
|
|
37
|
+
const o = (r = (l = t.response) == null ? void 0 : l.headers) == null ? void 0 : r[a];
|
|
38
|
+
return o ? {
|
|
39
|
+
name: a,
|
|
40
|
+
value: o,
|
|
41
41
|
required: !1
|
|
42
42
|
} : [];
|
|
43
43
|
})) ?? [];
|
|
44
44
|
}
|
|
45
|
-
),
|
|
45
|
+
), B = ["Cookies", "Headers", "Body"], s = T("All"), f = c(() => ["All", ...B]), p = c(
|
|
46
46
|
() => Object.fromEntries(
|
|
47
47
|
f.value.map((e) => [e, g()])
|
|
48
48
|
)
|
|
49
|
-
), R =
|
|
50
|
-
var
|
|
51
|
-
if (!
|
|
49
|
+
), R = c(() => {
|
|
50
|
+
var l, r;
|
|
51
|
+
if (!t.response)
|
|
52
52
|
return !1;
|
|
53
|
-
const e = ((
|
|
54
|
-
return !e || (
|
|
53
|
+
const e = ((l = t.response.headers) == null ? void 0 : l["content-type"]) || ((r = t.response.headers) == null ? void 0 : r["Content-Type"]);
|
|
54
|
+
return !e || (t.response.size ?? 0) <= b || e.includes("text/html") ? !1 : [
|
|
55
55
|
// Text types
|
|
56
56
|
"text/",
|
|
57
57
|
// JSON types
|
|
@@ -78,63 +78,66 @@ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], x = 2e5
|
|
|
78
78
|
"application/x-java-source",
|
|
79
79
|
// Form data
|
|
80
80
|
"application/x-www-form-urlencoded"
|
|
81
|
-
].some((C) => e.includes(C)) && (
|
|
81
|
+
].some((C) => e.includes(C)) && (t.response.size ?? 0) > b;
|
|
82
82
|
});
|
|
83
|
-
return (e,
|
|
83
|
+
return (e, a) => (n(), i(V, { "aria-label": "Response" }, {
|
|
84
84
|
title: v(() => [
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
d("div", L, [
|
|
86
|
+
d("div", {
|
|
87
87
|
"aria-live": "polite",
|
|
88
88
|
class: y(["flex items-center", { "animate-response-heading": e.response }])
|
|
89
89
|
}, [
|
|
90
|
-
|
|
91
|
-
e.response ? (
|
|
90
|
+
a[1] || (a[1] = d("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
|
|
91
|
+
e.response ? (n(), i(O, {
|
|
92
92
|
key: 0,
|
|
93
93
|
class: "animate-response-children",
|
|
94
94
|
response: e.response
|
|
95
|
-
}, null, 8, ["response"])) :
|
|
95
|
+
}, null, 8, ["response"])) : u("", !0)
|
|
96
96
|
], 2),
|
|
97
97
|
h(I, {
|
|
98
98
|
modelValue: s.value,
|
|
99
|
-
"onUpdate:modelValue":
|
|
99
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => s.value = o),
|
|
100
100
|
filterIds: p.value,
|
|
101
101
|
filters: f.value
|
|
102
102
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
103
103
|
])
|
|
104
104
|
]),
|
|
105
105
|
default: v(() => {
|
|
106
|
-
var
|
|
106
|
+
var o, l, r;
|
|
107
107
|
return [
|
|
108
|
-
|
|
108
|
+
d("div", {
|
|
109
109
|
id: p.value.All,
|
|
110
|
-
class: y(["custom-scroll relative grid h-full justify-stretch
|
|
110
|
+
class: y(["custom-scroll response-section-content relative grid h-full justify-stretch", {
|
|
111
111
|
"content-start": e.response
|
|
112
112
|
}]),
|
|
113
113
|
role: s.value === "All" && e.response ? "tabpanel" : "none"
|
|
114
114
|
}, [
|
|
115
|
-
e.response ? (
|
|
116
|
-
s.value === "All" || s.value === "Cookies" ? (
|
|
115
|
+
e.response ? (n(), k(A, { key: 1 }, [
|
|
116
|
+
s.value === "All" || s.value === "Cookies" ? (n(), i(w, {
|
|
117
117
|
key: 0,
|
|
118
|
+
class: "response-section-content-cookies",
|
|
118
119
|
id: p.value.Cookies,
|
|
119
|
-
cookies:
|
|
120
|
+
cookies: x.value,
|
|
120
121
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
121
|
-
}, null, 8, ["id", "cookies", "role"])) :
|
|
122
|
-
s.value === "All" || s.value === "Headers" ? (
|
|
122
|
+
}, null, 8, ["id", "cookies", "role"])) : u("", !0),
|
|
123
|
+
s.value === "All" || s.value === "Headers" ? (n(), i(z, {
|
|
123
124
|
key: 1,
|
|
125
|
+
class: "response-section-content-headers",
|
|
124
126
|
id: p.value.Headers,
|
|
125
127
|
headers: m.value,
|
|
126
128
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
127
|
-
}, null, 8, ["id", "headers", "role"])) :
|
|
128
|
-
s.value === "All" || s.value === "Body" ? (
|
|
129
|
-
R.value && typeof ((
|
|
129
|
+
}, null, 8, ["id", "headers", "role"])) : u("", !0),
|
|
130
|
+
s.value === "All" || s.value === "Body" ? (n(), k(A, { key: 2 }, [
|
|
131
|
+
R.value && typeof ((o = e.response) == null ? void 0 : o.data) == "string" ? (n(), i($, {
|
|
130
132
|
key: 0,
|
|
131
133
|
id: p.value.Body,
|
|
132
134
|
content: e.response.data,
|
|
133
|
-
data: (
|
|
135
|
+
data: (l = e.response) == null ? void 0 : l.data,
|
|
134
136
|
headers: m.value,
|
|
135
137
|
role: s.value === "All" ? "none" : "tabpanel"
|
|
136
|
-
}, null, 8, ["id", "content", "data", "headers", "role"])) : (
|
|
138
|
+
}, null, 8, ["id", "content", "data", "headers", "role"])) : (n(), i(H, {
|
|
137
139
|
key: 1,
|
|
140
|
+
class: "response-section-content-body",
|
|
138
141
|
id: p.value.Body,
|
|
139
142
|
active: !0,
|
|
140
143
|
data: (r = e.response) == null ? void 0 : r.data,
|
|
@@ -142,8 +145,8 @@ const L = { class: "flex h-8 flex-1 items-center" }, N = ["id", "role"], x = 2e5
|
|
|
142
145
|
role: s.value === "All" ? "none" : "tabpanel",
|
|
143
146
|
title: "Body"
|
|
144
147
|
}, null, 8, ["id", "data", "headers", "role"]))
|
|
145
|
-
], 64)) :
|
|
146
|
-
], 64)) : (
|
|
148
|
+
], 64)) : u("", !0)
|
|
149
|
+
], 64)) : (n(), i(q, {
|
|
147
150
|
key: 0,
|
|
148
151
|
numWorkspaceRequests: e.numWorkspaceRequests
|
|
149
152
|
}, null, 8, ["numWorkspaceRequests"])),
|