@scalar/api-client 2.26.2 → 2.29.1
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 +218 -0
- package/dist/components/Server/ServerSelector.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +1 -1
- package/dist/libs/local-storage.js +3 -3
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +26 -26
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +88 -103
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +20 -19
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +7 -7
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +52 -54
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +106 -86
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +4 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +32 -40
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
- package/dist/v2/features/app/App.vue.d.ts +5 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +80 -78
- package/dist/v2/features/app/app-events.d.ts +2 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +89 -64
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +172 -151
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +99 -97
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +4 -4
- package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +1 -1
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +9 -9
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +71 -43
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +11 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +12 -10
- package/dist/v2/features/app/helpers/routes.d.ts +2 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +11 -11
- package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-theme.js +34 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -6
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +41 -22
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +27 -15
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts +3 -0
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/LabelInput.vue.js +2 -2
- package/dist/v2/features/collection/components/LabelInput.vue2.js +20 -16
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +2 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.js +93 -88
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +19 -17
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +7 -2
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +70 -71
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.d.ts → CommandPaletteOpenApiDocument.vue.d.ts} +3 -3
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/{CommandPaletteDocument.vue.js → CommandPaletteOpenApiDocument.vue.js} +15 -15
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +2 -2
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +10 -10
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +27 -5
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +80 -53
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +34 -9
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +50 -44
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +15 -15
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +30 -33
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
- package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/components/Section.vue.js +26 -15
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +2 -2
- package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.js +8 -6
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +132 -115
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -16
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +0 -1
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-body.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;
|
|
1
|
+
{"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-body.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAKjG;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,iBAAiB,GAAG,SAAS;AAC1C,8DAA8D;AAC9D,MAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;AAChC,qCAAqC;AACrC,mBAAsB,KACrB,QAAQ,GAAG,IAgFb,CAAA"}
|
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
import { replaceEnvVariables as
|
|
2
|
-
import { unpackProxyObject as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { replaceEnvVariables as l } from "@scalar/helpers/regex/replace-variables";
|
|
2
|
+
import { unpackProxyObject as s } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
3
|
+
import { getSelectedBodyContentType as m } from "./get-selected-body-content-type.js";
|
|
4
|
+
import { getExampleFromBody as d } from "../../request-block/helpers/get-request-body-example.js";
|
|
5
|
+
const v = (p, a = {}, u = "default") => {
|
|
6
|
+
if (!p)
|
|
6
7
|
return null;
|
|
7
|
-
const
|
|
8
|
+
const o = m(p, u);
|
|
9
|
+
if (!o)
|
|
10
|
+
return null;
|
|
11
|
+
const e = d(p, o, u);
|
|
8
12
|
if (!e)
|
|
9
13
|
return null;
|
|
10
|
-
if ((
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
if (!
|
|
14
|
+
if ((o === "multipart/form-data" || o === "application/x-www-form-urlencoded") && Array.isArray(e.value)) {
|
|
15
|
+
const i = e.value.filter((r) => !r.isDisabled), t = o === "multipart/form-data" ? new FormData() : new URLSearchParams();
|
|
16
|
+
return i.forEach(({ name: r, value: n }) => {
|
|
17
|
+
if (!r)
|
|
14
18
|
return;
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
} else typeof
|
|
20
|
-
}),
|
|
19
|
+
const f = l(r, a);
|
|
20
|
+
if (n instanceof File && t instanceof FormData) {
|
|
21
|
+
const c = s(n);
|
|
22
|
+
t.append(f, c, c.name);
|
|
23
|
+
} else typeof n == "string" && t.append(f, l(n, a));
|
|
24
|
+
}), t;
|
|
21
25
|
}
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
for (const [
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
if (o === "application/x-www-form-urlencoded" && e.value !== null && typeof e.value == "object" && !Array.isArray(e.value)) {
|
|
27
|
+
const i = new URLSearchParams();
|
|
28
|
+
for (const [t, r] of Object.entries(e.value))
|
|
29
|
+
if (t && r !== void 0 && r !== null) {
|
|
30
|
+
const n = l(t, a), f = typeof r == "string" ? r : String(r);
|
|
31
|
+
i.append(n, l(f, a));
|
|
28
32
|
}
|
|
29
|
-
return
|
|
33
|
+
return i;
|
|
30
34
|
}
|
|
31
|
-
return typeof e.value == "object" ?
|
|
35
|
+
return typeof e.value == "object" ? l(JSON.stringify(e.value), a) : typeof e.value == "string" ? l(e.value, a) : e.value;
|
|
32
36
|
};
|
|
33
37
|
export {
|
|
34
|
-
|
|
38
|
+
v as buildRequestBody
|
|
35
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/get-example.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"get-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/get-example.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,8DAA8D,CAAA;AAgCrE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GACrB,OAAO,eAAe,GAAG,iBAAiB,GAAG,eAAe,EAC5D,YAAY,MAAM,GAAG,SAAS,EAC9B,aAAa,MAAM,GAAG,SAAS,KAC9B,aAAa,GAAG,SA6ClB,CAAA"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { getResolvedRefDeep as
|
|
2
|
-
const r = (t, n,
|
|
1
|
+
import { getResolvedRefDeep as u } from "../../operation-code-sample/helpers/get-resolved-ref-deep.js";
|
|
2
|
+
const r = (t, n, s) => {
|
|
3
3
|
if (!t && !n)
|
|
4
4
|
return;
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
7
|
-
return
|
|
8
|
-
if (!o && n !== void 0)
|
|
9
|
-
return { value:
|
|
10
|
-
},
|
|
5
|
+
const o = !!t && Object.keys(t).length > 0, e = s || Object.keys(t ?? {})[0] || "", i = u(t?.[e]);
|
|
6
|
+
if (i !== void 0)
|
|
7
|
+
return i;
|
|
8
|
+
if ((!o || !s) && n !== void 0)
|
|
9
|
+
return { value: u(n) };
|
|
10
|
+
}, l = (t, n, s) => {
|
|
11
11
|
if ("content" in t) {
|
|
12
|
-
const e = t.content?.[
|
|
13
|
-
if (
|
|
14
|
-
return
|
|
12
|
+
const e = t.content?.[s ?? Object.keys(t.content)[0] ?? ""], i = r(e?.examples, e?.example, n);
|
|
13
|
+
if (i !== void 0)
|
|
14
|
+
return i;
|
|
15
15
|
}
|
|
16
16
|
if ("examples" in t || "example" in t) {
|
|
17
17
|
const e = r(t.examples, t.example, n);
|
|
18
18
|
if (e !== void 0)
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
if ("schema" in
|
|
23
|
-
const e =
|
|
21
|
+
const o = u(t);
|
|
22
|
+
if ("schema" in o && o.schema) {
|
|
23
|
+
const e = o.schema;
|
|
24
24
|
if ("default" in e && e.default !== void 0)
|
|
25
25
|
return { value: e.default };
|
|
26
26
|
if ("enum" in e && e.enum?.[0] !== void 0)
|
|
@@ -32,5 +32,5 @@ const r = (t, n, o) => {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
l as getExample
|
|
36
36
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/request-body';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the selected body content type for the given request body and exampleKey.
|
|
4
|
+
* Priority:
|
|
5
|
+
* 1. requestBody?.['x-scalar-selected-content-type']?.[exampleKey] (if set)
|
|
6
|
+
* 2. First key in requestBody?.content (if available)
|
|
7
|
+
* 3. null (if none available)
|
|
8
|
+
*/
|
|
9
|
+
export declare const getSelectedBodyContentType: (requestBody: RequestBodyObject | undefined, exampleKey?: string) => string | null;
|
|
10
|
+
//# sourceMappingURL=get-selected-body-content-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-selected-body-content-type.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/helpers/get-selected-body-content-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAEjG;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACrC,aAAa,iBAAiB,GAAG,SAAS,EAC1C,aAAY,MAAkB,KAC7B,MAAM,GAAG,IAIX,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestBlock.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-2076f815"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as z, computed as n, ref as X, useId as s, watch as J, createBlock as q, openBlock as v, withCtx as C, createElementVNode as K, withDirectives as m, createElementBlock as
|
|
1
|
+
import { defineComponent as z, computed as n, ref as X, useId as s, watch as J, createBlock as q, openBlock as v, withCtx as C, createElementVNode as K, withDirectives as m, createElementBlock as x, createVNode as d, unref as y, vShow as c, mergeProps as f, toHandlers as b, Fragment as W, renderList as Y, createCommentVNode as E, resolveDynamicComponent as Z, toDisplayString as _ } from "vue";
|
|
2
2
|
import { ScalarErrorBoundary as ee } from "@scalar/components";
|
|
3
3
|
import { canMethodHaveBody as w } from "@scalar/helpers/http/can-method-have-body";
|
|
4
4
|
import { REGEX as te } from "@scalar/helpers/regex/regex-helpers";
|
|
5
|
-
import { getResolvedRef as
|
|
5
|
+
import { getResolvedRef as R } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
6
|
import { unpackProxyObject as ae } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
7
7
|
import le from "../../../components/SectionFilter.vue.js";
|
|
8
8
|
import ne from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
@@ -18,10 +18,10 @@ import { getParameterSchema as de } from "./helpers/get-parameter-schema.js";
|
|
|
18
18
|
import { groupBy as D } from "./helpers/group-by.js";
|
|
19
19
|
import { isParamDisabled as ce } from "./helpers/is-param-disabled.js";
|
|
20
20
|
import ve from "../scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
21
|
-
const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, he = ["for"], fe = ["id", "placeholder", "value"],
|
|
21
|
+
const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, he = ["for"], fe = ["id", "placeholder", "value"], Be = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "text-c-1 flex h-8 items-center"
|
|
24
|
-
},
|
|
24
|
+
}, xe = ["id", "role"], Te = /* @__PURE__ */ z({
|
|
25
25
|
__name: "RequestBlock",
|
|
26
26
|
props: {
|
|
27
27
|
authMeta: { default: () => ({ type: "document" }) },
|
|
@@ -50,7 +50,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
50
50
|
exampleKey: e.exampleKey
|
|
51
51
|
})), r = n(
|
|
52
52
|
() => D(
|
|
53
|
-
e.operation.parameters?.map((t) =>
|
|
53
|
+
e.operation.parameters?.map((t) => R(t)) ?? [],
|
|
54
54
|
"in",
|
|
55
55
|
(t) => {
|
|
56
56
|
const a = re(t, e.exampleKey, void 0);
|
|
@@ -75,7 +75,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
75
75
|
)
|
|
76
76
|
), N = n(
|
|
77
77
|
() => me({ method: e.method, operation: e.operation, exampleKey: e.exampleKey })
|
|
78
|
-
),
|
|
78
|
+
), p = n(() => {
|
|
79
79
|
const t = e.operation["x-scalar-disable-parameters"]?.["default-headers"]?.[e.exampleKey] ?? {};
|
|
80
80
|
return N.value.map((a) => {
|
|
81
81
|
const l = I.value[a.name.toLowerCase()]?.[0];
|
|
@@ -89,7 +89,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
89
89
|
};
|
|
90
90
|
});
|
|
91
91
|
}), A = n(() => [
|
|
92
|
-
...
|
|
92
|
+
...p.value,
|
|
93
93
|
...r.value.header ?? []
|
|
94
94
|
]), V = n(() => {
|
|
95
95
|
const t = ie({
|
|
@@ -153,7 +153,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
153
153
|
meta: o.value,
|
|
154
154
|
payload: { summary: a }
|
|
155
155
|
});
|
|
156
|
-
},
|
|
156
|
+
}, B = n(() => ({
|
|
157
157
|
path: g("path", e.eventBus, o.value, {
|
|
158
158
|
context: r.value.path ?? []
|
|
159
159
|
}),
|
|
@@ -163,7 +163,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
163
163
|
}),
|
|
164
164
|
header: g("header", e.eventBus, o.value, {
|
|
165
165
|
context: A.value,
|
|
166
|
-
defaultParameters:
|
|
166
|
+
defaultParameters: p.value.length
|
|
167
167
|
}),
|
|
168
168
|
query: g("query", e.eventBus, o.value, {
|
|
169
169
|
context: r.value.query ?? []
|
|
@@ -209,19 +209,19 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
209
209
|
}, {
|
|
210
210
|
title: C(() => [
|
|
211
211
|
K("div", ye, [
|
|
212
|
-
e.layout !== "modal" ? (v(),
|
|
212
|
+
e.layout !== "modal" ? (v(), x("label", {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
|
|
215
215
|
for: y(U)
|
|
216
216
|
}, null, 8, he)) : E("", !0),
|
|
217
|
-
e.layout !== "modal" ? (v(),
|
|
217
|
+
e.layout !== "modal" ? (v(), x("input", {
|
|
218
218
|
key: 1,
|
|
219
219
|
id: y(U),
|
|
220
220
|
class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
|
|
221
221
|
placeholder: L.value,
|
|
222
222
|
value: e.operation.summary,
|
|
223
|
-
|
|
224
|
-
}, null, 40, fe)) : (v(),
|
|
223
|
+
onBlur: F
|
|
224
|
+
}, null, 40, fe)) : (v(), x("span", Be, _(e.operation.summary), 1))
|
|
225
225
|
]),
|
|
226
226
|
d(le, {
|
|
227
227
|
modelValue: i.value,
|
|
@@ -259,7 +259,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
259
259
|
rows: r.value.path ?? [],
|
|
260
260
|
showAddRowPlaceholder: !1,
|
|
261
261
|
title: "Variables"
|
|
262
|
-
}, b(
|
|
262
|
+
}, b(B.value.path)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
263
263
|
[c, h("Variables") && r.value.path?.length]
|
|
264
264
|
]),
|
|
265
265
|
m(d(k, f({
|
|
@@ -270,7 +270,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
270
270
|
rows: P.value ?? [],
|
|
271
271
|
showAddRowPlaceholder: !0,
|
|
272
272
|
title: "Cookies"
|
|
273
|
-
}, b(
|
|
273
|
+
}, b(B.value.cookie)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
274
274
|
[c, h("Cookies")]
|
|
275
275
|
]),
|
|
276
276
|
m(d(k, f({
|
|
@@ -280,7 +280,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
280
280
|
exampleKey: e.exampleKey,
|
|
281
281
|
rows: A.value ?? [],
|
|
282
282
|
title: "Headers"
|
|
283
|
-
}, b(
|
|
283
|
+
}, b(B.value.header)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
284
284
|
[c, h("Headers")]
|
|
285
285
|
]),
|
|
286
286
|
m(d(k, f({
|
|
@@ -290,14 +290,14 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
290
290
|
exampleKey: e.exampleKey,
|
|
291
291
|
rows: r.value.query ?? [],
|
|
292
292
|
title: "Query Parameters"
|
|
293
|
-
}, b(
|
|
293
|
+
}, b(B.value.query)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
294
294
|
[c, h("Query")]
|
|
295
295
|
]),
|
|
296
296
|
m(d(ue, {
|
|
297
297
|
id: u.value.Body,
|
|
298
298
|
environment: e.environment,
|
|
299
299
|
exampleKey: e.exampleKey,
|
|
300
|
-
requestBody: y(
|
|
300
|
+
requestBody: y(R)(e.operation.requestBody),
|
|
301
301
|
title: "Request Body",
|
|
302
302
|
"onUpdate:contentType": G,
|
|
303
303
|
"onUpdate:formValue": M,
|
|
@@ -305,17 +305,17 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
305
305
|
}, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
|
|
306
306
|
[c, h("Body") && y(w)(e.method)]
|
|
307
307
|
]),
|
|
308
|
-
(v(!0),
|
|
308
|
+
(v(!0), x(W, null, Y(e.plugins, (l, S) => (v(), q(y(ee), { key: S }, {
|
|
309
309
|
default: C(() => [
|
|
310
|
-
l?.components?.request ? (v(), q(Z(l.components.request.component), f({
|
|
310
|
+
l?.components?.request ? m((v(), q(Z(l.components.request.component), f({
|
|
311
311
|
key: 0,
|
|
312
312
|
operation: e.operation
|
|
313
|
-
}, { ref_for: !0 }, l.components.request.additionalProps, { "onOperation:update:extension": j }), null, 16, ["operation"]))
|
|
313
|
+
}, { ref_for: !0 }, l.components.request.additionalProps, { "onOperation:update:extension": j }), null, 16, ["operation"])), [
|
|
314
|
+
[c, i.value === "All"]
|
|
315
|
+
]) : E("", !0)
|
|
314
316
|
]),
|
|
315
317
|
_: 2
|
|
316
|
-
}, 1024)),
|
|
317
|
-
[c, i.value === "All"]
|
|
318
|
-
])), 128)),
|
|
318
|
+
}, 1024))), 128)),
|
|
319
319
|
a[1] || (a[1] = K("div", { class: "flex grow" }, null, -1)),
|
|
320
320
|
m(d(se, {
|
|
321
321
|
clientOptions: e.clientOptions,
|
|
@@ -327,12 +327,12 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
327
327
|
path: e.path,
|
|
328
328
|
securitySchemes: e.selectedSecuritySchemes,
|
|
329
329
|
selectedClient: e.selectedClient,
|
|
330
|
-
selectedContentType: y(
|
|
330
|
+
selectedContentType: y(R)(e.operation.requestBody)?.["x-scalar-selected-content-type"]?.[e.exampleKey],
|
|
331
331
|
selectedServer: e.server ?? void 0
|
|
332
332
|
}, null, 8, ["clientOptions", "eventBus", "globalCookies", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedContentType", "selectedServer"]), [
|
|
333
333
|
[c, i.value === "All"]
|
|
334
334
|
])
|
|
335
|
-
], 8,
|
|
335
|
+
], 8, xe)
|
|
336
336
|
]),
|
|
337
337
|
_: 1
|
|
338
338
|
}, 8, ["aria-label"]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"AAwQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAgBrG,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AA4eF,QAAA,MAAM,YAAY;;;;;;;;;;;eAve4B,MAAM;;;;;;;;;;;;;;;;;;eAAN,MAAM;;;;;;;kFA0elD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -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-fd127758"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as h, computed as d, createBlock as p, openBlock as u, unref as t, withCtx as a, createVNode as i, createElementVNode as f, toDisplayString as v, createElementBlock as y, Fragment as E, createTextVNode as T } from "vue";
|
|
2
|
+
import { ScalarListbox as F, ScalarButton as x, ScalarIcon as w } from "@scalar/components";
|
|
3
|
+
import { CONTENT_TYPES as k } from "@scalar/helpers/consts/content-types";
|
|
4
|
+
import { objectEntries as q } from "@scalar/helpers/object/object-entries";
|
|
5
|
+
import { unpackProxyObject as C } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
6
|
+
import { getSelectedBodyContentType as D } from "../../operation-block/helpers/get-selected-body-content-type.js";
|
|
7
|
+
import U from "./RequestBodyForm.vue.js";
|
|
5
8
|
import { getFileName as V } from "../helpers/files.js";
|
|
6
|
-
import { getExampleFromBody as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { useFileDialog as
|
|
13
|
-
const
|
|
9
|
+
import { getExampleFromBody as $ } from "../helpers/get-request-body-example.js";
|
|
10
|
+
import z from "../../../components/layout/CollapsibleSection.vue.js";
|
|
11
|
+
import O from "../../../components/data-table/DataTable.vue.js";
|
|
12
|
+
import K from "../../../components/data-table/DataTableHeader.vue.js";
|
|
13
|
+
import I from "../../../components/data-table/DataTableRow.vue.js";
|
|
14
|
+
import L from "../../../components/code-input/CodeInput.vue.js";
|
|
15
|
+
import { useFileDialog as M } from "../../../../hooks/useFileDialog.js";
|
|
16
|
+
const P = {
|
|
14
17
|
key: 0,
|
|
15
18
|
class: "text-c-3 flex min-h-10 w-full items-center justify-center border-t p-2 text-sm"
|
|
16
|
-
},
|
|
19
|
+
}, R = {
|
|
17
20
|
key: 1,
|
|
18
21
|
class: "flex items-center justify-center overflow-hidden border-t p-1.5"
|
|
19
|
-
}, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" },
|
|
22
|
+
}, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, re = /* @__PURE__ */ h({
|
|
20
23
|
__name: "RequestBody",
|
|
21
24
|
props: {
|
|
22
25
|
requestBody: {},
|
|
@@ -25,88 +28,70 @@ const R = {
|
|
|
25
28
|
environment: {}
|
|
26
29
|
},
|
|
27
30
|
emits: ["update:contentType", "update:value", "update:formValue"],
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
31
|
+
setup(r, { emit: B }) {
|
|
32
|
+
const m = B, N = {
|
|
30
33
|
"application/json": "json",
|
|
31
34
|
"application/xml": "xml",
|
|
32
35
|
"application/yaml": "yaml"
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"application/json": "JSON",
|
|
38
|
-
"application/xml": "XML",
|
|
39
|
-
"application/yaml": "YAML",
|
|
40
|
-
"application/edn": "EDN",
|
|
41
|
-
other: "Other",
|
|
42
|
-
none: "None"
|
|
43
|
-
}, n = d(
|
|
44
|
-
() => l.requestBody?.["x-scalar-selected-content-type"]?.[l.exampleKey] ?? Object.keys(l.requestBody?.content ?? {})[0] ?? "none"
|
|
45
|
-
);
|
|
46
|
-
q(
|
|
47
|
-
() => l.requestBody?.["x-scalar-selected-content-type"]?.[l.exampleKey],
|
|
48
|
-
(o) => {
|
|
49
|
-
o || s("update:contentType", { value: n.value });
|
|
50
|
-
},
|
|
51
|
-
{ immediate: !0 }
|
|
52
|
-
);
|
|
53
|
-
const f = Object.entries(b).map(([o, e]) => ({
|
|
54
|
-
id: o,
|
|
36
|
+
}, o = d(
|
|
37
|
+
() => D(r.requestBody, r.exampleKey) ?? "none"
|
|
38
|
+
), c = q(k).map(([n, e]) => ({
|
|
39
|
+
id: n,
|
|
55
40
|
label: e
|
|
56
|
-
})),
|
|
57
|
-
get: () =>
|
|
58
|
-
(e) => e.id ===
|
|
59
|
-
) ??
|
|
60
|
-
set: (
|
|
61
|
-
|
|
41
|
+
})), b = d({
|
|
42
|
+
get: () => c.find(
|
|
43
|
+
(e) => e.id === o.value
|
|
44
|
+
) ?? c.at(-1),
|
|
45
|
+
set: (n) => {
|
|
46
|
+
m("update:contentType", { value: n.id });
|
|
62
47
|
}
|
|
63
48
|
});
|
|
64
|
-
function
|
|
65
|
-
const { open: e } =
|
|
66
|
-
onChange: (
|
|
67
|
-
const
|
|
68
|
-
|
|
49
|
+
function S(n) {
|
|
50
|
+
const { open: e } = M({
|
|
51
|
+
onChange: (l) => {
|
|
52
|
+
const g = l?.[0];
|
|
53
|
+
g && n(g);
|
|
69
54
|
},
|
|
70
55
|
multiple: !1,
|
|
71
56
|
accept: "*/*"
|
|
72
57
|
});
|
|
73
58
|
e();
|
|
74
59
|
}
|
|
75
|
-
const
|
|
76
|
-
() =>
|
|
60
|
+
const s = d(
|
|
61
|
+
() => r.requestBody && $(r.requestBody, o.value, r.exampleKey)
|
|
77
62
|
), j = d(() => {
|
|
78
|
-
if (!
|
|
63
|
+
if (!s.value)
|
|
79
64
|
return "";
|
|
80
|
-
const
|
|
81
|
-
return typeof
|
|
65
|
+
const n = s.value.value;
|
|
66
|
+
return typeof n == "string" ? n : JSON.stringify(n, null, 2);
|
|
82
67
|
});
|
|
83
|
-
return (
|
|
84
|
-
title:
|
|
85
|
-
T(v(
|
|
68
|
+
return (n, e) => (u(), p(t(z), null, {
|
|
69
|
+
title: a(() => [
|
|
70
|
+
T(v(r.title), 1)
|
|
86
71
|
]),
|
|
87
|
-
default:
|
|
88
|
-
|
|
72
|
+
default: a(() => [
|
|
73
|
+
i(t(O), {
|
|
89
74
|
columns: [""],
|
|
90
75
|
presentational: ""
|
|
91
76
|
}, {
|
|
92
|
-
default:
|
|
93
|
-
|
|
94
|
-
default:
|
|
95
|
-
|
|
96
|
-
modelValue:
|
|
97
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
98
|
-
options: t(
|
|
77
|
+
default: a(() => [
|
|
78
|
+
i(t(K), { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between border-r-0 !p-0" }, {
|
|
79
|
+
default: a(() => [
|
|
80
|
+
i(t(F), {
|
|
81
|
+
modelValue: b.value,
|
|
82
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => b.value = l),
|
|
83
|
+
options: t(c),
|
|
99
84
|
teleport: ""
|
|
100
85
|
}, {
|
|
101
|
-
default:
|
|
102
|
-
|
|
86
|
+
default: a(() => [
|
|
87
|
+
i(t(x), {
|
|
103
88
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
|
|
104
89
|
fullWidth: "",
|
|
105
90
|
variant: "ghost"
|
|
106
91
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
|
|
109
|
-
|
|
92
|
+
default: a(() => [
|
|
93
|
+
f("span", null, v(t(k)[o.value] ?? o.value), 1),
|
|
94
|
+
i(t(w), {
|
|
110
95
|
icon: "ChevronDown",
|
|
111
96
|
size: "md"
|
|
112
97
|
})
|
|
@@ -119,23 +104,23 @@ const R = {
|
|
|
119
104
|
]),
|
|
120
105
|
_: 1
|
|
121
106
|
}),
|
|
122
|
-
|
|
123
|
-
default:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
])])) :
|
|
127
|
-
t(V)(t(
|
|
128
|
-
|
|
129
|
-
|
|
107
|
+
i(t(I), null, {
|
|
108
|
+
default: a(() => [
|
|
109
|
+
o.value === "none" ? (u(), y("div", P, [...e[5] || (e[5] = [
|
|
110
|
+
f("span", null, "No Body", -1)
|
|
111
|
+
])])) : o.value === "application/octet-stream" ? (u(), y("div", R, [
|
|
112
|
+
t(V)(t(C)(s.value?.value)) !== void 0 ? (u(), y(E, { key: 0 }, [
|
|
113
|
+
f("span", J, v(t(V)(t(C)(s.value?.value))), 1),
|
|
114
|
+
i(t(x), {
|
|
130
115
|
class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
|
|
131
116
|
size: "sm",
|
|
132
117
|
variant: "outlined",
|
|
133
|
-
onClick: e[1] || (e[1] = (
|
|
118
|
+
onClick: e[1] || (e[1] = (l) => m("update:value", {
|
|
134
119
|
payload: void 0,
|
|
135
|
-
contentType:
|
|
120
|
+
contentType: o.value
|
|
136
121
|
}))
|
|
137
122
|
}, {
|
|
138
|
-
default:
|
|
123
|
+
default: a(() => [...e[6] || (e[6] = [
|
|
139
124
|
T(" Delete ", -1)
|
|
140
125
|
])]),
|
|
141
126
|
_: 1
|
|
@@ -145,16 +130,16 @@ const R = {
|
|
|
145
130
|
class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
|
|
146
131
|
size: "sm",
|
|
147
132
|
variant: "outlined",
|
|
148
|
-
onClick: e[2] || (e[2] = () =>
|
|
149
|
-
(
|
|
150
|
-
payload:
|
|
151
|
-
contentType:
|
|
133
|
+
onClick: e[2] || (e[2] = () => S(
|
|
134
|
+
(l) => m("update:value", {
|
|
135
|
+
payload: l,
|
|
136
|
+
contentType: o.value
|
|
152
137
|
})
|
|
153
138
|
))
|
|
154
139
|
}, {
|
|
155
|
-
default:
|
|
156
|
-
e[7] || (e[7] =
|
|
157
|
-
|
|
140
|
+
default: a(() => [
|
|
141
|
+
e[7] || (e[7] = f("span", null, "Select File", -1)),
|
|
142
|
+
i(t(w), {
|
|
158
143
|
class: "ml-1",
|
|
159
144
|
icon: "Upload",
|
|
160
145
|
size: "xs",
|
|
@@ -163,27 +148,27 @@ const R = {
|
|
|
163
148
|
]),
|
|
164
149
|
_: 1
|
|
165
150
|
}))
|
|
166
|
-
])) :
|
|
151
|
+
])) : o.value === "multipart/form-data" || o.value === "application/x-www-form-urlencoded" ? (u(), p(U, {
|
|
167
152
|
key: 2,
|
|
168
|
-
environment:
|
|
169
|
-
example:
|
|
170
|
-
selectedContentType:
|
|
171
|
-
"onUpdate:formValue": e[3] || (e[3] = (
|
|
172
|
-
payload:
|
|
173
|
-
contentType:
|
|
153
|
+
environment: r.environment,
|
|
154
|
+
example: s.value,
|
|
155
|
+
selectedContentType: o.value,
|
|
156
|
+
"onUpdate:formValue": e[3] || (e[3] = (l) => m("update:formValue", {
|
|
157
|
+
payload: l,
|
|
158
|
+
contentType: o.value
|
|
174
159
|
}))
|
|
175
|
-
}, null, 8, ["environment", "example", "selectedContentType"])) : (u(), p(t(
|
|
160
|
+
}, null, 8, ["environment", "example", "selectedContentType"])) : (u(), p(t(L), {
|
|
176
161
|
key: 3,
|
|
177
162
|
class: "border-t px-3",
|
|
178
163
|
content: "",
|
|
179
|
-
environment:
|
|
180
|
-
language: N[
|
|
164
|
+
environment: r.environment,
|
|
165
|
+
language: N[o.value] ?? "plaintext",
|
|
181
166
|
lineNumbers: "",
|
|
182
167
|
lint: "",
|
|
183
168
|
modelValue: j.value,
|
|
184
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
185
|
-
payload:
|
|
186
|
-
contentType:
|
|
169
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => m("update:value", {
|
|
170
|
+
payload: l,
|
|
171
|
+
contentType: o.value
|
|
187
172
|
}))
|
|
188
173
|
}, null, 8, ["environment", "language", "modelValue"]))
|
|
189
174
|
]),
|
|
@@ -198,5 +183,5 @@ const R = {
|
|
|
198
183
|
}
|
|
199
184
|
});
|
|
200
185
|
export {
|
|
201
|
-
|
|
186
|
+
re as default
|
|
202
187
|
};
|