@scalar/api-client 2.1.22 → 2.1.23
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 +25 -0
- package/README.md +22 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +163 -154
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +5 -5
- package/dist/components/DataTable/DataTableText.vue.d.ts +12 -3
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableText.vue.js +13 -9
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +84 -63
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +36 -40
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts +3 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +125 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +4 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +2 -2
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +28 -27
- package/dist/components/SideNav/SideHelp.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +8 -8
- package/dist/data/httpHeaders.d.ts +6 -0
- package/dist/data/httpHeaders.d.ts.map +1 -0
- package/dist/data/httpHeaders.js +537 -0
- package/dist/layouts/App/create-api-client-app.d.ts +8 -8
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +16 -16
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +8 -8
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +8 -8
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/importers/curl.d.ts +25 -1
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +40 -38
- package/dist/libs/parse-curl.d.ts +3 -4
- package/dist/libs/parse-curl.d.ts.map +1 -1
- package/dist/libs/parse-curl.js +58 -55
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/store.d.ts +16 -16
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +21 -21
- 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 +35 -34
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +43 -43
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
- package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +43 -22
- package/package.json +10 -10
|
@@ -1,91 +1,112 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useUrlPrefetcher as
|
|
1
|
+
import { defineComponent as S, computed as a, watch as C, openBlock as l, createBlock as z, unref as o, withCtx as D, createElementVNode as e, toDisplayString as h, createElementBlock as d, createVNode as i, Fragment as F, createCommentVNode as x, createTextVNode as I } from "vue";
|
|
2
|
+
import { useUrlPrefetcher as V } from "./hooks/useUrlPrefetcher.js";
|
|
3
3
|
import { getOpenApiDocumentVersion as _ } from "./utils/getOpenApiDocumentVersion.js";
|
|
4
|
-
import { isDocument as
|
|
5
|
-
import { isUrl as
|
|
6
|
-
import { useModal as
|
|
7
|
-
import { normalize as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
const P = { class: "flex
|
|
4
|
+
import { isDocument as j } from "./utils/isDocument.js";
|
|
5
|
+
import { isUrl as A } from "./utils/isUrl.js";
|
|
6
|
+
import { useModal as B, ScalarModal as E, ScalarIcon as m, ScalarCodeBlock as N } from "@scalar/components";
|
|
7
|
+
import { normalize as O } from "@scalar/openapi-parser";
|
|
8
|
+
import U from "./ImportNowButton.vue.js";
|
|
9
|
+
import M from "./WorkspaceSelector.vue.js";
|
|
10
|
+
import { useWorkspace as $ } from "../../store/store.js";
|
|
11
|
+
const P = { class: "flex flex-col h-screen justify-center overflow-hidden relative" }, T = { class: "flex items-center flex-col m-auto" }, W = { class: "text-center text-[50px] tracking-[-3px] leading-tight font-medium text-pretty" }, K = {
|
|
12
12
|
key: 0,
|
|
13
|
-
class: "flex gap-2 items-center p-3 font-code text-sm border rounded break-words"
|
|
14
|
-
},
|
|
13
|
+
class: "flex gap-2 items-center p-3 font-code text-sm border rounded break-words my-4"
|
|
14
|
+
}, L = { class: "break-all" }, R = { class: "flex gap-2 items-center p-3 font-code text-sm border rounded" }, q = { class: "bg-b-2 h-48 border rounded custom-scroll" }, G = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "inline-flex flex-col gap-2 items-center mt-2"
|
|
17
|
-
},
|
|
17
|
+
}, H = { class: "flex justify-center" }, J = { class: "inline-block py-1 px-4" }, Q = { class: "flex flex-col justify-center items-center pb-4" }, X = { class: "text-center flex items-center flex-col" }, Y = { class: "mb-2 w-10 h-10 border rounded-[10px] flex items-center justify-center" }, ae = /* @__PURE__ */ S({
|
|
18
18
|
__name: "ImportCollectionModal",
|
|
19
19
|
props: {
|
|
20
20
|
source: {}
|
|
21
21
|
},
|
|
22
22
|
emits: ["importFinished"],
|
|
23
23
|
setup(v) {
|
|
24
|
-
const c = v, { activeWorkspace: k, events: g } =
|
|
24
|
+
const c = v, { activeWorkspace: k, events: g } = $(), { prefetchResult: r, prefetchUrl: y } = V(), n = B();
|
|
25
25
|
g.hotKeys.on(() => n.hide());
|
|
26
|
-
const
|
|
26
|
+
const b = a(() => {
|
|
27
27
|
try {
|
|
28
|
-
return
|
|
29
|
-
|
|
28
|
+
return O(
|
|
29
|
+
r.content || c.source || ""
|
|
30
30
|
);
|
|
31
31
|
} catch {
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
}), w =
|
|
35
|
-
var
|
|
36
|
-
return (
|
|
37
|
-
}),
|
|
38
|
-
() => _(
|
|
34
|
+
}), w = a(() => {
|
|
35
|
+
var t, s;
|
|
36
|
+
return (s = (t = b.value) == null ? void 0 : t.info) == null ? void 0 : s.title;
|
|
37
|
+
}), p = a(
|
|
38
|
+
() => _(r.content || c.source || "")
|
|
39
39
|
);
|
|
40
|
-
return
|
|
40
|
+
return C(
|
|
41
41
|
() => c.source,
|
|
42
|
-
(
|
|
43
|
-
|
|
42
|
+
(t) => {
|
|
43
|
+
y(t, k.value.proxyUrl), t && (A(t) || j(t) && _(t)) ? n.show() : n.hide();
|
|
44
44
|
}
|
|
45
|
-
), (
|
|
46
|
-
size: "
|
|
45
|
+
), (t, s) => (l(), z(o(E), {
|
|
46
|
+
size: "full",
|
|
47
47
|
state: o(n)
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
var
|
|
49
|
+
default: D(() => {
|
|
50
|
+
var f, u;
|
|
51
51
|
return [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
i(o(
|
|
57
|
-
|
|
58
|
-
]),
|
|
59
|
-
o(s).state !== "loading" && o(s).error ? (l(), m("div", R, [
|
|
60
|
-
i(o(x), {
|
|
61
|
-
class: "text-red flex-shrink-0",
|
|
62
|
-
icon: "Error",
|
|
63
|
-
size: "sm"
|
|
64
|
-
}),
|
|
65
|
-
t("div", T, f(o(s).error), 1)
|
|
66
|
-
])) : a.value ? h("", !0) : (l(), m(B, { key: 1 }, [
|
|
67
|
-
t("div", q, [
|
|
68
|
-
i(o(x), {
|
|
69
|
-
class: "text-red",
|
|
52
|
+
e("div", P, [
|
|
53
|
+
e("div", T, [
|
|
54
|
+
e("div", W, h(w.value ?? "Import Collection"), 1),
|
|
55
|
+
o(r).state !== "loading" && o(r).error ? (l(), d("div", K, [
|
|
56
|
+
i(o(m), {
|
|
57
|
+
class: "text-red flex-shrink-0",
|
|
70
58
|
icon: "Error",
|
|
71
59
|
size: "sm"
|
|
72
60
|
}),
|
|
73
|
-
|
|
74
|
-
]),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
61
|
+
e("div", L, h(o(r).error), 1)
|
|
62
|
+
])) : p.value ? x("", !0) : (l(), d(F, { key: 1 }, [
|
|
63
|
+
e("div", R, [
|
|
64
|
+
i(o(m), {
|
|
65
|
+
class: "text-red",
|
|
66
|
+
icon: "Error",
|
|
67
|
+
size: "sm"
|
|
68
|
+
}),
|
|
69
|
+
s[1] || (s[1] = e("div", null, "This doesn’t look like a valid OpenAPI/Swagger document.", -1))
|
|
70
|
+
]),
|
|
71
|
+
e("div", q, [
|
|
72
|
+
i(o(N), {
|
|
73
|
+
content: ((f = o(r).content) == null ? void 0 : f.trim()) || ((u = c.source) == null ? void 0 : u.trim()) || "",
|
|
74
|
+
copy: !1
|
|
75
|
+
}, null, 8, ["content"])
|
|
76
|
+
])
|
|
77
|
+
], 64)),
|
|
78
|
+
p.value ? (l(), d("div", G, [
|
|
79
|
+
i(U, {
|
|
80
|
+
source: t.source,
|
|
81
|
+
variant: "button",
|
|
82
|
+
onImportFinished: s[0] || (s[0] = () => t.$emit("importFinished"))
|
|
83
|
+
}, null, 8, ["source"])
|
|
84
|
+
])) : x("", !0),
|
|
85
|
+
e("div", H, [
|
|
86
|
+
e("div", J, [
|
|
87
|
+
i(M)
|
|
88
|
+
])
|
|
89
|
+
])
|
|
90
|
+
]),
|
|
91
|
+
e("div", Q, [
|
|
92
|
+
e("div", X, [
|
|
93
|
+
e("div", Y, [
|
|
94
|
+
i(o(m), {
|
|
95
|
+
icon: "Logo",
|
|
96
|
+
size: "xl"
|
|
97
|
+
})
|
|
98
|
+
]),
|
|
99
|
+
s[2] || (s[2] = e("span", { class: "text-c-2" }, [
|
|
100
|
+
e("a", {
|
|
101
|
+
class: "hover:text-c-1",
|
|
102
|
+
href: "https://scalar.com/download",
|
|
103
|
+
target: "_blank"
|
|
104
|
+
}, " Download Scalar App "),
|
|
105
|
+
e("br"),
|
|
106
|
+
I(" Offline First - Open Source ")
|
|
107
|
+
], -1))
|
|
80
108
|
])
|
|
81
|
-
]
|
|
82
|
-
a.value ? (l(), m("div", H, [
|
|
83
|
-
i(N, {
|
|
84
|
-
source: e.source,
|
|
85
|
-
variant: "button",
|
|
86
|
-
onImportFinished: r[0] || (r[0] = () => e.$emit("importFinished"))
|
|
87
|
-
}, null, 8, ["source"])
|
|
88
|
-
])) : h("", !0)
|
|
109
|
+
])
|
|
89
110
|
])
|
|
90
111
|
];
|
|
91
112
|
}),
|
|
@@ -94,5 +115,5 @@ const P = { class: "flex gap-5 flex-col my-24" }, W = { class: "text-center text
|
|
|
94
115
|
}
|
|
95
116
|
});
|
|
96
117
|
export {
|
|
97
|
-
|
|
118
|
+
ae as default
|
|
98
119
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportNowButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportNowButton.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ImportNowButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/ImportNowButton.vue"],"names":[],"mappings":";aA6GW,MAAM,GAAG,IAAI;cACZ,QAAQ,GAAG,MAAM;;;;aADlB,MAAM,GAAG,IAAI;cACZ,QAAQ,GAAG,MAAM;;;;AAkL7B,wBASG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isUrl as
|
|
3
|
-
import { ScalarButton as l
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as x, openBlock as s, createElementBlock as b, Fragment as w, createBlock as m, unref as a, withCtx as p, createTextVNode as c, createCommentVNode as g } from "vue";
|
|
2
|
+
import { isUrl as h } from "./utils/isUrl.js";
|
|
3
|
+
import { ScalarButton as l } from "@scalar/components";
|
|
4
|
+
import { useToasts as F } from "@scalar/use-toasts";
|
|
5
|
+
import { useRouter as B } from "vue-router";
|
|
6
|
+
import { useWorkspace as I } from "../../store/store.js";
|
|
7
|
+
const R = /* @__PURE__ */ x({
|
|
8
8
|
__name: "ImportNowButton",
|
|
9
9
|
props: {
|
|
10
10
|
source: {},
|
|
@@ -12,74 +12,70 @@ const W = /* @__PURE__ */ w({
|
|
|
12
12
|
},
|
|
13
13
|
emits: ["importFinished"],
|
|
14
14
|
setup(f, { emit: d }) {
|
|
15
|
-
const o = f, k = d,
|
|
16
|
-
async function
|
|
15
|
+
const o = f, k = d, y = B(), { importSpecFromUrl: v, importSpecFile: C, activeWorkspace: r } = I(), { toast: i } = F();
|
|
16
|
+
async function n() {
|
|
17
17
|
try {
|
|
18
18
|
if (o.source) {
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
19
|
+
if (h(o.source)) {
|
|
20
|
+
const t = await v(
|
|
21
21
|
o.source,
|
|
22
22
|
void 0,
|
|
23
23
|
void 0,
|
|
24
24
|
r.value.uid
|
|
25
25
|
);
|
|
26
|
-
|
|
26
|
+
u(t);
|
|
27
27
|
} else {
|
|
28
|
-
const
|
|
28
|
+
const t = await C(
|
|
29
29
|
o.source,
|
|
30
30
|
r.value.uid
|
|
31
31
|
);
|
|
32
|
-
|
|
32
|
+
u(t);
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
i("Import successful", "info"), k("importFinished");
|
|
35
35
|
}
|
|
36
|
-
} catch (
|
|
37
|
-
console.error("[importCollection]",
|
|
38
|
-
const
|
|
39
|
-
|
|
36
|
+
} catch (t) {
|
|
37
|
+
console.error("[importCollection]", t);
|
|
38
|
+
const e = (t == null ? void 0 : t.message) || "Unknown error";
|
|
39
|
+
i(`Import failed: ${e}`, "error");
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
42
|
+
function u(t) {
|
|
43
|
+
t && y.push({
|
|
44
44
|
name: "request",
|
|
45
45
|
params: {
|
|
46
46
|
workspace: r.value.uid,
|
|
47
|
-
request:
|
|
47
|
+
request: t == null ? void 0 : t.requests[0]
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
return (
|
|
52
|
-
|
|
51
|
+
return (t, e) => t.source ? (s(), b(w, { key: 0 }, [
|
|
52
|
+
t.variant === "button" ? (s(), m(a(l), {
|
|
53
53
|
key: 0,
|
|
54
|
-
class: "px-6
|
|
54
|
+
class: "text-[21px] py-2.5 px-6 rounded-lg font-bold h-fit mt-3 mb-1.5",
|
|
55
55
|
size: "md",
|
|
56
56
|
type: "button",
|
|
57
|
-
onClick:
|
|
57
|
+
onClick: n
|
|
58
58
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
size: "md"
|
|
63
|
-
}),
|
|
64
|
-
t[0] || (t[0] = p(" Import Collection "))
|
|
65
|
-
]),
|
|
59
|
+
default: p(() => e[0] || (e[0] = [
|
|
60
|
+
c(" Import Collection ")
|
|
61
|
+
])),
|
|
66
62
|
_: 1
|
|
67
|
-
})) : (s(),
|
|
63
|
+
})) : (s(), m(a(l), {
|
|
68
64
|
key: 1,
|
|
69
|
-
class: "px-6
|
|
65
|
+
class: "text-[21px] py-2.5 px-6 rounded-lg font-bold h-fit",
|
|
70
66
|
size: "md",
|
|
71
67
|
type: "button",
|
|
72
68
|
variant: "ghost",
|
|
73
|
-
onClick:
|
|
69
|
+
onClick: n
|
|
74
70
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
|
|
71
|
+
default: p(() => e[1] || (e[1] = [
|
|
72
|
+
c(" Try it in the browser ")
|
|
77
73
|
])),
|
|
78
74
|
_: 1
|
|
79
75
|
}))
|
|
80
|
-
], 64)) :
|
|
76
|
+
], 64)) : g("", !0);
|
|
81
77
|
}
|
|
82
78
|
});
|
|
83
79
|
export {
|
|
84
|
-
|
|
80
|
+
R as default
|
|
85
81
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=WorkspaceSelector.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCollection/WorkspaceSelector.vue"],"names":[],"mappings":";AAieA,wBAKG"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { defineComponent as y, ref as D, openBlock as d, createElementBlock as x, Fragment as w, createElementVNode as t, createVNode as s, unref as e, withCtx as r, renderList as W, createBlock as N, withModifiers as h, normalizeClass as M, toDisplayString as k, withDirectives as $, vModelText as z, createTextVNode as B } from "vue";
|
|
2
|
+
import { useModal as V, ScalarDropdown as j, ScalarDropdownItem as v, ScalarIcon as u, ScalarDropdownDivider as T, ScalarButton as _, ScalarModal as E } from "@scalar/components";
|
|
3
|
+
import { useToasts as I } from "@scalar/use-toasts";
|
|
4
|
+
import { useRouter as A } from "vue-router";
|
|
5
|
+
import { useWorkspace as F } from "../../store/store.js";
|
|
6
|
+
const L = { class: "flex items-center text-sm w-[inherit]" }, P = { class: "font-medium m-0 text-sm flex gap-1.5 items-center" }, R = { class: "line-clamp-1 text-left w-[calc(100%-10px)]" }, U = { class: "text-ellipsis overflow-hidden" }, q = { class: "flex items-center justify-center h-4 w-4" }, Y = /* @__PURE__ */ y({
|
|
7
|
+
__name: "WorkspaceSelector",
|
|
8
|
+
setup(G) {
|
|
9
|
+
const { activeWorkspace: i, workspaces: b, workspaceMutators: g } = F(), { push: m } = A(), c = V(), { toast: f } = I(), a = D(""), C = (l) => {
|
|
10
|
+
l !== i.value.uid && m(`/workspace/${l}`);
|
|
11
|
+
}, S = () => {
|
|
12
|
+
if (!a.value.trim()) {
|
|
13
|
+
f("Please enter a name before creating a workspace.", "error");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const l = g.add({
|
|
17
|
+
name: a.value
|
|
18
|
+
});
|
|
19
|
+
m(`/workspace/${l.uid}`), f(`Created new workspace '${a.value}'`), a.value = "", c.hide();
|
|
20
|
+
};
|
|
21
|
+
return (l, o) => (d(), x(w, null, [
|
|
22
|
+
t("div", L, [
|
|
23
|
+
s(e(j), null, {
|
|
24
|
+
items: r(() => [
|
|
25
|
+
(d(!0), x(w, null, W(e(b), (n, p) => (d(), N(e(v), {
|
|
26
|
+
key: p,
|
|
27
|
+
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden w-full",
|
|
28
|
+
onClick: h((H) => C(p), ["stop"])
|
|
29
|
+
}, {
|
|
30
|
+
default: r(() => [
|
|
31
|
+
t("div", {
|
|
32
|
+
class: M([
|
|
33
|
+
"flex items-center justify-center rounded-full p-[3px] w-4 h-4 group-hover/item:shadow-border",
|
|
34
|
+
e(i).uid === p ? "bg-blue text-b-1" : "text-transparent"
|
|
35
|
+
])
|
|
36
|
+
}, [
|
|
37
|
+
s(e(u), {
|
|
38
|
+
class: "size-2.5",
|
|
39
|
+
icon: "Checkmark",
|
|
40
|
+
thickness: "3.5"
|
|
41
|
+
})
|
|
42
|
+
], 2),
|
|
43
|
+
t("span", U, k(n.name), 1)
|
|
44
|
+
]),
|
|
45
|
+
_: 2
|
|
46
|
+
}, 1032, ["onClick"]))), 128)),
|
|
47
|
+
s(e(T)),
|
|
48
|
+
s(e(v), {
|
|
49
|
+
class: "flex items-center gap-1.5",
|
|
50
|
+
onClick: o[0] || (o[0] = (n) => e(c).show())
|
|
51
|
+
}, {
|
|
52
|
+
default: r(() => [
|
|
53
|
+
t("div", q, [
|
|
54
|
+
s(e(u), {
|
|
55
|
+
class: "h-2.5",
|
|
56
|
+
icon: "Add",
|
|
57
|
+
thickness: "3"
|
|
58
|
+
})
|
|
59
|
+
]),
|
|
60
|
+
o[2] || (o[2] = t("span", null, "New Workspace", -1))
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
})
|
|
64
|
+
]),
|
|
65
|
+
default: r(() => [
|
|
66
|
+
s(e(_), {
|
|
67
|
+
class: "font-normal h-full justify-start line-clamp-1 py-1.5 px-1.5 text-c-1 hover:bg-b-2 w-fit",
|
|
68
|
+
fullWidth: "",
|
|
69
|
+
variant: "ghost"
|
|
70
|
+
}, {
|
|
71
|
+
default: r(() => [
|
|
72
|
+
t("div", P, [
|
|
73
|
+
t("h2", R, k(e(i).name), 1),
|
|
74
|
+
s(e(u), {
|
|
75
|
+
class: "size-3",
|
|
76
|
+
icon: "ChevronDown",
|
|
77
|
+
thickness: "3"
|
|
78
|
+
})
|
|
79
|
+
])
|
|
80
|
+
]),
|
|
81
|
+
_: 1
|
|
82
|
+
})
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
})
|
|
86
|
+
]),
|
|
87
|
+
s(e(E), {
|
|
88
|
+
bodyClass: "!m-0 !p-1",
|
|
89
|
+
size: "xxs",
|
|
90
|
+
state: e(c),
|
|
91
|
+
variant: "form"
|
|
92
|
+
}, {
|
|
93
|
+
default: r(() => [
|
|
94
|
+
t("form", {
|
|
95
|
+
class: "flex gap-1 rounded",
|
|
96
|
+
onSubmit: h(S, ["prevent"])
|
|
97
|
+
}, [
|
|
98
|
+
$(t("input", {
|
|
99
|
+
"onUpdate:modelValue": o[1] || (o[1] = (n) => a.value = n),
|
|
100
|
+
class: "border-none outline-none flex-1 w-full text-sm min-h-8 p-1.5",
|
|
101
|
+
placeholder: "New Workspace",
|
|
102
|
+
type: "text"
|
|
103
|
+
}, null, 512), [
|
|
104
|
+
[z, a.value]
|
|
105
|
+
]),
|
|
106
|
+
s(e(_), {
|
|
107
|
+
class: "max-h-8 text-xs p-0 px-3",
|
|
108
|
+
disabled: !a.value.trim(),
|
|
109
|
+
type: "submit"
|
|
110
|
+
}, {
|
|
111
|
+
default: r(() => o[3] || (o[3] = [
|
|
112
|
+
B(" Continue ")
|
|
113
|
+
])),
|
|
114
|
+
_: 1
|
|
115
|
+
}, 8, ["disabled"])
|
|
116
|
+
], 32)
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
}, 8, ["state"])
|
|
120
|
+
], 64));
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
export {
|
|
124
|
+
Y as default
|
|
125
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportCurlModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCurl/ImportCurlModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImportCurlModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ImportCurl/ImportCurlModal.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAEV,cAAc,EACf,MAAM,iCAAiC,CAAA;;gBAO1B,cAAc,GAAG,IAAI;WAC1B;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE;;;oBAoQnC,cAAc;qBAAe,MAAM;;;;gBArQhD,cAAc,GAAG,IAAI;WAC1B;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE;;;oBAoQnC,cAAc;qBAAe,MAAM;;;;AAT9D,wBAaG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ImportCurlModal.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-50c10cc9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { ScalarModal as
|
|
4
|
-
import { useToasts as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as _, ref as g, computed as N, watch as V, openBlock as k, createBlock as R, unref as s, withCtx as n, createVNode as r, withKeys as S, createElementVNode as l, toDisplayString as x, createTextVNode as h } from "vue";
|
|
2
|
+
import I from "../HttpMethod/HttpMethod.vue.js";
|
|
3
|
+
import { ScalarModal as B, ScalarTextField as E, ScalarButton as v } from "@scalar/components";
|
|
4
|
+
import { useToasts as M } from "@scalar/use-toasts";
|
|
5
|
+
const T = { class: "border flex flex-row gap-2 h-10 items-center my-4 p-[3px] rounded text-sm" }, K = { class: "flex h-full" }, U = { class: "scroll-timeline-x whitespace-nowrap" }, j = { class: "flex gap-10 justify-between" }, L = /* @__PURE__ */ _({
|
|
6
6
|
__name: "ImportCurlModal",
|
|
7
7
|
props: {
|
|
8
8
|
parsedCurl: {},
|
|
9
9
|
state: {}
|
|
10
10
|
},
|
|
11
11
|
emits: ["importCurl", "close"],
|
|
12
|
-
setup(
|
|
13
|
-
const t =
|
|
14
|
-
function
|
|
12
|
+
setup(q, { emit: w }) {
|
|
13
|
+
const t = q, u = w, { toast: y } = M(), o = g(""), i = N(() => !o.value.trim());
|
|
14
|
+
function p() {
|
|
15
15
|
if (i.value) {
|
|
16
|
-
|
|
16
|
+
y("Please enter a name before importing your request.", "error");
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
b();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function b() {
|
|
22
22
|
t.parsedCurl && u("importCurl", {
|
|
23
23
|
parsedCurl: t.parsedCurl,
|
|
24
24
|
requestName: o.value
|
|
@@ -29,50 +29,51 @@ const M = { class: "border flex flex-row gap-2 h-10 items-center my-4 p-[3px] ro
|
|
|
29
29
|
(a) => {
|
|
30
30
|
a && (o.value = "");
|
|
31
31
|
}
|
|
32
|
-
), (a, e) => (k(), R(s(
|
|
32
|
+
), (a, e) => (k(), R(s(B), {
|
|
33
33
|
size: "xs",
|
|
34
34
|
state: a.state,
|
|
35
35
|
title: "Import cURL request"
|
|
36
36
|
}, {
|
|
37
37
|
default: n(() => {
|
|
38
|
-
var
|
|
38
|
+
var d, m, c, f;
|
|
39
39
|
return [
|
|
40
|
-
r(s(
|
|
40
|
+
r(s(E), {
|
|
41
41
|
modelValue: o.value,
|
|
42
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
42
|
+
"onUpdate:modelValue": e[0] || (e[0] = (C) => o.value = C),
|
|
43
43
|
autofocus: "",
|
|
44
|
-
placeholder: "Request Name"
|
|
44
|
+
placeholder: "Request Name",
|
|
45
|
+
onKeyup: S(p, ["enter"])
|
|
45
46
|
}, null, 8, ["modelValue"]),
|
|
46
|
-
l("div",
|
|
47
|
-
l("div",
|
|
48
|
-
r(
|
|
47
|
+
l("div", T, [
|
|
48
|
+
l("div", K, [
|
|
49
|
+
r(I, {
|
|
49
50
|
isEditable: !1,
|
|
50
51
|
isSquare: "",
|
|
51
|
-
method: ((
|
|
52
|
+
method: ((d = t.parsedCurl) == null ? void 0 : d.method) || "get"
|
|
52
53
|
}, null, 8, ["method"])
|
|
53
54
|
]),
|
|
54
|
-
l("span", U,
|
|
55
|
+
l("span", U, x(((c = (m = t.parsedCurl) == null ? void 0 : m.servers) == null ? void 0 : c[0]) || "") + x(((f = t.parsedCurl) == null ? void 0 : f.path) || ""), 1)
|
|
55
56
|
]),
|
|
56
57
|
l("div", j, [
|
|
57
|
-
r(s(
|
|
58
|
+
r(s(v), {
|
|
58
59
|
class: "gap-1.5 px-2.5 h-8 shadow-none focus:outline-none flex items-center cursor-pointer",
|
|
59
60
|
type: "button",
|
|
60
61
|
variant: "outlined",
|
|
61
|
-
onClick: e[1] || (e[1] = (
|
|
62
|
+
onClick: e[1] || (e[1] = (C) => u("close"))
|
|
62
63
|
}, {
|
|
63
64
|
default: n(() => e[2] || (e[2] = [
|
|
64
|
-
|
|
65
|
+
h(" Cancel ")
|
|
65
66
|
])),
|
|
66
67
|
_: 1
|
|
67
68
|
}),
|
|
68
|
-
r(s(
|
|
69
|
+
r(s(v), {
|
|
69
70
|
class: "gap-1.5 font-medium px-2.5 h-8 shadow-none focus:outline-none",
|
|
70
71
|
disabled: i.value,
|
|
71
72
|
type: "submit",
|
|
72
|
-
onClick:
|
|
73
|
+
onClick: p
|
|
73
74
|
}, {
|
|
74
75
|
default: n(() => e[3] || (e[3] = [
|
|
75
|
-
|
|
76
|
+
h(" Import Request ")
|
|
76
77
|
])),
|
|
77
78
|
_: 1
|
|
78
79
|
}, 8, ["disabled"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as i, openBlock as c, createBlock as r, unref as t, withCtx as l, createElementVNode as e, createVNode as n } from "vue";
|
|
2
2
|
import { ScalarDropdown as d, ScalarDropdownItem as o, ScalarIcon as a } from "@scalar/components";
|
|
3
3
|
const p = {
|
|
4
|
-
class: "min-w-[37px] max-w-[37px] hover:bg-b-
|
|
4
|
+
class: "min-w-[37px] max-w-[37px] hover:bg-b-2 flex items-center justify-center rounded-lg p-[7px] text-c-3 focus:text-c-1 scalar-app-nav-padding",
|
|
5
5
|
type: "button"
|
|
6
6
|
}, u = {
|
|
7
7
|
class: "no-underline block",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SideNav.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.vue"],"names":[],"mappings":";AAmLA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SideNav.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-26a2bed3"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as p, openBlock as o, createElementBlock as r, createElementVNode as e, Fragment as u, renderList as x, unref as i, createVNode as
|
|
1
|
+
import { defineComponent as p, openBlock as o, createElementBlock as r, createElementVNode as e, Fragment as u, renderList as x, unref as i, createVNode as a, withCtx as m, createTextVNode as f, toDisplayString as v } from "vue";
|
|
2
2
|
import { ROUTES as N } from "../../constants.js";
|
|
3
3
|
import { useRouter as S } from "vue-router";
|
|
4
4
|
import h from "./SideHelp.vue.js";
|
|
@@ -7,10 +7,10 @@ const y = {
|
|
|
7
7
|
"aria-label": "Side Navigation",
|
|
8
8
|
class: "text-c-2 w-15 flex flex-col items-center px-2 py-2 scalar-sidenav relative drag-region bg-b-1 border-t-1/2",
|
|
9
9
|
role: "navigation"
|
|
10
|
-
}, b = { class: "flex flex-col gap-1.5" }, k = { class: "mt-auto flex flex-col py-0.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" }, F = /* @__PURE__ */ p({
|
|
10
|
+
}, b = { class: "flex flex-col gap-1.5" }, k = { class: "mt-auto flex flex-col gap-1.5 py-0.5" }, E = { class: "flex items-center no-drag-region" }, R = { class: "flex items-center no-drag-region" }, F = /* @__PURE__ */ p({
|
|
11
11
|
__name: "SideNav",
|
|
12
12
|
setup(V) {
|
|
13
|
-
const { currentRoute:
|
|
13
|
+
const { currentRoute: s } = S();
|
|
14
14
|
return (w, l) => (o(), r("nav", y, [
|
|
15
15
|
e("ul", b, [
|
|
16
16
|
(o(!0), r(u, null, x(i(N).filter(
|
|
@@ -21,8 +21,8 @@ const y = {
|
|
|
21
21
|
key: g,
|
|
22
22
|
class: "no-drag-region"
|
|
23
23
|
}, [
|
|
24
|
-
|
|
25
|
-
active: (c = i(
|
|
24
|
+
a(_, {
|
|
25
|
+
active: (c = i(s).name) == null ? void 0 : c.startsWith(n),
|
|
26
26
|
icon: t,
|
|
27
27
|
name: n,
|
|
28
28
|
prettyName: d
|
|
@@ -37,8 +37,8 @@ const y = {
|
|
|
37
37
|
]),
|
|
38
38
|
e("ul", k, [
|
|
39
39
|
e("li", E, [
|
|
40
|
-
|
|
41
|
-
active: i(
|
|
40
|
+
a(_, {
|
|
41
|
+
active: i(s).name === "settings",
|
|
42
42
|
icon: "Settings",
|
|
43
43
|
name: "settings",
|
|
44
44
|
prettyName: "Settings"
|
|
@@ -50,7 +50,7 @@ const y = {
|
|
|
50
50
|
}, 8, ["active"])
|
|
51
51
|
]),
|
|
52
52
|
e("li", R, [
|
|
53
|
-
|
|
53
|
+
a(h)
|
|
54
54
|
])
|
|
55
55
|
])
|
|
56
56
|
]));
|