@scalar/api-client 2.1.11 → 2.1.12
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 +24 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.js +27 -23
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +32 -31
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +43 -42
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +26 -25
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.js +31 -30
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +35 -34
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +28 -27
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +18 -17
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +14 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +112 -103
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +7 -0
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/DropEventListener.vue.js +75 -0
- package/dist/components/ImportCollection/DropEventListener.vue2.js +4 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts +12 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +30 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +4 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +20 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +101 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue2.js +4 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +22 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.js +85 -0
- package/dist/components/ImportCollection/ImportNowButton.vue2.js +4 -0
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +16 -0
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts +19 -0
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +7 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.js +24 -0
- package/dist/components/ImportCollection/PasteEventListener.vue2.js +4 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +7 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +15 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +4 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +28 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +55 -0
- package/dist/components/ImportCollection/index.d.ts +2 -0
- package/dist/components/ImportCollection/index.d.ts.map +1 -0
- package/dist/components/ImportCollection/index.js +4 -0
- package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts +5 -0
- package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/getOpenApiDocumentVersion.js +20 -0
- package/dist/components/ImportCollection/utils/isDocument.d.ts +3 -0
- package/dist/components/ImportCollection/utils/isDocument.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/isDocument.js +7 -0
- package/dist/components/ImportCollection/utils/isUrl.d.ts +3 -0
- package/dist/components/ImportCollection/utils/isUrl.d.ts.map +1 -0
- package/dist/components/ImportCollection/utils/isUrl.js +6 -0
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +1 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +129 -2
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +258 -4
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +130 -2
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +54 -41
- package/dist/libs/send-request.d.ts +37 -1
- package/dist/libs/send-request.d.ts.map +1 -1
- package/dist/libs/send-request.js +24 -19
- package/dist/store/import-spec.d.ts +128 -2
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +24 -23
- package/dist/store/store.d.ts +256 -4
- package/dist/store/store.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 +1 -1
- 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 +14 -14
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +39 -39
- package/package.json +14 -9
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineComponent as P, ref as c, computed as
|
|
1
|
+
import { defineComponent as P, 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 V, toDisplayString as q, createCommentVNode as W, createTextVNode as j } from "vue";
|
|
2
2
|
import E from "../HttpMethod/HttpMethod.vue.js";
|
|
3
|
-
import { ScalarListbox as
|
|
3
|
+
import { ScalarListbox as D, ScalarButton as _, ScalarIcon as k } from "@scalar/components";
|
|
4
4
|
import { useToasts as H } from "@scalar/use-toasts";
|
|
5
5
|
import { useRouter as I } from "vue-router";
|
|
6
6
|
import L from "./CommandActionForm.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import { isHTTPMethod as
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
const
|
|
7
|
+
import O from "./CommandActionInput.vue.js";
|
|
8
|
+
import { isHTTPMethod as A } from "../HttpMethod/helpers.js";
|
|
9
|
+
import { useWorkspace as F } from "../../store/store.js";
|
|
10
|
+
const G = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
11
11
|
__name: "CommandPaletteRequest",
|
|
12
12
|
props: {
|
|
13
13
|
metaData: {}
|
|
14
14
|
},
|
|
15
|
-
emits: ["close"],
|
|
16
|
-
setup(
|
|
17
|
-
const r =
|
|
15
|
+
emits: ["close", "back"],
|
|
16
|
+
setup(w, { emit: S }) {
|
|
17
|
+
const r = w, b = S, { push: M } = I(), { toast: N } = H(), {
|
|
18
18
|
activeCollection: R,
|
|
19
19
|
activeWorkspace: U,
|
|
20
|
-
activeWorkspaceCollections:
|
|
20
|
+
activeWorkspaceCollections: g,
|
|
21
21
|
requestMutators: T,
|
|
22
22
|
activeRequest: y,
|
|
23
23
|
tags: $
|
|
24
|
-
} =
|
|
25
|
-
() =>
|
|
24
|
+
} = F(), o = c(""), d = c("get"), v = x(
|
|
25
|
+
() => g.value.map((t) => {
|
|
26
26
|
var e;
|
|
27
27
|
return {
|
|
28
28
|
id: t.uid,
|
|
29
29
|
label: ((e = t.info) == null ? void 0 : e.title) ?? "Unititled Collection"
|
|
30
30
|
};
|
|
31
31
|
})
|
|
32
|
-
), m =
|
|
33
|
-
() =>
|
|
32
|
+
), m = x(
|
|
33
|
+
() => g.value.flatMap(
|
|
34
34
|
(t) => {
|
|
35
35
|
var e;
|
|
36
36
|
return t.uid === ((e = l.value) == null ? void 0 : e.id) ? t.tags.flatMap((a) => {
|
|
@@ -70,7 +70,7 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
70
70
|
N("Please enter a name before creating a request.", "error");
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
if (!((e = l.value) != null && e.id) || !
|
|
73
|
+
if (!((e = l.value) != null && e.id) || !A(d.value))
|
|
74
74
|
return;
|
|
75
75
|
const t = T.add(
|
|
76
76
|
{
|
|
@@ -83,23 +83,23 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
83
83
|
},
|
|
84
84
|
l.value.id
|
|
85
85
|
);
|
|
86
|
-
t && M(`/workspace/${U.value.uid}/request/${t.uid}`),
|
|
86
|
+
t && M(`/workspace/${U.value.uid}/request/${t.uid}`), b("close");
|
|
87
87
|
};
|
|
88
|
-
return (t, e) => (
|
|
88
|
+
return (t, e) => (h(), C(L, {
|
|
89
89
|
disabled: !o.value.trim(),
|
|
90
90
|
onSubmit: B
|
|
91
91
|
}, {
|
|
92
92
|
options: u(() => [
|
|
93
|
-
f("div",
|
|
93
|
+
f("div", G, [
|
|
94
94
|
i(E, {
|
|
95
95
|
isEditable: !0,
|
|
96
96
|
isSquare: "",
|
|
97
97
|
method: d.value,
|
|
98
98
|
onChange: z
|
|
99
99
|
}, null, 8, ["method"]),
|
|
100
|
-
i(n(
|
|
100
|
+
i(n(D), {
|
|
101
101
|
modelValue: l.value,
|
|
102
|
-
"onUpdate:modelValue": e[
|
|
102
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => l.value = a),
|
|
103
103
|
options: v.value
|
|
104
104
|
}, {
|
|
105
105
|
default: u(() => [
|
|
@@ -109,9 +109,9 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
109
109
|
}, {
|
|
110
110
|
default: u(() => [
|
|
111
111
|
f("span", {
|
|
112
|
-
class:
|
|
113
|
-
},
|
|
114
|
-
i(n(
|
|
112
|
+
class: V(l.value ? "text-c-1" : "text-c-3")
|
|
113
|
+
}, q(l.value ? l.value.label : "Select Collection"), 3),
|
|
114
|
+
i(n(k), {
|
|
115
115
|
class: "text-c-3",
|
|
116
116
|
icon: "ChevronDown",
|
|
117
117
|
size: "xs"
|
|
@@ -122,10 +122,10 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
122
122
|
]),
|
|
123
123
|
_: 1
|
|
124
124
|
}, 8, ["modelValue", "options"]),
|
|
125
|
-
m.value.length ? (
|
|
125
|
+
m.value.length ? (h(), C(n(D), {
|
|
126
126
|
key: 0,
|
|
127
127
|
modelValue: s.value,
|
|
128
|
-
"onUpdate:modelValue": e[
|
|
128
|
+
"onUpdate:modelValue": e[3] || (e[3] = (a) => s.value = a),
|
|
129
129
|
options: m.value
|
|
130
130
|
}, {
|
|
131
131
|
default: u(() => [
|
|
@@ -135,9 +135,9 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
135
135
|
}, {
|
|
136
136
|
default: u(() => [
|
|
137
137
|
f("span", {
|
|
138
|
-
class:
|
|
139
|
-
},
|
|
140
|
-
i(n(
|
|
138
|
+
class: V(s.value ? "text-c-1" : "text-c-3")
|
|
139
|
+
}, q(s.value ? s.value.label : "Select Tag"), 3),
|
|
140
|
+
i(n(k), {
|
|
141
141
|
class: "text-c-3",
|
|
142
142
|
icon: "ChevronDown",
|
|
143
143
|
size: "xs"
|
|
@@ -154,11 +154,12 @@ const J = { class: "flex gap-2" }, le = /* @__PURE__ */ P({
|
|
|
154
154
|
j("Create Request")
|
|
155
155
|
]),
|
|
156
156
|
default: u(() => [
|
|
157
|
-
i(
|
|
157
|
+
i(O, {
|
|
158
158
|
modelValue: o.value,
|
|
159
159
|
"onUpdate:modelValue": e[0] || (e[0] = (a) => o.value = a),
|
|
160
160
|
label: "Request Name",
|
|
161
|
-
placeholder: "Request Name"
|
|
161
|
+
placeholder: "Request Name",
|
|
162
|
+
onOnDelete: e[1] || (e[1] = (a) => b("back", a))
|
|
162
163
|
}, null, 8, ["modelValue"])
|
|
163
164
|
]),
|
|
164
165
|
_: 1
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
close: () => void;
|
|
3
|
+
back: (e: KeyboardEvent) => void;
|
|
3
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
4
6
|
onClose?: (() => any) | undefined;
|
|
5
7
|
}, {}, {}>;
|
|
6
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":";;;;;;;AAyTA,wBAMG"}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { defineComponent as S, ref as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { useToasts as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useWorkspace as
|
|
1
|
+
import { defineComponent as S, ref as c, computed as C, openBlock as V, createBlock as _, withCtx as r, createVNode as i, unref as s, createElementVNode as U, normalizeClass as k, toDisplayString as g, createTextVNode as w } from "vue";
|
|
2
|
+
import { ScalarListbox as D, ScalarButton as B, ScalarIcon as L } from "@scalar/components";
|
|
3
|
+
import { useToasts as M } from "@scalar/use-toasts";
|
|
4
|
+
import N from "./CommandActionForm.vue.js";
|
|
5
|
+
import y from "./CommandActionInput.vue.js";
|
|
6
|
+
import { useWorkspace as z } from "../../store/store.js";
|
|
7
7
|
const E = /* @__PURE__ */ S({
|
|
8
8
|
__name: "CommandPaletteServer",
|
|
9
|
-
emits: ["close"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
9
|
+
emits: ["close", "back"],
|
|
10
|
+
setup(P, { emit: d }) {
|
|
11
|
+
const n = d, { toast: m } = M(), {
|
|
12
12
|
activeCollection: v,
|
|
13
13
|
activeWorkspaceCollections: f,
|
|
14
14
|
collectionMutators: p,
|
|
15
15
|
serverMutators: b
|
|
16
|
-
} =
|
|
16
|
+
} = z(), a = c(""), u = C(
|
|
17
17
|
() => f.value.flatMap(
|
|
18
|
-
(
|
|
19
|
-
var e,
|
|
20
|
-
return ((e =
|
|
21
|
-
id:
|
|
22
|
-
label: ((
|
|
18
|
+
(l) => {
|
|
19
|
+
var e, t;
|
|
20
|
+
return ((e = l.info) == null ? void 0 : e.title) === "Drafts" ? [] : {
|
|
21
|
+
id: l.uid,
|
|
22
|
+
label: ((t = l.info) == null ? void 0 : t.title) ?? "Unititled Collection"
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
)
|
|
26
|
-
), o =
|
|
27
|
-
|
|
28
|
-
(
|
|
26
|
+
), o = c(
|
|
27
|
+
u.value.find(
|
|
28
|
+
(l) => {
|
|
29
29
|
var e;
|
|
30
|
-
return
|
|
30
|
+
return l.id === ((e = v.value) == null ? void 0 : e.uid);
|
|
31
31
|
}
|
|
32
32
|
)
|
|
33
33
|
), x = () => {
|
|
34
|
-
var
|
|
34
|
+
var t;
|
|
35
35
|
if (!a.value.trim()) {
|
|
36
36
|
m("Please enter a valid url before creating a server.", "error");
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
if (!
|
|
41
|
-
const e = b.add({ url: a.value },
|
|
42
|
-
p.edit(
|
|
39
|
+
const l = (t = o.value) == null ? void 0 : t.id;
|
|
40
|
+
if (!l) return;
|
|
41
|
+
const e = b.add({ url: a.value }, l);
|
|
42
|
+
p.edit(l, "selectedServerUid", e.uid), n("close");
|
|
43
43
|
};
|
|
44
|
-
return (
|
|
44
|
+
return (l, e) => (V(), _(N, {
|
|
45
45
|
disabled: !a.value.trim(),
|
|
46
46
|
onSubmit: x
|
|
47
47
|
}, {
|
|
48
48
|
options: r(() => [
|
|
49
|
-
i(s(
|
|
49
|
+
i(s(D), {
|
|
50
50
|
modelValue: o.value,
|
|
51
|
-
"onUpdate:modelValue": e[
|
|
52
|
-
options:
|
|
51
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => o.value = t),
|
|
52
|
+
options: u.value
|
|
53
53
|
}, {
|
|
54
54
|
default: r(() => [
|
|
55
55
|
i(s(B), {
|
|
@@ -58,9 +58,9 @@ const E = /* @__PURE__ */ S({
|
|
|
58
58
|
}, {
|
|
59
59
|
default: r(() => [
|
|
60
60
|
U("span", {
|
|
61
|
-
class:
|
|
62
|
-
},
|
|
63
|
-
i(s(
|
|
61
|
+
class: k(o.value ? "text-c-1" : "text-c-3")
|
|
62
|
+
}, g(o.value ? o.value.label : "Select Collection"), 3),
|
|
63
|
+
i(s(L), {
|
|
64
64
|
class: "text-c-3",
|
|
65
65
|
icon: "ChevronDown",
|
|
66
66
|
size: "xs"
|
|
@@ -76,11 +76,12 @@ const E = /* @__PURE__ */ S({
|
|
|
76
76
|
w("Create Server")
|
|
77
77
|
]),
|
|
78
78
|
default: r(() => [
|
|
79
|
-
i(
|
|
79
|
+
i(y, {
|
|
80
80
|
modelValue: a.value,
|
|
81
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
81
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => a.value = t),
|
|
82
82
|
label: "Server URL",
|
|
83
|
-
placeholder: "Server URL"
|
|
83
|
+
placeholder: "Server URL",
|
|
84
|
+
onOnDelete: e[1] || (e[1] = (t) => n("back", t))
|
|
84
85
|
}, null, 8, ["modelValue"])
|
|
85
86
|
]),
|
|
86
87
|
_: 1
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
close: () => void;
|
|
3
|
+
back: (e: KeyboardEvent) => void;
|
|
3
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
4
6
|
onClose?: (() => any) | undefined;
|
|
5
7
|
}, {}, {}>;
|
|
6
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteTag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteTag.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteTag.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteTag.vue"],"names":[],"mappings":";;;;;;;AAmSA,wBAMG"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as g, computed as x, ref as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { useToasts as
|
|
1
|
+
import { defineComponent as g, computed as x, ref as m, openBlock as C, createBlock as V, withCtx as n, createVNode as s, unref as i, createElementVNode as _, normalizeClass as S, toDisplayString as k, createTextVNode as T } from "vue";
|
|
2
|
+
import { ScalarListbox as N, ScalarButton as w, ScalarIcon as B } from "@scalar/components";
|
|
3
|
+
import { useToasts as D } from "@scalar/use-toasts";
|
|
4
4
|
import y from "./CommandActionForm.vue.js";
|
|
5
5
|
import z from "./CommandActionInput.vue.js";
|
|
6
|
-
import { useWorkspace as
|
|
6
|
+
import { useWorkspace as P } from "../../store/store.js";
|
|
7
7
|
const L = /* @__PURE__ */ g({
|
|
8
8
|
__name: "CommandPaletteTag",
|
|
9
|
-
emits: ["close"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
9
|
+
emits: ["close", "back"],
|
|
10
|
+
setup(U, { emit: c }) {
|
|
11
|
+
const r = c, { activeWorkspaceCollections: d, activeCollection: p, tagMutators: f } = P(), { toast: v } = D(), u = x(
|
|
12
12
|
() => d.value.map((l) => {
|
|
13
13
|
var e;
|
|
14
14
|
return {
|
|
@@ -16,8 +16,8 @@ const L = /* @__PURE__ */ g({
|
|
|
16
16
|
label: ((e = l.info) == null ? void 0 : e.title) ?? ""
|
|
17
17
|
};
|
|
18
18
|
})
|
|
19
|
-
), t =
|
|
20
|
-
|
|
19
|
+
), t = m(""), a = m(
|
|
20
|
+
u.value.find(
|
|
21
21
|
(l) => {
|
|
22
22
|
var e;
|
|
23
23
|
return l.id === ((e = p.value) == null ? void 0 : e.uid);
|
|
@@ -34,28 +34,28 @@ const L = /* @__PURE__ */ g({
|
|
|
34
34
|
name: t.value
|
|
35
35
|
},
|
|
36
36
|
a.value.id
|
|
37
|
-
) &&
|
|
37
|
+
) && r("close");
|
|
38
38
|
};
|
|
39
|
-
return (l, e) => (C(),
|
|
39
|
+
return (l, e) => (C(), V(y, {
|
|
40
40
|
disabled: !t.value.trim(),
|
|
41
41
|
onSubmit: b
|
|
42
42
|
}, {
|
|
43
|
-
options:
|
|
44
|
-
|
|
43
|
+
options: n(() => [
|
|
44
|
+
s(i(N), {
|
|
45
45
|
modelValue: a.value,
|
|
46
|
-
"onUpdate:modelValue": e[
|
|
47
|
-
options:
|
|
46
|
+
"onUpdate:modelValue": e[2] || (e[2] = (o) => a.value = o),
|
|
47
|
+
options: u.value
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
49
|
+
default: n(() => [
|
|
50
|
+
s(i(w), {
|
|
51
51
|
class: "justify-between p-2 max-h-8 w-full gap-1 text-xs hover:bg-b-2",
|
|
52
52
|
variant: "outlined"
|
|
53
53
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
|
|
54
|
+
default: n(() => [
|
|
55
|
+
_("span", {
|
|
56
56
|
class: S(a.value ? "text-c-1" : "text-c-3")
|
|
57
|
-
},
|
|
58
|
-
|
|
57
|
+
}, k(a.value ? a.value.label : "Select Collection"), 3),
|
|
58
|
+
s(i(B), {
|
|
59
59
|
class: "text-c-3",
|
|
60
60
|
icon: "ChevronDown",
|
|
61
61
|
size: "xs"
|
|
@@ -67,15 +67,16 @@ const L = /* @__PURE__ */ g({
|
|
|
67
67
|
_: 1
|
|
68
68
|
}, 8, ["modelValue", "options"])
|
|
69
69
|
]),
|
|
70
|
-
submit:
|
|
71
|
-
|
|
70
|
+
submit: n(() => [
|
|
71
|
+
T("Create Tag")
|
|
72
72
|
]),
|
|
73
|
-
default:
|
|
74
|
-
|
|
73
|
+
default: n(() => [
|
|
74
|
+
s(z, {
|
|
75
75
|
modelValue: t.value,
|
|
76
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
76
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => t.value = o),
|
|
77
77
|
label: "Tag Name",
|
|
78
|
-
placeholder: "Tag Name"
|
|
78
|
+
placeholder: "Tag Name",
|
|
79
|
+
onOnDelete: e[1] || (e[1] = (o) => r("back", o))
|
|
79
80
|
}, null, 8, ["modelValue"])
|
|
80
81
|
]),
|
|
81
82
|
_: 1
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
close: () => void;
|
|
3
|
+
back: (e: KeyboardEvent) => void;
|
|
3
4
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
5
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
4
6
|
onClose?: (() => any) | undefined;
|
|
5
7
|
}, {}, {}>;
|
|
6
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;;;AAwKA,wBAMG"}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { defineComponent as u, ref as i, openBlock as d, createBlock as f, withCtx as
|
|
2
|
-
import { useToasts as
|
|
1
|
+
import { defineComponent as u, ref as i, openBlock as d, createBlock as f, withCtx as s, createTextVNode as k, createVNode as b } from "vue";
|
|
2
|
+
import { useToasts as _ } from "@scalar/use-toasts";
|
|
3
3
|
import { useRouter as w } from "vue-router";
|
|
4
4
|
import v from "./CommandActionForm.vue.js";
|
|
5
5
|
import N from "./CommandActionInput.vue.js";
|
|
6
6
|
import { useWorkspace as V } from "../../store/store.js";
|
|
7
|
-
const
|
|
7
|
+
const T = /* @__PURE__ */ u({
|
|
8
8
|
__name: "CommandPaletteWorkspace",
|
|
9
|
-
emits: ["close"],
|
|
10
|
-
setup(W, { emit:
|
|
11
|
-
const
|
|
9
|
+
emits: ["close", "back"],
|
|
10
|
+
setup(W, { emit: m }) {
|
|
11
|
+
const a = m, { push: n } = w(), { toast: l } = _(), { workspaceMutators: c } = V(), e = i(""), p = () => {
|
|
12
12
|
if (!e.value.trim()) {
|
|
13
|
-
|
|
13
|
+
l("Please enter a name before creating a workspace.", "error");
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const r = c.add({
|
|
17
17
|
name: e.value
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
n(`/workspace/${r.uid}`), a("close");
|
|
20
20
|
};
|
|
21
|
-
return (
|
|
21
|
+
return (r, o) => (d(), f(v, {
|
|
22
22
|
disabled: !e.value.trim(),
|
|
23
|
-
onSubmit:
|
|
23
|
+
onSubmit: p
|
|
24
24
|
}, {
|
|
25
|
-
submit:
|
|
25
|
+
submit: s(() => [
|
|
26
26
|
k("Create Workspace")
|
|
27
27
|
]),
|
|
28
|
-
default:
|
|
29
|
-
|
|
28
|
+
default: s(() => [
|
|
29
|
+
b(N, {
|
|
30
30
|
modelValue: e.value,
|
|
31
|
-
"onUpdate:modelValue":
|
|
31
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => e.value = t),
|
|
32
32
|
label: "Workspace Name",
|
|
33
|
-
placeholder: "Workspace Name"
|
|
33
|
+
placeholder: "Workspace Name",
|
|
34
|
+
onOnDelete: o[1] || (o[1] = (t) => a("back", t))
|
|
34
35
|
}, null, 8, ["modelValue"])
|
|
35
36
|
]),
|
|
36
37
|
_: 1
|
|
@@ -38,5 +39,5 @@ const S = /* @__PURE__ */ u({
|
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
T as default
|
|
42
43
|
};
|
|
@@ -8,7 +8,9 @@ export default _default;
|
|
|
8
8
|
export declare const PaletteComponents: {
|
|
9
9
|
readonly 'Import Collection': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
10
|
close: () => void;
|
|
11
|
+
back: (e: KeyboardEvent) => void;
|
|
11
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
13
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
12
14
|
onClose?: (() => any) | undefined;
|
|
13
15
|
}, {}, {}>;
|
|
14
16
|
readonly 'Create Request': import("vue").DefineComponent<{
|
|
@@ -20,6 +22,7 @@ export declare const PaletteComponents: {
|
|
|
20
22
|
};
|
|
21
23
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
24
|
close: () => void;
|
|
25
|
+
back: (e: KeyboardEvent) => void;
|
|
23
26
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
27
|
metaData: {
|
|
25
28
|
type: import("vue").PropType<{
|
|
@@ -28,26 +31,35 @@ export declare const PaletteComponents: {
|
|
|
28
31
|
}>;
|
|
29
32
|
};
|
|
30
33
|
}>> & {
|
|
34
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
31
35
|
onClose?: (() => any) | undefined;
|
|
32
36
|
}, {}, {}>;
|
|
33
37
|
readonly 'Create Workspace': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
38
|
close: () => void;
|
|
39
|
+
back: (e: KeyboardEvent) => void;
|
|
35
40
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
41
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
36
42
|
onClose?: (() => any) | undefined;
|
|
37
43
|
}, {}, {}>;
|
|
38
44
|
readonly 'Add Tag': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
45
|
close: () => void;
|
|
46
|
+
back: (e: KeyboardEvent) => void;
|
|
40
47
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
48
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
41
49
|
onClose?: (() => any) | undefined;
|
|
42
50
|
}, {}, {}>;
|
|
43
51
|
readonly 'Add Server': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
44
52
|
close: () => void;
|
|
53
|
+
back: (e: KeyboardEvent) => void;
|
|
45
54
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
55
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
46
56
|
onClose?: (() => any) | undefined;
|
|
47
57
|
}, {}, {}>;
|
|
48
58
|
readonly 'Create Collection': import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
59
|
close: () => void;
|
|
60
|
+
back: (e: KeyboardEvent) => void;
|
|
50
61
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
62
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
51
63
|
onClose?: (() => any) | undefined;
|
|
52
64
|
}, {}, {}>;
|
|
53
65
|
readonly 'Add Example': import("vue").DefineComponent<{
|
|
@@ -58,6 +70,7 @@ export declare const PaletteComponents: {
|
|
|
58
70
|
};
|
|
59
71
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
60
72
|
close: () => void;
|
|
73
|
+
back: (e: KeyboardEvent) => void;
|
|
61
74
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
75
|
metaData: {
|
|
63
76
|
type: import("vue").PropType<{
|
|
@@ -65,6 +78,7 @@ export declare const PaletteComponents: {
|
|
|
65
78
|
}>;
|
|
66
79
|
};
|
|
67
80
|
}>> & {
|
|
81
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
68
82
|
onClose?: (() => any) | undefined;
|
|
69
83
|
}, {}, {}>;
|
|
70
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAoYA;;;;GAIG;;AACH,wBAubI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CACxD"}
|
|
@@ -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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c08d90be"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
s as PaletteComponents,
|
|
8
|
+
a as default
|
|
9
9
|
};
|