@scalar/api-client 2.2.22 → 2.2.24
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/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 +69 -70
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +69 -61
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +17 -16
- 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 +46 -46
- package/dist/components/CodeInput/codeVariableWidget.d.ts +4 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +42 -38
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +25 -24
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +64 -55
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +110 -106
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +38 -37
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +52 -49
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +46 -43
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +40 -39
- package/dist/components/ImportCollection/ImportNowButton.vue.js +44 -42
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +76 -69
- package/dist/components/ScalarAsciiArt.vue.js +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +22 -19
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +57 -49
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +22 -19
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +38 -36
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +71 -64
- package/dist/layouts/App/ApiClientApp.vue.js +4 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +22 -19
- package/dist/layouts/Web/ApiClientWeb.vue.js +4 -1
- package/dist/libs/create-client.d.ts +10 -10
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +42 -36
- package/dist/libs/extractAttachmentFilename.d.ts +3 -0
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.js +7 -7
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +18 -18
- package/dist/libs/normalize-headers.d.ts.map +1 -1
- package/dist/libs/normalize-headers.js +2 -2
- package/dist/libs/parse-curl.js +39 -36
- package/dist/store/active-entities.d.ts +4 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +88 -86
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +29 -29
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request-example.js +27 -23
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +94 -77
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +27 -27
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/servers.js +18 -18
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/tags.js +35 -33
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +14 -9
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +39 -37
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +94 -89
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +118 -116
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +28 -25
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +38 -37
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +76 -73
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +80 -80
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +192 -178
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +80 -73
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +50 -48
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +149 -144
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +168 -150
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +80 -80
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +166 -156
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +37 -31
- package/dist/views/Request/hooks/useOpenApiWatcher.js +27 -27
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -1
- package/dist/views/Request/libs/live-sync.js +147 -130
- package/dist/views/Request/types/sidebar-item.d.ts +4 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/ServerForm.vue.js +38 -35
- package/dist/views/Servers/Servers.vue2.js +38 -35
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +15 -15
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +206 -174
- package/package.json +8 -8
|
@@ -1,124 +1,131 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActiveEntities as
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as W, ref as D, openBlock as d, createElementBlock as w, Fragment as k, createElementVNode as s, createVNode as o, unref as e, withCtx as r, renderList as N, createBlock as z, withModifiers as v, normalizeClass as M, toDisplayString as h, withDirectives as B, vModelText as V, createTextVNode as j } from "vue";
|
|
2
|
+
import { useActiveEntities as E } from "../../store/active-entities.js";
|
|
3
|
+
import { useModal as T, ScalarDropdown as $, ScalarDropdownItem as _, ScalarIcon as u, ScalarDropdownDivider as A, ScalarButton as b, ScalarModal as I } from "@scalar/components";
|
|
4
|
+
import { useToasts as F } from "@scalar/use-toasts";
|
|
5
|
+
import { useRouter as L } from "vue-router";
|
|
6
|
+
import { useWorkspace as P } from "../../store/store.js";
|
|
7
|
+
const R = { class: "flex items-center text-sm w-[inherit]" }, U = { class: "font-medium m-0 text-sm flex gap-1 items-center" }, q = { class: "line-clamp-1 text-left w-[calc(100%-10px)] text-xs" }, G = { class: "text-ellipsis overflow-hidden" }, H = { class: "flex items-center justify-center h-4 w-4" }, ee = /* @__PURE__ */ W({
|
|
8
8
|
__name: "WorkspaceSelector",
|
|
9
|
-
setup(
|
|
10
|
-
const { activeWorkspace: i } =
|
|
11
|
-
|
|
9
|
+
setup(J) {
|
|
10
|
+
const { activeWorkspace: i } = E(), { workspaces: g, workspaceMutators: C } = P(), { push: f } = L(), c = T(), { toast: x } = F(), n = D(""), S = (l) => {
|
|
11
|
+
var t;
|
|
12
|
+
l !== ((t = i.value) == null ? void 0 : t.uid) && f({
|
|
12
13
|
name: "workspace",
|
|
13
14
|
params: {
|
|
14
|
-
workspace:
|
|
15
|
+
workspace: l
|
|
15
16
|
}
|
|
16
17
|
});
|
|
17
|
-
},
|
|
18
|
-
if (!
|
|
19
|
-
|
|
18
|
+
}, y = () => {
|
|
19
|
+
if (!n.value.trim()) {
|
|
20
|
+
x("Please enter a name before creating a workspace.", "error");
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
-
name:
|
|
23
|
+
const l = C.add({
|
|
24
|
+
name: n.value
|
|
24
25
|
});
|
|
25
|
-
|
|
26
|
+
x(`Created new workspace '${l.name}'`), f({
|
|
26
27
|
name: "workspace",
|
|
27
28
|
params: {
|
|
28
|
-
workspace:
|
|
29
|
+
workspace: l.uid
|
|
29
30
|
}
|
|
30
|
-
}),
|
|
31
|
+
}), n.value = "", c.hide();
|
|
31
32
|
};
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
items:
|
|
36
|
-
(
|
|
33
|
+
return (l, t) => (d(), w(k, null, [
|
|
34
|
+
s("div", R, [
|
|
35
|
+
o(e($), null, {
|
|
36
|
+
items: r(() => [
|
|
37
|
+
(d(!0), w(k, null, N(e(g), (a, p) => (d(), z(e(_), {
|
|
37
38
|
key: p,
|
|
38
39
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
39
|
-
onClick:
|
|
40
|
+
onClick: v((m) => S(p), ["stop"])
|
|
40
41
|
}, {
|
|
41
|
-
default:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
default: r(() => {
|
|
43
|
+
var m;
|
|
44
|
+
return [
|
|
45
|
+
s("div", {
|
|
46
|
+
class: M([
|
|
47
|
+
"flex items-center justify-center rounded-full p-[3px] w-4 h-4",
|
|
48
|
+
((m = e(i)) == null ? void 0 : m.uid) === p ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
|
|
49
|
+
])
|
|
50
|
+
}, [
|
|
51
|
+
o(e(u), {
|
|
52
|
+
class: "size-2.5",
|
|
53
|
+
icon: "Checkmark",
|
|
54
|
+
thickness: "3.5"
|
|
55
|
+
})
|
|
56
|
+
], 2),
|
|
57
|
+
s("span", G, h(a.name), 1)
|
|
58
|
+
];
|
|
59
|
+
}),
|
|
56
60
|
_: 2
|
|
57
61
|
}, 1032, ["onClick"]))), 128)),
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
o(e(A)),
|
|
63
|
+
o(e(_), {
|
|
60
64
|
class: "flex items-center gap-1.5",
|
|
61
|
-
onClick:
|
|
65
|
+
onClick: t[0] || (t[0] = (a) => e(c).show())
|
|
62
66
|
}, {
|
|
63
|
-
default:
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
default: r(() => [
|
|
68
|
+
s("div", H, [
|
|
69
|
+
o(e(u), {
|
|
66
70
|
icon: "Add",
|
|
67
71
|
size: "sm"
|
|
68
72
|
})
|
|
69
73
|
]),
|
|
70
|
-
|
|
74
|
+
t[2] || (t[2] = s("span", null, "New Workspace", -1))
|
|
71
75
|
]),
|
|
72
76
|
_: 1
|
|
73
77
|
})
|
|
74
78
|
]),
|
|
75
|
-
default:
|
|
76
|
-
|
|
79
|
+
default: r(() => [
|
|
80
|
+
o(e(b), {
|
|
77
81
|
class: "font-normal h-full justify-start line-clamp-1 py-1 px-1.5 text-c-1 hover:bg-b-2 w-fit text-c-3",
|
|
78
82
|
fullWidth: "",
|
|
79
83
|
variant: "ghost"
|
|
80
84
|
}, {
|
|
81
|
-
default:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
s(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
default: r(() => {
|
|
86
|
+
var a;
|
|
87
|
+
return [
|
|
88
|
+
s("div", U, [
|
|
89
|
+
s("h2", q, h((a = e(i)) == null ? void 0 : a.name), 1),
|
|
90
|
+
o(e(u), {
|
|
91
|
+
icon: "ChevronDown",
|
|
92
|
+
size: "md"
|
|
93
|
+
})
|
|
94
|
+
])
|
|
95
|
+
];
|
|
96
|
+
}),
|
|
90
97
|
_: 1
|
|
91
98
|
})
|
|
92
99
|
]),
|
|
93
100
|
_: 1
|
|
94
101
|
})
|
|
95
102
|
]),
|
|
96
|
-
|
|
103
|
+
o(e(I), {
|
|
97
104
|
bodyClass: "!m-0 !p-1",
|
|
98
105
|
size: "xxs",
|
|
99
106
|
state: e(c),
|
|
100
107
|
variant: "form"
|
|
101
108
|
}, {
|
|
102
|
-
default:
|
|
103
|
-
|
|
109
|
+
default: r(() => [
|
|
110
|
+
s("form", {
|
|
104
111
|
class: "flex gap-1 rounded",
|
|
105
|
-
onSubmit:
|
|
112
|
+
onSubmit: v(y, ["prevent"])
|
|
106
113
|
}, [
|
|
107
|
-
|
|
108
|
-
"onUpdate:modelValue":
|
|
114
|
+
B(s("input", {
|
|
115
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => n.value = a),
|
|
109
116
|
class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
|
|
110
117
|
placeholder: "New Workspace",
|
|
111
118
|
type: "text"
|
|
112
119
|
}, null, 512), [
|
|
113
|
-
[
|
|
120
|
+
[V, n.value]
|
|
114
121
|
]),
|
|
115
|
-
|
|
122
|
+
o(e(b), {
|
|
116
123
|
class: "max-h-8 text-xs p-0 px-3",
|
|
117
|
-
disabled: !
|
|
124
|
+
disabled: !n.value.trim(),
|
|
118
125
|
type: "submit"
|
|
119
126
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
127
|
+
default: r(() => t[3] || (t[3] = [
|
|
128
|
+
j(" Continue ")
|
|
122
129
|
])),
|
|
123
130
|
_: 1
|
|
124
131
|
}, 8, ["disabled"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ScalarAsciiArt.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0018c948"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as h, computed as f, openBlock as i, createElementBlock as l, normalizeClass as y, Fragment as v, renderList as x, normalizeStyle as m, createElementVNode as $, toDisplayString as k } from "vue";
|
|
2
|
+
const p = 500, o = 100, B = /* @__PURE__ */ h({
|
|
3
3
|
__name: "ScalarAsciiArt",
|
|
4
4
|
props: {
|
|
5
5
|
art: {},
|
|
6
6
|
animate: { type: Boolean }
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
`)),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
setup(u) {
|
|
9
|
+
const d = u, n = f(() => d.art.split(`
|
|
10
|
+
`)), g = (a, s) => {
|
|
11
|
+
var e, t, r, c;
|
|
12
|
+
return {
|
|
13
|
+
animationDuration: `${a * o}ms, ${p}ms`,
|
|
14
|
+
animationTimingFunction: `steps(${a}), step-end`,
|
|
15
|
+
animationDelay: `${s * o}ms, 0ms`,
|
|
16
|
+
animationIterationCount: `1, ${((((e = n.value) == null ? void 0 : e.length) ?? 0) + (((c = (r = n.value) == null ? void 0 : r[((t = n.value) == null ? void 0 : t.length) - 1]) == null ? void 0 : c.length) ?? 0) + 5) * o / p}`
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
return (a, s) => (i(), l("div", {
|
|
20
|
+
class: y(["ascii-art font-code flex flex-col items-start text-[6px] leading-[7px]", { "ascii-art-animate": a.animate }])
|
|
18
21
|
}, [
|
|
19
|
-
(
|
|
20
|
-
key:
|
|
22
|
+
(i(!0), l(v, null, x(n.value, (e, t) => (i(), l("span", {
|
|
23
|
+
key: t,
|
|
21
24
|
class: "inline-block",
|
|
22
|
-
style:
|
|
25
|
+
style: m({ width: `calc(${e.length + 1}ch)` })
|
|
23
26
|
}, [
|
|
24
|
-
|
|
27
|
+
$("span", {
|
|
25
28
|
class: "inline-block whitespace-pre overflow-hidden",
|
|
26
|
-
style:
|
|
27
|
-
},
|
|
29
|
+
style: m(g(e.length, t))
|
|
30
|
+
}, k(e), 5)
|
|
28
31
|
], 4))), 128))
|
|
29
32
|
], 2));
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
35
|
export {
|
|
33
|
-
|
|
36
|
+
B as default
|
|
34
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSearch.d.ts","sourceRoot":"","sources":["../../../src/components/Search/useSearch.ts"],"names":[],"mappings":"AAIA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAI/C;;;GAGG;AACH,wBAAgB,SAAS;;;eAMd,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;;;iCA4FsB,UAAU;eAjGrC,MAAM;qBACA,MAAM;kBACT,MAAM;YACZ,MAAM;cACJ,MAAM;cACN,MAAM;MA4F0C;sBAxDjC,IAAI;;;uCAae,IAAI,GAAG,MAAM;;EAyExD"}
|
|
@@ -1,68 +1,76 @@
|
|
|
1
|
-
import { useActiveEntities as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { useActiveEntities as x } from "../../store/active-entities.js";
|
|
2
|
+
import { isDefined as A } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import D from "fuse.js";
|
|
4
|
+
import { ref as a, watch as d, computed as R, nextTick as E } from "vue";
|
|
5
|
+
import { useRouter as I } from "vue-router";
|
|
6
|
+
import { useWorkspace as C } from "../../store/store.js";
|
|
7
|
+
function P() {
|
|
8
|
+
const k = I(), { activeWorkspace: S, activeWorkspaceRequests: i } = x(), { requests: b } = C(), u = a([]), c = a([]), s = a(0), l = a(""), n = a(null), v = a([]), h = new D(u.value, {
|
|
8
9
|
keys: ["title", "description", "body"]
|
|
9
|
-
}),
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
u.value = e.map((t) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
}), g = () => {
|
|
11
|
+
l.value = "", s.value = 0, c.value = [], n.value instanceof HTMLInputElement && n.value.blur();
|
|
12
|
+
}, y = (e) => {
|
|
13
|
+
u.value = e.map((t) => {
|
|
14
|
+
var o;
|
|
15
|
+
return {
|
|
16
|
+
id: t.uid,
|
|
17
|
+
title: t.summary ?? t.method,
|
|
18
|
+
description: t.description ?? "",
|
|
19
|
+
httpVerb: t.method,
|
|
20
|
+
path: t.path,
|
|
21
|
+
// TODO: Use router instead
|
|
22
|
+
link: `/workspace/${(o = S.value) == null ? void 0 : o.uid}/request/${t.uid}`
|
|
23
|
+
};
|
|
24
|
+
}), h.setCollection(u.value);
|
|
25
|
+
}, m = () => {
|
|
26
|
+
s.value = 0, c.value = h.search(l.value);
|
|
22
27
|
};
|
|
23
|
-
|
|
24
|
-
e.length ?
|
|
28
|
+
d(l, (e) => {
|
|
29
|
+
e.length ? m() : c.value = [];
|
|
25
30
|
});
|
|
26
|
-
const
|
|
27
|
-
const t = e === "up" ? -1 : 1,
|
|
28
|
-
s.value = (s.value + t +
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
+
const w = (e) => {
|
|
32
|
+
const t = e === "up" ? -1 : 1, o = r.value.length;
|
|
33
|
+
s.value = (s.value + t + o) % o, E(() => {
|
|
34
|
+
const f = v.value[s.value];
|
|
35
|
+
f instanceof HTMLElement && f.scrollIntoView({
|
|
31
36
|
behavior: "smooth",
|
|
32
37
|
block: "center"
|
|
33
38
|
});
|
|
34
39
|
});
|
|
35
|
-
},
|
|
36
|
-
s.value >= 0
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
}, T = () => {
|
|
41
|
+
if (s.value >= 0) {
|
|
42
|
+
const e = r.value[s.value];
|
|
43
|
+
e && p(e);
|
|
44
|
+
}
|
|
45
|
+
}, W = R(
|
|
46
|
+
() => i.value.map((e) => b[e]).filter(A)
|
|
47
|
+
);
|
|
48
|
+
d(
|
|
49
|
+
i,
|
|
50
|
+
() => {
|
|
51
|
+
y(W.value);
|
|
44
52
|
},
|
|
45
53
|
{ immediate: !0 }
|
|
46
54
|
);
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
() =>
|
|
55
|
+
const p = (e) => {
|
|
56
|
+
k.push(e.item.id), g();
|
|
57
|
+
}, r = R(
|
|
58
|
+
() => l.value.length === 0 ? u.value.map((e) => ({
|
|
51
59
|
item: e
|
|
52
60
|
})) : c.value
|
|
53
61
|
);
|
|
54
62
|
return {
|
|
55
|
-
searchText:
|
|
56
|
-
searchResultsWithPlaceholderResults:
|
|
63
|
+
searchText: l,
|
|
64
|
+
searchResultsWithPlaceholderResults: r,
|
|
57
65
|
selectedSearchResult: s,
|
|
58
|
-
onSearchResultClick:
|
|
59
|
-
fuseSearch:
|
|
60
|
-
searchInputRef:
|
|
61
|
-
searchResultRefs:
|
|
62
|
-
navigateSearchResults:
|
|
63
|
-
selectSearchResult:
|
|
66
|
+
onSearchResultClick: p,
|
|
67
|
+
fuseSearch: m,
|
|
68
|
+
searchInputRef: n,
|
|
69
|
+
searchResultRefs: v,
|
|
70
|
+
navigateSearchResults: w,
|
|
71
|
+
selectSearchResult: T
|
|
64
72
|
};
|
|
65
73
|
}
|
|
66
74
|
export {
|
|
67
|
-
|
|
75
|
+
P as useSearch
|
|
68
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNavRouterLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavRouterLink.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SideNavRouterLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNavRouterLink.vue"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAK9C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,IAAI,CAAA;IACV,IAAI,EAAE,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAUF,iBAAS,cAAc;WAyCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useActiveEntities as
|
|
4
|
-
import { RouterLink as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as n, openBlock as r, createBlock as a, unref as t, withCtx as c, renderSlot as s } from "vue";
|
|
2
|
+
import p from "./SideNavLink.vue.js";
|
|
3
|
+
import { useActiveEntities as m } from "../../store/active-entities.js";
|
|
4
|
+
import { RouterLink as f } from "vue-router";
|
|
5
|
+
const $ = /* @__PURE__ */ n({
|
|
6
6
|
__name: "SideNavRouterLink",
|
|
7
7
|
props: {
|
|
8
8
|
icon: {},
|
|
9
9
|
name: {},
|
|
10
10
|
active: { type: Boolean }
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const { activeWorkspace:
|
|
14
|
-
return (e,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
setup(u) {
|
|
13
|
+
const { activeWorkspace: i } = m();
|
|
14
|
+
return (e, l) => {
|
|
15
|
+
var o;
|
|
16
|
+
return r(), a(p, {
|
|
17
|
+
is: t(f),
|
|
18
|
+
active: e.active,
|
|
19
|
+
icon: e.icon,
|
|
20
|
+
to: `/workspace/${(o = t(i)) == null ? void 0 : o.uid}/${e.name}`
|
|
21
|
+
}, {
|
|
22
|
+
default: c(() => [
|
|
23
|
+
s(e.$slots, "default")
|
|
24
|
+
]),
|
|
25
|
+
_: 3
|
|
26
|
+
}, 8, ["is", "active", "icon", "to"]);
|
|
27
|
+
};
|
|
25
28
|
}
|
|
26
29
|
});
|
|
27
30
|
export {
|
|
28
|
-
|
|
31
|
+
$ as default
|
|
29
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Sidebar/SidebarListElement.vue"],"names":[],"mappings":"AAqHA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,oBAAoB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE;QACR,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,SAAS,CAAC,EAAE,OAAO,CAAA;KACpB,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAA;CAC3C,CAAC;;;;;;;;;;AAuNF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./SidebarListElement.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4713d7d0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useActiveEntities as
|
|
4
|
-
import { ScalarIcon as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as C, resolveComponent as h, openBlock as s, createElementBlock as d, createVNode as c, normalizeClass as D, unref as p, withModifiers as I, withCtx as M, createElementVNode as m, normalizeStyle as R, createCommentVNode as u, createBlock as B, toDisplayString as E } from "vue";
|
|
2
|
+
import N from "./SidebarListElementActions.vue.js";
|
|
3
|
+
import { useActiveEntities as S } from "../../store/active-entities.js";
|
|
4
|
+
import { ScalarIcon as z } from "@scalar/components";
|
|
5
|
+
import { useRouter as V } from "vue-router";
|
|
6
|
+
const A = { class: "empty-variable-name text-sm" }, F = /* @__PURE__ */ C({
|
|
7
7
|
__name: "SidebarListElement",
|
|
8
8
|
props: {
|
|
9
9
|
variable: {},
|
|
@@ -15,57 +15,59 @@ const V = { class: "empty-variable-name text-sm" }, q = /* @__PURE__ */ g({
|
|
|
15
15
|
type: {}
|
|
16
16
|
},
|
|
17
17
|
emits: ["delete", "colorModal", "rename"],
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
18
|
+
setup(b, { emit: v }) {
|
|
19
|
+
const k = b, r = v, y = V(), { activeWorkspace: t } = S(), f = (e, a, n) => {
|
|
20
|
+
var i;
|
|
20
21
|
const o = {
|
|
21
|
-
workspaceId:
|
|
22
|
-
type:
|
|
23
|
-
collectionId:
|
|
22
|
+
workspaceId: (i = t.value) == null ? void 0 : i.uid,
|
|
23
|
+
type: k.type,
|
|
24
|
+
collectionId: n || void 0,
|
|
24
25
|
uid: a
|
|
25
|
-
},
|
|
26
|
-
e.metaKey ? window.open(
|
|
27
|
-
}, f = (e) => {
|
|
28
|
-
i("delete", e);
|
|
26
|
+
}, l = n ? `/workspace/${o.workspaceId}/${o.type}/${o.collectionId}/${o.uid}` : `/workspace/${o.workspaceId}/${o.type}/${o.uid}`;
|
|
27
|
+
e.metaKey ? window.open(l, "_blank") : y.push({ path: l });
|
|
29
28
|
}, w = (e) => {
|
|
30
|
-
|
|
29
|
+
r("delete", e);
|
|
31
30
|
}, $ = (e) => {
|
|
32
|
-
|
|
31
|
+
r("colorModal", e);
|
|
32
|
+
}, g = (e) => {
|
|
33
|
+
r("rename", e);
|
|
33
34
|
};
|
|
34
35
|
return (e, a) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
var o, l;
|
|
37
|
+
const n = h("router-link");
|
|
38
|
+
return s(), d("li", null, [
|
|
39
|
+
c(n, {
|
|
40
|
+
class: D(["h-8 text-c-2 hover:bg-b-2 group relative block flex items-center gap-1.5 rounded py-1 pr-1.5 font-medium no-underline", [e.variable.color ? "pl-1" : "pl-1.5"]]),
|
|
39
41
|
exactActiveClass: "active-link",
|
|
40
|
-
to: e.collectionId ? `/workspace/${t
|
|
41
|
-
onClick: a[1] || (a[1] =
|
|
42
|
+
to: e.collectionId ? `/workspace/${(o = p(t)) == null ? void 0 : o.uid}/${e.type}/${e.collectionId}/${e.variable.uid}` : `/workspace/${(l = p(t)) == null ? void 0 : l.uid}/${e.type}/${e.variable.uid}`,
|
|
43
|
+
onClick: a[1] || (a[1] = I((i) => f(i, e.variable.uid, e.collectionId), ["prevent"]))
|
|
42
44
|
}, {
|
|
43
|
-
default:
|
|
44
|
-
e.variable.color ? (
|
|
45
|
+
default: M(() => [
|
|
46
|
+
e.variable.color ? (s(), d("button", {
|
|
45
47
|
key: 0,
|
|
46
48
|
class: "hover:bg-b-3 rounded p-1.5",
|
|
47
49
|
type: "button",
|
|
48
|
-
onClick: a[0] || (a[0] = (
|
|
50
|
+
onClick: a[0] || (a[0] = (i) => $(e.variable.uid))
|
|
49
51
|
}, [
|
|
50
|
-
|
|
52
|
+
m("div", {
|
|
51
53
|
class: "h-2.5 w-2.5 rounded-xl",
|
|
52
|
-
style:
|
|
54
|
+
style: R({ backgroundColor: e.variable.color })
|
|
53
55
|
}, null, 4)
|
|
54
|
-
])) :
|
|
55
|
-
e.variable.icon ? (
|
|
56
|
+
])) : u("", !0),
|
|
57
|
+
e.variable.icon ? (s(), B(p(z), {
|
|
56
58
|
key: 1,
|
|
57
59
|
class: "text-sidebar-c-2 size-3.5 stroke-[2.25]",
|
|
58
60
|
icon: e.variable.icon
|
|
59
|
-
}, null, 8, ["icon"])) :
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
}, null, 8, ["icon"])) : u("", !0),
|
|
62
|
+
m("span", A, E(e.variable.name), 1),
|
|
63
|
+
c(N, {
|
|
62
64
|
isCopyable: e.isCopyable,
|
|
63
65
|
isDeletable: e.isDeletable,
|
|
64
66
|
isRenameable: e.isRenameable,
|
|
65
67
|
variable: { ...e.variable, isDefault: e.variable.isDefault ?? !1 },
|
|
66
68
|
warningMessage: e.warningMessage,
|
|
67
|
-
onDelete:
|
|
68
|
-
onRename:
|
|
69
|
+
onDelete: w,
|
|
70
|
+
onRename: g
|
|
69
71
|
}, null, 8, ["isCopyable", "isDeletable", "isRenameable", "variable", "warningMessage"])
|
|
70
72
|
]),
|
|
71
73
|
_: 1
|
|
@@ -75,5 +77,5 @@ const V = { class: "empty-variable-name text-sm" }, q = /* @__PURE__ */ g({
|
|
|
75
77
|
}
|
|
76
78
|
});
|
|
77
79
|
export {
|
|
78
|
-
|
|
80
|
+
F as default
|
|
79
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TopNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TopNav/TopNav.vue"],"names":[],"mappings":"AAgQA,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAC;;AAgbF,wBAOG"}
|