@scalar/api-client 2.0.57 → 2.0.58
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 +18 -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 +61 -58
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +31 -25
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +51 -45
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteFolder.vue.js +47 -41
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +56 -40
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +67 -61
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +30 -30
- package/dist/components/TopNav/TopNav.vue.d.ts +20 -1
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +2 -2
- package/dist/components/TopNav/TopNav.vue2.js +64 -49
- package/dist/layouts/App/ApiClientApp.vue.d.ts +11 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +53 -49
- package/dist/libs/event-busses/cancel-request-bus.d.ts +2 -0
- package/dist/libs/event-busses/cancel-request-bus.d.ts.map +1 -0
- package/dist/libs/event-busses/cancel-request-bus.js +5 -0
- package/dist/libs/event-busses/hot-keys-bus.d.ts +3 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.js +1 -0
- package/dist/libs/event-busses/index.d.ts +2 -1
- package/dist/libs/event-busses/index.d.ts.map +1 -1
- package/dist/libs/event-busses/index.js +11 -8
- package/dist/libs/index.js +21 -18
- package/dist/libs/local-storage.js +1 -1
- package/dist/libs/sendRequest.d.ts +2 -2
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +22 -21
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +100 -103
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts +11 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +3 -3
- package/dist/views/Request/Request.vue2.js +184 -174
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -0
- 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 +139 -130
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts +3 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +39 -0
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -30
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +23 -21
- package/package.json +7 -7
|
@@ -1,75 +1,80 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
1
|
+
import { defineComponent as y, ref as d, computed as v, onMounted as V, openBlock as k, createElementBlock as N, createElementVNode as s, withDirectives as S, withKeys as F, withModifiers as I, vModelText as M, createVNode as n, unref as i, withCtx as u, normalizeClass as B, toDisplayString as D, createTextVNode as K } from "vue";
|
|
2
|
+
import { useWorkspace as T } from "../../store/workspace.js";
|
|
3
3
|
import { ScalarListbox as z, ScalarButton as x, ScalarIcon as E } from "@scalar/components";
|
|
4
|
-
|
|
4
|
+
import { useToasts as P } from "@scalar/use-toasts";
|
|
5
|
+
const U = { class: "flex w-full flex-col gap-3" }, W = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, j = /* @__PURE__ */ s("label", {
|
|
5
6
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
6
7
|
for: "foldername"
|
|
7
|
-
}, null, -1),
|
|
8
|
+
}, null, -1), L = ["onKeydown"], q = { class: "flex" }, A = { class: "flex flex-1 gap-2 max-h-8" }, R = /* @__PURE__ */ y({
|
|
8
9
|
__name: "CommandPaletteFolder",
|
|
9
10
|
emits: ["close"],
|
|
10
|
-
setup(
|
|
11
|
+
setup(G, { emit: h }) {
|
|
11
12
|
var p;
|
|
12
|
-
const
|
|
13
|
-
() =>
|
|
14
|
-
var l,
|
|
13
|
+
const b = h, { activeWorkspaceCollections: _, folderMutators: w, activeCollection: C } = T(), t = d(""), r = d(((p = C.value) == null ? void 0 : p.uid) ?? ""), { toast: g } = P(), c = v(
|
|
14
|
+
() => _.value.map((e) => {
|
|
15
|
+
var l, a;
|
|
15
16
|
return {
|
|
16
17
|
id: e.uid,
|
|
17
|
-
label: ((
|
|
18
|
+
label: ((a = (l = e.spec) == null ? void 0 : l.info) == null ? void 0 : a.title) ?? ""
|
|
18
19
|
};
|
|
19
20
|
})
|
|
20
|
-
),
|
|
21
|
-
get: () =>
|
|
22
|
-
({ id: e }) => e ===
|
|
21
|
+
), o = v({
|
|
22
|
+
get: () => c.value.find(
|
|
23
|
+
({ id: e }) => e === r.value
|
|
23
24
|
),
|
|
24
25
|
set: (e) => {
|
|
25
|
-
e != null && e.id && (
|
|
26
|
+
e != null && e.id && (r.value = e.id);
|
|
26
27
|
}
|
|
27
28
|
}), f = () => {
|
|
28
|
-
|
|
29
|
+
if (!t.value) {
|
|
30
|
+
g("Please enter a name before creating a folder.", "error");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
t.value && o.value && (w.add(
|
|
29
34
|
{
|
|
30
|
-
name:
|
|
35
|
+
name: t.value
|
|
31
36
|
},
|
|
32
|
-
|
|
33
|
-
),
|
|
34
|
-
}, m =
|
|
35
|
-
return
|
|
37
|
+
r.value
|
|
38
|
+
), b("close"));
|
|
39
|
+
}, m = d(null);
|
|
40
|
+
return V(() => {
|
|
36
41
|
var e;
|
|
37
42
|
(e = m.value) == null || e.focus();
|
|
38
|
-
}), (e, l) => (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
}), (e, l) => (k(), N("div", U, [
|
|
44
|
+
s("div", W, [
|
|
45
|
+
j,
|
|
46
|
+
S(s("input", {
|
|
42
47
|
id: "foldername",
|
|
43
48
|
ref_key: "folderInput",
|
|
44
49
|
ref: m,
|
|
45
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
50
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => t.value = a),
|
|
46
51
|
autocomplete: "off",
|
|
47
52
|
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
48
53
|
"data-form-type": "other",
|
|
49
54
|
"data-lpignore": "true",
|
|
50
55
|
label: "Folder Name",
|
|
51
56
|
placeholder: "Folder Name",
|
|
52
|
-
onKeydown:
|
|
53
|
-
}, null, 40,
|
|
54
|
-
[
|
|
57
|
+
onKeydown: F(I(f, ["prevent"]), ["enter"])
|
|
58
|
+
}, null, 40, L), [
|
|
59
|
+
[M, t.value]
|
|
55
60
|
])
|
|
56
61
|
]),
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
s("div", q, [
|
|
63
|
+
s("div", A, [
|
|
59
64
|
n(i(z), {
|
|
60
|
-
modelValue:
|
|
61
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
62
|
-
options:
|
|
65
|
+
modelValue: o.value,
|
|
66
|
+
"onUpdate:modelValue": l[1] || (l[1] = (a) => o.value = a),
|
|
67
|
+
options: c.value
|
|
63
68
|
}, {
|
|
64
|
-
default:
|
|
69
|
+
default: u(() => [
|
|
65
70
|
n(i(x), {
|
|
66
71
|
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
67
72
|
variant: "outlined"
|
|
68
73
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
|
|
71
|
-
class:
|
|
72
|
-
},
|
|
74
|
+
default: u(() => [
|
|
75
|
+
s("span", {
|
|
76
|
+
class: B(o.value ? "text-c-1" : "text-c-3")
|
|
77
|
+
}, D(o.value ? o.value.label : "Select Collection"), 3),
|
|
73
78
|
n(i(E), {
|
|
74
79
|
class: "text-c-3",
|
|
75
80
|
icon: "ChevronDown",
|
|
@@ -84,17 +89,18 @@ const T = { class: "flex w-full flex-col gap-3" }, U = { class: "gap-3 rounded b
|
|
|
84
89
|
]),
|
|
85
90
|
n(i(x), {
|
|
86
91
|
class: "max-h-8 text-xs p-0 px-3",
|
|
92
|
+
disabled: !t.value.trim(),
|
|
87
93
|
onClick: f
|
|
88
94
|
}, {
|
|
89
|
-
default:
|
|
90
|
-
|
|
95
|
+
default: u(() => [
|
|
96
|
+
K(" Create Folder ")
|
|
91
97
|
]),
|
|
92
98
|
_: 1
|
|
93
|
-
})
|
|
99
|
+
}, 8, ["disabled"])
|
|
94
100
|
])
|
|
95
101
|
]));
|
|
96
102
|
}
|
|
97
103
|
});
|
|
98
104
|
export {
|
|
99
|
-
|
|
105
|
+
R as default
|
|
100
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;AA8TA,wBAMG"}
|
|
@@ -1,57 +1,73 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useWorkspace as
|
|
3
|
-
import { ScalarButton as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as S, ref as d, onMounted as C, openBlock as F, createElementBlock as U, createElementVNode as o, withDirectives as M, withKeys as N, withModifiers as R, vModelText as T, createVNode as c, unref as l, withCtx as f, createTextVNode as h } from "vue";
|
|
2
|
+
import { useWorkspace as V } from "../../store/workspace.js";
|
|
3
|
+
import { ScalarButton as x, ScalarIcon as A } from "@scalar/components";
|
|
4
|
+
import { useToasts as B } from "@scalar/use-toasts";
|
|
5
|
+
import { useFileDialog as D } from "../../hooks/useFileDialog.js";
|
|
6
|
+
const K = { class: "flex w-full flex-col gap-3" }, L = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, P = /* @__PURE__ */ o("label", {
|
|
6
7
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
7
8
|
for: "requestimport"
|
|
8
|
-
}, null, -1),
|
|
9
|
+
}, null, -1), q = ["onKeydown"], E = { class: "flex gap-2" }, W = { class: "flex flex-1 gap-2 max-h-8" }, G = /* @__PURE__ */ S({
|
|
9
10
|
__name: "CommandPaletteImport",
|
|
10
11
|
emits: ["close"],
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
12
|
+
setup($, { emit: g }) {
|
|
13
|
+
const i = g, { activeWorkspace: _, importSpecFile: w, importSpecFromUrl: v } = V(), s = d(""), { toast: r } = B(), { open: y } = D({
|
|
13
14
|
onChange: async (e) => {
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
const t = e == null ? void 0 : e[0];
|
|
16
|
+
if (t) {
|
|
17
|
+
const a = new FileReader();
|
|
18
|
+
a.onload = async (b) => {
|
|
19
|
+
var u;
|
|
20
|
+
const k = (u = b.target) == null ? void 0 : u.result;
|
|
21
|
+
try {
|
|
22
|
+
await w(k, _.value.uid), r("Import successful", "info"), i("close");
|
|
23
|
+
} catch (n) {
|
|
24
|
+
const I = (n == null ? void 0 : n.message) || "Unknown error";
|
|
25
|
+
r(`Import failed: ${I}`, "error");
|
|
26
|
+
}
|
|
27
|
+
}, a.readAsText(t);
|
|
22
28
|
}
|
|
23
29
|
},
|
|
24
30
|
multiple: !1,
|
|
25
31
|
accept: ".json,.yaml,.yml"
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
}), p = async () => {
|
|
33
|
+
if (s.value)
|
|
34
|
+
try {
|
|
35
|
+
await v(s.value), r("Import successful", "info"), i("close");
|
|
36
|
+
} catch (e) {
|
|
37
|
+
console.error("the error ", e);
|
|
38
|
+
const t = (e == null ? void 0 : e.message) || "Unknown error";
|
|
39
|
+
r(`Import failed: ${t}`, "error");
|
|
40
|
+
}
|
|
41
|
+
}, m = d(null);
|
|
42
|
+
return C(() => {
|
|
30
43
|
var e;
|
|
31
|
-
(e =
|
|
32
|
-
}), (e,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
(e = m.value) == null || e.focus();
|
|
45
|
+
}), (e, t) => (F(), U("div", K, [
|
|
46
|
+
o("div", L, [
|
|
47
|
+
P,
|
|
48
|
+
M(o("input", {
|
|
36
49
|
id: "requestimport",
|
|
37
50
|
ref_key: "importInput",
|
|
38
|
-
ref:
|
|
51
|
+
ref: m,
|
|
52
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => s.value = a),
|
|
39
53
|
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
40
54
|
label: "Paste Swagger File URL",
|
|
41
55
|
placeholder: "Paste Swagger File URL",
|
|
42
|
-
onKeydown:
|
|
43
|
-
}, null, 40,
|
|
56
|
+
onKeydown: N(R(p, ["prevent"]), ["enter"])
|
|
57
|
+
}, null, 40, q), [
|
|
58
|
+
[T, s.value]
|
|
59
|
+
])
|
|
44
60
|
]),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
61
|
+
o("div", E, [
|
|
62
|
+
o("div", W, [
|
|
63
|
+
c(l(x), {
|
|
48
64
|
class: "p-2 max-h-8 gap-1 text-xs hover:bg-b-2 relative",
|
|
49
65
|
variant: "outlined",
|
|
50
|
-
onClick:
|
|
66
|
+
onClick: l(y)
|
|
51
67
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
|
|
54
|
-
|
|
68
|
+
default: f(() => [
|
|
69
|
+
h(" JSON, or YAML Files "),
|
|
70
|
+
c(l(A), {
|
|
55
71
|
class: "text-c-3 -rotate-90",
|
|
56
72
|
icon: "ArrowRight",
|
|
57
73
|
size: "sm"
|
|
@@ -60,12 +76,12 @@ const A = { class: "flex w-full flex-col gap-3" }, B = { class: "gap-3 rounded b
|
|
|
60
76
|
_: 1
|
|
61
77
|
}, 8, ["onClick"])
|
|
62
78
|
]),
|
|
63
|
-
|
|
79
|
+
c(l(x), {
|
|
64
80
|
class: "max-h-8 text-xs p-0 px-3",
|
|
65
|
-
onClick:
|
|
81
|
+
onClick: p
|
|
66
82
|
}, {
|
|
67
|
-
default:
|
|
68
|
-
|
|
83
|
+
default: f(() => [
|
|
84
|
+
h(" Import Collection ")
|
|
69
85
|
]),
|
|
70
86
|
_: 1
|
|
71
87
|
})
|
|
@@ -74,5 +90,5 @@ const A = { class: "flex w-full flex-col gap-3" }, B = { class: "gap-3 rounded b
|
|
|
74
90
|
}
|
|
75
91
|
});
|
|
76
92
|
export {
|
|
77
|
-
|
|
93
|
+
G as default
|
|
78
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteRequest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteRequest.vue"],"names":[],"mappings":";;;;;AAmiBA,wBAMG"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { defineComponent as K, ref as d, computed as v, onMounted as
|
|
2
|
-
import
|
|
3
|
-
import { useWorkspace as
|
|
1
|
+
import { defineComponent as K, ref as d, computed as v, onMounted as W, openBlock as k, createElementBlock as P, createElementVNode as n, withDirectives as $, withKeys as G, withModifiers as H, vModelText as L, createVNode as s, unref as u, withCtx as r, normalizeClass as M, toDisplayString as S, createBlock as O, createCommentVNode as A, createTextVNode as J } from "vue";
|
|
2
|
+
import Q from "../HttpMethod/HttpMethod.vue.js";
|
|
3
|
+
import { useWorkspace as X } from "../../store/workspace.js";
|
|
4
4
|
import { ScalarListbox as U, ScalarButton as p, ScalarIcon as N } from "@scalar/components";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { useToasts as Y } from "@scalar/use-toasts";
|
|
6
|
+
import { useRouter as Z } from "vue-router";
|
|
7
|
+
const ee = { class: "flex w-full flex-col gap-3" }, te = { class: "gap-3 rounded bg-b-2 focus-within:bg-b-1 focus-within:shadow-border min-h-20 relative" }, le = /* @__PURE__ */ n("label", {
|
|
7
8
|
class: "absolute w-full h-full opacity-0 cursor-text",
|
|
8
9
|
for: "requestname"
|
|
9
|
-
}, null, -1),
|
|
10
|
+
}, null, -1), ae = ["onKeydown"], oe = { class: "flex" }, se = { class: "flex flex-1 gap-2 max-h-8" }, me = /* @__PURE__ */ K({
|
|
10
11
|
__name: "CommandPaletteRequest",
|
|
11
12
|
emits: ["close"],
|
|
12
|
-
setup(
|
|
13
|
-
var
|
|
14
|
-
const I = R, { push: B } =
|
|
15
|
-
activeCollection:
|
|
16
|
-
activeWorkspace:
|
|
13
|
+
setup(ue, { emit: R }) {
|
|
14
|
+
var C, q;
|
|
15
|
+
const I = R, { push: B } = Z(), { toast: D } = Y(), {
|
|
16
|
+
activeCollection: E,
|
|
17
|
+
activeWorkspace: T,
|
|
17
18
|
activeWorkspaceCollections: h,
|
|
18
19
|
requestMutators: j,
|
|
19
20
|
activeRequest: z,
|
|
20
21
|
folders: x
|
|
21
|
-
} =
|
|
22
|
+
} = X(), a = d(""), m = d("GET"), c = d(((C = E.value) == null ? void 0 : C.uid) ?? ""), b = v(
|
|
22
23
|
() => h.value.map((e) => {
|
|
23
24
|
var t;
|
|
24
25
|
return {
|
|
@@ -26,12 +27,12 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
26
27
|
label: ((t = e.spec.info) == null ? void 0 : t.title) ?? "Unititled Collection"
|
|
27
28
|
};
|
|
28
29
|
})
|
|
29
|
-
),
|
|
30
|
+
), i = v({
|
|
30
31
|
get: () => b.value.find(({ id: e }) => e === c.value),
|
|
31
32
|
set: (e) => {
|
|
32
33
|
e != null && e.id && (c.value = e.id);
|
|
33
34
|
}
|
|
34
|
-
}),
|
|
35
|
+
}), f = v(
|
|
35
36
|
() => h.value.flatMap(
|
|
36
37
|
(e) => e.uid === c.value ? e.childUids.flatMap((t) => {
|
|
37
38
|
const l = x[t];
|
|
@@ -50,42 +51,46 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
50
51
|
return e.childUids.includes((t = z.value) == null ? void 0 : t.uid);
|
|
51
52
|
}
|
|
52
53
|
)) == null ? void 0 : q.uid) ?? ""
|
|
53
|
-
),
|
|
54
|
-
get: () =>
|
|
54
|
+
), o = v({
|
|
55
|
+
get: () => f.value.find(({ id: e }) => e === _.value),
|
|
55
56
|
set: (e) => {
|
|
56
57
|
e != null && e.id && (_.value = e.id);
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
60
|
function F(e) {
|
|
60
|
-
|
|
61
|
+
m.value = e;
|
|
61
62
|
}
|
|
62
63
|
const w = () => {
|
|
63
64
|
var l, y, V;
|
|
64
|
-
if (!
|
|
65
|
-
|
|
65
|
+
if (!a.value.trim()) {
|
|
66
|
+
D("Please enter a name before creating a request.", "error");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (!c.value && !((l = o.value) != null && l.id)) return;
|
|
70
|
+
const e = ((y = o.value) == null ? void 0 : y.id) ?? ((V = i.value) == null ? void 0 : V.id), t = j.add(
|
|
66
71
|
{
|
|
67
72
|
path: "",
|
|
68
|
-
method:
|
|
69
|
-
description:
|
|
70
|
-
operationId:
|
|
71
|
-
summary:
|
|
73
|
+
method: m.value.toUpperCase(),
|
|
74
|
+
description: a.value,
|
|
75
|
+
operationId: a.value,
|
|
76
|
+
summary: a.value,
|
|
72
77
|
tags: ["default"]
|
|
73
78
|
},
|
|
74
79
|
e
|
|
75
80
|
);
|
|
76
|
-
B(`/workspace/${
|
|
77
|
-
},
|
|
78
|
-
return
|
|
81
|
+
B(`/workspace/${T.value.uid}/request/${t.uid}`), I("close");
|
|
82
|
+
}, g = d(null);
|
|
83
|
+
return W(() => {
|
|
79
84
|
var e;
|
|
80
|
-
(e =
|
|
81
|
-
}), (e, t) => (k(),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
$(
|
|
85
|
+
(e = g.value) == null || e.focus();
|
|
86
|
+
}), (e, t) => (k(), P("div", ee, [
|
|
87
|
+
n("div", te, [
|
|
88
|
+
le,
|
|
89
|
+
$(n("input", {
|
|
85
90
|
id: "requestname",
|
|
86
91
|
ref_key: "requestInput",
|
|
87
|
-
ref:
|
|
88
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) =>
|
|
92
|
+
ref: g,
|
|
93
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => a.value = l),
|
|
89
94
|
autocomplete: "off",
|
|
90
95
|
class: "border-transparent outline-none w-full pl-8 text-sm min-h-8 py-1.5",
|
|
91
96
|
"data-form-type": "other",
|
|
@@ -93,33 +98,33 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
93
98
|
label: "Request Name",
|
|
94
99
|
placeholder: "Request Name",
|
|
95
100
|
onKeydown: G(H(w, ["prevent"]), ["enter"])
|
|
96
|
-
}, null, 40,
|
|
97
|
-
[L,
|
|
101
|
+
}, null, 40, ae), [
|
|
102
|
+
[L, a.value]
|
|
98
103
|
])
|
|
99
104
|
]),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
n("div", oe, [
|
|
106
|
+
n("div", se, [
|
|
107
|
+
s(Q, {
|
|
103
108
|
isEditable: !0,
|
|
104
109
|
isSquare: "",
|
|
105
|
-
method:
|
|
110
|
+
method: m.value,
|
|
106
111
|
onChange: F
|
|
107
112
|
}, null, 8, ["method"]),
|
|
108
|
-
|
|
109
|
-
modelValue:
|
|
110
|
-
"onUpdate:modelValue": t[1] || (t[1] = (l) =>
|
|
113
|
+
s(u(U), {
|
|
114
|
+
modelValue: i.value,
|
|
115
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => i.value = l),
|
|
111
116
|
options: b.value
|
|
112
117
|
}, {
|
|
113
118
|
default: r(() => [
|
|
114
|
-
|
|
119
|
+
s(u(p), {
|
|
115
120
|
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
116
121
|
variant: "outlined"
|
|
117
122
|
}, {
|
|
118
123
|
default: r(() => [
|
|
119
|
-
|
|
120
|
-
class: M(
|
|
121
|
-
}, S(
|
|
122
|
-
|
|
124
|
+
n("span", {
|
|
125
|
+
class: M(i.value ? "text-c-1" : "text-c-3")
|
|
126
|
+
}, S(i.value ? i.value.label : "Select Collection"), 3),
|
|
127
|
+
s(u(N), {
|
|
123
128
|
class: "text-c-3",
|
|
124
129
|
icon: "ChevronDown",
|
|
125
130
|
size: "xs"
|
|
@@ -130,22 +135,22 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
130
135
|
]),
|
|
131
136
|
_: 1
|
|
132
137
|
}, 8, ["modelValue", "options"]),
|
|
133
|
-
|
|
138
|
+
f.value.length ? (k(), O(u(U), {
|
|
134
139
|
key: 0,
|
|
135
|
-
modelValue:
|
|
136
|
-
"onUpdate:modelValue": t[2] || (t[2] = (l) =>
|
|
137
|
-
options:
|
|
140
|
+
modelValue: o.value,
|
|
141
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => o.value = l),
|
|
142
|
+
options: f.value
|
|
138
143
|
}, {
|
|
139
144
|
default: r(() => [
|
|
140
|
-
|
|
145
|
+
s(u(p), {
|
|
141
146
|
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
142
147
|
variant: "outlined"
|
|
143
148
|
}, {
|
|
144
149
|
default: r(() => [
|
|
145
|
-
|
|
146
|
-
class: M(
|
|
147
|
-
}, S(
|
|
148
|
-
|
|
150
|
+
n("span", {
|
|
151
|
+
class: M(o.value ? "text-c-1" : "text-c-3")
|
|
152
|
+
}, S(o.value ? o.value.label : "Select Folder"), 3),
|
|
153
|
+
s(u(N), {
|
|
149
154
|
class: "text-c-3",
|
|
150
155
|
icon: "ChevronDown",
|
|
151
156
|
size: "xs"
|
|
@@ -155,21 +160,22 @@ const Y = { class: "flex w-full flex-col gap-3" }, Z = { class: "gap-3 rounded b
|
|
|
155
160
|
})
|
|
156
161
|
]),
|
|
157
162
|
_: 1
|
|
158
|
-
}, 8, ["modelValue", "options"])) :
|
|
163
|
+
}, 8, ["modelValue", "options"])) : A("", !0)
|
|
159
164
|
]),
|
|
160
|
-
|
|
165
|
+
s(u(p), {
|
|
161
166
|
class: "max-h-8 text-xs p-0 px-3",
|
|
167
|
+
disabled: !a.value.trim(),
|
|
162
168
|
onClick: w
|
|
163
169
|
}, {
|
|
164
170
|
default: r(() => [
|
|
165
|
-
|
|
171
|
+
J(" Create Request ")
|
|
166
172
|
]),
|
|
167
173
|
_: 1
|
|
168
|
-
})
|
|
174
|
+
}, 8, ["disabled"])
|
|
169
175
|
])
|
|
170
176
|
]));
|
|
171
177
|
}
|
|
172
178
|
});
|
|
173
179
|
export {
|
|
174
|
-
|
|
180
|
+
me as default
|
|
175
181
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import o from "./TheCommandPalette.vue2.js";
|
|
2
|
-
import { PaletteComponents as
|
|
2
|
+
import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-27c7a3a7"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
s as PaletteComponents,
|
|
8
|
+
r as default
|
|
9
9
|
};
|