@scalar/api-client 2.2.56 → 2.2.57
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 +33 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +53 -54
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +3 -19
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +154 -129
- package/dist/components/DataTable/DataTableInput.vue.d.ts +4 -4
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +17 -16
- package/dist/layouts/App/create-api-client-app.d.ts +62 -52
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +120 -100
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +1 -2
- package/dist/layouts/Web/create-api-client-web.d.ts +62 -52
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +64 -58
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +82 -80
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.js +8 -7
- package/dist/libs/find-request.d.ts +1 -1
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts.map +1 -1
- package/dist/libs/hot-keys.js +9 -8
- package/dist/libs/send-request/create-request-operation.test.d.ts +3 -2
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +4 -3
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts +3 -3
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +4 -1
- package/dist/store/request-example.d.ts +22 -12
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +13 -13
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +6 -6
- package/dist/store/store.d.ts +92 -67
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +12 -12
- package/dist/store/workspace.d.ts +12 -12
- package/dist/store/workspace.d.ts.map +1 -1
- 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/RequestRoot.test.d.ts +2 -0
- package/dist/views/Request/RequestRoot.test.d.ts.map +1 -0
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +2 -2
- package/dist/views/Request/RequestRoot.vue2.js +72 -60
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +113 -107
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +37 -37
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +55 -51
- 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 +171 -166
- 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 +187 -180
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +2 -2
- package/dist/views/Request/RequestSubpageHeader.vue2.js +41 -49
- 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 +62 -45
- package/package.json +12 -12
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +0 -15
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +0 -176
- package/dist/components/CommandPalette/CommandPaletteRequest.vue2.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":"AA+GA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAI1D,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;;;;;;;AAyMJ,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./RequestSubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const d = /* @__PURE__ */ o(e, [["__scopeId", "data-v-ad3dcf8d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIcon as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, z = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, R = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, L = /* @__PURE__ */ k({
|
|
1
|
+
import { defineComponent as g, openBlock as r, createElementBlock as l, createElementVNode as i, unref as o, normalizeClass as k, createCommentVNode as s, createVNode as m, createBlock as v } from "vue";
|
|
2
|
+
import { ScalarIcon as p } from "@scalar/components";
|
|
3
|
+
import { useRouter as C } from "vue-router";
|
|
4
|
+
import w from "../../components/AddressBar/AddressBar.vue.js";
|
|
5
|
+
import { useLayout as y } from "../../hooks/useLayout.js";
|
|
6
|
+
import { useSidebar as h } from "../../hooks/useSidebar.js";
|
|
7
|
+
import V from "../../components/OpenApiClientButton.vue.js";
|
|
8
|
+
import { useWorkspace as z } from "../../store/store.js";
|
|
9
|
+
const B = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 flex w-full flex-wrap items-center justify-center p-2 pt-2 lg:p-1 lg:pt-1" }, S = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, $ = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, O = /* @__PURE__ */ g({
|
|
11
10
|
__name: "RequestSubpageHeader",
|
|
12
11
|
props: {
|
|
13
12
|
collection: {},
|
|
@@ -18,70 +17,63 @@ const $ = { class: "lg:min-h-client-header t-app__top-container border-b-1/2 fle
|
|
|
18
17
|
workspace: {}
|
|
19
18
|
},
|
|
20
19
|
emits: ["hideModal", "importCurl"],
|
|
21
|
-
setup(
|
|
22
|
-
const { hideClientButton:
|
|
23
|
-
return (
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
setup(x) {
|
|
21
|
+
const { hideClientButton: u, showSidebar: d, integration: c } = z(), { isSidebarOpen: f } = h(), { layout: n } = y(), { currentRoute: b } = C();
|
|
22
|
+
return (e, t) => (r(), l("div", B, [
|
|
23
|
+
i("div", S, [
|
|
24
|
+
o(d) ? (r(), l("div", {
|
|
26
25
|
key: 0,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class: C(["ml-1", [
|
|
30
|
-
{ hidden: e(l) },
|
|
31
|
-
{ "xl:!flex": !e(l) },
|
|
32
|
-
{ "!flex": e(r) === "modal" },
|
|
33
|
-
{ "!hidden": e(r) === "modal" && e(l) }
|
|
34
|
-
]])
|
|
35
|
-
}, null, 8, ["modelValue", "class"])) : a("", !0)
|
|
26
|
+
class: k(["size-8", { hidden: o(n) === "modal" && !o(f) }])
|
|
27
|
+
}, null, 2)) : s("", !0)
|
|
36
28
|
]),
|
|
37
|
-
|
|
38
|
-
collection:
|
|
39
|
-
envVariables:
|
|
40
|
-
environment:
|
|
41
|
-
operation:
|
|
42
|
-
server:
|
|
43
|
-
workspace:
|
|
44
|
-
onImportCurl: t[
|
|
29
|
+
m(w, {
|
|
30
|
+
collection: e.collection,
|
|
31
|
+
envVariables: e.envVariables,
|
|
32
|
+
environment: e.environment,
|
|
33
|
+
operation: e.operation,
|
|
34
|
+
server: e.server,
|
|
35
|
+
workspace: e.workspace,
|
|
36
|
+
onImportCurl: t[0] || (t[0] = (a) => e.$emit("importCurl", a))
|
|
45
37
|
}, null, 8, ["collection", "envVariables", "environment", "operation", "server", "workspace"]),
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
i("div", $, [
|
|
39
|
+
o(n) === "modal" && e.collection.documentUrl && !o(u) ? (r(), v(o(V), {
|
|
48
40
|
key: 0,
|
|
49
41
|
buttonSource: "modal",
|
|
50
42
|
class: "!w-fit lg:-mr-1",
|
|
51
|
-
integration:
|
|
52
|
-
source:
|
|
53
|
-
url:
|
|
54
|
-
}, null, 8, ["integration", "source", "url"])) :
|
|
55
|
-
|
|
43
|
+
integration: o(c) ?? e.collection.integration ?? null,
|
|
44
|
+
source: o(b).query.source === "gitbook" ? "gitbook" : "api-reference",
|
|
45
|
+
url: e.collection.documentUrl
|
|
46
|
+
}, null, 8, ["integration", "source", "url"])) : s("", !0),
|
|
47
|
+
o(n) === "modal" ? (r(), l("button", {
|
|
56
48
|
key: 1,
|
|
57
49
|
class: "app-exit-button gitbook-hidden zoomed:static zoomed:p-1 fixed right-2 top-2 rounded-full p-2",
|
|
58
50
|
type: "button",
|
|
59
|
-
onClick: t[
|
|
51
|
+
onClick: t[1] || (t[1] = (a) => e.$emit("hideModal"))
|
|
60
52
|
}, [
|
|
61
|
-
|
|
53
|
+
m(o(p), {
|
|
62
54
|
icon: "Close",
|
|
63
55
|
size: "lg",
|
|
64
56
|
thickness: "2"
|
|
65
57
|
}),
|
|
66
|
-
t[
|
|
67
|
-
])) :
|
|
68
|
-
|
|
58
|
+
t[3] || (t[3] = i("span", { class: "sr-only" }, "Close Client", -1))
|
|
59
|
+
])) : s("", !0),
|
|
60
|
+
o(n) === "modal" ? (r(), l("button", {
|
|
69
61
|
key: 2,
|
|
70
62
|
class: "text-c-1 hover:bg-b-2 active:text-c-1 gitbook-show -mr-1.5 rounded p-2",
|
|
71
63
|
type: "button",
|
|
72
|
-
onClick: t[
|
|
64
|
+
onClick: t[2] || (t[2] = (a) => e.$emit("hideModal"))
|
|
73
65
|
}, [
|
|
74
|
-
|
|
66
|
+
m(o(p), {
|
|
75
67
|
icon: "Close",
|
|
76
68
|
size: "md",
|
|
77
69
|
thickness: "1.75"
|
|
78
70
|
}),
|
|
79
|
-
t[
|
|
80
|
-
])) :
|
|
71
|
+
t[4] || (t[4] = i("span", { class: "sr-only" }, "Close Client", -1))
|
|
72
|
+
])) : s("", !0)
|
|
81
73
|
])
|
|
82
74
|
]));
|
|
83
75
|
}
|
|
84
76
|
});
|
|
85
77
|
export {
|
|
86
|
-
|
|
78
|
+
O as default
|
|
87
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseEmpty.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseEmpty.vue"],"names":[],"mappings":"AAoLA,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAC;;AAwNF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseEmpty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fb583e5d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,89 +1,106 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { defineComponent as S, onMounted as B, onBeforeUnmount as E, openBlock as u, createElementBlock as i, createElementVNode as o, normalizeClass as q, unref as t, createTextVNode as m, toDisplayString as V, createCommentVNode as c, createVNode as l, nextTick as A } from "vue";
|
|
2
|
+
import { useRoute as K, useRouter as W } from "vue-router";
|
|
3
|
+
import _ from "../../../assets/computer.ascii.js";
|
|
4
|
+
import $ from "../../../components/EmptyState.vue.js";
|
|
5
|
+
import j from "../../../components/ScalarAsciiArt.vue.js";
|
|
6
|
+
import d from "../../../components/ScalarHotkey.vue.js";
|
|
7
|
+
import { useActiveEntities as z } from "../../../store/active-entities.js";
|
|
8
|
+
import { useWorkspace as D } from "../../../store/store.js";
|
|
9
|
+
import { useLayout as M } from "../../../hooks/useLayout.js";
|
|
10
|
+
const P = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, T = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "scalar-version-number"
|
|
12
|
-
},
|
|
13
|
+
}, G = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, Z = /* @__PURE__ */ S({
|
|
13
14
|
__name: "ResponseEmpty",
|
|
14
15
|
props: {
|
|
15
16
|
numWorkspaceRequests: {}
|
|
16
17
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const { events:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
setup(H) {
|
|
19
|
+
const { events: r, requestMutators: R } = D(), w = K(), h = W(), { layout: a } = M(), { activeWorkspace: C, activeCollection: f, activeRequest: p } = z(), k = () => {
|
|
20
|
+
var n, v, g, x, b;
|
|
21
|
+
if (!((n = f.value) != null && n.uid)) return;
|
|
22
|
+
const s = (g = (v = p.value) == null ? void 0 : v.tags) != null && g.length ? { tags: p.value.tags[0] ? [p.value.tags[0]] : [] } : {}, e = R.add(
|
|
23
|
+
s,
|
|
24
|
+
(x = f.value) == null ? void 0 : x.uid
|
|
25
|
+
);
|
|
26
|
+
e && (h.push({
|
|
27
|
+
name: "request",
|
|
28
|
+
params: {
|
|
29
|
+
workspace: (b = C.value) == null ? void 0 : b.uid,
|
|
30
|
+
request: e.uid
|
|
31
|
+
}
|
|
32
|
+
}), A(() => {
|
|
33
|
+
r.hotKeys.emit({
|
|
34
|
+
focusAddressBar: new KeyboardEvent("keydown", { key: "l" })
|
|
35
|
+
});
|
|
36
|
+
}));
|
|
37
|
+
}, y = (s) => {
|
|
38
|
+
s != null && s.createNew && w.name === "request" && k();
|
|
39
|
+
}, N = "2.2.57";
|
|
40
|
+
return B(() => r.hotKeys.on(y)), E(() => r.hotKeys.off(y)), (s, e) => (u(), i("div", P, [
|
|
41
|
+
o("div", {
|
|
42
|
+
class: q(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
43
|
+
"hidden opacity-0": s.numWorkspaceRequests <= 1 && t(a) !== "modal"
|
|
27
44
|
}])
|
|
28
45
|
}, [
|
|
29
|
-
t(
|
|
30
|
-
|
|
31
|
-
e[
|
|
32
|
-
|
|
46
|
+
t(a) !== "modal" ? (u(), i("div", T, [
|
|
47
|
+
m(" Scalar App V" + V(t(N)) + " Beta ", 1),
|
|
48
|
+
e[3] || (e[3] = o("div", { class: "mt-2" }, [
|
|
49
|
+
o("a", {
|
|
33
50
|
href: "https://github.com/scalar/scalar/issues/2669",
|
|
34
51
|
target: "_blank"
|
|
35
52
|
}, " Roadmap ")
|
|
36
53
|
], -1))
|
|
37
54
|
])) : c("", !0),
|
|
38
|
-
e[
|
|
55
|
+
e[4] || (e[4] = o("a", {
|
|
39
56
|
class: "gitbook-show scalar-version-number",
|
|
40
57
|
href: "https://www.scalar.com",
|
|
41
58
|
target: "_blank"
|
|
42
59
|
}, " Powered By Scalar.com ", -1)),
|
|
43
|
-
l(
|
|
44
|
-
art: t(
|
|
60
|
+
l(j, {
|
|
61
|
+
art: t(_),
|
|
45
62
|
class: "text-c-3"
|
|
46
63
|
}, null, 8, ["art"])
|
|
47
64
|
], 2),
|
|
48
|
-
t(
|
|
65
|
+
t(a) !== "modal" ? (u(), i("div", {
|
|
49
66
|
key: 0,
|
|
50
|
-
class:
|
|
51
|
-
"!flex opacity-100":
|
|
67
|
+
class: q(["hidden h-[calc(100%_-_50px)] items-center justify-center pb-5", {
|
|
68
|
+
"!flex opacity-100": s.numWorkspaceRequests == 1
|
|
52
69
|
}])
|
|
53
70
|
}, [
|
|
54
|
-
l(
|
|
71
|
+
l($)
|
|
55
72
|
], 2)) : c("", !0),
|
|
56
|
-
|
|
57
|
-
t(
|
|
73
|
+
o("div", G, [
|
|
74
|
+
t(a) !== "modal" ? (u(), i("button", {
|
|
58
75
|
key: 0,
|
|
59
76
|
class: "flex items-center gap-1.5",
|
|
60
77
|
type: "button",
|
|
61
|
-
onClick: e[0] || (e[0] = (
|
|
78
|
+
onClick: e[0] || (e[0] = (n) => t(r).commandPalette.emit())
|
|
62
79
|
}, [
|
|
63
|
-
e[
|
|
64
|
-
l(
|
|
80
|
+
e[5] || (e[5] = m(" Get Started ")),
|
|
81
|
+
l(d, { hotkey: "k" })
|
|
65
82
|
])) : c("", !0),
|
|
66
|
-
t(
|
|
83
|
+
t(a) === "desktop" ? (u(), i("button", {
|
|
67
84
|
key: 1,
|
|
68
85
|
class: "flex items-center gap-1.5",
|
|
69
86
|
type: "button",
|
|
70
|
-
onClick:
|
|
87
|
+
onClick: e[1] || (e[1] = (n) => k())
|
|
71
88
|
}, [
|
|
72
|
-
e[
|
|
73
|
-
l(
|
|
89
|
+
e[6] || (e[6] = m(" New Request ")),
|
|
90
|
+
l(d, { hotkey: "N" })
|
|
74
91
|
])) : c("", !0),
|
|
75
|
-
|
|
92
|
+
o("button", {
|
|
76
93
|
class: "flex items-center gap-1.5",
|
|
77
94
|
type: "button",
|
|
78
|
-
onClick: e[
|
|
95
|
+
onClick: e[2] || (e[2] = (n) => t(r).executeRequest.emit())
|
|
79
96
|
}, [
|
|
80
|
-
e[
|
|
81
|
-
l(
|
|
97
|
+
e[7] || (e[7] = m(" Send Request ")),
|
|
98
|
+
l(d, { hotkey: "↵" })
|
|
82
99
|
])
|
|
83
100
|
])
|
|
84
101
|
]));
|
|
85
102
|
}
|
|
86
103
|
});
|
|
87
104
|
export {
|
|
88
|
-
|
|
105
|
+
Z as default
|
|
89
106
|
};
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.2.
|
|
21
|
+
"version": "2.2.57",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -188,22 +188,22 @@
|
|
|
188
188
|
"whatwg-mimetype": "^4.0.0",
|
|
189
189
|
"yaml": "^2.4.5",
|
|
190
190
|
"zod": "^3.23.8",
|
|
191
|
-
"@scalar/components": "0.13.
|
|
191
|
+
"@scalar/components": "0.13.29",
|
|
192
192
|
"@scalar/icons": "0.1.3",
|
|
193
|
-
"@scalar/
|
|
193
|
+
"@scalar/draggable": "0.1.11",
|
|
194
|
+
"@scalar/import": "0.2.31",
|
|
194
195
|
"@scalar/object-utils": "1.1.13",
|
|
195
196
|
"@scalar/openapi-parser": "0.10.9",
|
|
196
197
|
"@scalar/openapi-types": "0.1.9",
|
|
197
|
-
"@scalar/
|
|
198
|
+
"@scalar/postman-to-openapi": "0.1.34",
|
|
198
199
|
"@scalar/snippetz": "0.2.15",
|
|
199
|
-
"@scalar/
|
|
200
|
-
"@scalar/
|
|
201
|
-
"@scalar/
|
|
202
|
-
"@scalar/use-
|
|
203
|
-
"@scalar/use-hooks": "0.1.25",
|
|
200
|
+
"@scalar/themes": "0.9.72",
|
|
201
|
+
"@scalar/types": "0.0.37",
|
|
202
|
+
"@scalar/use-codemirror": "0.11.74",
|
|
203
|
+
"@scalar/use-hooks": "0.1.26",
|
|
204
204
|
"@scalar/use-toasts": "0.7.9",
|
|
205
205
|
"@scalar/use-tooltip": "1.0.6",
|
|
206
|
-
"@scalar/
|
|
206
|
+
"@scalar/oas-utils": "0.2.111"
|
|
207
207
|
},
|
|
208
208
|
"devDependencies": {
|
|
209
209
|
"@types/shell-quote": "^1.7.5",
|
|
@@ -219,8 +219,8 @@
|
|
|
219
219
|
"vite": "^5.4.10",
|
|
220
220
|
"vite-svg-loader": "^5.1.0",
|
|
221
221
|
"vitest": "^1.6.0",
|
|
222
|
-
"@scalar/build-tooling": "0.1.
|
|
223
|
-
"@scalar/galaxy": "0.2.
|
|
222
|
+
"@scalar/build-tooling": "0.1.16",
|
|
223
|
+
"@scalar/galaxy": "0.2.23"
|
|
224
224
|
},
|
|
225
225
|
"scripts": {
|
|
226
226
|
"build": "scalar-build-vite",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
metaData?: {
|
|
3
|
-
itemUid: string;
|
|
4
|
-
parentUid: string;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
-
close: () => any;
|
|
9
|
-
back: (e: KeyboardEvent) => any;
|
|
10
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onClose?: () => any;
|
|
12
|
-
onBack?: (e: KeyboardEvent) => any;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLFormElement>;
|
|
14
|
-
export default _default;
|
|
15
|
-
//# sourceMappingURL=CommandPaletteRequest.vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":"AA8MA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;CACF,CAAC;;;;;;;;AA4TF,wBAQG"}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { defineComponent as W, ref as c, computed as x, openBlock as h, createBlock as C, withCtx as u, createElementVNode as f, createVNode as i, unref as n, normalizeClass as q, toDisplayString as V, createCommentVNode as j, createTextVNode as H } from "vue";
|
|
2
|
-
import { ScalarListbox as w, ScalarButton as D, ScalarIcon as k } from "@scalar/components";
|
|
3
|
-
import { isHttpMethod as I } from "@scalar/oas-utils/helpers";
|
|
4
|
-
import { useToasts as P } from "@scalar/use-toasts";
|
|
5
|
-
import { useRouter as $ } from "vue-router";
|
|
6
|
-
import A from "../HttpMethod/HttpMethod.vue.js";
|
|
7
|
-
import { useActiveEntities as L } from "../../store/active-entities.js";
|
|
8
|
-
import O from "./CommandActionForm.vue.js";
|
|
9
|
-
import F from "./CommandActionInput.vue.js";
|
|
10
|
-
import { useWorkspace as G } from "../../store/store.js";
|
|
11
|
-
const J = { class: "flex" }, se = /* @__PURE__ */ W({
|
|
12
|
-
__name: "CommandPaletteRequest",
|
|
13
|
-
props: {
|
|
14
|
-
metaData: {}
|
|
15
|
-
},
|
|
16
|
-
emits: ["close", "back"],
|
|
17
|
-
setup(S, { emit: _ }) {
|
|
18
|
-
const r = S, b = _, { push: M } = $(), { toast: N } = P(), {
|
|
19
|
-
activeCollection: R,
|
|
20
|
-
activeWorkspace: U,
|
|
21
|
-
activeWorkspaceCollections: g,
|
|
22
|
-
activeRequest: y
|
|
23
|
-
} = L(), { requestMutators: T, tags: z } = G(), o = c(""), m = c("get"), p = x(
|
|
24
|
-
() => g.value.map((t) => {
|
|
25
|
-
var e;
|
|
26
|
-
return {
|
|
27
|
-
id: t.uid,
|
|
28
|
-
label: ((e = t.info) == null ? void 0 : e.title) ?? "Unititled Collection"
|
|
29
|
-
};
|
|
30
|
-
})
|
|
31
|
-
), d = x(
|
|
32
|
-
() => g.value.flatMap(
|
|
33
|
-
(t) => {
|
|
34
|
-
var e;
|
|
35
|
-
return t.uid === ((e = l.value) == null ? void 0 : e.id) ? t.tags.flatMap((a) => {
|
|
36
|
-
const v = z[a];
|
|
37
|
-
return v ? [
|
|
38
|
-
{
|
|
39
|
-
id: v.uid,
|
|
40
|
-
label: v.name
|
|
41
|
-
}
|
|
42
|
-
] : [];
|
|
43
|
-
}) : [];
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
), l = c(
|
|
47
|
-
r.metaData ? p.value.find(
|
|
48
|
-
(t) => {
|
|
49
|
-
var e, a;
|
|
50
|
-
return t.id === ((e = r.metaData) == null ? void 0 : e.itemUid) || t.id === ((a = r.metaData) == null ? void 0 : a.parentUid);
|
|
51
|
-
}
|
|
52
|
-
) : p.value.find(
|
|
53
|
-
(t) => {
|
|
54
|
-
var e;
|
|
55
|
-
return t.id === ((e = R.value) == null ? void 0 : e.uid);
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
), s = c(
|
|
59
|
-
r.metaData ? d.value.find((t) => {
|
|
60
|
-
var e;
|
|
61
|
-
return t.id === ((e = r.metaData) == null ? void 0 : e.itemUid);
|
|
62
|
-
}) : d.value.find((t) => {
|
|
63
|
-
var e, a;
|
|
64
|
-
return t.label === ((a = (e = y.value) == null ? void 0 : e.tags) == null ? void 0 : a[0]);
|
|
65
|
-
})
|
|
66
|
-
), B = (t) => m.value = t, E = () => {
|
|
67
|
-
var e, a;
|
|
68
|
-
if (!o.value.trim()) {
|
|
69
|
-
N("Please enter a name before creating a request.", "error");
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (!((e = l.value) != null && e.id) || !I(m.value))
|
|
73
|
-
return;
|
|
74
|
-
const t = T.add(
|
|
75
|
-
{
|
|
76
|
-
path: "",
|
|
77
|
-
method: m.value,
|
|
78
|
-
description: o.value,
|
|
79
|
-
operationId: o.value,
|
|
80
|
-
summary: o.value,
|
|
81
|
-
tags: s.value ? [s.value.label] : []
|
|
82
|
-
},
|
|
83
|
-
l.value.id
|
|
84
|
-
);
|
|
85
|
-
t && M({
|
|
86
|
-
name: "request",
|
|
87
|
-
params: {
|
|
88
|
-
workspace: (a = U.value) == null ? void 0 : a.uid,
|
|
89
|
-
request: t.uid
|
|
90
|
-
}
|
|
91
|
-
}), b("close");
|
|
92
|
-
};
|
|
93
|
-
return (t, e) => (h(), C(O, {
|
|
94
|
-
disabled: !o.value.trim(),
|
|
95
|
-
onSubmit: E
|
|
96
|
-
}, {
|
|
97
|
-
options: u(() => [
|
|
98
|
-
f("div", J, [
|
|
99
|
-
i(A, {
|
|
100
|
-
isEditable: !0,
|
|
101
|
-
isSquare: "",
|
|
102
|
-
method: m.value,
|
|
103
|
-
onChange: B
|
|
104
|
-
}, null, 8, ["method"]),
|
|
105
|
-
i(n(w), {
|
|
106
|
-
modelValue: l.value,
|
|
107
|
-
"onUpdate:modelValue": e[2] || (e[2] = (a) => l.value = a),
|
|
108
|
-
options: p.value
|
|
109
|
-
}, {
|
|
110
|
-
default: u(() => [
|
|
111
|
-
i(n(D), {
|
|
112
|
-
class: "hover:bg-b-2 ml-2 max-h-8 w-full justify-between gap-1 p-2 text-xs",
|
|
113
|
-
variant: "outlined"
|
|
114
|
-
}, {
|
|
115
|
-
default: u(() => [
|
|
116
|
-
f("span", {
|
|
117
|
-
class: q(["whitespace-nowrap", l.value ? "text-c-1" : "text-c-3"])
|
|
118
|
-
}, V(l.value ? l.value.label : "Select Collection"), 3),
|
|
119
|
-
i(n(k), {
|
|
120
|
-
class: "text-c-3",
|
|
121
|
-
icon: "ChevronDown",
|
|
122
|
-
size: "md"
|
|
123
|
-
})
|
|
124
|
-
]),
|
|
125
|
-
_: 1
|
|
126
|
-
})
|
|
127
|
-
]),
|
|
128
|
-
_: 1
|
|
129
|
-
}, 8, ["modelValue", "options"]),
|
|
130
|
-
d.value.length ? (h(), C(n(w), {
|
|
131
|
-
key: 0,
|
|
132
|
-
modelValue: s.value,
|
|
133
|
-
"onUpdate:modelValue": e[3] || (e[3] = (a) => s.value = a),
|
|
134
|
-
options: d.value
|
|
135
|
-
}, {
|
|
136
|
-
default: u(() => [
|
|
137
|
-
i(n(D), {
|
|
138
|
-
class: "hover:bg-b-2 ml-2 max-h-8 w-full justify-between gap-1 p-2 text-xs",
|
|
139
|
-
variant: "outlined"
|
|
140
|
-
}, {
|
|
141
|
-
default: u(() => [
|
|
142
|
-
f("span", {
|
|
143
|
-
class: q(s.value ? "text-c-1" : "text-c-3")
|
|
144
|
-
}, V(s.value ? s.value.label : "Select Tag"), 3),
|
|
145
|
-
i(n(k), {
|
|
146
|
-
class: "text-c-3",
|
|
147
|
-
icon: "ChevronDown",
|
|
148
|
-
size: "md"
|
|
149
|
-
})
|
|
150
|
-
]),
|
|
151
|
-
_: 1
|
|
152
|
-
})
|
|
153
|
-
]),
|
|
154
|
-
_: 1
|
|
155
|
-
}, 8, ["modelValue", "options"])) : j("", !0)
|
|
156
|
-
])
|
|
157
|
-
]),
|
|
158
|
-
submit: u(() => e[4] || (e[4] = [
|
|
159
|
-
H(" Create Request ")
|
|
160
|
-
])),
|
|
161
|
-
default: u(() => [
|
|
162
|
-
i(F, {
|
|
163
|
-
modelValue: o.value,
|
|
164
|
-
"onUpdate:modelValue": e[0] || (e[0] = (a) => o.value = a),
|
|
165
|
-
label: "Request Name",
|
|
166
|
-
placeholder: "Request Name",
|
|
167
|
-
onOnDelete: e[1] || (e[1] = (a) => b("back", a))
|
|
168
|
-
}, null, 8, ["modelValue"])
|
|
169
|
-
]),
|
|
170
|
-
_: 1
|
|
171
|
-
}, 8, ["disabled"]));
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
export {
|
|
175
|
-
se as default
|
|
176
|
-
};
|