@scalar/api-client 2.1.47 → 2.1.49
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 +31 -0
- package/dist/assets/keycap.ascii.js +25 -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 +6 -6
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/codeVariableWidget.js +12 -12
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +13 -13
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +1 -3
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +11 -11
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/requests.d.ts +40 -0
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +65 -55
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +24 -29
- package/dist/style.css +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +71 -71
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +23 -23
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +18 -18
- package/dist/views/Request/RequestSidebar.vue.d.ts +2 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +169 -133
- 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 +181 -155
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +2 -0
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +3 -3
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +155 -96
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +26 -21
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +5 -97
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +97 -2
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +74 -34
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +15 -15
- package/package.json +7 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
selectedSecuritySchemeUids: string[];
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=RequestAuth.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestAuth.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuth.vue"],"names":[],"mappings":"AAiaA,KAAK,WAAW,GAAG;IACjB,0BAA0B,EAAE,MAAM,EAAE,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;AAihBF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuth.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-627b97b0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import { defineComponent as E,
|
|
2
|
-
import
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { nanoid as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { displaySchemeFormatter as
|
|
8
|
-
import { ADD_AUTH_OPTIONS as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { useWorkspace as
|
|
13
|
-
const
|
|
1
|
+
import { defineComponent as E, ref as g, computed as f, openBlock as d, createBlock as W, withCtx as u, createElementVNode as m, createTextVNode as k, toDisplayString as R, createElementBlock as p, createVNode as c, unref as i, createCommentVNode as L, Fragment as H, renderList as P, withModifiers as B, withKeys as G } from "vue";
|
|
2
|
+
import J from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
+
import { useModal as Q, ScalarIcon as M, ScalarComboboxMultiselect as X, ScalarButton as Y, ScalarIconButton as Z } from "@scalar/components";
|
|
4
|
+
import { nanoid as ee } from "nanoid";
|
|
5
|
+
import te from "./DeleteRequestAuthModal.vue.js";
|
|
6
|
+
import le from "./RequestExampleAuth.vue.js";
|
|
7
|
+
import { displaySchemeFormatter as q, createSchemeValueSet as oe } from "../../libs/auth.js";
|
|
8
|
+
import { ADD_AUTH_OPTIONS as se } from "../../consts/new-auth-options.js";
|
|
9
|
+
import ie from "../../../../components/DataTable/DataTable.vue.js";
|
|
10
|
+
import ne from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
11
|
+
import ce from "../../../../components/DataTable/DataTableHeader.vue.js";
|
|
12
|
+
import { useWorkspace as ae } from "../../../../store/store.js";
|
|
13
|
+
const re = { class: "flex flex-1 gap-1 items-center justify-between" }, ue = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "flex items-center gap-1 text-c-3"
|
|
16
|
-
},
|
|
16
|
+
}, me = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "flex relative scroll-timeline-x w-full"
|
|
19
|
-
},
|
|
19
|
+
}, de = { class: "flex flex-1 gap-0.25 mr-1.5 items-center" }, fe = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "pl-2"
|
|
22
|
-
},
|
|
22
|
+
}, we = /* @__PURE__ */ E({
|
|
23
23
|
__name: "RequestAuth",
|
|
24
24
|
props: {
|
|
25
25
|
selectedSecuritySchemeUids: {},
|
|
26
26
|
title: {}
|
|
27
27
|
},
|
|
28
|
-
setup(
|
|
28
|
+
setup(w) {
|
|
29
29
|
const {
|
|
30
30
|
activeCollection: a,
|
|
31
31
|
activeRequest: h,
|
|
32
|
-
collectionMutators:
|
|
32
|
+
collectionMutators: $,
|
|
33
33
|
isReadOnly: y,
|
|
34
|
-
requestMutators:
|
|
35
|
-
securitySchemes:
|
|
36
|
-
securitySchemeMutators:
|
|
37
|
-
} =
|
|
34
|
+
requestMutators: I,
|
|
35
|
+
securitySchemes: S,
|
|
36
|
+
securitySchemeMutators: K
|
|
37
|
+
} = ae(), T = g(null), C = g(null), b = Q(), U = g(void 0), A = `combobox-${ee()}`, D = f(() => {
|
|
38
38
|
var l, s;
|
|
39
39
|
const e = ((l = h.value) == null ? void 0 : l.security) ?? ((s = a.value) == null ? void 0 : s.security) ?? [];
|
|
40
40
|
return { filteredRequirements: e.filter((n) => Object.keys(n).length), requirements: e };
|
|
41
41
|
}), j = f(() => {
|
|
42
42
|
var t;
|
|
43
|
-
return (((t = a.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) =>
|
|
43
|
+
return (((t = a.value) == null ? void 0 : t.securitySchemes) ?? []).map((l) => S[l]).filter((l) => l);
|
|
44
44
|
}), N = f(
|
|
45
45
|
() => {
|
|
46
46
|
const e = [...j.value], t = [];
|
|
47
|
-
|
|
47
|
+
D.value.filteredRequirements.forEach((r) => {
|
|
48
48
|
const o = e.findIndex(
|
|
49
49
|
(x) => x.nameKey === Object.keys(r)[0]
|
|
50
50
|
);
|
|
51
51
|
o > -1 && (t.push(e[o]), e.splice(o, 1));
|
|
52
52
|
});
|
|
53
53
|
const l = e.map(
|
|
54
|
-
(r) =>
|
|
54
|
+
(r) => q(r)
|
|
55
55
|
), s = t.map(
|
|
56
|
-
(r) =>
|
|
56
|
+
(r) => q(r)
|
|
57
57
|
), n = [
|
|
58
58
|
{ label: "Required authentication", options: s },
|
|
59
59
|
{ label: "Available authentication", options: l }
|
|
60
60
|
];
|
|
61
61
|
return y.value ? s.length ? n : l : (n.push({
|
|
62
62
|
label: "Add new authentication",
|
|
63
|
-
options:
|
|
63
|
+
options: se
|
|
64
64
|
}), n);
|
|
65
65
|
}
|
|
66
66
|
), _ = f(() => {
|
|
67
|
-
const { filteredRequirements: e, requirements: t } =
|
|
67
|
+
const { filteredRequirements: e, requirements: t } = D.value;
|
|
68
68
|
if (!t.length) return null;
|
|
69
69
|
const l = e.length < t.length, s = l ? "Unlock" : "Lock", n = l ? "Optional" : "Required", o = `${e.length === 1 ? Object.keys(e[0])[0] : "Authentication"} ${n}`;
|
|
70
70
|
return { icon: s, text: o };
|
|
71
|
-
}),
|
|
72
|
-
!a.value || !h.value || (y.value ?
|
|
71
|
+
}), O = (e) => {
|
|
72
|
+
!a.value || !h.value || (y.value ? $.edit(
|
|
73
73
|
a.value.uid,
|
|
74
74
|
"selectedSecuritySchemeUids",
|
|
75
75
|
e
|
|
76
|
-
) :
|
|
76
|
+
) : I.edit(
|
|
77
77
|
h.value.uid,
|
|
78
78
|
"selectedSecuritySchemeUids",
|
|
79
79
|
e
|
|
80
80
|
));
|
|
81
81
|
}, v = f(
|
|
82
|
-
() =>
|
|
83
|
-
(e) =>
|
|
82
|
+
() => w.selectedSecuritySchemeUids.map(
|
|
83
|
+
(e) => q(S[e])
|
|
84
84
|
)
|
|
85
85
|
);
|
|
86
86
|
function F(e) {
|
|
@@ -88,59 +88,59 @@ const ue = { class: "flex flex-1 gap-1 items-center justify-between" }, me = {
|
|
|
88
88
|
if (!((n = a.value) != null && n.uid) || !((r = h.value) != null && r.uid)) return;
|
|
89
89
|
const t = e.find((o) => o.payload), l = e.filter((o) => !o.payload).map(({ id: o }) => o);
|
|
90
90
|
if (t != null && t.payload) {
|
|
91
|
-
const o =
|
|
91
|
+
const o = K.add(
|
|
92
92
|
t.payload,
|
|
93
93
|
a.value.uid
|
|
94
94
|
);
|
|
95
95
|
o && l.push(o.uid);
|
|
96
96
|
}
|
|
97
97
|
const s = l.filter((o) => !a.value.auth[o]);
|
|
98
|
-
|
|
98
|
+
$.edit(
|
|
99
99
|
a.value.uid,
|
|
100
100
|
"auth",
|
|
101
|
-
s.reduce((o, x) => (o[x] =
|
|
102
|
-
),
|
|
101
|
+
s.reduce((o, x) => (o[x] = oe(S[x]), o), a.value.auth)
|
|
102
|
+
), O(l);
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const V = (e) => {
|
|
105
105
|
var t;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
), (t =
|
|
106
|
+
O(
|
|
107
|
+
w.selectedSecuritySchemeUids.filter((l) => l !== e)
|
|
108
|
+
), (t = C.value) == null || t.$el.focus();
|
|
109
109
|
};
|
|
110
110
|
function z(e) {
|
|
111
|
-
|
|
111
|
+
U.value = e, b.show();
|
|
112
112
|
}
|
|
113
|
-
return (e, t) => (d(),
|
|
113
|
+
return (e, t) => (d(), W(J, {
|
|
114
114
|
class: "group/params",
|
|
115
115
|
itemCount: v.value.length
|
|
116
116
|
}, {
|
|
117
117
|
title: u(() => [
|
|
118
|
-
m("div",
|
|
119
|
-
R(
|
|
120
|
-
_.value ? (d(), p("div",
|
|
121
|
-
R(
|
|
118
|
+
m("div", re, [
|
|
119
|
+
k(R(e.title) + " ", 1),
|
|
120
|
+
_.value ? (d(), p("div", ue, [
|
|
121
|
+
k(R(_.value.text) + " ", 1),
|
|
122
122
|
c(i(M), {
|
|
123
123
|
class: "text-c-3",
|
|
124
124
|
icon: _.value.icon,
|
|
125
125
|
size: "xs"
|
|
126
126
|
}, null, 8, ["icon"])
|
|
127
|
-
])) :
|
|
127
|
+
])) : L("", !0)
|
|
128
128
|
])
|
|
129
129
|
]),
|
|
130
130
|
default: u(() => [
|
|
131
131
|
m("form", null, [
|
|
132
|
-
c(i(
|
|
132
|
+
c(i(ie), {
|
|
133
133
|
class: "flex-1",
|
|
134
134
|
columns: [""]
|
|
135
135
|
}, {
|
|
136
136
|
default: u(() => [
|
|
137
|
-
c(i(
|
|
137
|
+
c(i(ne), null, {
|
|
138
138
|
default: u(() => [
|
|
139
|
-
c(i(
|
|
139
|
+
c(i(ce), { class: "relative col-span-full cursor-pointer py-[0px] px-[0px] flex items-center" }, {
|
|
140
140
|
default: u(() => [
|
|
141
|
-
c(i(
|
|
141
|
+
c(i(X), {
|
|
142
142
|
ref_key: "comboboxRef",
|
|
143
|
-
ref:
|
|
143
|
+
ref: T,
|
|
144
144
|
class: "text-xs w-full",
|
|
145
145
|
fullWidth: "",
|
|
146
146
|
isDeletable: !i(y),
|
|
@@ -148,40 +148,40 @@ const ue = { class: "flex flex-1 gap-1 items-center justify-between" }, me = {
|
|
|
148
148
|
multiple: "",
|
|
149
149
|
options: N.value,
|
|
150
150
|
style: { "margin-left": "120px" },
|
|
151
|
-
teleport: `#${
|
|
151
|
+
teleport: `#${A}`,
|
|
152
152
|
onDelete: z,
|
|
153
153
|
"onUpdate:modelValue": F
|
|
154
154
|
}, {
|
|
155
155
|
default: u(() => [
|
|
156
|
-
c(i(
|
|
156
|
+
c(i(Y), {
|
|
157
157
|
ref_key: "comboboxButtonRef",
|
|
158
|
-
ref:
|
|
158
|
+
ref: C,
|
|
159
159
|
class: "h-auto py-0 px-0 text-c-2 hover:text-c-1 font-normal justify-start -outline-offset-2",
|
|
160
160
|
fullWidth: "",
|
|
161
161
|
variant: "ghost"
|
|
162
162
|
}, {
|
|
163
163
|
default: u(() => [
|
|
164
164
|
t[3] || (t[3] = m("div", { class: "text-c-1 h-8 flex min-w-[94px] items-center pr-0 pl-2" }, " Auth Type ", -1)),
|
|
165
|
-
v.value.length ? (d(), p("div",
|
|
165
|
+
v.value.length ? (d(), p("div", me, [
|
|
166
166
|
t[1] || (t[1] = m("div", { class: "fade-left" }, null, -1)),
|
|
167
|
-
m("div",
|
|
168
|
-
(d(!0), p(
|
|
167
|
+
m("div", de, [
|
|
168
|
+
(d(!0), p(H, null, P(v.value, (l) => (d(), p("span", {
|
|
169
169
|
key: l.id,
|
|
170
170
|
class: "cm-pill flex items-center mx-0 h-fit pr-0.5 !bg-b-2 text-c-1"
|
|
171
171
|
}, [
|
|
172
|
-
R(
|
|
173
|
-
c(i(
|
|
172
|
+
k(R(l.label) + " ", 1),
|
|
173
|
+
c(i(Z), {
|
|
174
174
|
class: "cursor-pointer -ml-0.5 text-c-3 hover:text-c-1 rounded-full",
|
|
175
175
|
icon: "Close",
|
|
176
176
|
label: `Remove ${l.label}`,
|
|
177
177
|
size: "xs",
|
|
178
|
-
onClick:
|
|
179
|
-
onKeydown:
|
|
178
|
+
onClick: B((s) => V(l.id), ["stop"]),
|
|
179
|
+
onKeydown: G(B((s) => V(l.id), ["stop"]), ["enter"])
|
|
180
180
|
}, null, 8, ["label", "onClick", "onKeydown"])
|
|
181
181
|
]))), 128))
|
|
182
182
|
]),
|
|
183
183
|
t[2] || (t[2] = m("div", { class: "fade-right" }, null, -1))
|
|
184
|
-
])) : (d(), p("div",
|
|
184
|
+
])) : (d(), p("div", fe, " None ")),
|
|
185
185
|
c(i(M), {
|
|
186
186
|
class: "min-w-3 ml-auto mr-2.5",
|
|
187
187
|
icon: "ChevronDown",
|
|
@@ -199,16 +199,16 @@ const ue = { class: "flex flex-1 gap-1 items-center justify-between" }, me = {
|
|
|
199
199
|
]),
|
|
200
200
|
_: 1
|
|
201
201
|
}),
|
|
202
|
-
c(
|
|
202
|
+
c(le, { selectedSecuritySchemeUids: e.selectedSecuritySchemeUids }, null, 8, ["selectedSecuritySchemeUids"])
|
|
203
203
|
]),
|
|
204
204
|
_: 1
|
|
205
205
|
}),
|
|
206
|
-
c(
|
|
207
|
-
scheme:
|
|
208
|
-
state: i(
|
|
209
|
-
onClose: t[0] || (t[0] = (l) => i(
|
|
206
|
+
c(te, {
|
|
207
|
+
scheme: U.value,
|
|
208
|
+
state: i(b),
|
|
209
|
+
onClose: t[0] || (t[0] = (l) => i(b).hide())
|
|
210
210
|
}, null, 8, ["scheme", "state"]),
|
|
211
|
-
m("div", { id:
|
|
211
|
+
m("div", { id: A })
|
|
212
212
|
])
|
|
213
213
|
]),
|
|
214
214
|
_: 1
|
|
@@ -216,5 +216,5 @@ const ue = { class: "flex flex-1 gap-1 items-center justify-between" }, me = {
|
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
export {
|
|
219
|
-
|
|
219
|
+
we as default
|
|
220
220
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as _, computed as $, watch as K, openBlock as d, createBlock as h, withCtx as y, createTextVNode as x, toDisplayString as q, createElementBlock as C, createElementVNode as P } from "vue";
|
|
2
|
+
import w from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
3
|
import V from "./RequestTable.vue.js";
|
|
4
|
-
import {
|
|
4
|
+
import { REGEX as M } from "@scalar/oas-utils/helpers";
|
|
5
5
|
import { useWorkspace as B } from "../../../store/store.js";
|
|
6
6
|
const N = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "text-c-3 px-4 text-sm border rounded min-h-12 justify-center flex items-center bg-b-1 mx-1"
|
|
9
|
-
},
|
|
9
|
+
}, D = /* @__PURE__ */ _({
|
|
10
10
|
__name: "RequestPathParams",
|
|
11
11
|
props: {
|
|
12
12
|
title: {},
|
|
13
13
|
paramKey: {}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const o =
|
|
15
|
+
setup(b) {
|
|
16
|
+
const o = b, {
|
|
17
17
|
activeRequest: s,
|
|
18
18
|
activeExample: n,
|
|
19
|
-
requestMutators:
|
|
20
|
-
requestExampleMutators:
|
|
21
|
-
} = B(), i =
|
|
19
|
+
requestMutators: v,
|
|
20
|
+
requestExampleMutators: f
|
|
21
|
+
} = B(), i = $(() => {
|
|
22
22
|
const e = n.value;
|
|
23
23
|
return e ? e.parameters[o.paramKey].map((a) => {
|
|
24
24
|
var r;
|
|
@@ -27,7 +27,7 @@ const N = {
|
|
|
27
27
|
enum: a.enum || ((r = e.serverVariables) == null ? void 0 : r[a.key])
|
|
28
28
|
};
|
|
29
29
|
}) : [];
|
|
30
|
-
}),
|
|
30
|
+
}), g = (e, a, r) => {
|
|
31
31
|
var u, t;
|
|
32
32
|
if (!s.value || !n.value) return;
|
|
33
33
|
const p = n.value.parameters[o.paramKey], l = (u = p[e]) == null ? void 0 : u.key;
|
|
@@ -35,18 +35,18 @@ const N = {
|
|
|
35
35
|
if ((t = p[e]) != null && t.required)
|
|
36
36
|
return;
|
|
37
37
|
if (r) {
|
|
38
|
-
const c = encodeURIComponent(l), m = encodeURIComponent(r),
|
|
39
|
-
|
|
38
|
+
const c = encodeURIComponent(l), m = encodeURIComponent(r), E = new RegExp(`(?<=/):${c}(?=[/?#]|$)`, "g"), R = s.value.path.replace(
|
|
39
|
+
E,
|
|
40
40
|
`:${m}`
|
|
41
41
|
);
|
|
42
|
-
|
|
42
|
+
v.edit(s.value.uid, "path", R);
|
|
43
43
|
} else {
|
|
44
44
|
p.splice(e, 1);
|
|
45
45
|
const c = new RegExp(`/:${encodeURIComponent(l)}(?=[/?#]|$)`, "g"), m = s.value.path.replace(c, "");
|
|
46
|
-
|
|
46
|
+
v.edit(s.value.uid, "path", m);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
f.edit(
|
|
50
50
|
n.value.uid,
|
|
51
51
|
`parameters.${o.paramKey}.${e}.${a}`,
|
|
52
52
|
r
|
|
@@ -54,18 +54,18 @@ const N = {
|
|
|
54
54
|
}, k = (e) => {
|
|
55
55
|
var u;
|
|
56
56
|
if (!n.value) return;
|
|
57
|
-
const a = ((u = e.match(M)) == null ? void 0 : u.map((t) => t.slice(1, -1))) || [], r = n.value.parameters[o.paramKey], p = new Map(r.map((t) => [t.key, t])), l = a.map(
|
|
57
|
+
const a = ((u = e.match(M.PATH)) == null ? void 0 : u.map((t) => t.slice(1, -1))) || [], r = n.value.parameters[o.paramKey], p = new Map(r.map((t) => [t.key, t])), l = a.map(
|
|
58
58
|
(t) => p.get(t) || { key: t, value: "", enabled: !0 }
|
|
59
59
|
);
|
|
60
60
|
r.forEach((t) => {
|
|
61
61
|
!a.includes(t.key) && (t.value || t.required) && l.push(t);
|
|
62
|
-
}), r.splice(0, r.length, ...l),
|
|
62
|
+
}), r.splice(0, r.length, ...l), f.edit(
|
|
63
63
|
n.value.uid,
|
|
64
64
|
`parameters.${o.paramKey}`,
|
|
65
65
|
r
|
|
66
66
|
);
|
|
67
67
|
};
|
|
68
|
-
return
|
|
68
|
+
return K(
|
|
69
69
|
() => {
|
|
70
70
|
var e;
|
|
71
71
|
return (e = s.value) == null ? void 0 : e.path;
|
|
@@ -73,22 +73,22 @@ const N = {
|
|
|
73
73
|
(e) => {
|
|
74
74
|
e && k(e);
|
|
75
75
|
}
|
|
76
|
-
), (e, a) => (d(),
|
|
76
|
+
), (e, a) => (d(), h(w, {
|
|
77
77
|
itemCount: i.value.length
|
|
78
78
|
}, {
|
|
79
79
|
title: y(() => [
|
|
80
80
|
x(q(e.title), 1)
|
|
81
81
|
]),
|
|
82
82
|
default: y(() => [
|
|
83
|
-
i.value.length ? (d(),
|
|
83
|
+
i.value.length ? (d(), h(V, {
|
|
84
84
|
key: 0,
|
|
85
85
|
class: "flex-1",
|
|
86
86
|
isEnabledHidden: "",
|
|
87
87
|
items: i.value,
|
|
88
|
-
onUpdateRow:
|
|
88
|
+
onUpdateRow: g
|
|
89
89
|
}, null, 8, ["items"])) : (d(), C("div", N, a[0] || (a[0] = [
|
|
90
90
|
x(" You can use variables in your path: "),
|
|
91
|
-
|
|
91
|
+
P("code", { class: "bg-b-2 ml-1 px-1 rounded" }, "/endpoint/{my_path_variable}", -1)
|
|
92
92
|
])))
|
|
93
93
|
]),
|
|
94
94
|
_: 1
|
|
@@ -96,5 +96,5 @@ const N = {
|
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
export {
|
|
99
|
-
|
|
99
|
+
D as default
|
|
100
100
|
};
|
|
@@ -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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cf78c2e8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -14,7 +14,7 @@ const $ = { class: "flex-1 flex gap-1 items-center lg:pr-24 pointer-events-none
|
|
|
14
14
|
}, M = ["value"], P = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "flex items-center text-c-1 h-8"
|
|
17
|
-
}, z = { class: "request-section-content custom-scroll flex flex-1 flex-col px-
|
|
17
|
+
}, z = { class: "request-section-content custom-scroll flex flex-1 flex-col px-3 xl:px-4 py-2.5" }, Y = /* @__PURE__ */ B({
|
|
18
18
|
__name: "RequestSection",
|
|
19
19
|
props: {
|
|
20
20
|
selectedSecuritySchemeUids: {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as l, computed as f, openBlock as t, createBlock as p, unref as
|
|
2
|
-
import { ScalarTooltip as
|
|
1
|
+
import { defineComponent as l, computed as f, openBlock as t, createBlock as p, unref as n, withCtx as i, createElementVNode as c, createVNode as d, createElementBlock as o, toDisplayString as s, createCommentVNode as r } from "vue";
|
|
2
|
+
import { ScalarTooltip as b, ScalarIcon as u } from "@scalar/components";
|
|
3
3
|
const x = { class: "pl-1 pr-1.5 py-[9px]" }, h = { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 p-2 text-xxs leading-5 text-c-1" }, _ = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex items-center text-c-2"
|
|
@@ -25,19 +25,19 @@ const x = { class: "pl-1 pr-1.5 py-[9px]" }, h = { class: "grid gap-1.5 pointer-
|
|
|
25
25
|
item: {}
|
|
26
26
|
},
|
|
27
27
|
setup(a) {
|
|
28
|
-
const e = a,
|
|
28
|
+
const e = a, m = f(
|
|
29
29
|
() => e.item.type || e.item.format || e.item.minimum || e.item.maximum || e.item.default
|
|
30
30
|
);
|
|
31
|
-
return (B, I) => (t(), p(
|
|
31
|
+
return (B, I) => (t(), p(n(b), {
|
|
32
32
|
align: "start",
|
|
33
33
|
class: "w-full",
|
|
34
34
|
delay: 0,
|
|
35
35
|
side: "left",
|
|
36
|
-
triggerClass: "before:absolute before:content-[''] before:bg-gradient-to-r before:from-transparent before:to-b-1 before:min-h-
|
|
36
|
+
triggerClass: "before:absolute before:content-[''] before:bg-gradient-to-r before:from-transparent before:to-b-1 before:min-h-[calc(100%-4px)] before:pointer-events-none before:right-[23px] before:top-0.5 before:w-3 absolute h-full right-0"
|
|
37
37
|
}, {
|
|
38
|
-
trigger:
|
|
39
|
-
|
|
40
|
-
d(
|
|
38
|
+
trigger: i(() => [
|
|
39
|
+
c("div", x, [
|
|
40
|
+
d(n(u), {
|
|
41
41
|
class: "text-c-3 group-hover/info:text-c-1",
|
|
42
42
|
icon: "Info",
|
|
43
43
|
size: "sm",
|
|
@@ -45,16 +45,16 @@ const x = { class: "pl-1 pr-1.5 py-[9px]" }, h = { class: "grid gap-1.5 pointer-
|
|
|
45
45
|
})
|
|
46
46
|
])
|
|
47
47
|
]),
|
|
48
|
-
content:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
e.item.type ? (t(), o("span", g,
|
|
52
|
-
e.item.format ? (t(), o("span", k,
|
|
53
|
-
e.item.minimum ? (t(), o("span", y, "min: " +
|
|
54
|
-
e.item.maximum ? (t(), o("span", w, "max: " +
|
|
55
|
-
e.item.default ? (t(), o("span", v, "default: " +
|
|
56
|
-
])) :
|
|
57
|
-
e.item.description ? (t(), o("span", C,
|
|
48
|
+
content: i(() => [
|
|
49
|
+
c("div", h, [
|
|
50
|
+
m.value ? (t(), o("div", _, [
|
|
51
|
+
e.item.type ? (t(), o("span", g, s(e.item.type), 1)) : r("", !0),
|
|
52
|
+
e.item.format ? (t(), o("span", k, s(e.item.format), 1)) : r("", !0),
|
|
53
|
+
e.item.minimum ? (t(), o("span", y, "min: " + s(e.item.minimum), 1)) : r("", !0),
|
|
54
|
+
e.item.maximum ? (t(), o("span", w, "max: " + s(e.item.maximum), 1)) : r("", !0),
|
|
55
|
+
e.item.default ? (t(), o("span", v, "default: " + s(e.item.default), 1)) : r("", !0)
|
|
56
|
+
])) : r("", !0),
|
|
57
|
+
e.item.description ? (t(), o("span", C, s(e.item.description), 1)) : r("", !0)
|
|
58
58
|
])
|
|
59
59
|
]),
|
|
60
60
|
_: 1
|
|
@@ -3,12 +3,14 @@ type __VLS_Props = {
|
|
|
3
3
|
isReadonly: boolean;
|
|
4
4
|
};
|
|
5
5
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
clearDrafts: () => any;
|
|
6
7
|
newTab: (args_0: {
|
|
7
8
|
name: string;
|
|
8
9
|
uid: string;
|
|
9
10
|
}) => any;
|
|
10
11
|
"update:showSidebar": (v: boolean) => any;
|
|
11
12
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onClearDrafts?: (() => any) | undefined;
|
|
12
14
|
onNewTab?: ((args_0: {
|
|
13
15
|
name: string;
|
|
14
16
|
uid: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":"AAmaA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAC;;;;cAKqC,MAAM;aAAO,MAAM;;;;;;cAAnB,MAAM;aAAO,MAAM;;;;AAgoB1D,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSidebar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3c33a096"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|