@scalar/api-client 2.1.44 → 2.1.46
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 +45 -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 +66 -58
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +8 -8
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +40 -39
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +7 -7
- package/dist/components/ContextBar.vue.d.ts +1 -1
- package/dist/components/ContextBar.vue.d.ts.map +1 -1
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +30 -19
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue2.js +10 -10
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -8
- package/dist/components/Form/Form.vue.js +15 -15
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +14 -13
- package/dist/components/Search/useSearch.d.ts +2 -0
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +25 -24
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts +3 -0
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -0
- package/dist/components/SideNav/DownloadAppButton.vue.js +7 -0
- package/dist/components/SideNav/DownloadAppButton.vue2.js +33 -0
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideHelp.vue.js +55 -53
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +82 -5
- package/dist/components/SideNav/SideNav.vue2.js +2 -72
- package/dist/components/SideNav/SideNavGroup.vue.d.ts +18 -0
- package/dist/components/SideNav/SideNavGroup.vue.d.ts.map +1 -0
- package/dist/components/SideNav/SideNavGroup.vue.js +16 -0
- package/dist/components/SideNav/SideNavGroup.vue2.js +4 -0
- package/dist/components/SideNav/SideNavLink.vue.d.ts +5 -5
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +31 -34
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +25 -0
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -0
- package/dist/components/SideNav/SideNavRouterLink.vue.js +29 -0
- package/dist/components/SideNav/SideNavRouterLink.vue2.js +4 -0
- package/dist/components/Sidebar/SidebarButton.vue.d.ts +1 -4
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +17 -17
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +16 -15
- 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 +14 -14
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +27 -27
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +13 -21
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +6 -4
- package/dist/hooks/useLayout.d.ts +13 -0
- package/dist/hooks/useLayout.d.ts.map +1 -0
- package/dist/hooks/useLayout.js +7 -0
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +37 -37
- package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
- package/dist/layouts/App/MainLayout.vue.js +21 -13
- package/dist/layouts/App/create-api-client-app.d.ts +35 -41
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +14 -13
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +3 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +37 -25
- package/dist/layouts/Modal/create-api-client-modal.d.ts +70 -82
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +18 -19
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +30 -30
- package/dist/layouts/Web/create-api-client-web.d.ts +35 -41
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +12 -11
- package/dist/libs/create-client.d.ts +43 -43
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +50 -51
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/import-spec.d.ts +4 -11
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +37 -39
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/security-schemes.d.ts +4 -4
- package/dist/store/store.d.ts +70 -82
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +4 -4
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieRaw.vue.js +10 -10
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +52 -53
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +79 -80
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +146 -108
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +53 -52
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +102 -97
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +44 -40
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +152 -134
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +2 -2
- 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 +103 -102
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +36 -34
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +13 -10
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +0 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +32 -33
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +32 -25
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +47 -46
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +1 -1
- package/package.json +13 -11
- package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as m, openBlock as r, createBlock as n, withCtx as p, createElementVNode as a, unref as e, createCommentVNode as l } from "vue";
|
|
2
|
+
import u from "../../components/CodeInput/CodeInput.vue.js";
|
|
3
|
+
import s from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
4
4
|
import { useWorkspace as c } from "../../store/store.js";
|
|
5
|
-
const w = /* @__PURE__ */
|
|
5
|
+
const w = /* @__PURE__ */ m({
|
|
6
6
|
__name: "CookieRaw",
|
|
7
|
-
setup(
|
|
8
|
-
const { cookies:
|
|
9
|
-
return (
|
|
10
|
-
title:
|
|
7
|
+
setup(d) {
|
|
8
|
+
const { cookies: i, activeCookieId: o } = c();
|
|
9
|
+
return (f, t) => (r(), n(s, null, {
|
|
10
|
+
title: p(() => t[0] || (t[0] = [
|
|
11
11
|
a("span", null, "Raw Cookie String", -1)
|
|
12
12
|
])),
|
|
13
|
-
default:
|
|
14
|
-
e(o) && e(
|
|
13
|
+
default: p(() => [
|
|
14
|
+
e(o) && e(i)[e(o)] ? (r(), n(u, {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "pl-px pr-2 md:px-2 py-2.5",
|
|
17
17
|
lineNumbers: "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AA0gBA,wBAMG"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as B, computed as D, onMounted as M, onBeforeUnmount as R, openBlock as n, createBlock as O, withCtx as a, createVNode as s, unref as l, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as x, normalizeClass as $, createTextVNode as k, toDisplayString as j, withDirectives as E, vShow as N } from "vue";
|
|
2
|
+
import F from "../../components/Sidebar/SidebarButton.vue.js";
|
|
3
|
+
import K from "../../components/Sidebar/SidebarList.vue.js";
|
|
4
|
+
import A from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
5
|
+
import H from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
6
|
+
import I from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
7
7
|
import { ScalarIcon as z } from "@scalar/components";
|
|
8
|
-
import { cookieSchema as
|
|
9
|
-
import { useRouter as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
8
|
+
import { cookieSchema as P } from "@scalar/oas-utils/entities/cookie";
|
|
9
|
+
import { useRouter as T, useRoute as U } from "vue-router";
|
|
10
|
+
import W from "./CookieForm.vue.js";
|
|
11
|
+
import q from "./CookieRaw.vue.js";
|
|
12
|
+
import { useWorkspace as G } from "../../store/store.js";
|
|
13
|
+
import J from "../../components/Sidebar/Sidebar.vue.js";
|
|
12
14
|
import { useSidebar as Q } from "../../hooks/useSidebar.js";
|
|
13
|
-
|
|
14
|
-
import Y from "../../components/Sidebar/Sidebar.vue.js";
|
|
15
|
-
const Z = { class: "flex-1" }, ee = ["onClick"], te = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, oe = ["onClick"], re = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, ve = /* @__PURE__ */ D({
|
|
15
|
+
const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, ee = ["onClick"], te = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, xe = /* @__PURE__ */ B({
|
|
16
16
|
__name: "Cookies",
|
|
17
|
-
setup(
|
|
18
|
-
const { cookies: p, cookieMutators: v, events:
|
|
19
|
-
const t = Object.keys(p).length, e =
|
|
17
|
+
setup(oe) {
|
|
18
|
+
const { cookies: p, cookieMutators: v, events: g } = G(), { collapsedSidebarFolders: i, toggleSidebarFolder: y } = Q(), b = T(), L = U(), C = () => {
|
|
19
|
+
const t = Object.keys(p).length, e = P.parse({
|
|
20
20
|
name: `Cookie ${t}`,
|
|
21
21
|
value: "",
|
|
22
22
|
domain: "example.com",
|
|
@@ -26,7 +26,7 @@ const Z = { class: "flex-1" }, ee = ["onClick"], te = { class: "before:bg-border
|
|
|
26
26
|
sameSite: "None"
|
|
27
27
|
});
|
|
28
28
|
v.add(e), b.push(e.uid);
|
|
29
|
-
},
|
|
29
|
+
}, V = (t) => {
|
|
30
30
|
v.delete(t);
|
|
31
31
|
const e = Object.values(p).filter(
|
|
32
32
|
(o) => o.uid !== t
|
|
@@ -35,7 +35,7 @@ const Z = { class: "flex-1" }, ee = ["onClick"], te = { class: "before:bg-border
|
|
|
35
35
|
const o = e[e.length - 1];
|
|
36
36
|
b.push(o.uid);
|
|
37
37
|
} else e.length === 1 && e[0].uid === "default" && b.push("default");
|
|
38
|
-
}, h =
|
|
38
|
+
}, h = D(() => {
|
|
39
39
|
const t = {};
|
|
40
40
|
return Object.values(p).forEach((e) => {
|
|
41
41
|
e.domain && e.path && (t[e.domain] || (t[e.domain] = {}), t[e.domain][e.path] || (t[e.domain][e.path] = []), t[e.domain][e.path].push(e));
|
|
@@ -43,7 +43,7 @@ const Z = { class: "flex-1" }, ee = ["onClick"], te = { class: "before:bg-border
|
|
|
43
43
|
}), w = (t) => i[t], S = (t) => {
|
|
44
44
|
t != null && t.createNew && L.name === "cookies" && C();
|
|
45
45
|
};
|
|
46
|
-
return
|
|
46
|
+
return M(() => {
|
|
47
47
|
const t = Object.keys(h.value), e = Object.entries(h.value).flatMap(
|
|
48
48
|
([o, r]) => Object.keys(r).map((d) => o + d)
|
|
49
49
|
);
|
|
@@ -51,57 +51,57 @@ const Z = { class: "flex-1" }, ee = ["onClick"], te = { class: "before:bg-border
|
|
|
51
51
|
i[o] = !0;
|
|
52
52
|
}), e.forEach((o) => {
|
|
53
53
|
i[o] = !0;
|
|
54
|
-
}),
|
|
55
|
-
}),
|
|
54
|
+
}), g.hotKeys.on(S);
|
|
55
|
+
}), R(() => g.hotKeys.off(S)), (t, e) => (n(), O(H, null, {
|
|
56
56
|
default: a(() => [
|
|
57
|
-
s(
|
|
57
|
+
s(l(J), { title: "Cookies" }, {
|
|
58
58
|
content: a(() => [
|
|
59
|
-
f("div",
|
|
60
|
-
s(
|
|
59
|
+
f("div", X, [
|
|
60
|
+
s(K, null, {
|
|
61
61
|
default: a(() => [
|
|
62
|
-
(
|
|
62
|
+
(n(!0), m(_, null, x(h.value, (o, r) => (n(), m("div", { key: r }, [
|
|
63
63
|
f("button", {
|
|
64
64
|
class: "flex font-medium gap-1.5 items-center px-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
65
65
|
type: "button",
|
|
66
|
-
onClick: (d) =>
|
|
66
|
+
onClick: (d) => l(y)(r)
|
|
67
67
|
}, [
|
|
68
|
-
s(
|
|
69
|
-
class:
|
|
70
|
-
"rotate-90":
|
|
68
|
+
s(l(z), {
|
|
69
|
+
class: $(["text-c-3", {
|
|
70
|
+
"rotate-90": l(i)[r]
|
|
71
71
|
}]),
|
|
72
72
|
icon: "ChevronRight",
|
|
73
73
|
size: "sm",
|
|
74
74
|
thickness: "2.5"
|
|
75
75
|
}, null, 8, ["class"]),
|
|
76
|
-
k(" " +
|
|
77
|
-
], 8,
|
|
78
|
-
E(f("div",
|
|
79
|
-
(
|
|
76
|
+
k(" " + j(r), 1)
|
|
77
|
+
], 8, Y),
|
|
78
|
+
E(f("div", Z, [
|
|
79
|
+
(n(!0), m(_, null, x(o, (d, c) => (n(), m("div", { key: c }, [
|
|
80
80
|
f("button", {
|
|
81
81
|
class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
82
82
|
type: "button",
|
|
83
|
-
onClick: (
|
|
83
|
+
onClick: (u) => l(y)(r + c)
|
|
84
84
|
}, [
|
|
85
|
-
s(
|
|
86
|
-
class:
|
|
87
|
-
"rotate-90":
|
|
85
|
+
s(l(z), {
|
|
86
|
+
class: $(["text-c-3", {
|
|
87
|
+
"rotate-90": l(i)[r + c]
|
|
88
88
|
}]),
|
|
89
89
|
icon: "ChevronRight",
|
|
90
90
|
size: "sm",
|
|
91
91
|
thickness: "2.5"
|
|
92
92
|
}, null, 8, ["class"]),
|
|
93
|
-
k(" " +
|
|
94
|
-
], 8,
|
|
95
|
-
E(f("div",
|
|
96
|
-
(
|
|
97
|
-
key:
|
|
93
|
+
k(" " + j(c), 1)
|
|
94
|
+
], 8, ee),
|
|
95
|
+
E(f("div", te, [
|
|
96
|
+
(n(!0), m(_, null, x(d, (u) => (n(), O(A, {
|
|
97
|
+
key: u.uid,
|
|
98
98
|
class: "cookie text-xs",
|
|
99
|
-
variable: { name:
|
|
99
|
+
variable: { name: u.name, uid: u.uid },
|
|
100
100
|
warningMessage: "Are you sure you want to delete this cookie?",
|
|
101
|
-
onDelete: (
|
|
101
|
+
onDelete: (re) => V(u.uid)
|
|
102
102
|
}, null, 8, ["variable", "onDelete"]))), 128))
|
|
103
103
|
], 512), [
|
|
104
|
-
[N, w(r +
|
|
104
|
+
[N, w(r + c)]
|
|
105
105
|
])
|
|
106
106
|
]))), 128))
|
|
107
107
|
], 512), [
|
|
@@ -114,23 +114,22 @@ const Z = { class: "flex-1" }, ee = ["onClick"], te = { class: "before:bg-border
|
|
|
114
114
|
])
|
|
115
115
|
]),
|
|
116
116
|
button: a(() => [
|
|
117
|
-
s(
|
|
117
|
+
s(F, {
|
|
118
118
|
click: C,
|
|
119
|
-
hotkey: "N"
|
|
120
|
-
layout: n(V)
|
|
119
|
+
hotkey: "N"
|
|
121
120
|
}, {
|
|
122
121
|
title: a(() => e[0] || (e[0] = [
|
|
123
122
|
k("Add Cookie")
|
|
124
123
|
])),
|
|
125
124
|
_: 1
|
|
126
|
-
}
|
|
125
|
+
})
|
|
127
126
|
]),
|
|
128
127
|
_: 1
|
|
129
128
|
}),
|
|
130
|
-
s(
|
|
129
|
+
s(I, { class: "flex-1" }, {
|
|
131
130
|
default: a(() => [
|
|
132
|
-
s(
|
|
133
|
-
s(
|
|
131
|
+
s(W),
|
|
132
|
+
s(q)
|
|
134
133
|
]),
|
|
135
134
|
_: 1
|
|
136
135
|
})
|
|
@@ -140,5 +139,5 @@ const Z = { class: "flex-1" }, ee = ["onClick"], te = { class: "before:bg-border
|
|
|
140
139
|
}
|
|
141
140
|
});
|
|
142
141
|
export {
|
|
143
|
-
|
|
142
|
+
xe as default
|
|
144
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/Environment.vue"],"names":[],"mappings":";AAyzBA,wBAMG"}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { useModal as
|
|
11
|
-
import { environmentSchema as
|
|
12
|
-
import { nanoid as
|
|
13
|
-
import { useRouter as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { useWorkspace as
|
|
17
|
-
const
|
|
1
|
+
import { defineComponent as z, ref as d, watch as J, onMounted as T, onBeforeUnmount as F, openBlock as m, createBlock as b, withCtx as i, createVNode as s, createElementVNode as H, createElementBlock as g, Fragment as W, renderList as q, unref as u, createTextVNode as G, createSlots as P, createCommentVNode as Q, toDisplayString as X, withKeys as Y, nextTick as Z } from "vue";
|
|
2
|
+
import ee from "../../components/CodeInput/CodeInput.vue.js";
|
|
3
|
+
import ne from "../../components/Sidebar/Sidebar.vue.js";
|
|
4
|
+
import te from "../../components/Sidebar/SidebarButton.vue.js";
|
|
5
|
+
import oe from "../../components/Sidebar/SidebarList.vue.js";
|
|
6
|
+
import le from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
7
|
+
import ae from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
8
|
+
import ue from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
9
|
+
import ie from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
10
|
+
import { useModal as S } from "@scalar/components";
|
|
11
|
+
import { environmentSchema as re } from "@scalar/oas-utils/entities/environment";
|
|
12
|
+
import { nanoid as se } from "nanoid";
|
|
13
|
+
import { useRouter as me, useRoute as ce } from "vue-router";
|
|
14
|
+
import de from "./EnvironmentColorModal.vue.js";
|
|
15
|
+
import fe from "./EnvironmentModal.vue.js";
|
|
16
|
+
import { useWorkspace as ve } from "../../store/store.js";
|
|
17
|
+
const pe = { class: "flex-1" }, ye = ["value"], Ke = /* @__PURE__ */ z({
|
|
18
18
|
__name: "Environment",
|
|
19
|
-
setup(
|
|
20
|
-
const f =
|
|
19
|
+
setup(Ee) {
|
|
20
|
+
const f = me(), k = ce(), { environments: l, environmentMutators: r, events: C } = ve(), v = S(), p = S(), o = d(null), V = d(null), y = d(!1), E = d(null), _ = d(""), c = (e) => JSON.parse(e), h = (e) => JSON.stringify(e, null, 2);
|
|
21
21
|
function x(e) {
|
|
22
|
-
const t = l[Object.keys(l)[0]],
|
|
23
|
-
(D,
|
|
22
|
+
const t = l[Object.keys(l)[0]], a = (t ? Object.keys(c(t.value)) : []).reduce(
|
|
23
|
+
(D, U) => (D[U] = "", D),
|
|
24
24
|
{}
|
|
25
|
-
), w =
|
|
25
|
+
), w = re.parse({
|
|
26
26
|
name: e.name,
|
|
27
|
-
uid:
|
|
27
|
+
uid: se(),
|
|
28
28
|
color: e.color,
|
|
29
|
-
value: h(
|
|
29
|
+
value: h(a),
|
|
30
30
|
isDefault: !1
|
|
31
31
|
});
|
|
32
32
|
r.add(w), o.value = w.uid, f.push(o.value), p.hide();
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function M(e) {
|
|
35
35
|
Object.values(l).forEach((t) => {
|
|
36
36
|
const n = c(t.value);
|
|
37
37
|
e in n || (n[e] = "", r.edit(
|
|
@@ -41,7 +41,7 @@ const Ee = { class: "flex-1" }, he = ["value"], Re = /* @__PURE__ */ J({
|
|
|
41
41
|
));
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function O(e) {
|
|
45
45
|
Object.values(l).forEach((t) => {
|
|
46
46
|
const n = c(t.value);
|
|
47
47
|
e in n && (delete n[e], r.edit(
|
|
@@ -51,19 +51,19 @@ const Ee = { class: "flex-1" }, he = ["value"], Re = /* @__PURE__ */ J({
|
|
|
51
51
|
));
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function $(e) {
|
|
55
55
|
if (o.value) {
|
|
56
56
|
const t = c(e), n = c(
|
|
57
57
|
l[o.value].value
|
|
58
58
|
);
|
|
59
|
-
Object.keys(t).forEach((
|
|
60
|
-
|
|
61
|
-
}), Object.keys(n).forEach((
|
|
62
|
-
|
|
59
|
+
Object.keys(t).forEach((a) => {
|
|
60
|
+
a in n || M(a);
|
|
61
|
+
}), Object.keys(n).forEach((a) => {
|
|
62
|
+
a in t || O(a);
|
|
63
63
|
}), r.edit(o.value, "value", e);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const j = (e) => {
|
|
67
67
|
if (r.delete(e), o.value === e) {
|
|
68
68
|
const t = Object.values(l);
|
|
69
69
|
if (t.length > 0) {
|
|
@@ -75,39 +75,39 @@ const Ee = { class: "flex-1" }, he = ["value"], Re = /* @__PURE__ */ J({
|
|
|
75
75
|
} else
|
|
76
76
|
o.value = l.default.uid, f.push({ name: "environment", params: { environment: "default" } });
|
|
77
77
|
}
|
|
78
|
+
}, K = (e) => {
|
|
79
|
+
E.value = e, _.value = l[e].color || "", v.show();
|
|
78
80
|
}, I = (e) => {
|
|
79
|
-
E.value = e, V.value = l[e].color || "", v.show();
|
|
80
|
-
}, R = (e) => {
|
|
81
81
|
E.value && (r.edit(E.value, "color", e), v.hide());
|
|
82
|
-
},
|
|
82
|
+
}, L = () => {
|
|
83
83
|
const e = f.currentRoute.value.params.environment;
|
|
84
84
|
e ? o.value = e : e === "default" && (o.value = l.default.uid);
|
|
85
|
-
},
|
|
86
|
-
o.value && !l[o.value].isDefault && (y.value = !0,
|
|
85
|
+
}, R = () => {
|
|
86
|
+
o.value && !l[o.value].isDefault && (y.value = !0, Z(() => {
|
|
87
87
|
var e;
|
|
88
|
-
(e =
|
|
88
|
+
(e = V.value) == null || e.focus();
|
|
89
89
|
}));
|
|
90
|
-
},
|
|
90
|
+
}, B = (e) => {
|
|
91
91
|
const n = e.target.value;
|
|
92
92
|
o.value && !l[o.value].isDefault && r.edit(o.value, "name", n);
|
|
93
93
|
}, N = (e) => {
|
|
94
94
|
e != null && e.createNew && k.name === "environment" && x({ name: "", color: "" });
|
|
95
|
-
},
|
|
95
|
+
}, A = () => {
|
|
96
96
|
p.show();
|
|
97
97
|
};
|
|
98
|
-
return
|
|
98
|
+
return J(
|
|
99
99
|
() => k.params.environment,
|
|
100
100
|
(e) => o.value = e || l.default.uid
|
|
101
|
-
),
|
|
102
|
-
|
|
103
|
-
}),
|
|
101
|
+
), T(() => {
|
|
102
|
+
L(), C.hotKeys.on(N);
|
|
103
|
+
}), F(() => C.hotKeys.off(N)), (e, t) => (m(), b(ae, null, {
|
|
104
104
|
default: i(() => [
|
|
105
|
-
s(
|
|
105
|
+
s(ne, { title: "Environment" }, {
|
|
106
106
|
content: i(() => [
|
|
107
|
-
|
|
108
|
-
s(
|
|
107
|
+
H("div", pe, [
|
|
108
|
+
s(oe, null, {
|
|
109
109
|
default: i(() => [
|
|
110
|
-
(m(!0), g(
|
|
110
|
+
(m(!0), g(W, null, q(u(l), (n) => (m(), b(le, {
|
|
111
111
|
key: n.uid,
|
|
112
112
|
class: "text-xs",
|
|
113
113
|
isCopyable: !1,
|
|
@@ -118,9 +118,9 @@ const Ee = { class: "flex-1" }, he = ["value"], Re = /* @__PURE__ */ J({
|
|
|
118
118
|
isDefault: n.isDefault
|
|
119
119
|
},
|
|
120
120
|
warningMessage: "Are you sure you want to delete this environment?",
|
|
121
|
-
onClick: (
|
|
122
|
-
onColorModal:
|
|
123
|
-
onDelete: (
|
|
121
|
+
onClick: (a) => o.value = n.uid,
|
|
122
|
+
onColorModal: K,
|
|
123
|
+
onDelete: (a) => j(n.uid)
|
|
124
124
|
}, null, 8, ["variable", "onClick", "onDelete"]))), 128))
|
|
125
125
|
]),
|
|
126
126
|
_: 1
|
|
@@ -128,54 +128,53 @@ const Ee = { class: "flex-1" }, he = ["value"], Re = /* @__PURE__ */ J({
|
|
|
128
128
|
])
|
|
129
129
|
]),
|
|
130
130
|
button: i(() => [
|
|
131
|
-
s(
|
|
132
|
-
click:
|
|
133
|
-
hotkey: "N"
|
|
134
|
-
layout: a(O)
|
|
131
|
+
s(te, {
|
|
132
|
+
click: A,
|
|
133
|
+
hotkey: "N"
|
|
135
134
|
}, {
|
|
136
135
|
title: i(() => t[4] || (t[4] = [
|
|
137
|
-
|
|
136
|
+
G("Add Environment")
|
|
138
137
|
])),
|
|
139
138
|
_: 1
|
|
140
|
-
}
|
|
139
|
+
})
|
|
141
140
|
]),
|
|
142
141
|
_: 1
|
|
143
142
|
}),
|
|
144
|
-
s(
|
|
143
|
+
s(ue, { class: "flex-1" }, {
|
|
145
144
|
default: i(() => [
|
|
146
|
-
s(
|
|
145
|
+
s(ie, null, P({
|
|
147
146
|
default: i(() => [
|
|
148
|
-
o.value ? (m(), b(
|
|
147
|
+
o.value ? (m(), b(ee, {
|
|
149
148
|
key: 0,
|
|
150
149
|
class: "pl-px pr-2 md:px-4 py-2",
|
|
151
150
|
isCopyable: "",
|
|
152
151
|
language: "json",
|
|
153
152
|
lineNumbers: "",
|
|
154
153
|
lint: "",
|
|
155
|
-
modelValue:
|
|
156
|
-
"onUpdate:modelValue":
|
|
157
|
-
}, null, 8, ["modelValue"])) :
|
|
154
|
+
modelValue: u(l)[o.value].value,
|
|
155
|
+
"onUpdate:modelValue": $
|
|
156
|
+
}, null, 8, ["modelValue"])) : Q("", !0)
|
|
158
157
|
]),
|
|
159
158
|
_: 2
|
|
160
159
|
}, [
|
|
161
160
|
o.value ? {
|
|
162
161
|
name: "title",
|
|
163
162
|
fn: i(() => [
|
|
164
|
-
!y.value ||
|
|
163
|
+
!y.value || u(l)[o.value].isDefault ? (m(), g("span", {
|
|
165
164
|
key: 0,
|
|
166
|
-
onDblclick:
|
|
167
|
-
},
|
|
165
|
+
onDblclick: R
|
|
166
|
+
}, X(u(l)[o.value].name), 33)) : (m(), g("input", {
|
|
168
167
|
key: 1,
|
|
169
168
|
ref_key: "nameInputRef",
|
|
170
|
-
ref:
|
|
169
|
+
ref: V,
|
|
171
170
|
class: "ring-1 ring-offset-4 ring-b-outline rounded",
|
|
172
171
|
spellcheck: "false",
|
|
173
172
|
type: "text",
|
|
174
|
-
value:
|
|
173
|
+
value: u(l)[o.value].name,
|
|
175
174
|
onBlur: t[0] || (t[0] = (n) => y.value = !1),
|
|
176
|
-
onInput:
|
|
177
|
-
onKeyup: t[1] || (t[1] =
|
|
178
|
-
}, null, 40,
|
|
175
|
+
onInput: B,
|
|
176
|
+
onKeyup: t[1] || (t[1] = Y((n) => y.value = !1, ["enter"]))
|
|
177
|
+
}, null, 40, ye))
|
|
179
178
|
]),
|
|
180
179
|
key: "0"
|
|
181
180
|
} : void 0
|
|
@@ -183,15 +182,15 @@ const Ee = { class: "flex-1" }, he = ["value"], Re = /* @__PURE__ */ J({
|
|
|
183
182
|
]),
|
|
184
183
|
_: 1
|
|
185
184
|
}),
|
|
186
|
-
s(
|
|
187
|
-
selectedColor:
|
|
188
|
-
state:
|
|
189
|
-
onCancel: t[2] || (t[2] = (n) =>
|
|
190
|
-
onSubmit:
|
|
185
|
+
s(de, {
|
|
186
|
+
selectedColor: _.value,
|
|
187
|
+
state: u(v),
|
|
188
|
+
onCancel: t[2] || (t[2] = (n) => u(v).hide()),
|
|
189
|
+
onSubmit: I
|
|
191
190
|
}, null, 8, ["selectedColor", "state"]),
|
|
192
|
-
s(
|
|
193
|
-
state:
|
|
194
|
-
onCancel: t[3] || (t[3] = (n) =>
|
|
191
|
+
s(fe, {
|
|
192
|
+
state: u(p),
|
|
193
|
+
onCancel: t[3] || (t[3] = (n) => u(p).hide()),
|
|
195
194
|
onSubmit: x
|
|
196
195
|
}, null, 8, ["state"])
|
|
197
196
|
]),
|
|
@@ -200,5 +199,5 @@ const Ee = { class: "flex-1" }, he = ["value"], Re = /* @__PURE__ */ J({
|
|
|
200
199
|
}
|
|
201
200
|
});
|
|
202
201
|
export {
|
|
203
|
-
|
|
202
|
+
Ke as default
|
|
204
203
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuth.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-9d4fb132"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|