@scalar/api-client 2.2.59 → 2.2.60
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 +15 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +88 -80
- package/dist/components/IconSelector.vue.d.ts.map +1 -1
- package/dist/components/IconSelector.vue.js +1 -0
- package/dist/components/SectionFilter.vue.d.ts +23 -0
- package/dist/components/SectionFilter.vue.d.ts.map +1 -0
- package/dist/components/SectionFilter.vue.js +7 -0
- package/dist/components/SectionFilter.vue2.js +67 -0
- package/dist/components/SectionFilterButton.vue.d.ts +22 -0
- package/dist/components/SectionFilterButton.vue.d.ts.map +1 -0
- package/dist/components/SectionFilterButton.vue.js +23 -0
- package/dist/components/SectionFilterButton.vue2.js +4 -0
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.js +1 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +62 -44
- package/dist/layouts/App/create-api-client-app.d.ts +1 -0
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +2 -0
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +1 -0
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +1 -0
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/store/events.d.ts +4 -0
- package/dist/store/events.d.ts.map +1 -1
- package/dist/store/events.js +4 -0
- package/dist/store/store.d.ts +1 -0
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +10 -10
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts.map +1 -0
- 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/RequestCodeExample.vue2.js +36 -36
- 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 +103 -83
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -1
- 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 +81 -81
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +9 -9
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +26 -21
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +80 -65
- package/package.json +13 -13
- package/dist/components/ContextBar.vue.d.ts +0 -11
- package/dist/components/ContextBar.vue.d.ts.map +0 -1
- package/dist/components/ContextBar.vue.js +0 -7
- package/dist/components/ContextBar.vue2.js +0 -47
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;AAOzE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,QAAQ,UACnC,CAAC,GAAG,YAAY,UAChB,QAAQ,CAAC,CAAC,CAAC,oDAMhB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CACnC,KACA,aAAa,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"get-snippet.d.ts","sourceRoot":"","sources":["../../../../../src/views/Components/CodeSnippet/helpers/get-snippet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AACxG,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAY,MAAM,kBAAkB,CAAA;AAOzE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,QAAQ,UACnC,CAAC,GAAG,YAAY,UAChB,QAAQ,CAAC,CAAC,CAAC,oDAMhB;IACD,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;CACnC,KACA,aAAa,CAAC,MAAM,CA+CtB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { snippetz as a } from "@scalar/snippetz";
|
|
2
2
|
import { getHarRequest as E } from "./get-har-request.js";
|
|
3
|
-
const s = "ws://replace.me",
|
|
4
|
-
operation:
|
|
3
|
+
const s = "ws://replace.me", S = (i, t, {
|
|
4
|
+
operation: l,
|
|
5
5
|
example: u,
|
|
6
6
|
server: c,
|
|
7
7
|
securitySchemes: g = []
|
|
@@ -9,7 +9,7 @@ const s = "ws://replace.me", w = (l, t, {
|
|
|
9
9
|
var n;
|
|
10
10
|
try {
|
|
11
11
|
const r = E({
|
|
12
|
-
operation:
|
|
12
|
+
operation: l,
|
|
13
13
|
example: u,
|
|
14
14
|
server: c,
|
|
15
15
|
securitySchemes: g
|
|
@@ -19,25 +19,25 @@ const s = "ws://replace.me", w = (l, t, {
|
|
|
19
19
|
const o = r.url.startsWith("/") ? "" : "/";
|
|
20
20
|
try {
|
|
21
21
|
new URL(r.url);
|
|
22
|
-
} catch {
|
|
23
|
-
r.url = `${s}${o}${r.url}`;
|
|
22
|
+
} catch (e) {
|
|
23
|
+
console.error("[getSnippet] Invalid URL", e), r.url = `${s}${o}${r.url}`;
|
|
24
24
|
}
|
|
25
25
|
if (((n = r.postData) == null ? void 0 : n.mimeType) === "application/json")
|
|
26
26
|
try {
|
|
27
27
|
JSON.parse(r.postData.text || "{}");
|
|
28
|
-
} catch {
|
|
29
|
-
return [new Error("Invalid JSON body"), null];
|
|
28
|
+
} catch (e) {
|
|
29
|
+
return console.error("[getSnippet] Invalid JSON body", e), [new Error("Invalid JSON body"), null];
|
|
30
30
|
}
|
|
31
|
-
const p =
|
|
31
|
+
const p = i.replace("javascript", "js");
|
|
32
32
|
if (a().hasPlugin(p, t)) {
|
|
33
33
|
const e = a().print(p, t, r);
|
|
34
34
|
return e ? [null, e.replace(`${s}${o}`, "")] : [new Error("Error generating snippet"), null];
|
|
35
35
|
}
|
|
36
36
|
} catch (r) {
|
|
37
|
-
return console.error("[getSnippet]", r), [new Error("Error generating snippet"), null];
|
|
37
|
+
return console.error("[getSnippet] Error generating snippet", r), [new Error("Error generating snippet"), null];
|
|
38
38
|
}
|
|
39
39
|
return [new Error("No snippet found"), null];
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
S as getSnippet
|
|
43
43
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestCodeExample.test.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":"AA2KA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AAcxC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4PF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestCodeExample.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-cf7ecb78"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as b, computed as
|
|
1
|
+
import { defineComponent as b, computed as i, openBlock as w, createElementBlock as x, createVNode as n, withCtx as c, createTextVNode as S, createElementVNode as m, unref as r, toDisplayString as C } from "vue";
|
|
2
2
|
import { ScalarCombobox as k, ScalarButton as $, ScalarIcon as g } from "@scalar/components";
|
|
3
3
|
import { snippetz as K } from "@scalar/snippetz";
|
|
4
4
|
import V from "../../../components/DataTable/DataTable.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { filterSecurityRequirements as
|
|
8
|
-
import
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
const
|
|
5
|
+
import H from "../../../components/DataTable/DataTableRow.vue.js";
|
|
6
|
+
import U from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
|
+
import { filterSecurityRequirements as _ } from "./helpers/filter-security-requirements.js";
|
|
8
|
+
import j from "../../Components/CodeSnippet/CodeSnippet.vue.js";
|
|
9
|
+
import { useWorkspace as B } from "../../../store/store.js";
|
|
10
|
+
const D = { class: "w-full" }, E = { class: "-mx-1 flex flex-1" }, N = { class: "bg-b-1 flex items-center justify-center overflow-hidden border-t" }, P = /* @__PURE__ */ b({
|
|
11
11
|
__name: "RequestCodeExample",
|
|
12
12
|
props: {
|
|
13
13
|
collection: {},
|
|
@@ -17,25 +17,25 @@ const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class:
|
|
|
17
17
|
workspace: {}
|
|
18
18
|
},
|
|
19
19
|
setup(o) {
|
|
20
|
-
const { securitySchemes:
|
|
21
|
-
() =>
|
|
20
|
+
const { securitySchemes: u, workspaceMutators: p } = B(), f = i(
|
|
21
|
+
() => _(
|
|
22
22
|
o.operation.security || o.collection.security || [],
|
|
23
|
-
o.collection.selectedSecuritySchemeUids,
|
|
24
|
-
|
|
23
|
+
o.operation.selectedSecuritySchemeUids || o.collection.selectedSecuritySchemeUids,
|
|
24
|
+
u
|
|
25
25
|
)
|
|
26
|
-
), a =
|
|
26
|
+
), a = i(() => {
|
|
27
27
|
const e = {};
|
|
28
28
|
return {
|
|
29
29
|
options: K().clients().map((t) => ({
|
|
30
30
|
label: t.title,
|
|
31
|
-
options: t.clients.map((
|
|
32
|
-
id: `${t.key},${
|
|
33
|
-
label:
|
|
31
|
+
options: t.clients.map((s) => (e[`${t.key},${s.client}`] = s.title, {
|
|
32
|
+
id: `${t.key},${s.client}`,
|
|
33
|
+
label: s.title
|
|
34
34
|
}))
|
|
35
35
|
})),
|
|
36
36
|
dict: e
|
|
37
37
|
};
|
|
38
|
-
}), d =
|
|
38
|
+
}), d = i(() => {
|
|
39
39
|
var t;
|
|
40
40
|
const e = o.workspace.selectedHttpClient;
|
|
41
41
|
if (!e)
|
|
@@ -48,49 +48,49 @@ const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class:
|
|
|
48
48
|
id: l,
|
|
49
49
|
label: a.value.dict[l] ?? "Unknown"
|
|
50
50
|
};
|
|
51
|
-
}),
|
|
51
|
+
}), y = i(
|
|
52
52
|
() => {
|
|
53
53
|
var e;
|
|
54
54
|
return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.targetKey) ?? "js";
|
|
55
55
|
}
|
|
56
|
-
),
|
|
56
|
+
), v = i(
|
|
57
57
|
() => {
|
|
58
58
|
var e;
|
|
59
59
|
return ((e = o.workspace.selectedHttpClient) == null ? void 0 : e.clientKey) ?? "fetch";
|
|
60
60
|
}
|
|
61
61
|
), h = ({ id: e }) => {
|
|
62
62
|
const [l, t] = e.split(",");
|
|
63
|
-
!l || !t ||
|
|
63
|
+
!l || !t || p.edit(o.workspace.uid, "selectedHttpClient", {
|
|
64
64
|
targetKey: l,
|
|
65
65
|
clientKey: t
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
return (e, l) => (w(), x("div",
|
|
69
|
-
n(
|
|
68
|
+
return (e, l) => (w(), x("div", D, [
|
|
69
|
+
n(U, {
|
|
70
70
|
class: "group/preview w-full border-b-0",
|
|
71
71
|
defaultOpen: !1
|
|
72
72
|
}, {
|
|
73
|
-
title:
|
|
74
|
-
|
|
73
|
+
title: c(() => l[0] || (l[0] = [
|
|
74
|
+
S("Code Snippet")
|
|
75
75
|
])),
|
|
76
|
-
actions:
|
|
77
|
-
m("div",
|
|
76
|
+
actions: c(() => [
|
|
77
|
+
m("div", E, [
|
|
78
78
|
n(r(k), {
|
|
79
79
|
modelValue: d.value,
|
|
80
80
|
options: a.value.options,
|
|
81
81
|
placement: "bottom-end",
|
|
82
82
|
"onUpdate:modelValue": h
|
|
83
83
|
}, {
|
|
84
|
-
default:
|
|
84
|
+
default: c(() => [
|
|
85
85
|
n(r($), {
|
|
86
86
|
class: "text-c-1 hover:bg-b-3 py-0.75 flex h-full w-fit gap-1.5 px-1.5 font-normal",
|
|
87
87
|
fullWidth: "",
|
|
88
88
|
variant: "ghost"
|
|
89
89
|
}, {
|
|
90
|
-
default:
|
|
90
|
+
default: c(() => {
|
|
91
91
|
var t;
|
|
92
92
|
return [
|
|
93
|
-
m("span", null,
|
|
93
|
+
m("span", null, C((t = d.value) == null ? void 0 : t.label), 1),
|
|
94
94
|
n(r(g), {
|
|
95
95
|
icon: "ChevronDown",
|
|
96
96
|
size: "md"
|
|
@@ -104,20 +104,20 @@ const E = { class: "w-full" }, N = { class: "-mx-1 flex flex-1" }, R = { class:
|
|
|
104
104
|
}, 8, ["modelValue", "options"])
|
|
105
105
|
])
|
|
106
106
|
]),
|
|
107
|
-
default:
|
|
107
|
+
default: c(() => [
|
|
108
108
|
n(V, { columns: [""] }, {
|
|
109
|
-
default:
|
|
110
|
-
n(
|
|
111
|
-
default:
|
|
112
|
-
m("div",
|
|
113
|
-
n(r(
|
|
109
|
+
default: c(() => [
|
|
110
|
+
n(H, null, {
|
|
111
|
+
default: c(() => [
|
|
112
|
+
m("div", N, [
|
|
113
|
+
n(r(j), {
|
|
114
114
|
class: "px-3 py-1.5",
|
|
115
|
-
client:
|
|
115
|
+
client: v.value,
|
|
116
116
|
example: e.example,
|
|
117
117
|
operation: e.operation,
|
|
118
118
|
securitySchemes: f.value,
|
|
119
119
|
server: e.server,
|
|
120
|
-
target:
|
|
120
|
+
target: y.value
|
|
121
121
|
}, null, 8, ["client", "example", "operation", "securitySchemes", "server", "target"])
|
|
122
122
|
])
|
|
123
123
|
]),
|
|
@@ -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":"AA+SA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AASxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAU1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,OAAO,EAAE,cAAc,CAAA;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAkUF,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 d = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dd5754ad"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarErrorBoundary as
|
|
3
|
-
import { canMethodHaveBody as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { matchesDomain as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import { defineComponent as E, computed as p, useId as O, ref as H, watch as N, openBlock as m, createBlock as b, withCtx as v, createElementVNode as d, unref as i, createElementBlock as c, createCommentVNode as w, toDisplayString as I, createVNode as n, withDirectives as t, vShow as s } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as K } from "@scalar/components";
|
|
3
|
+
import { canMethodHaveBody as f, isDefined as U, REGEX as V } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import D from "../../../components/SectionFilter.vue.js";
|
|
5
|
+
import Q from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
6
|
+
import { matchesDomain as $ } from "../../../libs/send-request/set-request-cookies.js";
|
|
7
|
+
import L from "./RequestBody.vue.js";
|
|
8
|
+
import y from "./RequestParams.vue.js";
|
|
9
|
+
import j from "./RequestPathParams.vue.js";
|
|
10
|
+
import F from "./RequestAuth/RequestAuth.vue.js";
|
|
11
11
|
import M from "./RequestCodeExample.vue.js";
|
|
12
12
|
import { useWorkspace as T } from "../../../store/store.js";
|
|
13
13
|
import { useLayout as W } from "../../../hooks/useLayout.js";
|
|
14
|
-
const
|
|
14
|
+
const z = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, G = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "pointer-events-auto absolute left-0 top-0 h-full w-full cursor-text opacity-0",
|
|
17
17
|
for: "requestname"
|
|
18
|
-
},
|
|
18
|
+
}, X = ["placeholder", "value"], J = {
|
|
19
19
|
key: 2,
|
|
20
20
|
class: "text-c-1 flex h-8 items-center"
|
|
21
|
-
},
|
|
21
|
+
}, Y = ["id", "role"], ue = /* @__PURE__ */ E({
|
|
22
22
|
__name: "RequestSection",
|
|
23
23
|
props: {
|
|
24
24
|
collection: {},
|
|
@@ -31,38 +31,41 @@ const j = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
31
31
|
server: {},
|
|
32
32
|
workspace: {}
|
|
33
33
|
},
|
|
34
|
-
setup(
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
]
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
setup(l) {
|
|
35
|
+
const A = [
|
|
36
|
+
"Auth",
|
|
37
|
+
"Variables",
|
|
38
|
+
"Cookies",
|
|
39
|
+
"Headers",
|
|
40
|
+
"Query",
|
|
41
|
+
"Body"
|
|
42
|
+
], { requestMutators: P, cookies: S, securitySchemes: q } = T(), { layout: u } = W(), k = p(() => {
|
|
43
|
+
const e = /* @__PURE__ */ new Set(["All", ...A]);
|
|
44
|
+
return l.example.parameters.path.length || e.delete("Variables"), f(l.operation.method ?? "get") || e.delete("Body"), h.value && e.delete("Auth"), [...e];
|
|
45
|
+
}), r = p(
|
|
46
|
+
() => Object.fromEntries(
|
|
47
|
+
k.value.map((e) => [e, O()])
|
|
48
|
+
)
|
|
49
|
+
), h = p(
|
|
47
50
|
() => {
|
|
48
51
|
var e;
|
|
49
|
-
return
|
|
52
|
+
return u === "modal" && ((e = l.operation.security) == null ? void 0 : e.length) === 0;
|
|
50
53
|
}
|
|
51
|
-
), a =
|
|
52
|
-
|
|
53
|
-
() =>
|
|
54
|
+
), a = H("All");
|
|
55
|
+
N(
|
|
56
|
+
() => l.operation,
|
|
54
57
|
(e) => {
|
|
55
|
-
a.value === "Body" && e && !
|
|
58
|
+
a.value === "Body" && e && !f(e.method) && (a.value = "All");
|
|
56
59
|
}
|
|
57
60
|
);
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
() => (
|
|
61
|
+
const g = (e) => {
|
|
62
|
+
const o = e.target;
|
|
63
|
+
P.edit(l.operation.uid, "summary", o.value);
|
|
64
|
+
}, B = p(
|
|
65
|
+
() => (l.workspace.cookies ?? []).map((e) => S[e]).filter(U).filter((e) => e.name).filter(
|
|
63
66
|
(e) => {
|
|
64
|
-
var
|
|
65
|
-
return
|
|
67
|
+
var o;
|
|
68
|
+
return $(((o = l.server) == null ? void 0 : o.url) || l.operation.path, e.domain);
|
|
66
69
|
}
|
|
67
70
|
).map((e) => ({
|
|
68
71
|
key: e.name,
|
|
@@ -75,116 +78,133 @@ const j = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
75
78
|
},
|
|
76
79
|
enabled: !0
|
|
77
80
|
}))
|
|
78
|
-
),
|
|
79
|
-
return (e,
|
|
81
|
+
), C = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(V.PROTOCOL, "") ? l.operation.path.replace(V.PROTOCOL, "") : "Request Name";
|
|
82
|
+
return (e, o) => (m(), b(Q, {
|
|
80
83
|
"aria-label": `Request: ${e.operation.summary}`
|
|
81
84
|
}, {
|
|
82
|
-
title:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
title: v(() => [
|
|
86
|
+
d("div", z, [
|
|
87
|
+
i(u) !== "modal" ? (m(), c("label", G)) : w("", !0),
|
|
88
|
+
i(u) !== "modal" ? (m(), c("input", {
|
|
86
89
|
key: 1,
|
|
87
90
|
id: "requestname",
|
|
88
91
|
class: "text-c-1 group-hover-input pl-1.25 md:-ml-1.25 pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded has-[:focus-visible]:outline",
|
|
89
|
-
placeholder:
|
|
92
|
+
placeholder: C(),
|
|
90
93
|
value: e.operation.summary,
|
|
91
|
-
onInput:
|
|
92
|
-
}, null, 40,
|
|
94
|
+
onInput: g
|
|
95
|
+
}, null, 40, X)) : (m(), c("span", J, I(e.operation.summary), 1))
|
|
93
96
|
]),
|
|
94
|
-
n(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
n(D, {
|
|
98
|
+
modelValue: a.value,
|
|
99
|
+
"onUpdate:modelValue": o[0] || (o[0] = (R) => a.value = R),
|
|
100
|
+
filterIds: r.value,
|
|
101
|
+
filters: k.value
|
|
102
|
+
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
99
103
|
]),
|
|
100
|
-
default:
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
default: v(() => [
|
|
105
|
+
d("div", {
|
|
106
|
+
id: r.value.All,
|
|
107
|
+
class: "request-section-content custom-scroll relative flex flex-1 flex-col divide-y",
|
|
108
|
+
role: a.value === "All" ? "tabpanel" : "none"
|
|
109
|
+
}, [
|
|
110
|
+
e.collection && e.workspace && (i(u) !== "modal" || Object.keys(i(q) ?? {}).length) ? t((m(), b(F, {
|
|
103
111
|
key: 0,
|
|
112
|
+
id: r.value.Auth,
|
|
104
113
|
collection: e.collection,
|
|
105
114
|
envVariables: e.envVariables,
|
|
106
115
|
environment: e.environment,
|
|
107
116
|
layout: "client",
|
|
108
117
|
operation: e.operation,
|
|
118
|
+
role: a.value === "All" ? "none" : "tabpanel",
|
|
109
119
|
selectedSecuritySchemeUids: e.selectedSecuritySchemeUids,
|
|
110
120
|
server: e.server,
|
|
111
121
|
title: "Authentication",
|
|
112
122
|
workspace: e.workspace
|
|
113
|
-
}, null, 8, ["collection", "envVariables", "environment", "operation", "selectedSecuritySchemeUids", "server", "workspace"])), [
|
|
123
|
+
}, null, 8, ["id", "collection", "envVariables", "environment", "operation", "role", "selectedSecuritySchemeUids", "server", "workspace"])), [
|
|
114
124
|
[
|
|
115
|
-
|
|
116
|
-
!
|
|
125
|
+
s,
|
|
126
|
+
!h.value && (a.value === "All" || a.value === "Auth")
|
|
117
127
|
]
|
|
118
|
-
]) :
|
|
119
|
-
|
|
128
|
+
]) : w("", !0),
|
|
129
|
+
t(n(j, {
|
|
130
|
+
id: r.value.Variables,
|
|
120
131
|
envVariables: e.envVariables,
|
|
121
132
|
environment: e.environment,
|
|
122
133
|
example: e.example,
|
|
134
|
+
invalidParams: e.invalidParams,
|
|
123
135
|
operation: e.operation,
|
|
124
136
|
paramKey: "path",
|
|
137
|
+
role: a.value === "All" ? "none" : "tabpanel",
|
|
125
138
|
title: "Variables",
|
|
126
|
-
workspace: e.workspace
|
|
127
|
-
|
|
128
|
-
}, null, 8, ["envVariables", "environment", "example", "operation", "workspace", "invalidParams"]), [
|
|
139
|
+
workspace: e.workspace
|
|
140
|
+
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
129
141
|
[
|
|
130
|
-
|
|
142
|
+
s,
|
|
131
143
|
(a.value === "All" || a.value === "Variables") && e.example.parameters.path.length
|
|
132
144
|
]
|
|
133
145
|
]),
|
|
134
|
-
|
|
146
|
+
t(n(y, {
|
|
147
|
+
id: r.value.Cookies,
|
|
135
148
|
envVariables: e.envVariables,
|
|
136
149
|
environment: e.environment,
|
|
137
150
|
example: e.example,
|
|
138
151
|
invalidParams: e.invalidParams,
|
|
139
152
|
operation: e.operation,
|
|
140
153
|
paramKey: "cookies",
|
|
141
|
-
readOnlyEntries:
|
|
154
|
+
readOnlyEntries: B.value,
|
|
155
|
+
role: a.value === "All" ? "none" : "tabpanel",
|
|
142
156
|
title: "Cookies",
|
|
143
157
|
workspace: e.workspace,
|
|
144
158
|
workspaceParamKey: "cookies"
|
|
145
|
-
}, null, 8, ["envVariables", "environment", "example", "invalidParams", "operation", "readOnlyEntries", "workspace"]), [
|
|
146
|
-
[
|
|
159
|
+
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "readOnlyEntries", "role", "workspace"]), [
|
|
160
|
+
[s, a.value === "All" || a.value === "Cookies"]
|
|
147
161
|
]),
|
|
148
|
-
|
|
162
|
+
t(n(y, {
|
|
163
|
+
id: r.value.Headers,
|
|
149
164
|
envVariables: e.envVariables,
|
|
150
165
|
environment: e.environment,
|
|
151
166
|
example: e.example,
|
|
152
167
|
invalidParams: e.invalidParams,
|
|
153
168
|
operation: e.operation,
|
|
154
169
|
paramKey: "headers",
|
|
170
|
+
role: a.value === "All" ? "none" : "tabpanel",
|
|
155
171
|
title: "Headers",
|
|
156
172
|
workspace: e.workspace
|
|
157
|
-
}, null, 8, ["envVariables", "environment", "example", "invalidParams", "operation", "workspace"]), [
|
|
158
|
-
[
|
|
173
|
+
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
174
|
+
[s, a.value === "All" || a.value === "Headers"]
|
|
159
175
|
]),
|
|
160
|
-
|
|
176
|
+
t(n(y, {
|
|
177
|
+
id: r.value.Query,
|
|
161
178
|
envVariables: e.envVariables,
|
|
162
179
|
environment: e.environment,
|
|
163
180
|
example: e.example,
|
|
164
181
|
invalidParams: e.invalidParams,
|
|
165
182
|
operation: e.operation,
|
|
166
183
|
paramKey: "query",
|
|
184
|
+
role: a.value === "All" ? "none" : "tabpanel",
|
|
167
185
|
title: "Query Parameters",
|
|
168
186
|
workspace: e.workspace
|
|
169
|
-
}, null, 8, ["envVariables", "environment", "example", "invalidParams", "operation", "workspace"]), [
|
|
170
|
-
[
|
|
187
|
+
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
188
|
+
[s, a.value === "All" || a.value === "Query"]
|
|
171
189
|
]),
|
|
172
|
-
|
|
190
|
+
t(n(L, {
|
|
191
|
+
id: r.value.Body,
|
|
173
192
|
envVariables: e.envVariables,
|
|
174
193
|
environment: e.environment,
|
|
175
194
|
example: e.example,
|
|
176
195
|
operation: e.operation,
|
|
196
|
+
role: a.value === "All" ? "none" : "tabpanel",
|
|
177
197
|
title: "Body",
|
|
178
198
|
workspace: e.workspace
|
|
179
|
-
}, null, 8, ["envVariables", "environment", "example", "operation", "workspace"]), [
|
|
199
|
+
}, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"]), [
|
|
180
200
|
[
|
|
181
|
-
|
|
182
|
-
e.operation.method && (a.value === "All" || a.value === "Body") &&
|
|
201
|
+
s,
|
|
202
|
+
e.operation.method && (a.value === "All" || a.value === "Body") && i(f)(e.operation.method)
|
|
183
203
|
]
|
|
184
204
|
]),
|
|
185
|
-
|
|
186
|
-
n(
|
|
187
|
-
default:
|
|
205
|
+
o[1] || (o[1] = d("div", { class: "-my-0.25 flex flex-grow" }, null, -1)),
|
|
206
|
+
n(i(K), null, {
|
|
207
|
+
default: v(() => [
|
|
188
208
|
n(M, {
|
|
189
209
|
collection: e.collection,
|
|
190
210
|
example: e.example,
|
|
@@ -195,12 +215,12 @@ const j = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
195
215
|
]),
|
|
196
216
|
_: 1
|
|
197
217
|
})
|
|
198
|
-
])
|
|
218
|
+
], 8, Y)
|
|
199
219
|
]),
|
|
200
220
|
_: 1
|
|
201
221
|
}, 8, ["aria-label"]));
|
|
202
222
|
}
|
|
203
223
|
});
|
|
204
224
|
export {
|
|
205
|
-
|
|
225
|
+
ue as default
|
|
206
226
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type DraggableProps, type DraggingItem, type HoveredItem } from '@scalar/draggable';
|
|
2
|
+
import { nextTick } from 'vue';
|
|
2
3
|
import type { SidebarMenuItem } from '../../views/Request/types';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
/**
|
|
@@ -96,7 +97,7 @@ declare function __VLS_template(): {
|
|
|
96
97
|
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
97
98
|
};
|
|
98
99
|
$forceUpdate: () => void;
|
|
99
|
-
$nextTick: typeof
|
|
100
|
+
$nextTick: typeof nextTick;
|
|
100
101
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
101
102
|
} & Readonly<{}> & Omit<Readonly<DraggableProps> & Readonly<{
|
|
102
103
|
onOnDragEnd?: (draggingItem: DraggingItem, hoveredItem: HoveredItem) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AAgrBA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAY,QAAQ,EAAO,MAAM,KAAK,CAAA;AAU7C,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAIzE,KAAK,WAAW,GAAG;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAC3C,oEAAoE;IACpE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,QAAQ,EAAE,eAAe,CAAA;CAC1B,CAAC;AAwTF,iBAAS,cAAc;WA0xBT,OAAO,IAA6B;;oBAhkCpC,IAAI;;oBAAJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAjElB,KA7nBmB;;;;;;;oCA6nBnB,KAznBO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4vB2B,GAAG,8CACzB,GAAG,yBACK,GAAG,6DACU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAggCnC;AAqCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;kFAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAUpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
5
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-716d294a"]]);
|
|
6
6
|
export {
|
|
7
7
|
p as default
|
|
8
8
|
};
|