@scalar/api-client 2.2.19 → 2.2.21
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 +19 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +3 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +2 -2
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +85 -49
- package/dist/layouts/App/create-api-client-app.d.ts +6 -6
- package/dist/layouts/Modal/create-api-client-modal.d.ts +12 -12
- package/dist/layouts/Web/create-api-client-web.d.ts +6 -6
- package/dist/libs/create-client.d.ts +6 -6
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/requests.d.ts +2 -2
- package/dist/store/store.d.ts +6 -6
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +157 -144
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +74 -61
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cAyS8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAmajD,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Request.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-df9ec365"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,177 +1,190 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { importCurlCommand as
|
|
6
|
-
import { useActiveEntities as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useOpenApiWatcher as
|
|
11
|
-
import { safeJSON as
|
|
12
|
-
import { useBreakpoints as
|
|
13
|
-
import { useToasts as
|
|
14
|
-
import { useRouter as
|
|
15
|
-
import
|
|
16
|
-
import { createRequestOperation as
|
|
17
|
-
import { ERRORS as
|
|
18
|
-
import { useWorkspace as
|
|
19
|
-
import { useLayout as
|
|
20
|
-
const
|
|
1
|
+
import { defineComponent as re, ref as R, computed as M, watch as se, onMounted as le, onBeforeUnmount as ue, openBlock as w, createElementBlock as ae, Fragment as ie, createElementVNode as U, normalizeClass as _, unref as l, createVNode as d, withCtx as A, createBlock as L, createCommentVNode as D } from "vue";
|
|
2
|
+
import ne from "../../components/ImportCurl/ImportCurlModal.vue.js";
|
|
3
|
+
import ce from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
4
|
+
import me from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
5
|
+
import { importCurlCommand as de } from "../../libs/importers/curl.js";
|
|
6
|
+
import { useActiveEntities as ve } from "../../store/active-entities.js";
|
|
7
|
+
import fe from "./RequestSection/RequestSection.vue.js";
|
|
8
|
+
import pe from "./RequestSubpageHeader.vue.js";
|
|
9
|
+
import ye from "./ResponseSection/ResponseSection.vue.js";
|
|
10
|
+
import { useOpenApiWatcher as Se } from "./hooks/useOpenApiWatcher.js";
|
|
11
|
+
import { safeJSON as Re } from "@scalar/object-utils/parse";
|
|
12
|
+
import { useBreakpoints as he } from "@scalar/use-hooks/useBreakpoints";
|
|
13
|
+
import { useToasts as qe } from "@scalar/use-toasts";
|
|
14
|
+
import { useRouter as xe } from "vue-router";
|
|
15
|
+
import be from "./RequestSidebar.vue.js";
|
|
16
|
+
import { createRequestOperation as we } from "../../libs/send-request/send-request.js";
|
|
17
|
+
import { ERRORS as Ue } from "../../libs/errors.js";
|
|
18
|
+
import { useWorkspace as ke } from "../../store/store.js";
|
|
19
|
+
import { useLayout as Ee } from "../../hooks/useLayout.js";
|
|
20
|
+
const Ve = { class: "flex h-full" }, Be = { class: "flex flex-1 flex-col h-full" }, Ke = /* @__PURE__ */ re({
|
|
21
21
|
__name: "Request",
|
|
22
22
|
emits: ["newTab"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
activeCollection:
|
|
23
|
+
setup(Ce) {
|
|
24
|
+
const H = ke(), { toast: k } = qe(), { layout: W } = Ee(), {
|
|
25
|
+
activeCollection: h,
|
|
26
26
|
activeExample: v,
|
|
27
|
-
activeEnvironment:
|
|
28
|
-
activeRequest:
|
|
29
|
-
activeWorkspace:
|
|
30
|
-
activeServer:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
activeEnvironment: E,
|
|
28
|
+
activeRequest: q,
|
|
29
|
+
activeWorkspace: x,
|
|
30
|
+
activeServer: $,
|
|
31
|
+
activeWorkspaceCollections: j
|
|
32
|
+
} = ve(), {
|
|
33
|
+
cookies: z,
|
|
34
|
+
isReadOnly: a,
|
|
35
|
+
modalState: i,
|
|
36
|
+
requestHistory: V,
|
|
37
|
+
securitySchemes: F,
|
|
38
|
+
requestMutators: Q,
|
|
39
|
+
serverMutators: J,
|
|
40
|
+
servers: G,
|
|
40
41
|
events: f
|
|
41
|
-
} =
|
|
42
|
-
() =>
|
|
43
|
-
var
|
|
44
|
-
return o.request.uid === ((
|
|
42
|
+
} = H, u = R(!a), B = R(), e = R(), b = R(""), K = xe(), P = M(
|
|
43
|
+
() => V.findLast((o) => {
|
|
44
|
+
var t;
|
|
45
|
+
return o.request.uid === ((t = v.value) == null ? void 0 : t.uid);
|
|
45
46
|
})
|
|
46
|
-
), { mediaQueries:
|
|
47
|
-
|
|
48
|
-
immediate:
|
|
47
|
+
), { mediaQueries: X } = he();
|
|
48
|
+
se(X.xl, (o) => u.value = o, {
|
|
49
|
+
immediate: W !== "modal"
|
|
49
50
|
});
|
|
50
|
-
const C =
|
|
51
|
+
const C = M(
|
|
51
52
|
() => {
|
|
52
|
-
var o,
|
|
53
|
-
return (
|
|
53
|
+
var o, t;
|
|
54
|
+
return (a ? (o = h.value) == null ? void 0 : o.selectedSecuritySchemeUids : (t = q.value) == null ? void 0 : t.selectedSecuritySchemeUids) ?? [];
|
|
54
55
|
}
|
|
55
|
-
),
|
|
56
|
-
if (!
|
|
56
|
+
), N = async () => {
|
|
57
|
+
if (!q.value || !v.value || !h.value)
|
|
57
58
|
return;
|
|
58
|
-
const o = typeof
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
request:
|
|
59
|
+
const o = typeof E.value == "object" ? E.value.value : "{}", t = Re.parse(o);
|
|
60
|
+
t.error && console.error("INVALID ENVIRONMENT!");
|
|
61
|
+
const s = t.error || typeof t.data != "object" ? {} : t.data ?? {}, r = x.value.cookies.map((y) => z[y]), [n, c] = we({
|
|
62
|
+
request: q.value,
|
|
62
63
|
example: v.value,
|
|
63
64
|
selectedSecuritySchemeUids: C.value,
|
|
64
|
-
proxyUrl:
|
|
65
|
-
environment:
|
|
66
|
-
globalCookies:
|
|
65
|
+
proxyUrl: x.value.proxyUrl ?? "",
|
|
66
|
+
environment: s,
|
|
67
|
+
globalCookies: r,
|
|
67
68
|
status: f.requestStatus,
|
|
68
|
-
securitySchemes:
|
|
69
|
-
server:
|
|
69
|
+
securitySchemes: F,
|
|
70
|
+
server: $.value
|
|
70
71
|
});
|
|
71
|
-
if (
|
|
72
|
-
|
|
72
|
+
if (n) {
|
|
73
|
+
k(n.message, "error");
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
75
|
-
|
|
76
|
-
const [m,
|
|
77
|
-
m ?
|
|
78
|
-
},
|
|
76
|
+
B.value = c.controller;
|
|
77
|
+
const [m, p] = await c.sendRequest();
|
|
78
|
+
m ? k(m.message, "error") : V.push(p);
|
|
79
|
+
}, Y = async () => {
|
|
79
80
|
var o;
|
|
80
|
-
return (o =
|
|
81
|
+
return (o = B.value) == null ? void 0 : o.abort(Ue.REQUEST_ABORTED);
|
|
81
82
|
};
|
|
82
|
-
|
|
83
|
-
f.executeRequest.on(
|
|
84
|
-
}),
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
le(() => {
|
|
84
|
+
f.executeRequest.on(N), f.cancelRequest.on(Y);
|
|
85
|
+
}), Se(), ue(() => f.executeRequest.off(N));
|
|
86
|
+
function Z({
|
|
87
|
+
requestName: o,
|
|
88
|
+
collectionUid: t
|
|
89
|
+
}) {
|
|
90
|
+
var c, m, p, y, O, g;
|
|
91
|
+
if (!e.value) return;
|
|
92
|
+
const s = j.value.find(
|
|
93
|
+
(S) => S.uid === t
|
|
94
|
+
);
|
|
95
|
+
if (!s) return;
|
|
96
|
+
const r = ((c = s == null ? void 0 : s.info) == null ? void 0 : c.title) === "Drafts";
|
|
97
|
+
if (!r && e.value.servers) {
|
|
98
|
+
const S = Object.values(G).find(
|
|
99
|
+
(oe) => {
|
|
100
|
+
var I, T;
|
|
101
|
+
return oe.url === ((T = (I = e == null ? void 0 : e.value) == null ? void 0 : I.servers) == null ? void 0 : T[0]);
|
|
93
102
|
}
|
|
94
103
|
);
|
|
95
|
-
|
|
96
|
-
{ url:
|
|
97
|
-
|
|
104
|
+
S ? b.value = S.uid : b.value = J.add(
|
|
105
|
+
{ url: e.value.servers[0] },
|
|
106
|
+
s.uid
|
|
98
107
|
).uid;
|
|
99
108
|
}
|
|
100
|
-
const
|
|
109
|
+
const n = Q.add(
|
|
101
110
|
{
|
|
102
111
|
summary: o,
|
|
103
|
-
path:
|
|
104
|
-
method: (
|
|
105
|
-
parameters: (
|
|
106
|
-
selectedServerUid:
|
|
107
|
-
requestBody: (
|
|
112
|
+
path: r ? (m = e == null ? void 0 : e.value) == null ? void 0 : m.url : (p = e == null ? void 0 : e.value) == null ? void 0 : p.path,
|
|
113
|
+
method: (y = e == null ? void 0 : e.value) == null ? void 0 : y.method,
|
|
114
|
+
parameters: (O = e == null ? void 0 : e.value) == null ? void 0 : O.parameters,
|
|
115
|
+
selectedServerUid: r ? void 0 : b.value,
|
|
116
|
+
requestBody: (g = e == null ? void 0 : e.value) == null ? void 0 : g.requestBody
|
|
108
117
|
},
|
|
109
|
-
|
|
118
|
+
s.uid
|
|
110
119
|
);
|
|
111
|
-
|
|
112
|
-
`/workspace/${
|
|
113
|
-
),
|
|
120
|
+
n && K.push(
|
|
121
|
+
`/workspace/${x.value.uid}/request/${n.uid}`
|
|
122
|
+
), i.hide();
|
|
114
123
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
124
|
+
function ee(o) {
|
|
125
|
+
e.value = de(o), i.show();
|
|
117
126
|
}
|
|
118
|
-
function
|
|
119
|
-
console.log("hello", o),
|
|
127
|
+
function te(o) {
|
|
128
|
+
console.log("hello", o), u.value = o;
|
|
120
129
|
}
|
|
121
|
-
return (o,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
130
|
+
return (o, t) => {
|
|
131
|
+
var s;
|
|
132
|
+
return w(), ae(ie, null, [
|
|
133
|
+
U("div", {
|
|
134
|
+
class: _(["flex flex-1 flex-col pt-0 h-full bg-b-1 relative z-0 overflow-hidden", {
|
|
135
|
+
"!mr-0 !mb-0 !border-0": l(a)
|
|
136
|
+
}])
|
|
137
|
+
}, [
|
|
138
|
+
U("div", Ve, [
|
|
139
|
+
d(be, {
|
|
140
|
+
isReadonly: l(a),
|
|
141
|
+
showSidebar: u.value,
|
|
142
|
+
onNewTab: t[0] || (t[0] = (r) => o.$emit("newTab", r)),
|
|
143
|
+
"onUpdate:showSidebar": te
|
|
144
|
+
}, null, 8, ["isReadonly", "showSidebar"]),
|
|
145
|
+
U("div", Be, [
|
|
146
|
+
d(pe, {
|
|
147
|
+
modelValue: u.value,
|
|
148
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => u.value = r),
|
|
149
|
+
isReadonly: l(a),
|
|
150
|
+
onHideModal: t[2] || (t[2] = () => l(i).hide()),
|
|
151
|
+
onImportCurl: ee
|
|
152
|
+
}, null, 8, ["modelValue", "isReadonly"]),
|
|
153
|
+
d(ce, null, {
|
|
154
|
+
default: A(() => [
|
|
155
|
+
l(v) ? (w(), L(me, {
|
|
156
|
+
key: 0,
|
|
157
|
+
class: _(["flex-1", [u.value ? "sidebar-active-hide-layout" : ""]])
|
|
158
|
+
}, {
|
|
159
|
+
default: A(() => {
|
|
160
|
+
var r;
|
|
161
|
+
return [
|
|
162
|
+
d(fe, { selectedSecuritySchemeUids: C.value }, null, 8, ["selectedSecuritySchemeUids"]),
|
|
163
|
+
d(ye, {
|
|
164
|
+
response: (r = P.value) == null ? void 0 : r.response
|
|
165
|
+
}, null, 8, ["response"])
|
|
166
|
+
];
|
|
167
|
+
}),
|
|
168
|
+
_: 1
|
|
169
|
+
}, 8, ["class"])) : D("", !0)
|
|
170
|
+
]),
|
|
171
|
+
_: 1
|
|
172
|
+
})
|
|
173
|
+
])
|
|
162
174
|
])
|
|
163
|
-
])
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
175
|
+
], 2),
|
|
176
|
+
e.value ? (w(), L(ne, {
|
|
177
|
+
key: 0,
|
|
178
|
+
collectionUid: ((s = l(h)) == null ? void 0 : s.uid) ?? "",
|
|
179
|
+
parsedCurl: e.value,
|
|
180
|
+
state: l(i),
|
|
181
|
+
onClose: t[3] || (t[3] = (r) => l(i).hide()),
|
|
182
|
+
onImportCurl: Z
|
|
183
|
+
}, null, 8, ["collectionUid", "parsedCurl", "state"])) : D("", !0)
|
|
184
|
+
], 64);
|
|
185
|
+
};
|
|
173
186
|
}
|
|
174
187
|
});
|
|
175
188
|
export {
|
|
176
|
-
|
|
189
|
+
Ke as default
|
|
177
190
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AA4MA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AAKxC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;CAC7C,CAAC;;AAqUF,wBAOG"}
|
|
@@ -1,124 +1,137 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useActiveEntities as
|
|
4
|
-
import
|
|
5
|
-
import { ScalarButton as W } from "@scalar/components";
|
|
6
|
-
import { requestExampleParametersSchema as
|
|
7
|
-
import { useWorkspace as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as K, computed as y, onMounted as $, ref as E, watch as S, openBlock as T, createBlock as A, withCtx as n, createTextVNode as h, toDisplayString as x, createElementVNode as o, createVNode as f, unref as R, withModifiers as z, nextTick as k } from "vue";
|
|
2
|
+
import B from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
3
|
+
import { useActiveEntities as M } from "../../../store/active-entities.js";
|
|
4
|
+
import N from "./RequestTable.vue.js";
|
|
5
|
+
import { ScalarTooltip as V, ScalarButton as W } from "@scalar/components";
|
|
6
|
+
import { requestExampleParametersSchema as b } from "@scalar/oas-utils/entities/spec";
|
|
7
|
+
import { useWorkspace as D } from "../../../store/store.js";
|
|
8
|
+
const O = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100 request-meta-buttons" }, U = { class: "sr-only" }, Z = /* @__PURE__ */ K({
|
|
9
9
|
__name: "RequestParams",
|
|
10
10
|
props: {
|
|
11
11
|
title: {},
|
|
12
12
|
paramKey: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const r =
|
|
14
|
+
setup(_) {
|
|
15
|
+
const r = _, { activeRequest: u, activeExample: a } = M(), { requestExampleMutators: i } = D(), l = y(
|
|
16
16
|
() => {
|
|
17
17
|
var e;
|
|
18
18
|
return ((e = a.value) == null ? void 0 : e.parameters[r.paramKey]) ?? [];
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
$(() => {
|
|
22
|
+
v();
|
|
23
23
|
});
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
26
|
-
const e =
|
|
27
|
-
|
|
24
|
+
const p = () => {
|
|
25
|
+
if (!u.value || !a.value) return;
|
|
26
|
+
const e = b.parse({ enabled: !1 }), t = [...l.value, e];
|
|
27
|
+
i.edit(
|
|
28
28
|
a.value.uid,
|
|
29
29
|
`parameters.${r.paramKey}`,
|
|
30
30
|
t
|
|
31
31
|
);
|
|
32
|
-
},
|
|
33
|
-
if (!
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
const s = [...
|
|
37
|
-
s[e] = { ...s[e], [t]:
|
|
32
|
+
}, m = E(null), q = (e, t, d) => {
|
|
33
|
+
if (!u.value || !a.value) return;
|
|
34
|
+
const c = l.value;
|
|
35
|
+
if (c.length > e) {
|
|
36
|
+
const s = [...c];
|
|
37
|
+
s[e] = { ...s[e], [t]: d }, (s[e].key !== "" || s[e].value !== "") && (s[e].enabled = !0), s[e].key === "" && s[e].value === "" && s.splice(e, 1), i.edit(
|
|
38
38
|
a.value.uid,
|
|
39
39
|
`parameters.${r.paramKey}`,
|
|
40
40
|
s
|
|
41
41
|
);
|
|
42
42
|
} else {
|
|
43
|
-
const s = [
|
|
44
|
-
|
|
43
|
+
const s = [b.parse({ [t]: d })];
|
|
44
|
+
i.edit(
|
|
45
45
|
a.value.uid,
|
|
46
46
|
`parameters.${r.paramKey}`,
|
|
47
47
|
s
|
|
48
48
|
), k(() => {
|
|
49
|
-
var
|
|
50
|
-
if (!
|
|
51
|
-
(
|
|
49
|
+
var g;
|
|
50
|
+
if (!m.value) return;
|
|
51
|
+
(g = m.value.querySelectorAll("input")[t === "key" ? 0 : 1]) == null || g.focus();
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
e ===
|
|
55
|
-
},
|
|
54
|
+
e === c.length - 1 && p();
|
|
55
|
+
}, w = (e, t) => u.value && a.value && i.edit(
|
|
56
56
|
a.value.uid,
|
|
57
57
|
`parameters.${r.paramKey}.${e}.enabled`,
|
|
58
58
|
t
|
|
59
59
|
), C = () => {
|
|
60
|
-
if (!
|
|
61
|
-
const e = l.value.filter(
|
|
62
|
-
|
|
63
|
-
);
|
|
64
|
-
n.edit(
|
|
60
|
+
if (!u.value || !a.value) return;
|
|
61
|
+
const e = l.value.filter((t) => t.required);
|
|
62
|
+
i.edit(
|
|
65
63
|
a.value.uid,
|
|
66
64
|
`parameters.${r.paramKey}`,
|
|
67
65
|
e
|
|
68
66
|
), k(() => {
|
|
69
|
-
|
|
67
|
+
p();
|
|
70
68
|
});
|
|
71
69
|
};
|
|
72
|
-
function
|
|
70
|
+
function v() {
|
|
73
71
|
if (l.value.length === 0)
|
|
74
|
-
|
|
72
|
+
p();
|
|
75
73
|
else if (l.value.length >= 1) {
|
|
76
74
|
const e = l.value[l.value.length - 1];
|
|
77
|
-
e.key !== "" && e.value !== "" &&
|
|
75
|
+
e.key !== "" && e.value !== "" && p();
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
|
-
const
|
|
78
|
+
const P = y(
|
|
81
79
|
() => l.value.filter((e) => e.key || e.value).length
|
|
82
80
|
);
|
|
83
|
-
return
|
|
81
|
+
return S(
|
|
84
82
|
() => a.value,
|
|
85
83
|
(e, t) => {
|
|
86
|
-
e !== t &&
|
|
84
|
+
e !== t && v();
|
|
87
85
|
},
|
|
88
86
|
{ immediate: !0 }
|
|
89
|
-
), (e, t) => (
|
|
87
|
+
), (e, t) => (T(), A(B, {
|
|
90
88
|
class: "group/params",
|
|
91
|
-
itemCount:
|
|
89
|
+
itemCount: P.value
|
|
92
90
|
}, {
|
|
93
|
-
title:
|
|
94
|
-
h(
|
|
91
|
+
title: n(() => [
|
|
92
|
+
h(x(e.title), 1)
|
|
95
93
|
]),
|
|
96
|
-
actions:
|
|
97
|
-
|
|
98
|
-
R(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
variant: "ghost",
|
|
102
|
-
onClick: B(C, ["stop"])
|
|
94
|
+
actions: n(() => [
|
|
95
|
+
o("div", O, [
|
|
96
|
+
f(R(V), {
|
|
97
|
+
side: "right",
|
|
98
|
+
sideOffset: 12
|
|
103
99
|
}, {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
trigger: n(() => [
|
|
101
|
+
f(R(W), {
|
|
102
|
+
class: "px-1 transition-none",
|
|
103
|
+
size: "sm",
|
|
104
|
+
variant: "ghost",
|
|
105
|
+
onClick: z(C, ["stop"])
|
|
106
|
+
}, {
|
|
107
|
+
default: n(() => [
|
|
108
|
+
t[0] || (t[0] = h(" Clear ")),
|
|
109
|
+
o("span", U, "All " + x(e.title), 1)
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
})
|
|
107
113
|
]),
|
|
114
|
+
content: n(() => t[1] || (t[1] = [
|
|
115
|
+
o("div", { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-context p-2 text-xxs leading-5 z-10 text-c-1" }, [
|
|
116
|
+
o("div", { class: "flex items-center text-c-2" }, [
|
|
117
|
+
o("span", null, "Clear optional parameters")
|
|
118
|
+
])
|
|
119
|
+
], -1)
|
|
120
|
+
])),
|
|
108
121
|
_: 1
|
|
109
122
|
})
|
|
110
123
|
])
|
|
111
124
|
]),
|
|
112
|
-
default:
|
|
113
|
-
|
|
125
|
+
default: n(() => [
|
|
126
|
+
o("div", {
|
|
114
127
|
ref_key: "tableWrapperRef",
|
|
115
|
-
ref:
|
|
128
|
+
ref: m
|
|
116
129
|
}, [
|
|
117
|
-
|
|
130
|
+
f(N, {
|
|
118
131
|
class: "flex-1",
|
|
119
132
|
columns: ["32px", "", ""],
|
|
120
133
|
items: l.value,
|
|
121
|
-
onToggleRow:
|
|
134
|
+
onToggleRow: w,
|
|
122
135
|
onUpdateRow: q
|
|
123
136
|
}, null, 8, ["items"])
|
|
124
137
|
], 512)
|
|
@@ -128,5 +141,5 @@ const D = { class: "text-c-2 flex whitespace-nowrap opacity-0 group-hover/params
|
|
|
128
141
|
}
|
|
129
142
|
});
|
|
130
143
|
export {
|
|
131
|
-
|
|
144
|
+
Z as default
|
|
132
145
|
};
|
|
@@ -17,7 +17,7 @@ const K = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, A = {
|
|
|
17
17
|
a.commandPalette.emit({ commandName: "Create Request" });
|
|
18
18
|
}, y = (i) => {
|
|
19
19
|
i != null && i.createNew && v.name === "request" && f();
|
|
20
|
-
}, h = "2.2.
|
|
20
|
+
}, h = "2.2.21";
|
|
21
21
|
return R(() => a.hotKeys.on(y)), C(() => a.hotKeys.off(y)), (i, e) => (r(), l("div", K, [
|
|
22
22
|
o("div", {
|
|
23
23
|
class: k(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.2.
|
|
21
|
+
"version": "2.2.21",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -169,18 +169,18 @@
|
|
|
169
169
|
"whatwg-mimetype": "^4.0.0",
|
|
170
170
|
"yaml": "^2.4.5",
|
|
171
171
|
"zod": "^3.23.8",
|
|
172
|
-
"@scalar/components": "0.13.
|
|
173
|
-
"@scalar/draggable": "0.1.
|
|
174
|
-
"@scalar/icons": "0.1.2",
|
|
172
|
+
"@scalar/components": "0.13.10",
|
|
173
|
+
"@scalar/draggable": "0.1.8",
|
|
175
174
|
"@scalar/import": "0.2.11",
|
|
175
|
+
"@scalar/icons": "0.1.2",
|
|
176
|
+
"@scalar/object-utils": "1.1.12",
|
|
176
177
|
"@scalar/openapi-parser": "0.10.2",
|
|
177
178
|
"@scalar/oas-utils": "0.2.91",
|
|
178
|
-
"@scalar/object-utils": "1.1.12",
|
|
179
179
|
"@scalar/openapi-types": "0.1.5",
|
|
180
180
|
"@scalar/postman-to-openapi": "0.1.14",
|
|
181
181
|
"@scalar/themes": "0.9.58",
|
|
182
182
|
"@scalar/types": "0.0.25",
|
|
183
|
-
"@scalar/use-codemirror": "0.11.
|
|
183
|
+
"@scalar/use-codemirror": "0.11.54",
|
|
184
184
|
"@scalar/use-hooks": "0.1.11",
|
|
185
185
|
"@scalar/use-tooltip": "1.0.4",
|
|
186
186
|
"@scalar/use-toasts": "0.7.7"
|