@scalar/api-client 2.38.0 → 2.38.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 +24 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +5 -5
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +83 -80
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- 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 +23 -21
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +24 -22
- package/dist/v2/features/app/app-events.js +2 -2
- package/dist/v2/features/collection/components/Form.vue.d.ts +1 -0
- package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Form.vue.js +23 -23
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.js +5 -4
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/components/Section.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +10 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Header.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0e03d0d8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -2,8 +2,8 @@ import { defineComponent as g, createElementBlock as s, openBlock as o, createEl
|
|
|
2
2
|
import { ScalarIcon as d } from "@scalar/components";
|
|
3
3
|
import x from "../../scalar-address-bar-block/components/EnvironmentSelector.vue.js";
|
|
4
4
|
import B from "../../scalar-address-bar-block/components/AddressBar.vue.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import b from "../../../../components/OpenApiClientButton.vue.js";
|
|
6
|
+
const k = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, h = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-2 lg:mb-0 lg:flex-1 lg:px-2.5" }, S = /* @__PURE__ */ g({
|
|
7
7
|
__name: "Header",
|
|
8
8
|
props: {
|
|
9
9
|
path: {},
|
|
@@ -27,9 +27,9 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
|
|
|
27
27
|
const m = c, f = (v) => {
|
|
28
28
|
e.eventBus.emit("workspace:update:active-environment", v);
|
|
29
29
|
}, y = () => {
|
|
30
|
-
e.eventBus.emit("ui:navigate", { page: "
|
|
30
|
+
e.eventBus.emit("ui:navigate", { page: "document", path: "environment" });
|
|
31
31
|
};
|
|
32
|
-
return (v, t) => (o(), s("div",
|
|
32
|
+
return (v, t) => (o(), s("div", k, [
|
|
33
33
|
t[7] || (t[7] = i("div", { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, [
|
|
34
34
|
i("div", { class: "size-8" })
|
|
35
35
|
], -1)),
|
|
@@ -57,7 +57,7 @@ const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap i
|
|
|
57
57
|
"onAdd:environment": y,
|
|
58
58
|
"onSelect:environment": f
|
|
59
59
|
}, null, 8, ["activeEnvironment", "environments"])) : l("", !0),
|
|
60
|
-
e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (o(), u(r(
|
|
60
|
+
e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (o(), u(r(b), {
|
|
61
61
|
key: 1,
|
|
62
62
|
buttonSource: "modal",
|
|
63
63
|
class: "!w-fit lg:-mr-1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/request-block/RequestBlock.vue"],"names":[],"mappings":"AAikBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EAEV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAU1E,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAA;AAW7G,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IACjD,QAAQ,EAAE,UAAU,GAAG,WAAW,CAAA;CACnC,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,oBAAoB,EAAE,CAAA;IACrC,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,UAAU,CAAA;IAClB,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,cAAc,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC,CAAA;IACtE,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,uBAAuB,EAAE,0BAA0B,EAAE,CAAA;IACrD,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC;AAmsBF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -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
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-98af86fe"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarErrorBoundary as
|
|
1
|
+
import { defineComponent as X, computed as n, ref as J, useId as s, watch as W, 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 Y, renderList as Z, createCommentVNode as D, resolveDynamicComponent as _, toDisplayString as ee } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as te } from "@scalar/components";
|
|
3
3
|
import { canMethodHaveBody as w } from "@scalar/helpers/http/can-method-have-body";
|
|
4
|
-
import { REGEX as
|
|
4
|
+
import { REGEX as ae } from "@scalar/helpers/regex/regex-helpers";
|
|
5
5
|
import { getResolvedRef as R } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
|
-
import { unpackProxyObject as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { filterGlobalCookie as
|
|
10
|
-
import { getExample as
|
|
6
|
+
import { unpackProxyObject as le } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
7
|
+
import ne from "../../../components/SectionFilter.vue.js";
|
|
8
|
+
import oe from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
9
|
+
import { filterGlobalCookie as re } from "../operation-block/helpers/filter-global-cookies.js";
|
|
10
|
+
import { getExample as ue } from "../operation-block/helpers/get-example.js";
|
|
11
11
|
import { getResolvedUrl as ie } from "../operation-block/helpers/get-resolved-url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import se from "./components/RequestBody.vue.js";
|
|
13
|
+
import me from "./components/RequestCodeSnippet.vue.js";
|
|
14
14
|
import S from "./components/RequestParams.vue.js";
|
|
15
|
-
import { createParameterHandlers as
|
|
16
|
-
import { getDefaultHeaders as
|
|
17
|
-
import { getParameterSchema as
|
|
18
|
-
import { groupBy as
|
|
19
|
-
import { isParamDisabled as
|
|
20
|
-
import
|
|
21
|
-
const
|
|
15
|
+
import { createParameterHandlers as g } from "./helpers/create-parameter-handlers.js";
|
|
16
|
+
import { getDefaultHeaders as de } from "./helpers/get-default-headers.js";
|
|
17
|
+
import { getParameterSchema as ce } from "./helpers/get-parameter-schema.js";
|
|
18
|
+
import { groupBy as E } from "./helpers/group-by.js";
|
|
19
|
+
import { isParamDisabled as ve } from "./helpers/is-param-disabled.js";
|
|
20
|
+
import ye from "../scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
21
|
+
const he = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, fe = ["for"], Be = ["id", "placeholder", "value"], xe = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "text-c-1 flex h-8 items-center"
|
|
24
|
-
},
|
|
24
|
+
}, be = ["id", "role"], $e = /* @__PURE__ */ X({
|
|
25
25
|
__name: "RequestBlock",
|
|
26
26
|
props: {
|
|
27
27
|
authMeta: { default: () => ({ type: "document" }) },
|
|
@@ -49,24 +49,24 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
49
49
|
path: e.path,
|
|
50
50
|
exampleKey: e.exampleKey
|
|
51
51
|
})), r = n(
|
|
52
|
-
() =>
|
|
52
|
+
() => E(
|
|
53
53
|
e.operation.parameters?.map((t) => R(t)) ?? [],
|
|
54
54
|
"in",
|
|
55
55
|
(t) => {
|
|
56
|
-
const a =
|
|
56
|
+
const a = ue(t, e.exampleKey, void 0);
|
|
57
57
|
return {
|
|
58
58
|
name: t.name,
|
|
59
59
|
value: a?.value ?? "",
|
|
60
60
|
description: t.description,
|
|
61
|
-
schema:
|
|
61
|
+
schema: ce(t),
|
|
62
62
|
isRequired: t.required,
|
|
63
|
-
isDisabled:
|
|
63
|
+
isDisabled: ve(t, a),
|
|
64
64
|
originalParameter: t
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
68
|
), I = n(
|
|
69
|
-
() =>
|
|
69
|
+
() => E(
|
|
70
70
|
r.value.header?.map((t) => ({
|
|
71
71
|
...t,
|
|
72
72
|
name: t.name.toLowerCase()
|
|
@@ -74,7 +74,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
74
74
|
"name"
|
|
75
75
|
)
|
|
76
76
|
), N = n(
|
|
77
|
-
() =>
|
|
77
|
+
() => de({ method: e.method, operation: e.operation, exampleKey: e.exampleKey })
|
|
78
78
|
), A = n(() => {
|
|
79
79
|
const t = e.operation["x-scalar-disable-parameters"]?.["default-headers"]?.[e.exampleKey] ?? {};
|
|
80
80
|
return N.value.map((a) => {
|
|
@@ -88,7 +88,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
88
88
|
isDisabled: t[a.name.toLowerCase()] ?? !1
|
|
89
89
|
};
|
|
90
90
|
});
|
|
91
|
-
}),
|
|
91
|
+
}), O = n(() => [
|
|
92
92
|
...A.value,
|
|
93
93
|
...r.value.header ?? []
|
|
94
94
|
]), V = n(() => {
|
|
@@ -99,7 +99,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
99
99
|
pathVariables: {}
|
|
100
100
|
}), a = e.operation["x-scalar-disable-parameters"]?.["global-cookies"]?.[e.exampleKey] ?? {};
|
|
101
101
|
return e.globalCookies?.filter(
|
|
102
|
-
(l) =>
|
|
102
|
+
(l) => re({
|
|
103
103
|
cookie: l,
|
|
104
104
|
url: t,
|
|
105
105
|
// Do not filter global cookies for the default cookies section (it's already filtered in the buildRequestCookieHeader function)
|
|
@@ -116,7 +116,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
116
116
|
}), P = n(() => [
|
|
117
117
|
...V.value ?? [],
|
|
118
118
|
...r.value.cookie ?? []
|
|
119
|
-
]),
|
|
119
|
+
]), u = J("All"), T = [
|
|
120
120
|
"Auth",
|
|
121
121
|
"Variables",
|
|
122
122
|
"Cookies",
|
|
@@ -131,47 +131,49 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
131
131
|
Headers: s(),
|
|
132
132
|
Query: s(),
|
|
133
133
|
Body: s()
|
|
134
|
-
},
|
|
134
|
+
}, p = n(() => {
|
|
135
135
|
const t = /* @__PURE__ */ new Set(["All", ...T]);
|
|
136
136
|
return r.value.path?.length || t.delete("Variables"), w(e.method) || t.delete("Body"), H.value && t.delete("Auth"), [...t];
|
|
137
|
-
}),
|
|
137
|
+
}), i = n(
|
|
138
138
|
() => Object.fromEntries(
|
|
139
|
-
|
|
139
|
+
p.value.map((t) => [t, $[t]])
|
|
140
140
|
)
|
|
141
141
|
), H = n(
|
|
142
|
-
() => e.layout === "modal" && !
|
|
143
|
-
), L = n(
|
|
144
|
-
|
|
142
|
+
() => e.layout === "modal" && !Object.keys(e.securitySchemes ?? {}).length
|
|
143
|
+
), L = n(
|
|
144
|
+
() => e.layout !== "modal" || !!(e.securityRequirements?.length || e.selectedSecurity.selectedSchemes.length)
|
|
145
|
+
), F = n(() => e.operation.summary ? e.operation.summary : e.path.replace(ae.PROTOCOL, "") || "Request Name"), h = (t) => u.value === "All" || u.value === t;
|
|
146
|
+
W(
|
|
145
147
|
() => e.method,
|
|
146
148
|
(t) => {
|
|
147
|
-
|
|
149
|
+
u.value === "Body" && !w(t) && (u.value = "All");
|
|
148
150
|
}
|
|
149
151
|
);
|
|
150
|
-
const
|
|
152
|
+
const G = (t) => {
|
|
151
153
|
const a = t.target.value;
|
|
152
154
|
e.eventBus.emit("operation:update:meta", {
|
|
153
155
|
meta: o.value,
|
|
154
156
|
payload: { summary: a.trim() }
|
|
155
157
|
});
|
|
156
158
|
}, B = n(() => ({
|
|
157
|
-
path:
|
|
159
|
+
path: g("path", e.eventBus, o.value, {
|
|
158
160
|
context: r.value.path ?? []
|
|
159
161
|
}),
|
|
160
|
-
cookie:
|
|
162
|
+
cookie: g("cookie", e.eventBus, o.value, {
|
|
161
163
|
context: P.value ?? [],
|
|
162
164
|
globalParameters: V.value.length
|
|
163
165
|
}),
|
|
164
|
-
header:
|
|
165
|
-
context:
|
|
166
|
+
header: g("header", e.eventBus, o.value, {
|
|
167
|
+
context: O.value,
|
|
166
168
|
defaultParameters: A.value.length
|
|
167
169
|
}),
|
|
168
|
-
query:
|
|
170
|
+
query: g("query", e.eventBus, o.value, {
|
|
169
171
|
context: r.value.query ?? []
|
|
170
172
|
})
|
|
171
|
-
})),
|
|
173
|
+
})), Q = (t) => e.eventBus.emit("operation:update:requestBody:contentType", {
|
|
172
174
|
payload: { contentType: t.value },
|
|
173
175
|
meta: o.value
|
|
174
|
-
}),
|
|
176
|
+
}), M = ({
|
|
175
177
|
payload: t,
|
|
176
178
|
contentType: a
|
|
177
179
|
}) => {
|
|
@@ -187,7 +189,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
187
189
|
debounceKey: l
|
|
188
190
|
}
|
|
189
191
|
);
|
|
190
|
-
},
|
|
192
|
+
}, j = ({
|
|
191
193
|
payload: t,
|
|
192
194
|
contentType: a
|
|
193
195
|
}) => {
|
|
@@ -195,7 +197,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
195
197
|
e.eventBus.emit(
|
|
196
198
|
"operation:update:requestBody:formValue",
|
|
197
199
|
{
|
|
198
|
-
payload: t.map((
|
|
200
|
+
payload: t.map((k) => le(k, { depth: 1 })),
|
|
199
201
|
contentType: a,
|
|
200
202
|
meta: o.value
|
|
201
203
|
},
|
|
@@ -203,42 +205,43 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
203
205
|
debounceKey: l
|
|
204
206
|
}
|
|
205
207
|
);
|
|
206
|
-
}, U = s(),
|
|
207
|
-
return (t, a) => (v(), q(
|
|
208
|
+
}, U = s(), z = (t) => e.eventBus.emit("operation:update:extension", { payload: t, meta: o.value });
|
|
209
|
+
return (t, a) => (v(), q(oe, {
|
|
208
210
|
"aria-label": `Request: ${e.operation.summary}`
|
|
209
211
|
}, {
|
|
210
212
|
title: C(() => [
|
|
211
|
-
K("div",
|
|
213
|
+
K("div", he, [
|
|
212
214
|
e.layout !== "modal" ? (v(), x("label", {
|
|
213
215
|
key: 0,
|
|
214
216
|
class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
|
|
215
217
|
for: y(U)
|
|
216
|
-
}, null, 8,
|
|
218
|
+
}, null, 8, fe)) : D("", !0),
|
|
217
219
|
e.layout !== "modal" ? (v(), x("input", {
|
|
218
220
|
key: 1,
|
|
219
221
|
id: y(U),
|
|
220
222
|
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
|
-
placeholder:
|
|
223
|
+
placeholder: F.value,
|
|
222
224
|
value: e.operation.summary,
|
|
223
|
-
onBlur:
|
|
224
|
-
}, null, 40,
|
|
225
|
+
onBlur: G
|
|
226
|
+
}, null, 40, Be)) : (v(), x("span", xe, ee(e.operation.summary), 1))
|
|
225
227
|
]),
|
|
226
|
-
d(
|
|
227
|
-
modelValue:
|
|
228
|
-
"onUpdate:modelValue": a[0] || (a[0] = (l) =>
|
|
229
|
-
filterIds:
|
|
230
|
-
filters:
|
|
228
|
+
d(ne, {
|
|
229
|
+
modelValue: u.value,
|
|
230
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => u.value = l),
|
|
231
|
+
filterIds: i.value,
|
|
232
|
+
filters: p.value
|
|
231
233
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
232
234
|
]),
|
|
233
235
|
default: C(() => [
|
|
234
236
|
K("div", {
|
|
235
|
-
id:
|
|
237
|
+
id: i.value.All,
|
|
236
238
|
class: "request-section-content custom-scroll relative flex flex-1 flex-col",
|
|
237
|
-
role:
|
|
239
|
+
role: u.value === "All" ? "tabpanel" : "none"
|
|
238
240
|
}, [
|
|
239
|
-
m(d(y(
|
|
240
|
-
id:
|
|
241
|
+
m(d(y(ye), {
|
|
242
|
+
id: i.value.Auth,
|
|
241
243
|
createAnySecurityScheme: e.layout !== "modal",
|
|
244
|
+
defaultOpen: L.value,
|
|
242
245
|
environment: e.environment,
|
|
243
246
|
eventBus: e.eventBus,
|
|
244
247
|
meta: e.authMeta,
|
|
@@ -249,11 +252,11 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
249
252
|
selectedSecuritySchemes: e.selectedSecuritySchemes,
|
|
250
253
|
server: e.server,
|
|
251
254
|
title: "Authentication"
|
|
252
|
-
}, null, 8, ["id", "createAnySecurityScheme", "environment", "eventBus", "meta", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "selectedSecuritySchemes", "server"]), [
|
|
255
|
+
}, null, 8, ["id", "createAnySecurityScheme", "defaultOpen", "environment", "eventBus", "meta", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "selectedSecuritySchemes", "server"]), [
|
|
253
256
|
[c, h("Auth") && !H.value]
|
|
254
257
|
]),
|
|
255
258
|
m(d(S, f({
|
|
256
|
-
id:
|
|
259
|
+
id: i.value.Variables,
|
|
257
260
|
environment: e.environment,
|
|
258
261
|
eventBus: e.eventBus,
|
|
259
262
|
exampleKey: e.exampleKey,
|
|
@@ -264,7 +267,7 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
264
267
|
[c, h("Variables") && r.value.path?.length]
|
|
265
268
|
]),
|
|
266
269
|
m(d(S, f({
|
|
267
|
-
id:
|
|
270
|
+
id: i.value.Cookies,
|
|
268
271
|
environment: e.environment,
|
|
269
272
|
eventBus: e.eventBus,
|
|
270
273
|
exampleKey: e.exampleKey,
|
|
@@ -275,17 +278,17 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
275
278
|
[c, h("Cookies")]
|
|
276
279
|
]),
|
|
277
280
|
m(d(S, f({
|
|
278
|
-
id:
|
|
281
|
+
id: i.value.Headers,
|
|
279
282
|
environment: e.environment,
|
|
280
283
|
eventBus: e.eventBus,
|
|
281
284
|
exampleKey: e.exampleKey,
|
|
282
|
-
rows:
|
|
285
|
+
rows: O.value ?? [],
|
|
283
286
|
title: "Headers"
|
|
284
287
|
}, b(B.value.header)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
285
288
|
[c, h("Headers")]
|
|
286
289
|
]),
|
|
287
290
|
m(d(S, f({
|
|
288
|
-
id:
|
|
291
|
+
id: i.value.Query,
|
|
289
292
|
environment: e.environment,
|
|
290
293
|
eventBus: e.eventBus,
|
|
291
294
|
exampleKey: e.exampleKey,
|
|
@@ -294,31 +297,31 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
294
297
|
}, b(B.value.query)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
295
298
|
[c, h("Query")]
|
|
296
299
|
]),
|
|
297
|
-
m(d(
|
|
298
|
-
id:
|
|
300
|
+
m(d(se, {
|
|
301
|
+
id: i.value.Body,
|
|
299
302
|
environment: e.environment,
|
|
300
303
|
exampleKey: e.exampleKey,
|
|
301
304
|
requestBody: y(R)(e.operation.requestBody),
|
|
302
305
|
title: "Request Body",
|
|
303
|
-
"onUpdate:contentType":
|
|
304
|
-
"onUpdate:formValue":
|
|
305
|
-
"onUpdate:value":
|
|
306
|
+
"onUpdate:contentType": Q,
|
|
307
|
+
"onUpdate:formValue": j,
|
|
308
|
+
"onUpdate:value": M
|
|
306
309
|
}, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
|
|
307
310
|
[c, h("Body") && y(w)(e.method)]
|
|
308
311
|
]),
|
|
309
|
-
(v(!0), x(
|
|
312
|
+
(v(!0), x(Y, null, Z(e.plugins, (l, k) => (v(), q(y(te), { key: k }, {
|
|
310
313
|
default: C(() => [
|
|
311
|
-
l?.components?.request ? m((v(), q(
|
|
314
|
+
l?.components?.request ? m((v(), q(_(l.components.request.component), f({
|
|
312
315
|
key: 0,
|
|
313
316
|
operation: e.operation
|
|
314
|
-
}, { ref_for: !0 }, l.components.request.additionalProps, { "onOperation:update:extension":
|
|
315
|
-
[c,
|
|
316
|
-
]) :
|
|
317
|
+
}, { ref_for: !0 }, l.components.request.additionalProps, { "onOperation:update:extension": z }), null, 16, ["operation"])), [
|
|
318
|
+
[c, u.value === "All"]
|
|
319
|
+
]) : D("", !0)
|
|
317
320
|
]),
|
|
318
321
|
_: 2
|
|
319
322
|
}, 1024))), 128)),
|
|
320
323
|
a[1] || (a[1] = K("div", { class: "flex grow" }, null, -1)),
|
|
321
|
-
m(d(
|
|
324
|
+
m(d(me, {
|
|
322
325
|
clientOptions: e.clientOptions,
|
|
323
326
|
eventBus: e.eventBus,
|
|
324
327
|
globalCookies: e.globalCookies,
|
|
@@ -331,14 +334,14 @@ const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
331
334
|
selectedContentType: y(R)(e.operation.requestBody)?.["x-scalar-selected-content-type"]?.[e.exampleKey],
|
|
332
335
|
selectedServer: e.server ?? void 0
|
|
333
336
|
}, null, 8, ["clientOptions", "eventBus", "globalCookies", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedContentType", "selectedServer"]), [
|
|
334
|
-
[c,
|
|
337
|
+
[c, u.value === "All"]
|
|
335
338
|
])
|
|
336
|
-
], 8,
|
|
339
|
+
], 8, be)
|
|
337
340
|
]),
|
|
338
341
|
_: 1
|
|
339
342
|
}, 8, ["aria-label"]));
|
|
340
343
|
}
|
|
341
344
|
});
|
|
342
345
|
export {
|
|
343
|
-
|
|
346
|
+
$e as default
|
|
344
347
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { canMethodHaveBody as m } from "@scalar/helpers/http/can-method-have-body";
|
|
2
2
|
import { getResolvedRef as r } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { isElectron as y } from "../../../../libs/electron.js";
|
|
4
|
-
const l = "2.38.
|
|
4
|
+
const l = "2.38.1", T = "application/json", C = "*/*", a = (n, s, o) => ({
|
|
5
5
|
name: n,
|
|
6
6
|
defaultValue: s,
|
|
7
7
|
isOverridden: o.has(n.toLowerCase())
|
|
@@ -10,6 +10,8 @@ type __VLS_Props = {
|
|
|
10
10
|
eventBus: WorkspaceEventBus;
|
|
11
11
|
/** Allows adding authentication which is not in the document */
|
|
12
12
|
createAnySecurityScheme?: boolean;
|
|
13
|
+
/** Whether the authentication disclosure should start expanded */
|
|
14
|
+
defaultOpen?: boolean;
|
|
13
15
|
/** Creates a static disclosure that cannot be collapsed */
|
|
14
16
|
isStatic?: boolean;
|
|
15
17
|
meta: AuthMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AA2TA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;AAC1G,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gEAAgE;IAChE,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,qBAAqB,CAAA;IACtC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IAC9C,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AA+eF,QAAA,MAAM,YAAY;;cA9cqB,IAAI;cAAQ,MAAM;;;;oPAidvD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as U, useId as $, ref as v, computed as S, createBlock as
|
|
1
|
+
import { defineComponent as U, useId as $, ref as v, computed as S, createBlock as p, openBlock as c, unref as s, withCtx as r, createVNode as m, createCommentVNode as x, createElementBlock as f, Fragment as b, createElementVNode as u, createTextVNode as g, toDisplayString as y, withModifiers as q, normalizeClass as M } from "vue";
|
|
2
2
|
import { useModal as N, ScalarComboboxMultiselect as T, ScalarButton as j, ScalarListboxCheckbox as z, ScalarIconButton as E } from "@scalar/components";
|
|
3
3
|
import { ScalarIconCaretDown as L, ScalarIconTrash as P } from "@scalar/icons";
|
|
4
4
|
import { getResolvedRef as F } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
@@ -14,6 +14,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
14
14
|
environment: {},
|
|
15
15
|
eventBus: {},
|
|
16
16
|
createAnySecurityScheme: { type: Boolean, default: !1 },
|
|
17
|
+
defaultOpen: { type: Boolean, default: !0 },
|
|
17
18
|
isStatic: { type: Boolean, default: !1 },
|
|
18
19
|
meta: {},
|
|
19
20
|
proxyUrl: {},
|
|
@@ -24,7 +25,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
24
25
|
title: {}
|
|
25
26
|
},
|
|
26
27
|
setup(e, { expose: A }) {
|
|
27
|
-
const k = $(),
|
|
28
|
+
const k = $(), O = v(null), B = v(!1), d = N(), o = v(null), h = S(() => {
|
|
28
29
|
if (!e.securityRequirements?.length)
|
|
29
30
|
return null;
|
|
30
31
|
const l = J(e.securityRequirements);
|
|
@@ -32,7 +33,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
32
33
|
icon: l ? "Unlock" : "Lock",
|
|
33
34
|
text: l ? "Optional" : "Required"
|
|
34
35
|
};
|
|
35
|
-
}),
|
|
36
|
+
}), C = S(
|
|
36
37
|
() => K(
|
|
37
38
|
e.securityRequirements ?? [],
|
|
38
39
|
e.securitySchemes ?? {},
|
|
@@ -54,7 +55,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
54
55
|
}) : [] : [];
|
|
55
56
|
}) : [];
|
|
56
57
|
}), D = (l) => {
|
|
57
|
-
B.value && l.stopPropagation(),
|
|
58
|
+
B.value && l.stopPropagation(), O.value?.$el.click();
|
|
58
59
|
}, I = (l) => {
|
|
59
60
|
const t = l.filter((a) => a.payload === void 0).map((a) => G(a.value, { depth: 2 })), n = l.filter((a) => a.payload !== void 0).map((a) => ({
|
|
60
61
|
name: a.label,
|
|
@@ -75,9 +76,10 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
75
76
|
return A({
|
|
76
77
|
authIndicator: h,
|
|
77
78
|
selectedSchemeOptions: i,
|
|
78
|
-
schemeOptions:
|
|
79
|
-
}), (l, t) => (c(),
|
|
79
|
+
schemeOptions: C
|
|
80
|
+
}), (l, t) => (c(), p(s(Y), {
|
|
80
81
|
class: "group/params relative",
|
|
82
|
+
defaultOpen: e.defaultOpen,
|
|
81
83
|
isStatic: e.isStatic,
|
|
82
84
|
itemCount: i.value.length,
|
|
83
85
|
"onUpdate:modelValue": t[1] || (t[1] = (n) => B.value = n)
|
|
@@ -87,13 +89,13 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
87
89
|
id: s(k),
|
|
88
90
|
class: "inline-flex items-center gap-0.5 leading-[20px]"
|
|
89
91
|
}, [
|
|
90
|
-
u("span", null,
|
|
91
|
-
h.value ? (c(),
|
|
92
|
+
u("span", null, y(e.title), 1),
|
|
93
|
+
h.value ? (c(), f("span", {
|
|
92
94
|
key: 0,
|
|
93
95
|
class: M(["text-c-3 hover:bg-b-3 hover:text-c-1 -my-0.5 -mr-1 cursor-pointer rounded px-1 py-0.5 leading-[normal] font-normal", { "text-c-1": h.value.text === "Required" }]),
|
|
94
96
|
"data-testid": "auth-indicator",
|
|
95
97
|
onClick: D
|
|
96
|
-
},
|
|
98
|
+
}, y(h.value.text), 3)) : x("", !0)
|
|
97
99
|
], 8, Z)
|
|
98
100
|
]),
|
|
99
101
|
actions: r(() => [
|
|
@@ -101,7 +103,7 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
101
103
|
class: "w-72 text-xs",
|
|
102
104
|
modelValue: i.value,
|
|
103
105
|
multiple: "",
|
|
104
|
-
options:
|
|
106
|
+
options: C.value,
|
|
105
107
|
placement: "bottom-end",
|
|
106
108
|
teleport: "",
|
|
107
109
|
onDelete: R,
|
|
@@ -112,32 +114,32 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
112
114
|
multiselect: "",
|
|
113
115
|
selected: a
|
|
114
116
|
}, null, 8, ["selected"]),
|
|
115
|
-
u("div", _,
|
|
116
|
-
n.isDeletable ? (c(),
|
|
117
|
+
u("div", _, y(n.label), 1),
|
|
118
|
+
n.isDeletable ? (c(), p(s(E), {
|
|
117
119
|
key: 0,
|
|
118
120
|
class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
|
|
119
121
|
icon: s(P),
|
|
120
122
|
label: `Delete ${n.label}`,
|
|
121
123
|
size: "xs",
|
|
122
124
|
onClick: q((V) => R(n), ["stop"])
|
|
123
|
-
}, null, 8, ["icon", "label", "onClick"])) :
|
|
125
|
+
}, null, 8, ["icon", "label", "onClick"])) : x("", !0)
|
|
124
126
|
]),
|
|
125
127
|
default: r(() => [
|
|
126
128
|
m(s(j), {
|
|
127
129
|
ref_key: "comboboxButtonRef",
|
|
128
|
-
ref:
|
|
130
|
+
ref: O,
|
|
129
131
|
"aria-describedby": s(k),
|
|
130
132
|
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal",
|
|
131
133
|
variant: "ghost"
|
|
132
134
|
}, {
|
|
133
135
|
default: r(() => [
|
|
134
|
-
i.value.length === 1 ? (c(),
|
|
136
|
+
i.value.length === 1 ? (c(), f(b, { key: 0 }, [
|
|
135
137
|
t[2] || (t[2] = u("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
136
|
-
g(" " +
|
|
137
|
-
], 64)) : i.value.length > 1 ? (c(),
|
|
138
|
+
g(" " + y(i.value[0]?.label), 1)
|
|
139
|
+
], 64)) : i.value.length > 1 ? (c(), f(b, { key: 1 }, [
|
|
138
140
|
t[3] || (t[3] = g(" Multiple ", -1)),
|
|
139
141
|
t[4] || (t[4] = u("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
140
|
-
], 64)) : (c(),
|
|
142
|
+
], 64)) : (c(), f(b, { key: 2 }, [
|
|
141
143
|
t[5] || (t[5] = u("span", { class: "sr-only" }, "Select", -1)),
|
|
142
144
|
t[6] || (t[6] = g(" Auth Type ", -1))
|
|
143
145
|
], 64)),
|
|
@@ -164,17 +166,17 @@ const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */
|
|
|
164
166
|
selectedSchemeOptions: i.value,
|
|
165
167
|
server: e.server
|
|
166
168
|
}, null, 8, ["activeAuthIndex", "environment", "eventBus", "isStatic", "meta", "proxyUrl", "securitySchemes", "selectedSchemeOptions", "server"]),
|
|
167
|
-
o.value ? (c(),
|
|
169
|
+
o.value ? (c(), p(H, {
|
|
168
170
|
key: 0,
|
|
169
171
|
label: o.value.label,
|
|
170
172
|
scheme: o.value,
|
|
171
173
|
state: s(d),
|
|
172
174
|
onClose: t[0] || (t[0] = (n) => s(d).hide()),
|
|
173
175
|
onDelete: w
|
|
174
|
-
}, null, 8, ["label", "scheme", "state"])) :
|
|
176
|
+
}, null, 8, ["label", "scheme", "state"])) : x("", !0)
|
|
175
177
|
]),
|
|
176
178
|
_: 1
|
|
177
|
-
}, 8, ["isStatic", "itemCount"]));
|
|
179
|
+
}, 8, ["defaultOpen", "isStatic", "itemCount"]));
|
|
178
180
|
}
|
|
179
181
|
});
|
|
180
182
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarMenu.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/sidebar/SidebarMenu.vue"],"names":[],"mappings":"AA2EA,OAAO,EAQL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAG3B,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,eAAe,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/B;;;OAGG;IACH,UAAU,EAAE,cAAc,EAAE,CAAA;CAC7B,CAAC;AAcF,KAAK,WAAW,GAAG;IACjB,oEAAoE;IACpE,kBAAkB,CAAC,IAAI,OAAO,CAAA;CAC/B,CAAC;AAyJF,QAAA,MAAM,UAAU;;;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|