@scalar/api-client 2.1.10 → 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 +39 -0
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +18 -18
- 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/router.js +1 -1
- 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/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +82 -88
- 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 +106 -97
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +26 -26
- 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 +13 -8
- package/dist/views/Components/Schemas/Schemas.vue.d.ts +0 -3
- package/dist/views/Components/Schemas/Schemas.vue.d.ts.map +0 -1
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { defineComponent as w, ref as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { useToasts as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as w, ref as b, openBlock as F, createBlock as h, withCtx as l, createVNode as c, unref as i, createTextVNode as p } from "vue";
|
|
2
|
+
import { ScalarButton as y, ScalarIcon as C } from "@scalar/components";
|
|
3
|
+
import { useToasts as I } from "@scalar/use-toasts";
|
|
4
|
+
import U from "./CommandActionForm.vue.js";
|
|
5
5
|
import V from "./CommandActionInput.vue.js";
|
|
6
6
|
import { useFileDialog as R } from "../../hooks/useFileDialog.js";
|
|
7
7
|
import { useWorkspace as $ } from "../../store/store.js";
|
|
8
|
-
const
|
|
8
|
+
const O = /* @__PURE__ */ w({
|
|
9
9
|
__name: "CommandPaletteImport",
|
|
10
|
-
emits: ["close"],
|
|
10
|
+
emits: ["close", "back"],
|
|
11
11
|
setup(A, { emit: u }) {
|
|
12
|
-
const
|
|
12
|
+
const n = u, { activeWorkspace: f, importSpecFile: d, importSpecFromUrl: g } = $(), r = b(""), { toast: a } = I(), { open: k } = R({
|
|
13
13
|
onChange: async (e) => {
|
|
14
14
|
const o = e == null ? void 0 : e[0];
|
|
15
15
|
if (o) {
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const t = new FileReader();
|
|
17
|
+
t.onload = async (S) => {
|
|
18
18
|
var m;
|
|
19
|
-
const
|
|
19
|
+
const _ = (m = S.target) == null ? void 0 : m.result;
|
|
20
20
|
try {
|
|
21
|
-
await d(
|
|
21
|
+
await d(_, f.value.uid), a("Import successful", "info"), n("close");
|
|
22
22
|
} catch (s) {
|
|
23
23
|
console.error(s);
|
|
24
24
|
const v = (s == null ? void 0 : s.message) || "Unknown error";
|
|
25
|
-
|
|
25
|
+
a(`Import failed: ${v}`, "error");
|
|
26
26
|
}
|
|
27
|
-
},
|
|
27
|
+
}, t.readAsText(o);
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
multiple: !1,
|
|
31
31
|
accept: ".json,.yaml,.yml"
|
|
32
32
|
}), x = async () => {
|
|
33
|
-
if (
|
|
33
|
+
if (r.value)
|
|
34
34
|
try {
|
|
35
|
-
await g(
|
|
35
|
+
await g(r.value), a("Import successful", "info"), n("close");
|
|
36
36
|
} catch (e) {
|
|
37
37
|
console.error("the error ", e);
|
|
38
38
|
const o = (e == null ? void 0 : e.message) || "Unknown error";
|
|
39
|
-
|
|
39
|
+
a(`Import failed: ${o}`, "error");
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
return (e, o) => (F(),
|
|
42
|
+
return (e, o) => (F(), h(U, { onSubmit: x }, {
|
|
43
43
|
options: l(() => [
|
|
44
|
-
|
|
44
|
+
c(i(y), {
|
|
45
45
|
class: "p-2 max-h-8 gap-1 text-xs hover:bg-b-2 relative",
|
|
46
46
|
variant: "outlined",
|
|
47
|
-
onClick:
|
|
47
|
+
onClick: i(k)
|
|
48
48
|
}, {
|
|
49
49
|
default: l(() => [
|
|
50
50
|
p(" JSON, or YAML Files "),
|
|
51
|
-
|
|
51
|
+
c(i(C), {
|
|
52
52
|
class: "text-c-3 -rotate-90",
|
|
53
53
|
icon: "ArrowRight",
|
|
54
54
|
size: "sm"
|
|
@@ -61,11 +61,12 @@ const W = /* @__PURE__ */ w({
|
|
|
61
61
|
p("Import Collection")
|
|
62
62
|
]),
|
|
63
63
|
default: l(() => [
|
|
64
|
-
|
|
65
|
-
modelValue:
|
|
66
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
64
|
+
c(V, {
|
|
65
|
+
modelValue: r.value,
|
|
66
|
+
"onUpdate:modelValue": o[0] || (o[0] = (t) => r.value = t),
|
|
67
67
|
label: "Paste Swagger File URL",
|
|
68
|
-
placeholder: "Paste Swagger File URL"
|
|
68
|
+
placeholder: "Paste Swagger File URL",
|
|
69
|
+
onOnDelete: o[1] || (o[1] = (t) => n("back", t))
|
|
69
70
|
}, null, 8, ["modelValue"])
|
|
70
71
|
]),
|
|
71
72
|
_: 1
|
|
@@ -73,5 +74,5 @@ const W = /* @__PURE__ */ w({
|
|
|
73
74
|
}
|
|
74
75
|
});
|
|
75
76
|
export {
|
|
76
|
-
|
|
77
|
+
O as default
|
|
77
78
|
};
|
|
@@ -5,12 +5,14 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
5
5
|
};
|
|
6
6
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
close: () => void;
|
|
8
|
+
back: (e: KeyboardEvent) => void;
|
|
8
9
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
9
10
|
metaData?: {
|
|
10
11
|
itemUid: string;
|
|
11
12
|
parentUid: string;
|
|
12
13
|
};
|
|
13
14
|
}>>> & {
|
|
15
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
14
16
|
onClose?: (() => any) | undefined;
|
|
15
17
|
}, {}, {}>;
|
|
16
18
|
export default _default;
|
|
@@ -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":";eAkMa;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;;eAHU;QACT,OAAO,EAAE,MAAM,CAAA;QACf,SAAS,EAAE,MAAM,CAAA;KAClB;;;;;AAqVH,wBAOG;AAOH,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,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
|
};
|