@scalar/api-client 2.1.52 → 2.2.0
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 +22 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +35 -42
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +25 -24
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +32 -39
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +10 -15
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +48 -47
- package/dist/components/CodeInput/codeVariableWidget.d.ts +3 -2
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +15 -14
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +18 -23
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +27 -26
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +19 -20
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +19 -24
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +23 -22
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +47 -46
- package/dist/components/DataTable/DataTableInput.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +23 -28
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +127 -96
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +28 -27
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +14 -18
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -14
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +20 -19
- package/dist/components/SideNav/SideNavRouterLink.vue.js +9 -9
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +20 -19
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/useLayout.d.ts +2 -0
- package/dist/hooks/useLayout.d.ts.map +1 -1
- package/dist/hooks/useLayout.js +4 -3
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +38 -37
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +3 -3
- package/dist/layouts/App/create-api-client-app.d.ts +669 -1232
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +24 -23
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1382 -2508
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +34 -33
- package/dist/layouts/Web/create-api-client-web.d.ts +669 -1232
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +673 -1236
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +91 -102
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request.d.ts +2 -3
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +127 -123
- package/dist/store/active-entities.d.ts +333 -0
- package/dist/store/active-entities.d.ts.map +1 -0
- package/dist/store/active-entities.js +97 -0
- package/dist/store/collections.d.ts +4 -274
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/import-spec.d.ts +0 -54
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/index.js +4 -3
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +15 -15
- package/dist/store/security-schemes.d.ts +527 -317
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +33 -41
- package/dist/store/servers.d.ts +4 -4
- package/dist/store/store-context.d.ts +0 -3
- package/dist/store/store-context.d.ts.map +1 -1
- package/dist/store/store.d.ts +640 -5297
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +111 -189
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +14 -24
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -13
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +14 -13
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +3 -3
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +92 -92
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +96 -99
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +49 -46
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +94 -100
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +60 -67
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuthDataTableInput.vue.d.ts.map +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 +29 -28
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +11 -10
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +24 -28
- 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 +19 -18
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +72 -73
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +111 -109
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +15 -16
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +14 -14
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +23 -22
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +32 -31
- package/dist/views/Request/consts/new-auth-options.d.ts +16 -8
- package/dist/views/Request/consts/new-auth-options.d.ts.map +1 -1
- package/dist/views/Request/consts/new-auth-options.js +16 -8
- package/dist/views/Request/handle-drag.d.ts +2 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +23 -25
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +40 -39
- package/dist/views/Request/libs/auth.d.ts +1 -29
- package/dist/views/Request/libs/auth.d.ts.map +1 -1
- package/dist/views/Request/libs/auth.js +2 -9
- package/dist/views/Request/libs/index.js +6 -8
- package/dist/views/Request/libs/live-sync.d.ts +6 -5
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +164 -185
- package/dist/views/Request/libs/oauth2.d.ts +6 -10
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +54 -69
- package/dist/views/Servers/ServerForm.vue.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +14 -13
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +18 -17
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +218 -126
- package/dist/views/Settings/{SettingsGeneralMode.vue.d.ts → components/SettingsAppearance.vue.d.ts} +2 -2
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.js +74 -0
- package/dist/views/Settings/components/SettingsAppearance.vue2.js +4 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts +24 -0
- package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +1 -0
- package/dist/views/Settings/components/SettingsSection.vue.js +24 -0
- package/dist/views/Settings/components/SettingsSection.vue2.js +4 -0
- package/package.json +8 -8
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts +0 -16
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthModal.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.js +0 -78
- package/dist/views/Settings/SettingsGeneralMode.vue2.js +0 -4
|
@@ -4,25 +4,26 @@ import ee from "../../../components/DataTable/DataTable.vue.js";
|
|
|
4
4
|
import ae from "../../../components/DataTable/DataTableHeader.vue.js";
|
|
5
5
|
import k from "../../../components/DataTable/DataTableRow.vue.js";
|
|
6
6
|
import te from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useActiveEntities as oe } from "../../../store/active-entities.js";
|
|
8
|
+
import { ScalarListbox as ne, ScalarButton as _, ScalarIcon as L } from "@scalar/components";
|
|
8
9
|
import { requestExampleParametersSchema as M } from "@scalar/oas-utils/entities/spec";
|
|
9
|
-
import { canMethodHaveBody as
|
|
10
|
+
import { canMethodHaveBody as le } from "@scalar/oas-utils/helpers";
|
|
10
11
|
import A from "./RequestTable.vue.js";
|
|
11
|
-
import { useWorkspace as
|
|
12
|
+
import { useWorkspace as re } from "../../../store/store.js";
|
|
12
13
|
import { useFileDialog as W } from "../../../hooks/useFileDialog.js";
|
|
13
|
-
const
|
|
14
|
+
const ie = {
|
|
14
15
|
key: 0,
|
|
15
16
|
class: "text-c-3 flex min-h-10 w-full items-center justify-center p-2 text-sm"
|
|
16
17
|
}, de = {
|
|
17
18
|
key: 1,
|
|
18
19
|
class: "flex items-center justify-center p-1.5 overflow-hidden"
|
|
19
|
-
},
|
|
20
|
+
}, ue = { class: "text-c-2 text-xs w-full border rounded p-1 max-w-full overflow-hidden whitespace-nowrap" }, Re = /* @__PURE__ */ G({
|
|
20
21
|
__name: "RequestBody",
|
|
21
22
|
props: {
|
|
22
23
|
title: {}
|
|
23
24
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const { activeRequest:
|
|
25
|
+
setup(se) {
|
|
26
|
+
const { activeRequest: d, activeExample: a } = oe(), { requestExampleMutators: r } = re(), z = {
|
|
26
27
|
json: "json",
|
|
27
28
|
xml: "xml",
|
|
28
29
|
yaml: "yaml",
|
|
@@ -59,7 +60,7 @@ const re = {
|
|
|
59
60
|
console.log("deleteRow");
|
|
60
61
|
}
|
|
61
62
|
const T = (e, t, o) => {
|
|
62
|
-
if (!
|
|
63
|
+
if (!d.value || !a.value) return;
|
|
63
64
|
const l = v.value;
|
|
64
65
|
if (l.length > e) {
|
|
65
66
|
const n = [...l];
|
|
@@ -86,7 +87,7 @@ const re = {
|
|
|
86
87
|
return ((o = (t = (e = a.value) == null ? void 0 : e.body) == null ? void 0 : t.formData) == null ? void 0 : o.value) ?? [];
|
|
87
88
|
}
|
|
88
89
|
), E = () => v.value.length === 0 && D(), D = () => {
|
|
89
|
-
if (!
|
|
90
|
+
if (!d.value || !a.value) return;
|
|
90
91
|
const e = M.parse({
|
|
91
92
|
enabled: !1
|
|
92
93
|
}), t = [...v.value, e];
|
|
@@ -99,7 +100,7 @@ const re = {
|
|
|
99
100
|
encoding: "form-data"
|
|
100
101
|
});
|
|
101
102
|
}, P = (e, t) => {
|
|
102
|
-
if (!
|
|
103
|
+
if (!d.value || !a.value) return;
|
|
103
104
|
const o = v.value;
|
|
104
105
|
if (o.length > e) {
|
|
105
106
|
const l = [...o];
|
|
@@ -110,7 +111,7 @@ const re = {
|
|
|
110
111
|
);
|
|
111
112
|
}
|
|
112
113
|
}, $ = (e) => {
|
|
113
|
-
!
|
|
114
|
+
!d.value || !a.value || r.edit(a.value.uid, "body.raw.value", e);
|
|
114
115
|
}, H = (e) => e === "multipartForm" ? {
|
|
115
116
|
activeBody: "formData",
|
|
116
117
|
encoding: "form-data",
|
|
@@ -165,10 +166,10 @@ const re = {
|
|
|
165
166
|
const { raw: N, ...Y } = a.value.body;
|
|
166
167
|
r.edit(a.value.uid, "body", Y);
|
|
167
168
|
}
|
|
168
|
-
const n = [...a.value.parameters.headers],
|
|
169
|
+
const n = [...a.value.parameters.headers], i = n.findIndex(
|
|
169
170
|
(N) => N.key.toLowerCase() === "content-type"
|
|
170
171
|
);
|
|
171
|
-
|
|
172
|
+
i >= 0 ? l ? n[i].value = l : n.splice(i, 1) : l && n.unshift({
|
|
172
173
|
key: "Content-Type",
|
|
173
174
|
value: l,
|
|
174
175
|
enabled: !0
|
|
@@ -181,15 +182,15 @@ const re = {
|
|
|
181
182
|
const { open: t } = W({
|
|
182
183
|
onChange: async (o) => {
|
|
183
184
|
const l = o == null ? void 0 : o[0];
|
|
184
|
-
if (l &&
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
...
|
|
185
|
+
if (l && d.value && a.value) {
|
|
186
|
+
const i = [...v.value];
|
|
187
|
+
i[e] = {
|
|
188
|
+
...i[e],
|
|
188
189
|
file: l
|
|
189
190
|
}, r.edit(
|
|
190
191
|
a.value.uid,
|
|
191
192
|
"body.formData.value",
|
|
192
|
-
|
|
193
|
+
i
|
|
193
194
|
);
|
|
194
195
|
}
|
|
195
196
|
},
|
|
@@ -199,10 +200,10 @@ const re = {
|
|
|
199
200
|
t();
|
|
200
201
|
};
|
|
201
202
|
function J() {
|
|
202
|
-
!
|
|
203
|
+
!d.value || !a.value || r.edit(a.value.uid, "body.binary", void 0);
|
|
203
204
|
}
|
|
204
205
|
function V(e) {
|
|
205
|
-
if (!
|
|
206
|
+
if (!d.value || !a.value) return;
|
|
206
207
|
const o = [...v.value];
|
|
207
208
|
o[e] = {
|
|
208
209
|
...o[e],
|
|
@@ -217,7 +218,7 @@ const re = {
|
|
|
217
218
|
const { open: e } = W({
|
|
218
219
|
onChange: async (t) => {
|
|
219
220
|
const o = t == null ? void 0 : t[0];
|
|
220
|
-
o &&
|
|
221
|
+
o && d.value && a.value && r.edit(
|
|
221
222
|
a.value.uid,
|
|
222
223
|
"body.binary",
|
|
223
224
|
o
|
|
@@ -241,7 +242,7 @@ const re = {
|
|
|
241
242
|
},
|
|
242
243
|
() => {
|
|
243
244
|
var e;
|
|
244
|
-
(e =
|
|
245
|
+
(e = d.value) != null && e.method && le(d.value.method) && C(B.value), ["multipartForm", "formUrlEncoded"].includes(
|
|
245
246
|
B.value
|
|
246
247
|
) && E();
|
|
247
248
|
},
|
|
@@ -257,7 +258,7 @@ const re = {
|
|
|
257
258
|
default: u(() => [
|
|
258
259
|
s(ae, { class: "relative col-span-full flex h-8 cursor-pointer items-center !p-0" }, {
|
|
259
260
|
default: u(() => [
|
|
260
|
-
s(c(
|
|
261
|
+
s(c(ne), {
|
|
261
262
|
modelValue: m.value,
|
|
262
263
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => m.value = o),
|
|
263
264
|
class: "text-xxs",
|
|
@@ -294,13 +295,13 @@ const re = {
|
|
|
294
295
|
}),
|
|
295
296
|
s(k, null, {
|
|
296
297
|
default: u(() => {
|
|
297
|
-
var o, l, n,
|
|
298
|
+
var o, l, n, i, p;
|
|
298
299
|
return [
|
|
299
|
-
m.value.id === "none" ? (f(), R("div",
|
|
300
|
+
m.value.id === "none" ? (f(), R("div", ie, t[1] || (t[1] = [
|
|
300
301
|
x("span", null, "No Body", -1)
|
|
301
302
|
]))) : m.value.id === "binaryFile" ? (f(), R("div", de, [
|
|
302
303
|
(o = c(a)) != null && o.body.binary ? (f(), R(Q, { key: 0 }, [
|
|
303
|
-
x("span",
|
|
304
|
+
x("span", ue, F(((l = c(a)) == null ? void 0 : l.body.binary).name), 1),
|
|
304
305
|
s(c(_), {
|
|
305
306
|
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
|
|
306
307
|
size: "sm",
|
|
@@ -364,7 +365,7 @@ const re = {
|
|
|
364
365
|
language: O.value,
|
|
365
366
|
lineNumbers: "",
|
|
366
367
|
lint: "",
|
|
367
|
-
modelValue: ((p = (
|
|
368
|
+
modelValue: ((p = (i = (n = c(a)) == null ? void 0 : n.body) == null ? void 0 : i.raw) == null ? void 0 : p.value) ?? "",
|
|
368
369
|
"onUpdate:modelValue": $
|
|
369
370
|
}, null, 8, ["language", "modelValue"]))
|
|
370
371
|
];
|
|
@@ -381,5 +382,5 @@ const re = {
|
|
|
381
382
|
}
|
|
382
383
|
});
|
|
383
384
|
export {
|
|
384
|
-
|
|
385
|
+
Re as default
|
|
385
386
|
};
|
|
@@ -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":"AA2LA,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;;AA0SF,wBAOG"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { defineComponent as K, computed as y, onMounted as $, ref as x, watch as A, openBlock as E, createBlock as S, withCtx as i, createTextVNode as h, toDisplayString as g, createElementVNode as m, 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
|
-
import N from "
|
|
4
|
-
import
|
|
3
|
+
import { useActiveEntities as N } from "../../../store/active-entities.js";
|
|
4
|
+
import V from "./RequestTable.vue.js";
|
|
5
|
+
import { ScalarButton as W } from "@scalar/components";
|
|
5
6
|
import { requestExampleParametersSchema as _ } from "@scalar/oas-utils/entities/spec";
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
const
|
|
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__ */ K({
|
|
8
9
|
__name: "RequestParams",
|
|
9
10
|
props: {
|
|
10
11
|
title: {},
|
|
11
12
|
paramKey: {}
|
|
12
13
|
},
|
|
13
14
|
setup(b) {
|
|
14
|
-
const r = b, { activeRequest: n, activeExample: a, requestExampleMutators: o } =
|
|
15
|
+
const r = b, { activeRequest: n, activeExample: a } = N(), { requestExampleMutators: o } = z(), l = y(
|
|
15
16
|
() => {
|
|
16
17
|
var e;
|
|
17
18
|
return ((e = a.value) == null ? void 0 : e.parameters[r.paramKey]) ?? [];
|
|
@@ -92,8 +93,8 @@ const z = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
92
93
|
h(g(e.title), 1)
|
|
93
94
|
]),
|
|
94
95
|
actions: i(() => [
|
|
95
|
-
m("div",
|
|
96
|
-
R(T(
|
|
96
|
+
m("div", D, [
|
|
97
|
+
R(T(W), {
|
|
97
98
|
class: "px-1 transition-none",
|
|
98
99
|
size: "sm",
|
|
99
100
|
variant: "ghost",
|
|
@@ -101,7 +102,7 @@ const z = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
101
102
|
}, {
|
|
102
103
|
default: i(() => [
|
|
103
104
|
t[0] || (t[0] = h(" Clear")),
|
|
104
|
-
m("span",
|
|
105
|
+
m("span", U, "All " + g(e.title), 1)
|
|
105
106
|
]),
|
|
106
107
|
_: 1
|
|
107
108
|
})
|
|
@@ -112,7 +113,7 @@ const z = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
112
113
|
ref_key: "tableWrapperRef",
|
|
113
114
|
ref: p
|
|
114
115
|
}, [
|
|
115
|
-
R(
|
|
116
|
+
R(V, {
|
|
116
117
|
class: "flex-1",
|
|
117
118
|
columns: ["32px", "", ""],
|
|
118
119
|
items: l.value,
|
|
@@ -127,5 +128,5 @@ const z = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
127
128
|
}
|
|
128
129
|
});
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
+
Y as default
|
|
131
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestPathParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestPathParams.vue"],"names":[],"mappings":"AAoIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;CAC7C,CAAC;;AA0MF,wBAOG"}
|
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
import { defineComponent as _, computed as $, watch as K, openBlock as d, createBlock as h, withCtx as y, createTextVNode as x, toDisplayString as q, createElementBlock as C, createElementVNode as P } from "vue";
|
|
2
2
|
import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
-
import V from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
3
|
+
import { useActiveEntities as V } from "../../../store/active-entities.js";
|
|
4
|
+
import M from "./RequestTable.vue.js";
|
|
5
|
+
import { REGEX as B } from "@scalar/oas-utils/helpers";
|
|
6
|
+
import { useWorkspace as N } from "../../../store/store.js";
|
|
7
|
+
const T = {
|
|
7
8
|
key: 1,
|
|
8
9
|
class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
|
|
9
|
-
},
|
|
10
|
+
}, O = /* @__PURE__ */ _({
|
|
10
11
|
__name: "RequestPathParams",
|
|
11
12
|
props: {
|
|
12
13
|
title: {},
|
|
13
14
|
paramKey: {}
|
|
14
15
|
},
|
|
15
16
|
setup(b) {
|
|
16
|
-
const o = b, {
|
|
17
|
-
activeRequest: s,
|
|
18
|
-
activeExample: n,
|
|
19
|
-
requestMutators: v,
|
|
20
|
-
requestExampleMutators: f
|
|
21
|
-
} = B(), i = $(() => {
|
|
17
|
+
const o = b, { activeRequest: s, activeExample: n } = V(), { requestMutators: v, requestExampleMutators: f } = N(), l = $(() => {
|
|
22
18
|
const e = n.value;
|
|
23
19
|
return e ? e.parameters[o.paramKey].map((a) => {
|
|
24
20
|
var r;
|
|
@@ -30,19 +26,19 @@ const N = {
|
|
|
30
26
|
}), g = (e, a, r) => {
|
|
31
27
|
var u, t;
|
|
32
28
|
if (!s.value || !n.value) return;
|
|
33
|
-
const
|
|
29
|
+
const i = n.value.parameters[o.paramKey], p = (u = i[e]) == null ? void 0 : u.key;
|
|
34
30
|
if (a === "key") {
|
|
35
|
-
if ((t =
|
|
31
|
+
if ((t = i[e]) != null && t.required)
|
|
36
32
|
return;
|
|
37
33
|
if (r) {
|
|
38
|
-
const c = encodeURIComponent(
|
|
39
|
-
|
|
34
|
+
const c = encodeURIComponent(p), m = encodeURIComponent(r), k = new RegExp(`(?<=/):${c}(?=[/?#]|$)`, "g"), R = s.value.path.replace(
|
|
35
|
+
k,
|
|
40
36
|
`:${m}`
|
|
41
37
|
);
|
|
42
38
|
v.edit(s.value.uid, "path", R);
|
|
43
39
|
} else {
|
|
44
|
-
|
|
45
|
-
const c = new RegExp(`/:${encodeURIComponent(
|
|
40
|
+
i.splice(e, 1);
|
|
41
|
+
const c = new RegExp(`/:${encodeURIComponent(p)}(?=[/?#]|$)`, "g"), m = s.value.path.replace(c, "");
|
|
46
42
|
v.edit(s.value.uid, "path", m);
|
|
47
43
|
}
|
|
48
44
|
}
|
|
@@ -51,15 +47,15 @@ const N = {
|
|
|
51
47
|
`parameters.${o.paramKey}.${e}.${a}`,
|
|
52
48
|
r
|
|
53
49
|
);
|
|
54
|
-
},
|
|
50
|
+
}, E = (e) => {
|
|
55
51
|
var u;
|
|
56
52
|
if (!n.value) return;
|
|
57
|
-
const a = ((u = e.match(
|
|
58
|
-
(t) =>
|
|
53
|
+
const a = ((u = e.match(B.PATH)) == null ? void 0 : u.map((t) => t.slice(1, -1))) || [], r = n.value.parameters[o.paramKey], i = new Map(r.map((t) => [t.key, t])), p = a.map(
|
|
54
|
+
(t) => i.get(t) || { key: t, value: "", enabled: !0 }
|
|
59
55
|
);
|
|
60
56
|
r.forEach((t) => {
|
|
61
|
-
!a.includes(t.key) && (t.value || t.required) &&
|
|
62
|
-
}), r.splice(0, r.length, ...
|
|
57
|
+
!a.includes(t.key) && (t.value || t.required) && p.push(t);
|
|
58
|
+
}), r.splice(0, r.length, ...p), f.edit(
|
|
63
59
|
n.value.uid,
|
|
64
60
|
`parameters.${o.paramKey}`,
|
|
65
61
|
r
|
|
@@ -71,22 +67,22 @@ const N = {
|
|
|
71
67
|
return (e = s.value) == null ? void 0 : e.path;
|
|
72
68
|
},
|
|
73
69
|
(e) => {
|
|
74
|
-
e &&
|
|
70
|
+
e && E(e);
|
|
75
71
|
}
|
|
76
72
|
), (e, a) => (d(), h(w, {
|
|
77
|
-
itemCount:
|
|
73
|
+
itemCount: l.value.length
|
|
78
74
|
}, {
|
|
79
75
|
title: y(() => [
|
|
80
76
|
x(q(e.title), 1)
|
|
81
77
|
]),
|
|
82
78
|
default: y(() => [
|
|
83
|
-
|
|
79
|
+
l.value.length ? (d(), h(M, {
|
|
84
80
|
key: 0,
|
|
85
81
|
class: "flex-1",
|
|
86
82
|
isEnabledHidden: "",
|
|
87
|
-
items:
|
|
83
|
+
items: l.value,
|
|
88
84
|
onUpdateRow: g
|
|
89
|
-
}, null, 8, ["items"])) : (d(), C("div",
|
|
85
|
+
}, null, 8, ["items"])) : (d(), C("div", T, a[0] || (a[0] = [
|
|
90
86
|
x(" You can use variables in your path: "),
|
|
91
87
|
P("code", { class: "bg-b-2 ml-1 px-1 rounded" }, "/endpoint/{my_path_variable}", -1)
|
|
92
88
|
])))
|
|
@@ -96,5 +92,5 @@ const N = {
|
|
|
96
92
|
}
|
|
97
93
|
});
|
|
98
94
|
export {
|
|
99
|
-
|
|
95
|
+
O as default
|
|
100
96
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AA6KA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;CACrC,CAAC;;AAoQF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ca45845b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { defineComponent as B, computed as S, ref as b, watch as V, openBlock as d, createBlock as w, unref as o, withCtx as
|
|
1
|
+
import { defineComponent as B, computed as S, ref as b, watch as V, openBlock as d, createBlock as w, unref as o, withCtx as A, createElementVNode as x, createElementBlock as v, createCommentVNode as C, toDisplayString as R, createVNode as s, withDirectives as i, vShow as r } from "vue";
|
|
2
2
|
import H from "../../../components/ContextBar.vue.js";
|
|
3
3
|
import N from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
|
+
import { useActiveEntities as E } from "../../../store/active-entities.js";
|
|
4
5
|
import K from "./RequestBody.vue.js";
|
|
5
6
|
import h from "./RequestParams.vue.js";
|
|
6
7
|
import U from "./RequestPathParams.vue.js";
|
|
7
8
|
import { canMethodHaveBody as f } from "@scalar/oas-utils/helpers";
|
|
8
|
-
import
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
const
|
|
9
|
+
import Q from "./RequestAuth/RequestAuth.vue.js";
|
|
10
|
+
import { useWorkspace as $ } from "../../../store/store.js";
|
|
11
|
+
const D = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none group" }, M = {
|
|
11
12
|
key: 0,
|
|
12
13
|
class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
|
|
13
14
|
for: "requestname"
|
|
14
|
-
},
|
|
15
|
+
}, P = ["value"], z = {
|
|
15
16
|
key: 2,
|
|
16
17
|
class: "flex items-center text-c-1 h-8"
|
|
17
|
-
},
|
|
18
|
+
}, I = { class: "request-section-content custom-scroll flex flex-1 flex-col px-3 xl:px-4 py-2.5" }, ee = /* @__PURE__ */ B({
|
|
18
19
|
__name: "RequestSection",
|
|
19
20
|
props: {
|
|
20
21
|
selectedSecuritySchemeUids: {}
|
|
21
22
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const { activeRequest: l, activeExample: y, isReadOnly: p, requestMutators: g } =
|
|
23
|
+
setup(L) {
|
|
24
|
+
const { activeRequest: l, activeExample: y } = E(), { isReadOnly: p, requestMutators: g } = $(), k = S(() => {
|
|
24
25
|
var a, u;
|
|
25
26
|
const t = /* @__PURE__ */ new Set([
|
|
26
27
|
"All",
|
|
@@ -35,7 +36,7 @@ const $ = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
35
36
|
}), _ = S(
|
|
36
37
|
() => {
|
|
37
38
|
var t, a;
|
|
38
|
-
return p
|
|
39
|
+
return p && ((a = (t = l.value) == null ? void 0 : t.security) == null ? void 0 : a.length) === 0;
|
|
39
40
|
}
|
|
40
41
|
), e = b("All");
|
|
41
42
|
V(l, (t) => {
|
|
@@ -51,19 +52,19 @@ const $ = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
51
52
|
return d(), w(N, {
|
|
52
53
|
"aria-label": `Request: ${(u = o(l)) == null ? void 0 : u.summary}`
|
|
53
54
|
}, {
|
|
54
|
-
title:
|
|
55
|
+
title: A(() => {
|
|
55
56
|
var n, c;
|
|
56
57
|
return [
|
|
57
|
-
|
|
58
|
-
o(p) ? C("", !0) : (d(), v("label",
|
|
59
|
-
o(p) ? (d(), v("span",
|
|
58
|
+
x("div", D, [
|
|
59
|
+
o(p) ? C("", !0) : (d(), v("label", M)),
|
|
60
|
+
o(p) ? (d(), v("span", z, R((c = o(l)) == null ? void 0 : c.summary), 1)) : (d(), v("input", {
|
|
60
61
|
key: 1,
|
|
61
62
|
id: "requestname",
|
|
62
63
|
class: "text-c-1 rounded pointer-events-auto relative w-full pl-3 -ml-3 has-[:focus-visible]:outline h-8 group-hover-input has-[:focus-visible]:outline z-10",
|
|
63
64
|
placeholder: "Request Name",
|
|
64
65
|
value: (n = o(l)) == null ? void 0 : n.summary,
|
|
65
66
|
onInput: q
|
|
66
|
-
}, null, 40,
|
|
67
|
+
}, null, 40, P))
|
|
67
68
|
]),
|
|
68
69
|
s(H, {
|
|
69
70
|
activeSection: e.value,
|
|
@@ -72,11 +73,11 @@ const $ = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
72
73
|
}, null, 8, ["activeSection", "sections"])
|
|
73
74
|
];
|
|
74
75
|
}),
|
|
75
|
-
default:
|
|
76
|
+
default: A(() => {
|
|
76
77
|
var n, c, m;
|
|
77
78
|
return [
|
|
78
|
-
|
|
79
|
-
i(s(
|
|
79
|
+
x("div", I, [
|
|
80
|
+
i(s(Q, {
|
|
80
81
|
selectedSecuritySchemeUids: t.selectedSecuritySchemeUids,
|
|
81
82
|
title: "Authentication"
|
|
82
83
|
}, null, 8, ["selectedSecuritySchemeUids"]), [
|
|
@@ -127,5 +128,5 @@ const $ = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
127
128
|
}
|
|
128
129
|
});
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
+
ee as default
|
|
131
132
|
};
|
|
@@ -6,7 +6,7 @@ type __VLS_Props = {
|
|
|
6
6
|
showUploadButton?: boolean;
|
|
7
7
|
};
|
|
8
8
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
-
updateRow: (idx: number, field: "
|
|
9
|
+
updateRow: (idx: number, field: "key" | "value", value: string) => any;
|
|
10
10
|
toggleRow: (idx: number, enabled: boolean) => any;
|
|
11
11
|
addRow: () => any;
|
|
12
12
|
deleteRow: () => any;
|
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
15
15
|
uploadFile: (idx: number) => any;
|
|
16
16
|
removeFile: (idx: number) => any;
|
|
17
17
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
-
onUpdateRow?: ((idx: number, field: "
|
|
18
|
+
onUpdateRow?: ((idx: number, field: "key" | "value", value: string) => any) | undefined;
|
|
19
19
|
onToggleRow?: ((idx: number, enabled: boolean) => any) | undefined;
|
|
20
20
|
onAddRow?: (() => any) | undefined;
|
|
21
21
|
onDeleteRow?: (() => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"AAqaA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;cAKqC,MAAM;aAAO,MAAM;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAioB1D,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSidebar.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-6a96336d"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|