@scalar/api-client 2.18.0 → 2.18.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/hooks/useClientConfig.js +1 -1
- package/dist/hooks/useLayout.js +1 -1
- package/dist/hooks/useSidebar.js +1 -1
- package/dist/plugins/hooks/usePluginManager.js +1 -1
- package/dist/store/active-entities.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +1 -1
- 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 +36 -35
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +17 -17
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
- 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 +130 -122
- package/dist/v2/features/app/helpers/routes.d.ts +5 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +26 -25
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +3 -3
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +22 -20
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +13 -13
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarMarkdownSummary as
|
|
3
|
-
import { getResolvedRef as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as O, computed as j, ref as A, createElementBlock as i, openBlock as l, Fragment as d, renderList as g, createBlock as y, createCommentVNode as m, unref as u, withCtx as r, createVNode as s, createElementVNode as V, toDisplayString as N, createTextVNode as v, normalizeClass as R, capitalize as P } from "vue";
|
|
2
|
+
import { ScalarMarkdownSummary as Q } from "@scalar/components";
|
|
3
|
+
import { getResolvedRef as q } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
|
+
import D from "./OAuth2.vue.js";
|
|
5
5
|
import b from "./RequestAuthDataTableInput.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
6
|
+
import p from "../../../components/data-table/DataTableRow.vue.js";
|
|
7
|
+
import z from "../../../components/data-table/DataTableCell.vue.js";
|
|
8
|
+
const E = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow-hidden px-3 py-1.25 text-ellipsis group-hover/auth:absolute group-hover/auth:h-auto group-hover/auth:border-b *:first:line-clamp-1 *:first:text-ellipsis group-hover/auth:*:first:line-clamp-none" }, H = { class: "flex min-h-8 border-t text-base" }, L = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" }, G = ["onClick"], J = { class: "relative z-10" }, ae = /* @__PURE__ */ O({
|
|
9
9
|
__name: "RequestAuthTab",
|
|
10
10
|
props: {
|
|
11
11
|
environment: {},
|
|
@@ -16,68 +16,76 @@ const H = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
|
|
|
16
16
|
server: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:securityScheme", "update:selectedScopes"],
|
|
19
|
-
setup(f, { emit:
|
|
20
|
-
const x =
|
|
21
|
-
() => Object.entries(f.selectedSecuritySchemas).map(([
|
|
22
|
-
scheme:
|
|
23
|
-
name:
|
|
24
|
-
scopes:
|
|
19
|
+
setup(f, { emit: I }) {
|
|
20
|
+
const x = I, $ = j(
|
|
21
|
+
() => Object.entries(f.selectedSecuritySchemas).map(([o, t = []]) => ({
|
|
22
|
+
scheme: q(f.securitySchemes[o]),
|
|
23
|
+
name: o,
|
|
24
|
+
scopes: t
|
|
25
25
|
}))
|
|
26
|
-
), w =
|
|
27
|
-
const
|
|
28
|
-
switch (
|
|
26
|
+
), w = A(""), C = j(() => $.value.length > 1), _ = (o, t) => {
|
|
27
|
+
const e = P(o), a = t.description ? `: ${t.description}` : "";
|
|
28
|
+
switch (t.type) {
|
|
29
29
|
case "apiKey":
|
|
30
|
-
return `${
|
|
30
|
+
return `${e}${a || `: ${t.in}`}`;
|
|
31
31
|
case "oauth2": {
|
|
32
|
-
const
|
|
33
|
-
return `${
|
|
32
|
+
const k = Object.keys(t.flows ?? {})[0], n = w.value || k;
|
|
33
|
+
return `${e}: ${n}${a}`;
|
|
34
34
|
}
|
|
35
35
|
case "http":
|
|
36
|
-
return `${
|
|
36
|
+
return `${e}: ${t.scheme}${a}`;
|
|
37
37
|
default:
|
|
38
|
-
return `${
|
|
38
|
+
return `${e}${a || `: ${t.type}`}`;
|
|
39
39
|
}
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
}, F = (o, t) => w.value === o || t === 0 && !w.value, T = () => f.isStatic && "border-t", h = (o, t, e) => x(
|
|
41
|
+
"update:securityScheme",
|
|
42
|
+
{
|
|
43
|
+
type: "http",
|
|
44
|
+
[o]: t
|
|
45
|
+
},
|
|
46
|
+
e
|
|
47
|
+
), B = (o, t, e) => x(
|
|
48
|
+
"update:securityScheme",
|
|
49
|
+
{
|
|
50
|
+
type: "apiKey",
|
|
51
|
+
[o]: t
|
|
52
|
+
},
|
|
53
|
+
e
|
|
54
|
+
), K = (o, t) => {
|
|
47
55
|
x("update:selectedScopes", {
|
|
48
56
|
id: Object.keys(f.selectedSecuritySchemas),
|
|
49
|
-
name:
|
|
50
|
-
...
|
|
57
|
+
name: o,
|
|
58
|
+
...t
|
|
51
59
|
});
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
return
|
|
60
|
+
}, M = (o, t) => {
|
|
61
|
+
const e = "floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium";
|
|
62
|
+
return F(o, t) ? `${e} !text-c-1 !rounded-none border-b !border-current ${f.isStatic ? "opacity-100" : ""}` : e;
|
|
55
63
|
};
|
|
56
|
-
return (
|
|
57
|
-
|
|
58
|
-
default:
|
|
59
|
-
|
|
60
|
-
"aria-label":
|
|
64
|
+
return (o, t) => (l(!0), i(d, null, g($.value, ({ scheme: e, name: a, scopes: k }) => (l(), i(d, { key: a }, [
|
|
65
|
+
C.value && e ? (l(), y(u(p), { key: 0 }, {
|
|
66
|
+
default: r(() => [
|
|
67
|
+
s(u(z), {
|
|
68
|
+
"aria-label": _(a, e),
|
|
61
69
|
class: "text-c-2 group/auth flex items-center leading-[22px] whitespace-nowrap outline-none hover:whitespace-normal"
|
|
62
70
|
}, {
|
|
63
|
-
default:
|
|
64
|
-
|
|
71
|
+
default: r(() => [
|
|
72
|
+
V("p", E, N(_(a, e)), 1)
|
|
65
73
|
]),
|
|
66
74
|
_: 2
|
|
67
75
|
}, 1032, ["aria-label"])
|
|
68
76
|
]),
|
|
69
77
|
_: 2
|
|
70
78
|
}, 1024)) : m("", !0),
|
|
71
|
-
|
|
72
|
-
default:
|
|
73
|
-
|
|
74
|
-
"aria-label":
|
|
79
|
+
e?.description && !C.value ? (l(), y(u(p), { key: 1 }, {
|
|
80
|
+
default: r(() => [
|
|
81
|
+
s(u(z), {
|
|
82
|
+
"aria-label": e.description,
|
|
75
83
|
class: "max-h-[auto]"
|
|
76
84
|
}, {
|
|
77
|
-
default:
|
|
78
|
-
|
|
85
|
+
default: r(() => [
|
|
86
|
+
s(u(Q), {
|
|
79
87
|
class: "auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",
|
|
80
|
-
value:
|
|
88
|
+
value: e.description
|
|
81
89
|
}, null, 8, ["value"])
|
|
82
90
|
]),
|
|
83
91
|
_: 2
|
|
@@ -85,134 +93,134 @@ const H = { class: "bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow
|
|
|
85
93
|
]),
|
|
86
94
|
_: 2
|
|
87
95
|
}, 1024)) : m("", !0),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
default:
|
|
91
|
-
|
|
92
|
-
containerClass:
|
|
93
|
-
environment:
|
|
94
|
-
modelValue:
|
|
96
|
+
e?.type === "http" ? (l(), i(d, { key: 2 }, [
|
|
97
|
+
e.scheme === "bearer" ? (l(), y(u(p), { key: 0 }, {
|
|
98
|
+
default: r(() => [
|
|
99
|
+
s(b, {
|
|
100
|
+
containerClass: T(),
|
|
101
|
+
environment: o.environment,
|
|
102
|
+
modelValue: e["x-scalar-secret-token"],
|
|
95
103
|
placeholder: "Token",
|
|
96
104
|
type: "password",
|
|
97
|
-
"onUpdate:modelValue":
|
|
105
|
+
"onUpdate:modelValue": (n) => h("x-scalar-secret-token", n, a)
|
|
98
106
|
}, {
|
|
99
|
-
default:
|
|
100
|
-
|
|
107
|
+
default: r(() => [...t[0] || (t[0] = [
|
|
108
|
+
v(" Bearer Token ", -1)
|
|
101
109
|
])]),
|
|
102
110
|
_: 1
|
|
103
|
-
}, 8, ["containerClass", "environment", "modelValue"])
|
|
111
|
+
}, 8, ["containerClass", "environment", "modelValue", "onUpdate:modelValue"])
|
|
104
112
|
]),
|
|
105
113
|
_: 2
|
|
106
|
-
}, 1024)) :
|
|
107
|
-
|
|
108
|
-
default:
|
|
109
|
-
|
|
114
|
+
}, 1024)) : e?.scheme === "basic" ? (l(), i(d, { key: 1 }, [
|
|
115
|
+
s(u(p), null, {
|
|
116
|
+
default: r(() => [
|
|
117
|
+
s(b, {
|
|
110
118
|
class: "text-c-2",
|
|
111
|
-
environment:
|
|
112
|
-
modelValue:
|
|
119
|
+
environment: o.environment,
|
|
120
|
+
modelValue: e["x-scalar-secret-username"],
|
|
113
121
|
placeholder: "janedoe",
|
|
114
122
|
required: "",
|
|
115
|
-
"onUpdate:modelValue":
|
|
123
|
+
"onUpdate:modelValue": (n) => h("x-scalar-secret-username", n, a)
|
|
116
124
|
}, {
|
|
117
|
-
default:
|
|
118
|
-
|
|
125
|
+
default: r(() => [...t[1] || (t[1] = [
|
|
126
|
+
v(" Username ", -1)
|
|
119
127
|
])]),
|
|
120
128
|
_: 1
|
|
121
|
-
}, 8, ["environment", "modelValue"])
|
|
129
|
+
}, 8, ["environment", "modelValue", "onUpdate:modelValue"])
|
|
122
130
|
]),
|
|
123
131
|
_: 2
|
|
124
132
|
}, 1024),
|
|
125
|
-
|
|
126
|
-
default:
|
|
127
|
-
|
|
128
|
-
environment:
|
|
129
|
-
modelValue:
|
|
133
|
+
s(u(p), null, {
|
|
134
|
+
default: r(() => [
|
|
135
|
+
s(b, {
|
|
136
|
+
environment: o.environment,
|
|
137
|
+
modelValue: e["x-scalar-secret-password"],
|
|
130
138
|
placeholder: "********",
|
|
131
139
|
type: "password",
|
|
132
|
-
"onUpdate:modelValue":
|
|
140
|
+
"onUpdate:modelValue": (n) => h("x-scalar-secret-password", n, a)
|
|
133
141
|
}, {
|
|
134
|
-
default:
|
|
135
|
-
|
|
142
|
+
default: r(() => [...t[2] || (t[2] = [
|
|
143
|
+
v(" Password ", -1)
|
|
136
144
|
])]),
|
|
137
145
|
_: 1
|
|
138
|
-
}, 8, ["environment", "modelValue"])
|
|
146
|
+
}, 8, ["environment", "modelValue", "onUpdate:modelValue"])
|
|
139
147
|
]),
|
|
140
148
|
_: 2
|
|
141
149
|
}, 1024)
|
|
142
150
|
], 64)) : m("", !0)
|
|
143
|
-
], 64)) :
|
|
144
|
-
|
|
145
|
-
default:
|
|
146
|
-
|
|
147
|
-
containerClass:
|
|
148
|
-
environment:
|
|
149
|
-
modelValue:
|
|
151
|
+
], 64)) : e?.type === "apiKey" ? (l(), i(d, { key: 3 }, [
|
|
152
|
+
s(u(p), null, {
|
|
153
|
+
default: r(() => [
|
|
154
|
+
s(b, {
|
|
155
|
+
containerClass: T(),
|
|
156
|
+
environment: o.environment,
|
|
157
|
+
modelValue: e.name,
|
|
150
158
|
placeholder: "api-key",
|
|
151
|
-
"onUpdate:modelValue":
|
|
159
|
+
"onUpdate:modelValue": (n) => B("name", n, a)
|
|
152
160
|
}, {
|
|
153
|
-
default:
|
|
154
|
-
|
|
161
|
+
default: r(() => [...t[3] || (t[3] = [
|
|
162
|
+
v(" Name ", -1)
|
|
155
163
|
])]),
|
|
156
164
|
_: 1
|
|
157
|
-
}, 8, ["containerClass", "environment", "modelValue"])
|
|
165
|
+
}, 8, ["containerClass", "environment", "modelValue", "onUpdate:modelValue"])
|
|
158
166
|
]),
|
|
159
167
|
_: 2
|
|
160
168
|
}, 1024),
|
|
161
|
-
|
|
162
|
-
default:
|
|
163
|
-
|
|
164
|
-
environment:
|
|
165
|
-
modelValue:
|
|
169
|
+
s(u(p), null, {
|
|
170
|
+
default: r(() => [
|
|
171
|
+
s(b, {
|
|
172
|
+
environment: o.environment,
|
|
173
|
+
modelValue: e["x-scalar-secret-token"],
|
|
166
174
|
placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
|
|
167
175
|
type: "password",
|
|
168
|
-
"onUpdate:modelValue":
|
|
176
|
+
"onUpdate:modelValue": (n) => B("x-scalar-secret-token", n, a)
|
|
169
177
|
}, {
|
|
170
|
-
default:
|
|
171
|
-
|
|
178
|
+
default: r(() => [...t[4] || (t[4] = [
|
|
179
|
+
v(" Value ", -1)
|
|
172
180
|
])]),
|
|
173
181
|
_: 1
|
|
174
|
-
}, 8, ["environment", "modelValue"])
|
|
182
|
+
}, 8, ["environment", "modelValue", "onUpdate:modelValue"])
|
|
175
183
|
]),
|
|
176
184
|
_: 2
|
|
177
185
|
}, 1024)
|
|
178
|
-
], 64)) :
|
|
179
|
-
Object.keys(
|
|
180
|
-
default:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
(
|
|
184
|
-
key:
|
|
185
|
-
class:
|
|
186
|
+
], 64)) : e?.type === "oauth2" ? (l(), i(d, { key: 4 }, [
|
|
187
|
+
Object.keys(e.flows).length > 1 ? (l(), y(u(p), { key: 0 }, {
|
|
188
|
+
default: r(() => [
|
|
189
|
+
V("div", H, [
|
|
190
|
+
V("div", L, [
|
|
191
|
+
(l(!0), i(d, null, g(e.flows, (n, c, U) => (l(), i("button", {
|
|
192
|
+
key: c,
|
|
193
|
+
class: R(M(c, U)),
|
|
186
194
|
type: "button",
|
|
187
|
-
onClick: (S) => w.value =
|
|
195
|
+
onClick: (S) => w.value = c
|
|
188
196
|
}, [
|
|
189
|
-
|
|
190
|
-
], 10,
|
|
197
|
+
V("span", J, N(c), 1)
|
|
198
|
+
], 10, G))), 128))
|
|
191
199
|
])
|
|
192
200
|
])
|
|
193
201
|
]),
|
|
194
202
|
_: 2
|
|
195
203
|
}, 1024)) : m("", !0),
|
|
196
|
-
(
|
|
197
|
-
|
|
204
|
+
(l(!0), i(d, null, g(e.flows, (n, c, U) => (l(), i(d, { key: c }, [
|
|
205
|
+
F(c, U) ? (l(), y(D, {
|
|
198
206
|
key: 0,
|
|
199
|
-
environment:
|
|
200
|
-
flows:
|
|
201
|
-
proxyUrl:
|
|
202
|
-
selectedScopes:
|
|
203
|
-
server:
|
|
204
|
-
type:
|
|
205
|
-
"onUpdate:securityScheme":
|
|
206
|
-
"onUpdate:selectedScopes": (S) =>
|
|
207
|
-
}, null, 8, ["environment", "flows", "proxyUrl", "selectedScopes", "server", "type", "onUpdate:selectedScopes"])) : m("", !0)
|
|
207
|
+
environment: o.environment,
|
|
208
|
+
flows: e.flows,
|
|
209
|
+
proxyUrl: o.proxyUrl,
|
|
210
|
+
selectedScopes: k,
|
|
211
|
+
server: o.server,
|
|
212
|
+
type: c,
|
|
213
|
+
"onUpdate:securityScheme": (S) => x("update:securityScheme", S, a),
|
|
214
|
+
"onUpdate:selectedScopes": (S) => K(a, S)
|
|
215
|
+
}, null, 8, ["environment", "flows", "proxyUrl", "selectedScopes", "server", "type", "onUpdate:securityScheme", "onUpdate:selectedScopes"])) : m("", !0)
|
|
208
216
|
], 64))), 128))
|
|
209
|
-
], 64)) :
|
|
217
|
+
], 64)) : e?.type === "openIdConnect" ? (l(), i("div", {
|
|
210
218
|
key: 5,
|
|
211
|
-
class:
|
|
219
|
+
class: R(["text-c-3 bg-b-1 flex min-h-[calc(4rem+1px)] items-center justify-center border-t border-b-0 px-4 text-base", { "rounded-b-lg": o.isStatic }])
|
|
212
220
|
}, " Coming soon ", 2)) : m("", !0)
|
|
213
221
|
], 64))), 128));
|
|
214
222
|
}
|
|
215
223
|
});
|
|
216
224
|
export {
|
|
217
|
-
|
|
225
|
+
ae as default
|
|
218
226
|
};
|
|
@@ -41,7 +41,11 @@ export declare const ROUTES: ({
|
|
|
41
41
|
children: ({
|
|
42
42
|
name: string;
|
|
43
43
|
path: string;
|
|
44
|
-
component: import("vue").DefineComponent<RouteProps
|
|
44
|
+
component: import("vue").DefineComponent<RouteProps & {
|
|
45
|
+
hideClientButton?: boolean;
|
|
46
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps & {
|
|
47
|
+
hideClientButton?: boolean;
|
|
48
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
49
|
children?: undefined;
|
|
46
50
|
} | {
|
|
47
51
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/routes.ts"],"names":[],"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AM,eAAe,GAAG,UAAU,GACtC,CACI;IACE,cAAc,EAAE,UAAU,CAAA;IAC1B,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GACD;IACE,cAAc,EAAE,WAAW,CAAA;IAC3B,QAAQ,EAAE,IAAI,CAAA;CACf,CACJ,CAAA;AAEH,MAAM,MAAM,0BAA0B,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,QAAQ,GAAG,aAAa,CAAA;AAEpH,kFAAkF;AAClF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAZK,UAAU;8BAChB,iBAAiB;;oCAGX,WAAW;8BACjB,IAAI;;oCALE,UAAU;8BAChB,iBAAiB;;oCAGX,WAAW;8BACjB,IAAI;;;;;;;;;;;;;;;gCALE,UAAU;0BAChB,iBAAiB;;gCAGX,WAAW;0BACjB,IAAI;;gCALE,UAAU;0BAChB,iBAAiB;;gCAGX,WAAW;0BACjB,IAAI;;;;;;;;;IA0GM,CAAA"}
|
|
@@ -27,7 +27,7 @@ export type ModalProps = {
|
|
|
27
27
|
/** Api client plugins to include in the modal */
|
|
28
28
|
plugins: ClientPlugin[];
|
|
29
29
|
/** Subset of the configuration options for the modal */
|
|
30
|
-
options: MaybeRefOrGetter<Pick<ApiReferenceConfigurationRaw, 'authentication'
|
|
30
|
+
options: MaybeRefOrGetter<Partial<Pick<ApiReferenceConfigurationRaw, 'authentication' | 'hideClientButton'>>>;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
33
|
* Scalar Api Client Modal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/modal/Modal.vue"],"names":[],"mappings":"AAwYA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAA;AAC3B,OA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|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Modal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2d195805"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { addScalarClassesToHeadless as
|
|
1
|
+
import { defineComponent as N, ref as h, useId as D, watch as E, nextTick as F, onBeforeMount as U, onBeforeUnmount as V, computed as u, toValue as w, withDirectives as k, createElementBlock as r, openBlock as c, createElementVNode as i, unref as o, createVNode as l, withCtx as A, vShow as b } from "vue";
|
|
2
|
+
import { addScalarClassesToHeadless as $, ScalarTeleportRoot as x } from "@scalar/components";
|
|
3
3
|
import { ScalarToasts as H } from "@scalar/use-toasts";
|
|
4
4
|
import { useFocusTrap as L } from "@vueuse/integrations/useFocusTrap";
|
|
5
5
|
import { mergeAuthConfig as M } from "../../blocks/scalar-auth-selector-block/helpers/merge-auth-config.js";
|
|
@@ -16,7 +16,7 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
16
16
|
}, Y = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "flex h-full w-full items-center justify-center"
|
|
19
|
-
}, Z = {}, ce = /* @__PURE__ */
|
|
19
|
+
}, Z = {}, ce = /* @__PURE__ */ N({
|
|
20
20
|
...Z,
|
|
21
21
|
__name: "Modal",
|
|
22
22
|
props: {
|
|
@@ -31,7 +31,7 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
31
31
|
plugins: {},
|
|
32
32
|
options: {}
|
|
33
33
|
},
|
|
34
|
-
setup(t, { expose:
|
|
34
|
+
setup(t, { expose: B }) {
|
|
35
35
|
typeof window < "u" && (window.dataDumpWorkspace = () => t.workspaceStore);
|
|
36
36
|
const m = {
|
|
37
37
|
label: "default",
|
|
@@ -45,45 +45,45 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
45
45
|
sidebarState: t.sidebarState,
|
|
46
46
|
modalState: t.modalState
|
|
47
47
|
}), R(t.eventBus, "modal");
|
|
48
|
-
const
|
|
48
|
+
const f = h(null), v = D(), { activate: y, deactivate: C } = L(f, {
|
|
49
49
|
allowOutsideClick: !0,
|
|
50
|
-
fallbackFocus: `#${
|
|
50
|
+
fallbackFocus: `#${v}`
|
|
51
51
|
}), p = () => {
|
|
52
|
-
|
|
52
|
+
C(), t.eventBus.emit("operation:cancel:request");
|
|
53
53
|
}, g = j(() => typeof window < "u" ? window.document.body : null);
|
|
54
|
-
|
|
54
|
+
E(
|
|
55
55
|
() => t.modalState.open,
|
|
56
56
|
(e) => {
|
|
57
|
-
g.value = e, e ? y({ checkCanFocusTrap: () =>
|
|
57
|
+
g.value = e, e ? y({ checkCanFocusTrap: () => F() }) : p();
|
|
58
58
|
}
|
|
59
|
-
),
|
|
59
|
+
), U(() => $()), V(() => p());
|
|
60
60
|
const T = 288, d = u(
|
|
61
61
|
() => t.workspaceStore?.workspace?.["x-scalar-sidebar-width"] ?? T
|
|
62
|
-
),
|
|
62
|
+
), W = (e) => t.workspaceStore?.update("x-scalar-sidebar-width", e), S = u(
|
|
63
63
|
() => O(t.workspaceStore, t.document.value)
|
|
64
|
-
),
|
|
64
|
+
), I = u(
|
|
65
65
|
() => M(
|
|
66
66
|
t.document.value?.components?.securitySchemes,
|
|
67
|
-
|
|
67
|
+
w(t.options)?.authentication?.securitySchemes
|
|
68
68
|
)
|
|
69
69
|
);
|
|
70
|
-
return
|
|
70
|
+
return B({
|
|
71
71
|
sidebarWidth: d,
|
|
72
72
|
environment: S
|
|
73
|
-
}), (e, a) =>
|
|
73
|
+
}), (e, a) => k((c(), r("div", P, [
|
|
74
74
|
i("div", J, [
|
|
75
75
|
i("div", {
|
|
76
|
-
id: o(
|
|
76
|
+
id: o(v),
|
|
77
77
|
ref_key: "client",
|
|
78
|
-
ref:
|
|
78
|
+
ref: f,
|
|
79
79
|
"aria-label": "API Client",
|
|
80
80
|
"aria-modal": "true",
|
|
81
81
|
class: "scalar-app-layout scalar-client flex",
|
|
82
82
|
role: "dialog",
|
|
83
83
|
tabindex: "-1"
|
|
84
84
|
}, [
|
|
85
|
-
l(o(
|
|
86
|
-
default:
|
|
85
|
+
l(o(x), null, {
|
|
86
|
+
default: A(() => [
|
|
87
87
|
l(o(H)),
|
|
88
88
|
e.document.value && e.path?.value && e.method?.value ? (c(), r("main", X, [
|
|
89
89
|
l(o(G), {
|
|
@@ -91,11 +91,11 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
91
91
|
"onUpdate:modelValue": a[0] || (a[0] = (n) => s.value = n),
|
|
92
92
|
class: "absolute top-2 left-3 z-[10001]"
|
|
93
93
|
}, null, 8, ["modelValue"]),
|
|
94
|
-
|
|
94
|
+
k(l(o(K), {
|
|
95
95
|
sidebarWidth: d.value,
|
|
96
96
|
"onUpdate:sidebarWidth": [
|
|
97
97
|
a[1] || (a[1] = (n) => d.value = n),
|
|
98
|
-
|
|
98
|
+
W
|
|
99
99
|
],
|
|
100
100
|
activeWorkspace: m,
|
|
101
101
|
class: "z-[10000] h-full max-md:absolute! max-md:w-full!",
|
|
@@ -107,7 +107,7 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
107
107
|
workspaces: [],
|
|
108
108
|
onSelectItem: e.sidebarState.handleSelectItem
|
|
109
109
|
}, null, 8, ["sidebarWidth", "documents", "eventBus", "sidebarState", "onSelectItem"]), [
|
|
110
|
-
[
|
|
110
|
+
[b, s.value]
|
|
111
111
|
]),
|
|
112
112
|
l(z, {
|
|
113
113
|
activeWorkspace: m,
|
|
@@ -117,13 +117,14 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
117
117
|
environment: S.value,
|
|
118
118
|
eventBus: e.eventBus,
|
|
119
119
|
exampleName: e.exampleName?.value,
|
|
120
|
+
hideClientButton: w(e.options)?.hideClientButton ?? !1,
|
|
120
121
|
layout: "modal",
|
|
121
122
|
method: e.method?.value,
|
|
122
123
|
path: e.path?.value,
|
|
123
124
|
plugins: e.plugins,
|
|
124
|
-
securitySchemes:
|
|
125
|
+
securitySchemes: I.value,
|
|
125
126
|
workspaceStore: e.workspaceStore
|
|
126
|
-
}, null, 8, ["document", "documentSlug", "environment", "eventBus", "exampleName", "method", "path", "plugins", "securitySchemes", "workspaceStore"])
|
|
127
|
+
}, null, 8, ["document", "documentSlug", "environment", "eventBus", "exampleName", "hideClientButton", "method", "path", "plugins", "securitySchemes", "workspaceStore"])
|
|
127
128
|
])) : (c(), r("div", Y, [...a[3] || (a[3] = [
|
|
128
129
|
i("span", { class: "text-c-3" }, "No document selected", -1)
|
|
129
130
|
])]))
|
|
@@ -137,7 +138,7 @@ const P = { class: "scalar scalar-app" }, J = { class: "scalar-container" }, Q =
|
|
|
137
138
|
})
|
|
138
139
|
])
|
|
139
140
|
], 512)), [
|
|
140
|
-
[
|
|
141
|
+
[b, e.modalState.open]
|
|
141
142
|
]);
|
|
142
143
|
}
|
|
143
144
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ModalState } from '@scalar/components';
|
|
2
|
-
import type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference';
|
|
3
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
4
3
|
import { type WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
5
|
-
import { type App
|
|
4
|
+
import { type App } from 'vue';
|
|
6
5
|
import { type RoutePayload } from '../../../../v2/features/modal/helpers/resolve-route-parameters.js';
|
|
6
|
+
import { type ModalProps } from '../../../../v2/features/modal/Modal.vue.js';
|
|
7
7
|
import type { ClientPlugin } from '../../../../v2/helpers/plugins.js';
|
|
8
8
|
export type CreateApiClientModalOptions = {
|
|
9
9
|
/** Element to mount the client modal to. */
|
|
@@ -20,7 +20,7 @@ export type CreateApiClientModalOptions = {
|
|
|
20
20
|
/** Api client plugins to include in the modal */
|
|
21
21
|
plugins?: ClientPlugin[];
|
|
22
22
|
/** Subset of the configuration options for the modal, if you want it to be reactive ensure its a ref */
|
|
23
|
-
options?:
|
|
23
|
+
options?: ModalProps['options'];
|
|
24
24
|
};
|
|
25
25
|
export type ApiClientModal = {
|
|
26
26
|
app: App;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-api-client-modal.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/helpers/create-api-client-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,oBAAoB,CAAA;AAC9D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"create-api-client-modal.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/modal/helpers/create-api-client-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,oBAAoB,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,gCAAgC,CAAA;AAChG,OAAO,EAAE,KAAK,GAAG,EAAiC,MAAM,KAAK,CAAA;AAE7D,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,sDAAsD,CAAA;AAE7D,OAAc,EAAE,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAA;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,MAAM,2BAA2B,GAAG;IACxC,4CAA4C;IAC5C,EAAE,EAAE,WAAW,GAAG,IAAI,CAAA;IACtB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,kFAAkF;IAClF,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,6DAA6D;IAC7D,cAAc,EAAE,cAAc,CAAA;IAC9B,iDAAiD;IACjD,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,wGAAwG;IACxG,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,GAAG,CAAA;IACR,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,YAAY,KAAK,IAAI,CAAA;IACtC,KAAK,EAAE,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAC/C,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;IACtC,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,wEASlC,2BAA2B,KAAG,cAsFhC,CAAA"}
|
|
@@ -7,6 +7,10 @@ import type { RouteProps } from '../../../v2/features/app/helpers/routes.js';
|
|
|
7
7
|
* - Modify example request data
|
|
8
8
|
* - Send example request
|
|
9
9
|
*/
|
|
10
|
-
declare const _default: import("vue").DefineComponent<RouteProps
|
|
10
|
+
declare const _default: import("vue").DefineComponent<RouteProps & {
|
|
11
|
+
hideClientButton?: boolean;
|
|
12
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RouteProps & {
|
|
13
|
+
hideClientButton?: boolean;
|
|
14
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
15
|
export default _default;
|
|
12
16
|
//# sourceMappingURL=Operation.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/operation/Operation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Operation.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/operation/Operation.vue"],"names":[],"mappings":"AAmLA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAMlE;;;;;;;GAOG;;uBAGoB,OAAO;;uBAAP,OAAO;;AAF9B,wBA8OC"}
|