@scalar/api-client 2.0.15 → 2.0.16
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 +22 -0
- package/README.md +46 -3
- package/dist/App/ApiClientApp.vue.d.ts +3 -0
- package/dist/App/ApiClientApp.vue.d.ts.map +1 -0
- package/dist/App/ApiClientApp.vue.js +56 -0
- package/dist/App/ApiClientApp.vue3.js +5 -0
- package/dist/App/createApiClientApp.d.ts +16 -0
- package/dist/App/createApiClientApp.d.ts.map +1 -0
- package/dist/App/createApiClientApp.js +62 -0
- package/dist/App/index.d.ts +3 -0
- package/dist/App/index.d.ts.map +1 -0
- package/dist/App/index.js +6 -0
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +49 -33
- package/dist/Modal/api-client-modal.d.ts +1 -1
- package/dist/Modal/api-client-modal.d.ts.map +1 -1
- package/dist/Modal/api-client-modal.js +7 -7
- package/dist/Modal/index.js +4 -4
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts +31 -4
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +61 -37
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts +17 -0
- package/dist/components/CommandPalette/CommandPalette.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPalette.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPalette.vue2.js +184 -0
- package/dist/components/{ActionModal/ActionModalImport.vue.d.ts → CommandPalette/CommandPaletteCollection.vue.d.ts} +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +66 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue2.js +4 -0
- package/dist/components/{ActionModal/ActionModalCollection.vue.d.ts → CommandPalette/CommandPaletteExample.vue.d.ts} +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +107 -0
- package/dist/components/CommandPalette/CommandPaletteExample.vue2.js +4 -0
- package/dist/components/{ActionModal/ActionModalRequest.vue.d.ts → CommandPalette/CommandPaletteFolder.vue.d.ts} +1 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +104 -0
- package/dist/components/CommandPalette/CommandPaletteFolder.vue2.js +4 -0
- package/dist/components/{ActionModal/ActionModalVariant.vue.d.ts → CommandPalette/CommandPaletteImport.vue.d.ts} +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +86 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue2.js +4 -0
- package/dist/components/{ActionModal/ActionModalFolder.vue.d.ts → CommandPalette/CommandPaletteRequest.vue.d.ts} +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +119 -0
- package/dist/components/CommandPalette/CommandPaletteRequest.vue2.js +4 -0
- package/dist/components/ContextBar.vue.js +5 -5
- package/dist/components/DarkModeToggle/DarkModeIconToggle.vue.js +6 -6
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +4 -4
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +3 -3
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +1 -1
- package/dist/components/TopNav/TopNav.vue2.js +26 -26
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +8 -8
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +6 -9
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -6
- package/dist/router.d.ts +4 -1
- package/dist/router.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +32 -31
- 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 +68 -74
- package/dist/views/Request/RequestSection/RequestSection.vue.js +7 -7
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +4 -5
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +80 -64
- 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 +48 -48
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +41 -68
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
- package/package.json +11 -6
- package/dist/assets/ascii/collection.ascii.js +0 -10
- package/dist/assets/ascii/folder.ascii.js +0 -10
- package/dist/assets/ascii/import.ascii.js +0 -10
- package/dist/assets/ascii/request.ascii.js +0 -10
- package/dist/assets/ascii/variant.ascii.js +0 -10
- package/dist/components/ActionModal/ActionModal.vue.d.ts +0 -21
- package/dist/components/ActionModal/ActionModal.vue.d.ts.map +0 -1
- package/dist/components/ActionModal/ActionModal.vue.js +0 -7
- package/dist/components/ActionModal/ActionModal.vue2.js +0 -117
- package/dist/components/ActionModal/ActionModalCollection.vue.d.ts.map +0 -1
- package/dist/components/ActionModal/ActionModalCollection.vue.js +0 -54
- package/dist/components/ActionModal/ActionModalCollection.vue2.js +0 -4
- package/dist/components/ActionModal/ActionModalFolder.vue.d.ts.map +0 -1
- package/dist/components/ActionModal/ActionModalFolder.vue.js +0 -92
- package/dist/components/ActionModal/ActionModalFolder.vue2.js +0 -4
- package/dist/components/ActionModal/ActionModalImport.vue.d.ts.map +0 -1
- package/dist/components/ActionModal/ActionModalImport.vue.js +0 -70
- package/dist/components/ActionModal/ActionModalImport.vue2.js +0 -4
- package/dist/components/ActionModal/ActionModalRequest.vue.d.ts.map +0 -1
- package/dist/components/ActionModal/ActionModalRequest.vue.js +0 -108
- package/dist/components/ActionModal/ActionModalRequest.vue2.js +0 -4
- package/dist/components/ActionModal/ActionModalVariant.vue.d.ts.map +0 -1
- package/dist/components/ActionModal/ActionModalVariant.vue.js +0 -93
- package/dist/components/ActionModal/ActionModalVariant.vue2.js +0 -4
- package/dist/hooks/useActionModal.d.ts +0 -16
- package/dist/hooks/useActionModal.d.ts.map +0 -1
- package/dist/hooks/useActionModal.js +0 -25
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarButton as
|
|
1
|
+
import { defineComponent as b, ref as y, computed as k, watch as V, openBlock as s, createElementBlock as n, Fragment as C, renderList as j, withModifiers as B, createElementVNode as a, normalizeClass as $, createTextVNode as p, toDisplayString as m, createBlock as q, unref as i, withCtx as z, createVNode as E } from "vue";
|
|
2
|
+
import { useWorkspace as N } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarButton as O, ScalarIcon as S } from "@scalar/components";
|
|
4
4
|
import A from "fuse.js";
|
|
5
5
|
import { useRouter as D } from "vue-router";
|
|
6
|
-
const F = ["open"],
|
|
6
|
+
const F = ["open"], R = { key: 0 }, W = ["onClick"], I = { class: "flex items-center gap-1.5 whitespace-nowrap" }, L = { class: "w-20 overflow-hidden text-ellipsis text-right" }, J = /* @__PURE__ */ b({
|
|
7
7
|
__name: "EnvironmentVariableDropdown",
|
|
8
8
|
props: {
|
|
9
9
|
query: {}
|
|
10
10
|
},
|
|
11
11
|
emits: ["select"],
|
|
12
12
|
setup(f, { emit: h }) {
|
|
13
|
-
const
|
|
13
|
+
const l = f, v = h, { environments: c, activeWorkspace: w } = N(), x = D(), r = y(!1), g = new A(Object.values(c), {
|
|
14
14
|
/** search by both name and value */
|
|
15
15
|
keys: ["name", "value"]
|
|
16
|
-
}), u =
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
16
|
+
}), u = k(() => {
|
|
17
|
+
const o = l.query.match(/{{\s*(.*?)\s*(}}|$)/), t = o ? o[1].trim() : "";
|
|
18
|
+
if (!t)
|
|
19
19
|
return Object.values(c).slice(-4);
|
|
20
|
-
const e =
|
|
20
|
+
const e = g.search(t);
|
|
21
21
|
return e.length > 0 ? e.map((d) => d.item) : [];
|
|
22
|
-
}),
|
|
23
|
-
|
|
22
|
+
}), _ = (o) => {
|
|
23
|
+
v("select", o.name), r.value = !1;
|
|
24
24
|
};
|
|
25
|
-
return
|
|
26
|
-
() =>
|
|
27
|
-
(
|
|
28
|
-
|
|
25
|
+
return V(
|
|
26
|
+
() => l.query,
|
|
27
|
+
(o) => {
|
|
28
|
+
var t;
|
|
29
|
+
r.value = o.includes("{{") && !((t = w.value) != null && t.isReadOnly);
|
|
29
30
|
}
|
|
30
|
-
), (
|
|
31
|
+
), (o, t) => (s(), n("dialog", {
|
|
31
32
|
id: "env-dialog",
|
|
32
33
|
class: "absolute left-2 top-7 z-10 w-60 rounded border bg-white p-1",
|
|
33
34
|
open: r.value,
|
|
34
35
|
tabindex: "0"
|
|
35
36
|
}, [
|
|
36
|
-
u.value.length ? (s(), n("ul",
|
|
37
|
-
(s(!0), n(
|
|
37
|
+
u.value.length ? (s(), n("ul", R, [
|
|
38
|
+
(s(!0), n(C, null, j(u.value, (e) => (s(), n("li", {
|
|
38
39
|
key: e.uid,
|
|
39
40
|
class: "font-code text-3xs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150",
|
|
40
|
-
onClick:
|
|
41
|
+
onClick: B((d) => _(e), ["stop"])
|
|
41
42
|
}, [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class:
|
|
43
|
+
a("div", I, [
|
|
44
|
+
a("span", {
|
|
45
|
+
class: $(["h-2.5 w-2.5 min-w-2.5 rounded-full", `bg-${e.color}`])
|
|
45
46
|
}, null, 2),
|
|
46
|
-
|
|
47
|
+
p(" " + m(e.name), 1)
|
|
47
48
|
]),
|
|
48
|
-
|
|
49
|
-
], 8,
|
|
50
|
-
])) : (s(),
|
|
49
|
+
a("span", L, m(e.raw), 1)
|
|
50
|
+
], 8, W))), 128))
|
|
51
|
+
])) : (s(), q(i(O), {
|
|
51
52
|
key: 1,
|
|
52
53
|
class: "font-code text-3xs hover:bg-b-2 flex h-7 w-full justify-start gap-2 px-2 transition-colors duration-150",
|
|
53
54
|
variant: "secondary",
|
|
54
|
-
onClick:
|
|
55
|
+
onClick: t[0] || (t[0] = (e) => i(x).push("/environment"))
|
|
55
56
|
}, {
|
|
56
|
-
default:
|
|
57
|
-
|
|
57
|
+
default: z(() => [
|
|
58
|
+
E(i(S), {
|
|
58
59
|
class: "w-2",
|
|
59
60
|
icon: "Add",
|
|
60
61
|
size: "xs"
|
|
61
62
|
}),
|
|
62
|
-
|
|
63
|
+
p(" Add variable ")
|
|
63
64
|
]),
|
|
64
65
|
_: 1
|
|
65
66
|
}))
|
|
@@ -67,5 +68,5 @@ const F = ["open"], O = { key: 0 }, I = ["onClick"], L = { class: "flex items-ce
|
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
+
J as default
|
|
71
72
|
};
|
|
@@ -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":";AA++BA,wBAKG"}
|
|
@@ -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-47bb8cf2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import oe from "../../components/
|
|
3
|
-
import se from "../../components/
|
|
1
|
+
import { defineComponent as K, ref as G, onMounted as J, onBeforeUnmount as Q, computed as X, openBlock as p, createElementBlock as w, Fragment as M, createElementVNode as d, createVNode as r, unref as e, createCommentVNode as _, withCtx as m, withDirectives as Y, normalizeClass as k, createTextVNode as $, toDisplayString as Z, withModifiers as E, renderList as ee, createBlock as S, vShow as te } from "vue";
|
|
2
|
+
import oe from "../../components/AddressBar/AddressBar.vue.js";
|
|
3
|
+
import se from "../../components/CommandPalette/CommandPalette.vue.js";
|
|
4
4
|
import re from "../../components/Search/SearchButton.vue.js";
|
|
5
5
|
import ne from "../../components/Search/SearchModal.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import le from "../../components/Sidebar/SidebarButton.vue.js";
|
|
7
|
+
import ae from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
8
8
|
import ie from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
9
9
|
import { useWorkspace as ue } from "../../store/workspace.js";
|
|
10
10
|
import ce from "./RequestSection/RequestSection.vue.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
import de from "./ResponseSection/ResponseSection.vue.js";
|
|
13
|
-
import { useModal as
|
|
14
|
-
import { isMacOS as
|
|
15
|
-
import { useMagicKeys as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import xe from "../../components/Sidebar/Sidebar.vue.js";
|
|
13
|
+
import { useModal as I, ScalarIcon as y } from "@scalar/components";
|
|
14
|
+
import { isMacOS as V } from "@scalar/use-tooltip";
|
|
15
|
+
import { useMagicKeys as me, useEventListener as pe } from "@vueuse/core";
|
|
16
|
+
import fe from "./RequestSidebarItem.vue.js";
|
|
17
|
+
import ve from "../../components/Sidebar/Sidebar.vue.js";
|
|
19
18
|
/* empty css */
|
|
20
|
-
import { useSidebar as
|
|
21
|
-
import { sendRequest as
|
|
22
|
-
import { executeRequestBus as
|
|
23
|
-
const
|
|
19
|
+
import { useSidebar as ge } from "../../hooks/useSidebar.js";
|
|
20
|
+
import { sendRequest as xe } from "../../libs/sendRequest.js";
|
|
21
|
+
import { executeRequestBus as z } from "../../libs/eventBusses/executeRequestBus.js";
|
|
22
|
+
const he = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none rounded-r-none pt-0 h-full" }, ye = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container" }, be = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, we = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, Te = /* @__PURE__ */ K({
|
|
24
23
|
__name: "Request",
|
|
25
|
-
setup(
|
|
24
|
+
setup(_e) {
|
|
26
25
|
var O;
|
|
27
26
|
const {
|
|
28
|
-
activeExample:
|
|
27
|
+
activeExample: b,
|
|
29
28
|
activeRequest: i,
|
|
30
29
|
activeServer: x,
|
|
31
|
-
activeSecurityScheme:
|
|
30
|
+
activeSecurityScheme: N,
|
|
32
31
|
activeWorkspace: u,
|
|
33
|
-
collections:
|
|
34
|
-
modalState:
|
|
35
|
-
} = ue(), { collapsedSidebarFolders:
|
|
36
|
-
w.tab = s;
|
|
37
|
-
}, D = async () => {
|
|
32
|
+
collections: j,
|
|
33
|
+
modalState: L
|
|
34
|
+
} = ue(), { collapsedSidebarFolders: F } = ge(), f = I(), C = I(), a = G(!((O = u.value) != null && O.isReadOnly)), D = async () => {
|
|
38
35
|
var n, c, v, g;
|
|
39
|
-
if (!i.value || !
|
|
36
|
+
if (!i.value || !b.value) {
|
|
40
37
|
console.warn(
|
|
41
38
|
"There is no request active at the moment. Please select one then try again."
|
|
42
39
|
);
|
|
@@ -44,18 +41,18 @@ const ye = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
44
41
|
}
|
|
45
42
|
let s = (n = x.value) != null && n.url ? ((c = x.value) == null ? void 0 : c.url) + i.value.path : i.value.path;
|
|
46
43
|
if ((v = x.value) != null && v.variables) {
|
|
47
|
-
const
|
|
48
|
-
s = s.replace(
|
|
49
|
-
var R,
|
|
50
|
-
const
|
|
51
|
-
return (
|
|
44
|
+
const T = /{\s*([\w.-]+)\s*}/g;
|
|
45
|
+
s = s.replace(T, (W, H) => {
|
|
46
|
+
var R, B, q;
|
|
47
|
+
const l = (B = (R = x.value) == null ? void 0 : R.variables) == null ? void 0 : B[H];
|
|
48
|
+
return (l == null ? void 0 : l.value) || (l == null ? void 0 : l.default) || ((q = l == null ? void 0 : l.enum) == null ? void 0 : q[0]) || W;
|
|
52
49
|
});
|
|
53
50
|
}
|
|
54
|
-
const { request: o, response: t } = await
|
|
51
|
+
const { request: o, response: t } = await xe(
|
|
55
52
|
i.value,
|
|
56
|
-
|
|
53
|
+
b.value,
|
|
57
54
|
s,
|
|
58
|
-
|
|
55
|
+
N.value,
|
|
59
56
|
(g = u.value) == null ? void 0 : g.proxyUrl
|
|
60
57
|
);
|
|
61
58
|
o && t ? i.value.history.push({
|
|
@@ -64,51 +61,51 @@ const ye = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
64
61
|
timestamp: Date.now()
|
|
65
62
|
}) : console.warn("No response or request was returned");
|
|
66
63
|
};
|
|
67
|
-
J(() =>
|
|
68
|
-
const
|
|
69
|
-
const s = Object.values(
|
|
64
|
+
J(() => z.on(D)), Q(() => z.off(D));
|
|
65
|
+
const P = X(() => {
|
|
66
|
+
const s = Object.values(j), o = s.findIndex((n) => n.uid === "drafts"), [t] = s.splice(o, 1);
|
|
70
67
|
return s.push(t), s;
|
|
71
|
-
}),
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
}, h =
|
|
75
|
-
return
|
|
76
|
-
(
|
|
77
|
-
}), (s, o) => (p(),
|
|
78
|
-
d("div",
|
|
79
|
-
d("div",
|
|
80
|
-
d("div",
|
|
68
|
+
}), U = (s, o, t, n) => {
|
|
69
|
+
}, A = () => {
|
|
70
|
+
C.show();
|
|
71
|
+
}, h = me();
|
|
72
|
+
return pe(document, "keydown", (s) => {
|
|
73
|
+
(V() ? h.meta.value : h.ctrl.value) && s.key === "b" && (a.value = !a.value), (V() ? h.meta.value : h.ctrl.value) && s.key === "k" && (f.open ? f.hide() : f.show());
|
|
74
|
+
}), (s, o) => (p(), w(M, null, [
|
|
75
|
+
d("div", he, [
|
|
76
|
+
d("div", ye, [
|
|
77
|
+
d("div", be, [
|
|
81
78
|
d("button", {
|
|
82
79
|
class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
|
|
83
80
|
type: "button",
|
|
84
|
-
onClick: o[0] || (o[0] = (t) =>
|
|
81
|
+
onClick: o[0] || (o[0] = (t) => a.value = !a.value)
|
|
85
82
|
}, [
|
|
86
|
-
r(e(
|
|
87
|
-
icon:
|
|
83
|
+
r(e(y), {
|
|
84
|
+
icon: a.value ? "SideBarOpen" : "SideBarClosed",
|
|
88
85
|
size: "sm"
|
|
89
86
|
}, null, 8, ["icon"])
|
|
90
87
|
])
|
|
91
88
|
]),
|
|
92
|
-
r(
|
|
93
|
-
d("div",
|
|
94
|
-
e(u).isReadOnly ? (p(),
|
|
89
|
+
r(oe),
|
|
90
|
+
d("div", we, [
|
|
91
|
+
e(u).isReadOnly ? (p(), w("button", {
|
|
95
92
|
key: 0,
|
|
96
93
|
class: "text-c-3 hover:bg-b-3 active:text-c-1 p-2 rounded",
|
|
97
94
|
type: "button",
|
|
98
|
-
onClick: o[1] || (o[1] = (t) => e(
|
|
95
|
+
onClick: o[1] || (o[1] = (t) => e(L).hide())
|
|
99
96
|
}, [
|
|
100
|
-
r(e(
|
|
97
|
+
r(e(y), {
|
|
101
98
|
class: "stroke-[1.75]",
|
|
102
99
|
icon: "Close",
|
|
103
100
|
size: "lg"
|
|
104
101
|
})
|
|
105
|
-
])) :
|
|
102
|
+
])) : _("", !0)
|
|
106
103
|
])
|
|
107
104
|
]),
|
|
108
|
-
r(
|
|
105
|
+
r(ae, null, {
|
|
109
106
|
default: m(() => [
|
|
110
|
-
Y(r(e(
|
|
111
|
-
class:
|
|
107
|
+
Y(r(e(ve), {
|
|
108
|
+
class: k([a.value ? "sidebar-active-width" : ""])
|
|
112
109
|
}, {
|
|
113
110
|
title: m(() => [
|
|
114
111
|
$(Z(e(u).name), 1)
|
|
@@ -124,26 +121,26 @@ const ye = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
124
121
|
onDragover: o[4] || (o[4] = E(() => {
|
|
125
122
|
}, ["prevent"]))
|
|
126
123
|
}, [
|
|
127
|
-
(p(!0),
|
|
124
|
+
(p(!0), w(M, null, ee(P.value, (t, n) => (p(), S(fe, {
|
|
128
125
|
key: t.uid,
|
|
129
126
|
isDraggable: !e(u).isReadOnly,
|
|
130
127
|
isDroppable: !e(u).isReadOnly,
|
|
131
128
|
item: t,
|
|
132
129
|
parentUids: [],
|
|
133
|
-
onOnDragEnd: (...c) =>
|
|
130
|
+
onOnDragEnd: (...c) => U(t, n, ...c)
|
|
134
131
|
}, {
|
|
135
132
|
leftIcon: m(() => [
|
|
136
|
-
r(e(
|
|
133
|
+
r(e(y), {
|
|
137
134
|
class: "text-sidebar-c-2 stroke-[1] text-sm group-hover:hidden",
|
|
138
135
|
icon: "CodeFolder",
|
|
139
136
|
size: "sm"
|
|
140
137
|
}),
|
|
141
138
|
d("div", {
|
|
142
|
-
class:
|
|
143
|
-
"rotate-90": e(
|
|
139
|
+
class: k({
|
|
140
|
+
"rotate-90": e(F)[t.uid]
|
|
144
141
|
})
|
|
145
142
|
}, [
|
|
146
|
-
r(e(
|
|
143
|
+
r(e(y), {
|
|
147
144
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
148
145
|
icon: "ChevronRight",
|
|
149
146
|
size: "sm"
|
|
@@ -155,9 +152,9 @@ const ye = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
155
152
|
], 32)
|
|
156
153
|
]),
|
|
157
154
|
button: m(() => [
|
|
158
|
-
e(u).isReadOnly ?
|
|
155
|
+
e(u).isReadOnly ? _("", !0) : (p(), S(le, {
|
|
159
156
|
key: 0,
|
|
160
|
-
click:
|
|
157
|
+
click: A
|
|
161
158
|
}, {
|
|
162
159
|
title: m(() => [
|
|
163
160
|
$("Add Item")
|
|
@@ -167,11 +164,11 @@ const ye = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
167
164
|
]),
|
|
168
165
|
_: 1
|
|
169
166
|
}, 8, ["class"]), [
|
|
170
|
-
[te,
|
|
167
|
+
[te, a.value]
|
|
171
168
|
]),
|
|
172
|
-
e(
|
|
169
|
+
e(b) ? (p(), S(ie, {
|
|
173
170
|
key: 0,
|
|
174
|
-
class:
|
|
171
|
+
class: k(["flex-1", [a.value ? "sidebar-active-hide-layout" : ""]])
|
|
175
172
|
}, {
|
|
176
173
|
default: m(() => {
|
|
177
174
|
var t, n, c, v, g;
|
|
@@ -183,11 +180,8 @@ const ye = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
183
180
|
];
|
|
184
181
|
}),
|
|
185
182
|
_: 1
|
|
186
|
-
}, 8, ["class"])) :
|
|
187
|
-
r(
|
|
188
|
-
state: e(w),
|
|
189
|
-
"onUpdate:tab": L
|
|
190
|
-
}, null, 8, ["state"])
|
|
183
|
+
}, 8, ["class"])) : _("", !0),
|
|
184
|
+
r(se, { state: e(C) }, null, 8, ["state"])
|
|
191
185
|
]),
|
|
192
186
|
_: 1
|
|
193
187
|
})
|
|
@@ -197,5 +191,5 @@ const ye = { class: "bg-b-2 flex flex-1 flex-col rounded-lg rounded-b-none round
|
|
|
197
191
|
}
|
|
198
192
|
});
|
|
199
193
|
export {
|
|
200
|
-
|
|
194
|
+
Te as default
|
|
201
195
|
};
|
|
@@ -10,7 +10,7 @@ import { ScalarIcon as O } from "@scalar/components";
|
|
|
10
10
|
const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "request-section-content custom-scroll flex flex-1 flex-col px-2 xl:px-5 py-2.5" }, M = /* @__PURE__ */ y({
|
|
11
11
|
__name: "RequestSection",
|
|
12
12
|
setup(K) {
|
|
13
|
-
const { activeRequest: i, activeExample: m, activeSecurityRequirements:
|
|
13
|
+
const { activeRequest: i, activeExample: m, activeSecurityRequirements: p } = E(), c = ["POST", "PUT", "PATCH", "DELETE"], h = v(() => {
|
|
14
14
|
const t = [
|
|
15
15
|
"All",
|
|
16
16
|
"Auth",
|
|
@@ -20,9 +20,9 @@ const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "req
|
|
|
20
20
|
"Query",
|
|
21
21
|
"Body"
|
|
22
22
|
];
|
|
23
|
-
return m.value.parameters.path.length || t.splice(t.indexOf("Request"), 1), c.includes(i.value.method) || t.splice(t.indexOf("Body"), 1),
|
|
24
|
-
}),
|
|
25
|
-
() =>
|
|
23
|
+
return m.value.parameters.path.length || t.splice(t.indexOf("Request"), 1), c.includes(i.value.method) || t.splice(t.indexOf("Body"), 1), d.value && t.splice(t.indexOf("Auth"), 1), t;
|
|
24
|
+
}), d = v(
|
|
25
|
+
() => p.value.length === 0 || JSON.stringify(p.value) === "[{}]"
|
|
26
26
|
), e = x("All");
|
|
27
27
|
return A(i, (t) => {
|
|
28
28
|
e.value === "Body" && !c.includes(t.method) && (e.value = "All");
|
|
@@ -31,9 +31,9 @@ const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "req
|
|
|
31
31
|
var s;
|
|
32
32
|
return [
|
|
33
33
|
l(n(O), {
|
|
34
|
-
class: "text-c-3 mr-
|
|
34
|
+
class: "text-c-3 mr-2 stroke-[2]",
|
|
35
35
|
icon: "ExternalLink",
|
|
36
|
-
size: "
|
|
36
|
+
size: "sm"
|
|
37
37
|
}),
|
|
38
38
|
r("div", P, [
|
|
39
39
|
q(" Request "),
|
|
@@ -51,7 +51,7 @@ const P = { class: "flex-1" }, T = { class: "text-c-3 pl-1" }, w = { class: "req
|
|
|
51
51
|
o(l($, { title: "Authentication" }, null, 512), [
|
|
52
52
|
[
|
|
53
53
|
a,
|
|
54
|
-
!
|
|
54
|
+
!d.value && (e.value === "All" || e.value === "Auth")
|
|
55
55
|
]
|
|
56
56
|
]),
|
|
57
57
|
o(l(H, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AA6LA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAQ5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;AA+b9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./RequestTable.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9b63a166"]]);
|
|
3
|
+
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ o(e, [["__scopeId", "data-v-8e8bfed1"]]);
|
|
6
5
|
export {
|
|
7
|
-
|
|
6
|
+
f as default
|
|
8
7
|
};
|