@scalar/api-client 2.2.35 → 2.2.38
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 +61 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +1 -1
- package/dist/components/AddressBar/AddressBar.vue2.js +107 -116
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts +2 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +96 -76
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts +5 -1
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +92 -86
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts +7 -10
- package/dist/components/AddressBar/AddressBarServerItem.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServerItem.vue.js +5 -52
- package/dist/components/AddressBar/AddressBarServerItem.vue2.js +75 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts +5 -0
- 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 +126 -112
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -4
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +1 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.js +21 -18
- 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 +2 -2
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +1 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +86 -54
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +22 -21
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +3 -3
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +14 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesForm.vue.js +47 -0
- package/dist/components/Server/ServerVariablesForm.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts +12 -0
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesSelect.vue.js +54 -0
- package/dist/components/Server/ServerVariablesSelect.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +11 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.js +29 -0
- package/dist/components/Server/ServerVariablesTextbox.vue2.js +4 -0
- package/dist/components/Server/types.d.ts +9 -0
- package/dist/components/Server/types.d.ts.map +1 -0
- package/dist/components/SideNav/SideHelp.vue.js +16 -16
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +11 -10
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue2.js +10 -9
- package/dist/components/TopNav/TopNav.vue.js +27 -27
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +99 -84
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +198 -168
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +99 -84
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +110 -90
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +86 -81
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +4 -4
- package/dist/libs/index.js +18 -19
- package/dist/libs/send-request/index.js +3 -4
- package/dist/libs/send-request/send-request.d.ts +0 -14
- package/dist/libs/send-request/send-request.d.ts.map +1 -1
- package/dist/libs/send-request/send-request.js +120 -142
- package/dist/libs/send-request/set-request-cookies.d.ts +27 -0
- package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -0
- package/dist/libs/send-request/set-request-cookies.js +54 -0
- package/dist/store/active-entities.d.ts +13 -4
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +15 -12
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -58
- package/dist/store/cookies.d.ts.map +1 -1
- package/dist/store/cookies.js +5 -17
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +52 -2
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +2 -2
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/servers.d.ts +40 -20
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +99 -86
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +51 -53
- package/dist/style.css +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +24 -37
- package/dist/views/Cookies/CookieModal.vue.d.ts +21 -0
- package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -0
- package/dist/views/Cookies/CookieModal.vue.js +7 -0
- package/dist/views/Cookies/CookieModal.vue2.js +88 -0
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +98 -119
- package/dist/views/Environment/Environment.vue2.js +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +88 -89
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +87 -88
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +2 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +16 -17
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestExampleAuth.vue2.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +34 -34
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +7 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +79 -66
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +57 -74
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +91 -64
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +9 -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 +168 -129
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +5 -64
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +46 -2
- 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 +143 -143
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +71 -71
- 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 +37 -37
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +19 -17
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +27 -27
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +31 -31
- package/dist/views/Request/handle-drag.d.ts +1 -1
- package/dist/views/Request/handle-drag.d.ts.map +1 -1
- package/dist/views/Request/handle-drag.js +27 -26
- package/dist/views/Request/hooks/useOpenApiWatcher.js +1 -1
- package/dist/views/Request/libs/request.d.ts +12 -0
- package/dist/views/Request/libs/request.d.ts.map +1 -0
- package/dist/views/Request/libs/request.js +4 -0
- package/dist/views/Request/libs/{live-sync.d.ts → watch-mode.d.ts} +1 -1
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -0
- package/dist/views/Request/libs/{live-sync.js → watch-mode.js} +6 -6
- package/dist/views/Servers/Servers.vue2.js +29 -29
- package/package.json +10 -12
- package/dist/views/Cookies/CookieRaw.vue.js +0 -28
- package/dist/views/Cookies/CookieRaw.vue2.js +0 -4
- package/dist/views/Request/libs/live-sync.d.ts.map +0 -1
|
@@ -1,103 +1,135 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as O, computed as m, ref as y, watch as S, nextTick as E, openBlock as u, createElementBlock as f, createBlock as v, unref as a, withCtx as n, createVNode as s, createElementVNode as d, toDisplayString as w, withDirectives as K, withKeys as M, vModelText as R, Fragment as C, renderList as U, normalizeClass as W, createTextVNode as $, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { ScalarComboboxMultiselect as F, ScalarButton as b, ScalarIcon as h, ScalarDropdown as L, ScalarDropdownItem as D, ScalarDropdownDivider as q } from "@scalar/components";
|
|
3
|
+
const G = { class: "pr-4 w-full has-[:focus-visible]:outline has-[:focus-visible]:rounded-[4px] -outline-offset-1" }, H = { class: "text-c-1 whitespace-nowrap" }, J = { class: "text-c-1" }, P = { class: "flex items-center justify-center h-4 w-4" }, Z = /* @__PURE__ */ O({
|
|
4
4
|
__name: "DataTableInputSelect",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: {},
|
|
7
7
|
value: {},
|
|
8
8
|
default: {},
|
|
9
|
-
canAddCustomValue: { type: Boolean, default: !0 }
|
|
9
|
+
canAddCustomValue: { type: Boolean, default: !0 },
|
|
10
|
+
type: {}
|
|
10
11
|
},
|
|
11
12
|
emits: ["update:modelValue"],
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
setup(B, { emit: j }) {
|
|
14
|
+
const r = B, c = j, p = m(() => r.value ?? []), i = y(!1), o = y(""), x = y(null);
|
|
15
|
+
S(o, (e) => {
|
|
16
|
+
c("update:modelValue", e);
|
|
16
17
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
e &&
|
|
18
|
+
const k = (e) => {
|
|
19
|
+
c("update:modelValue", e), i.value = !1;
|
|
20
|
+
}, z = () => {
|
|
21
|
+
o.value.trim() && (k(o.value), o.value = "");
|
|
22
|
+
}, A = () => {
|
|
23
|
+
o.value.trim() || (c("update:modelValue", ""), i.value = !1);
|
|
24
|
+
}, N = (e) => r.modelValue.toString() === e;
|
|
25
|
+
S(i, (e) => {
|
|
26
|
+
e && E(() => {
|
|
26
27
|
var t;
|
|
27
|
-
(t =
|
|
28
|
+
(t = x.value) == null || t.focus();
|
|
28
29
|
});
|
|
29
30
|
});
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const g = m(() => r.modelValue !== void 0 ? r.modelValue : r.default), V = m(() => {
|
|
32
|
+
const e = new Set(r.modelValue.toString().split(", "));
|
|
33
|
+
return p.value.filter((t) => e.has(t)).map((t) => ({ id: t, label: t, value: t }));
|
|
34
|
+
}), T = m(
|
|
35
|
+
() => p.value.map((e) => ({ id: e, label: e, value: e }))
|
|
36
|
+
), I = (e) => {
|
|
37
|
+
const t = e.map((l) => l.value);
|
|
38
|
+
c("update:modelValue", t.join(", "));
|
|
39
|
+
};
|
|
40
|
+
return (e, t) => (u(), f("div", G, [
|
|
41
|
+
e.type === "array" ? (u(), v(a(F), {
|
|
33
42
|
key: 0,
|
|
43
|
+
modelValue: V.value,
|
|
44
|
+
options: T.value,
|
|
45
|
+
"onUpdate:modelValue": I
|
|
46
|
+
}, {
|
|
47
|
+
default: n(() => [
|
|
48
|
+
s(a(b), {
|
|
49
|
+
class: "gap-1.5 font-normal h-full justify-start px-2 py-1.5 custom-scroll pr-6 outline-none",
|
|
50
|
+
fullWidth: "",
|
|
51
|
+
variant: "ghost"
|
|
52
|
+
}, {
|
|
53
|
+
default: n(() => [
|
|
54
|
+
d("span", H, w(V.value.length > 0 ? V.value.map((l) => l.label).join(", ") : "Select a value"), 1),
|
|
55
|
+
s(a(h), {
|
|
56
|
+
icon: "ChevronDown",
|
|
57
|
+
size: "md"
|
|
58
|
+
})
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
})
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, ["modelValue", "options"])) : i.value ? K((u(), f("input", {
|
|
65
|
+
key: 1,
|
|
34
66
|
ref_key: "inputRef",
|
|
35
|
-
ref:
|
|
36
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) =>
|
|
67
|
+
ref: x,
|
|
68
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => o.value = l),
|
|
37
69
|
class: "border-none text-c-1 min-w-0 w-full px-2 py-1.5 outline-none",
|
|
38
70
|
placeholder: "Value",
|
|
39
71
|
type: "text",
|
|
40
|
-
onBlur:
|
|
41
|
-
onKeyup:
|
|
72
|
+
onBlur: A,
|
|
73
|
+
onKeyup: M(z, ["enter"])
|
|
42
74
|
}, null, 544)), [
|
|
43
|
-
[
|
|
44
|
-
]) : (
|
|
45
|
-
key:
|
|
75
|
+
[R, o.value]
|
|
76
|
+
]) : (u(), v(a(L), {
|
|
77
|
+
key: 2,
|
|
46
78
|
resize: "",
|
|
47
|
-
value:
|
|
79
|
+
value: g.value
|
|
48
80
|
}, {
|
|
49
|
-
items:
|
|
50
|
-
(
|
|
81
|
+
items: n(() => [
|
|
82
|
+
(u(!0), f(C, null, U(p.value, (l) => (u(), v(a(D), {
|
|
51
83
|
key: l,
|
|
52
84
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
|
|
53
85
|
value: l,
|
|
54
|
-
onClick: (
|
|
86
|
+
onClick: (Q) => k(l)
|
|
55
87
|
}, {
|
|
56
|
-
default:
|
|
57
|
-
|
|
58
|
-
class:
|
|
88
|
+
default: n(() => [
|
|
89
|
+
d("div", {
|
|
90
|
+
class: W([
|
|
59
91
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4",
|
|
60
|
-
|
|
92
|
+
N(l) ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
|
|
61
93
|
])
|
|
62
94
|
}, [
|
|
63
|
-
|
|
95
|
+
s(a(h), {
|
|
64
96
|
class: "size-2.5",
|
|
65
97
|
icon: "Checkmark",
|
|
66
98
|
thickness: "3.5"
|
|
67
99
|
})
|
|
68
100
|
], 2),
|
|
69
|
-
|
|
101
|
+
$(" " + w(l), 1)
|
|
70
102
|
]),
|
|
71
103
|
_: 2
|
|
72
104
|
}, 1032, ["value", "onClick"]))), 128)),
|
|
73
|
-
e.canAddCustomValue ? (
|
|
74
|
-
|
|
75
|
-
|
|
105
|
+
e.canAddCustomValue ? (u(), f(C, { key: 0 }, [
|
|
106
|
+
p.value.length ? (u(), v(a(q), { key: 0 })) : _("", !0),
|
|
107
|
+
s(a(D), {
|
|
76
108
|
class: "flex items-center gap-1.5",
|
|
77
|
-
onClick: t[1] || (t[1] = (l) =>
|
|
109
|
+
onClick: t[1] || (t[1] = (l) => i.value = !0)
|
|
78
110
|
}, {
|
|
79
|
-
default:
|
|
80
|
-
|
|
81
|
-
|
|
111
|
+
default: n(() => [
|
|
112
|
+
d("div", P, [
|
|
113
|
+
s(a(h), {
|
|
82
114
|
icon: "Add",
|
|
83
115
|
size: "sm"
|
|
84
116
|
})
|
|
85
117
|
]),
|
|
86
|
-
t[2] || (t[2] =
|
|
118
|
+
t[2] || (t[2] = d("span", null, "Add value", -1))
|
|
87
119
|
]),
|
|
88
120
|
_: 1
|
|
89
121
|
})
|
|
90
|
-
], 64)) :
|
|
122
|
+
], 64)) : _("", !0)
|
|
91
123
|
]),
|
|
92
|
-
default:
|
|
93
|
-
|
|
94
|
-
class: "gap-1.5 font-normal h-full justify-start px-2 py-1.5",
|
|
124
|
+
default: n(() => [
|
|
125
|
+
s(a(b), {
|
|
126
|
+
class: "gap-1.5 font-normal h-full justify-start px-2 py-1.5 outline-none",
|
|
95
127
|
fullWidth: "",
|
|
96
128
|
variant: "ghost"
|
|
97
129
|
}, {
|
|
98
|
-
default:
|
|
99
|
-
|
|
100
|
-
|
|
130
|
+
default: n(() => [
|
|
131
|
+
d("span", J, w(g.value || "Select a value"), 1),
|
|
132
|
+
s(a(h), {
|
|
101
133
|
icon: "ChevronDown",
|
|
102
134
|
size: "md"
|
|
103
135
|
})
|
|
@@ -111,5 +143,5 @@ const U = { class: "w-full" }, W = { class: "text-c-1" }, q = { class: "flex ite
|
|
|
111
143
|
}
|
|
112
144
|
});
|
|
113
145
|
export {
|
|
114
|
-
|
|
146
|
+
Z as default
|
|
115
147
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"EnvironmentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/EnvironmentSelector/EnvironmentSelector.vue"],"names":[],"mappings":";AAodA,wBAMG"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { defineComponent as I, computed as f, watch as B, onMounted as D, openBlock as c, createElementBlock as x, createVNode as s, unref as n, withCtx as l, Fragment as j, renderList as M, createBlock as h, withModifiers as w, createTextVNode as E, toDisplayString as k, createElementVNode as u, normalizeClass as V, createCommentVNode as z } from "vue";
|
|
2
|
-
import { useActiveEntities as
|
|
3
|
-
import { ScalarDropdown as
|
|
4
|
-
import { useRouter as
|
|
5
|
-
import { useWorkspace as
|
|
6
|
-
|
|
2
|
+
import { useActiveEntities as L } from "../../store/active-entities.js";
|
|
3
|
+
import { ScalarDropdown as W, ScalarDropdownItem as m, ScalarListboxCheckbox as $, ScalarIcon as g, ScalarDropdownDivider as A, ScalarButton as F } from "@scalar/components";
|
|
4
|
+
import { useRouter as O } from "vue-router";
|
|
5
|
+
import { useWorkspace as R } from "../../store/store.js";
|
|
6
|
+
import { useLayout as T } from "../../hooks/useLayout.js";
|
|
7
|
+
const q = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap" }, G = { class: "flex items-center justify-center h-4 w-4" }, Y = /* @__PURE__ */ I({
|
|
7
8
|
__name: "EnvironmentSelector",
|
|
8
|
-
setup(
|
|
9
|
-
const { activeCollection: a, activeWorkspace: i, activeEnvironment:
|
|
10
|
-
a.value && i.value && (
|
|
9
|
+
setup(H) {
|
|
10
|
+
const { activeCollection: a, activeWorkspace: i, activeEnvironment: v } = L(), { collectionMutators: _ } = R(), { layout: b } = T(), C = O(), d = (e) => {
|
|
11
|
+
a.value && i.value && (_.edit(
|
|
11
12
|
a.value.uid,
|
|
12
13
|
"x-scalar-active-environment",
|
|
13
14
|
e
|
|
@@ -21,7 +22,7 @@ const T = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
21
22
|
}
|
|
22
23
|
});
|
|
23
24
|
}, y = f(() => {
|
|
24
|
-
const { value: e } =
|
|
25
|
+
const { value: e } = v, { value: t } = a;
|
|
25
26
|
return (e == null ? void 0 : e.uid) || (t == null ? void 0 : t["x-scalar-active-environment"]) || "No Environment";
|
|
26
27
|
}), N = f(() => {
|
|
27
28
|
const { value: e } = a, t = e == null ? void 0 : e["x-scalar-environments"];
|
|
@@ -40,9 +41,9 @@ const T = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
40
41
|
), D(() => {
|
|
41
42
|
a.value && p(a.value);
|
|
42
43
|
}), (e, t) => (c(), x("div", null, [
|
|
43
|
-
s(n(
|
|
44
|
+
s(n(W), { placement: "bottom-end" }, {
|
|
44
45
|
items: l(() => [
|
|
45
|
-
(c(!0), x(j, null, M(N.value, (o) => (c(), h(n(
|
|
46
|
+
(c(!0), x(j, null, M(N.value, (o) => (c(), h(n(m), {
|
|
46
47
|
key: o.uid,
|
|
47
48
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
|
|
48
49
|
onClick: w((r) => d(o.uid), ["stop"])
|
|
@@ -50,7 +51,7 @@ const T = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
50
51
|
default: l(() => {
|
|
51
52
|
var r;
|
|
52
53
|
return [
|
|
53
|
-
s(n(
|
|
54
|
+
s(n($), {
|
|
54
55
|
selected: ((r = n(a)) == null ? void 0 : r["x-scalar-active-environment"]) === o.uid
|
|
55
56
|
}, null, 8, ["selected"]),
|
|
56
57
|
E(" " + k(o.name), 1)
|
|
@@ -58,7 +59,7 @@ const T = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
58
59
|
}),
|
|
59
60
|
_: 2
|
|
60
61
|
}, 1032, ["onClick"]))), 128)),
|
|
61
|
-
s(n(
|
|
62
|
+
s(n(m), {
|
|
62
63
|
class: "flex gap-1.5 group/item items-center whitespace-nowrap text-ellipsis overflow-hidden",
|
|
63
64
|
onClick: t[0] || (t[0] = w((o) => d(""), ["stop"]))
|
|
64
65
|
}, {
|
|
@@ -68,7 +69,7 @@ const T = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
68
69
|
u("div", {
|
|
69
70
|
class: V([
|
|
70
71
|
"flex items-center justify-center rounded-full p-[3px] w-4 h-4",
|
|
71
|
-
((o = n(
|
|
72
|
+
((o = n(v)) == null ? void 0 : o.uid) === "" && ((r = n(a)) == null ? void 0 : r["x-scalar-active-environment"]) === "" ? "bg-c-accent text-b-1" : "group-hover/item:shadow-border text-transparent"
|
|
72
73
|
])
|
|
73
74
|
}, [
|
|
74
75
|
s(n(g), {
|
|
@@ -82,14 +83,14 @@ const T = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
82
83
|
}),
|
|
83
84
|
_: 1
|
|
84
85
|
}),
|
|
85
|
-
s(n(
|
|
86
|
-
n(
|
|
86
|
+
s(n(A)),
|
|
87
|
+
n(b) !== "modal" ? (c(), h(n(m), {
|
|
87
88
|
key: 0,
|
|
88
89
|
class: "flex items-center gap-1.5",
|
|
89
90
|
onClick: S
|
|
90
91
|
}, {
|
|
91
92
|
default: l(() => [
|
|
92
|
-
u("div",
|
|
93
|
+
u("div", G, [
|
|
93
94
|
s(n(g), {
|
|
94
95
|
icon: "Brackets",
|
|
95
96
|
size: "sm"
|
|
@@ -98,16 +99,16 @@ const T = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
98
99
|
t[2] || (t[2] = u("span", { class: "leading-none" }, "Manage Environments", -1))
|
|
99
100
|
]),
|
|
100
101
|
_: 1
|
|
101
|
-
}))
|
|
102
|
+
})) : z("", !0)
|
|
102
103
|
]),
|
|
103
104
|
default: l(() => [
|
|
104
|
-
s(n(
|
|
105
|
+
s(n(F), {
|
|
105
106
|
class: "font-normal h-auto justify-start py-1.5 px-1.5 pl-2 text-c-1 hover:bg-b-2 w-fit",
|
|
106
107
|
fullWidth: "",
|
|
107
108
|
variant: "ghost"
|
|
108
109
|
}, {
|
|
109
110
|
default: l(() => [
|
|
110
|
-
u("h2",
|
|
111
|
+
u("h2", q, k(y.value), 1)
|
|
111
112
|
]),
|
|
112
113
|
_: 1
|
|
113
114
|
})
|
|
@@ -118,5 +119,5 @@ const T = { class: "font-medium m-0 flex gap-1.5 items-center whitespace-nowrap"
|
|
|
118
119
|
}
|
|
119
120
|
});
|
|
120
121
|
export {
|
|
121
|
-
|
|
122
|
+
Y as default
|
|
122
123
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.vue"],"names":[],"mappings":"AAqDA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,WAAW,EAAE,MAAM,CAAA;KACpB,EAAE,CAAA;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACzB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;CAC5C,CAAC;AAQF,iBAAS,cAAc;WAwGT,OAAO,IAA6B;;uBARvB,GAAG;;;;EAa7B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -11,8 +11,8 @@ const C = { key: 0 }, N = { class: "custom-scroll flex flex-1 flex-col gap-1.5"
|
|
|
11
11
|
data: {},
|
|
12
12
|
onUpdate: { type: Function }
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
return (e,
|
|
14
|
+
setup(U) {
|
|
15
|
+
return (e, w) => (t(), a(g, null, {
|
|
16
16
|
title: l(() => [
|
|
17
17
|
e.title ? (t(), n("span", C, s(e.title), 1)) : p(e.$slots, "title", { key: 1 })
|
|
18
18
|
]),
|
|
@@ -29,7 +29,7 @@ const C = { key: 0 }, N = { class: "custom-scroll flex flex-1 flex-col gap-1.5"
|
|
|
29
29
|
}, {
|
|
30
30
|
default: l(() => [
|
|
31
31
|
_(h, {
|
|
32
|
-
modelValue:
|
|
32
|
+
modelValue: e.data[o.key],
|
|
33
33
|
placeholder: o.placeholder,
|
|
34
34
|
"onUpdate:modelValue": (d) => e.onUpdate(o.key, d)
|
|
35
35
|
}, {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ServerVariableValues, ServerVariables } from '../../components/Server/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
variables?: ServerVariables;
|
|
4
|
+
values?: ServerVariableValues;
|
|
5
|
+
/** The ID of the input controlled by the variables form */
|
|
6
|
+
controls?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
"update:variable": (name: string, value: string) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:variable"?: ((name: string, value: string) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=ServerVariablesForm.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerVariablesForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesForm.vue"],"names":[],"mappings":"AA+DA,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,2BAA2B,CAAA;AAIlC,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;;;;;AA0IF,wBAOG"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent as h, openBlock as o, createElementBlock as m, Fragment as k, renderList as y, createElementVNode as C, toDisplayString as V, createBlock as v, createCommentVNode as _ } from "vue";
|
|
2
|
+
import S from "./ServerVariablesSelect.vue.js";
|
|
3
|
+
import B from "./ServerVariablesTextbox.vue.js";
|
|
4
|
+
const j = { class: "flex items-center pl-3 py-1.5 after:content-[':'] mr-1.5 group-has-[input]/label:mr-0" }, O = /* @__PURE__ */ h({
|
|
5
|
+
__name: "ServerVariablesForm",
|
|
6
|
+
props: {
|
|
7
|
+
variables: {},
|
|
8
|
+
values: {},
|
|
9
|
+
controls: {}
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:variable"],
|
|
12
|
+
setup(f, { emit: g }) {
|
|
13
|
+
const n = f, d = g;
|
|
14
|
+
function s(e, l) {
|
|
15
|
+
d("update:variable", e, l);
|
|
16
|
+
}
|
|
17
|
+
const i = (e) => {
|
|
18
|
+
var l, r, t;
|
|
19
|
+
return (((l = n.values) == null ? void 0 : l[e]) ?? ((t = (r = n.variables) == null ? void 0 : r[e]) == null ? void 0 : t.default) ?? "").toString();
|
|
20
|
+
};
|
|
21
|
+
return (e, l) => e.variables && Object.keys(e.variables ?? {}).length ? (o(!0), m(k, { key: 0 }, y(Object.keys(e.variables), (r) => {
|
|
22
|
+
var t, u, c, p, b;
|
|
23
|
+
return o(), m("label", {
|
|
24
|
+
key: r,
|
|
25
|
+
class: "group/label flex w-full"
|
|
26
|
+
}, [
|
|
27
|
+
C("span", j, V(r), 1),
|
|
28
|
+
(c = (u = (t = e.variables) == null ? void 0 : t[r]) == null ? void 0 : u.enum) != null && c.length ? (o(), v(S, {
|
|
29
|
+
key: 0,
|
|
30
|
+
controls: e.controls,
|
|
31
|
+
enum: ((b = (p = e.variables[r]) == null ? void 0 : p.enum) == null ? void 0 : b.map((a) => String(a))) ?? [],
|
|
32
|
+
label: r,
|
|
33
|
+
value: i(r),
|
|
34
|
+
onChange: (a) => s(r, a)
|
|
35
|
+
}, null, 8, ["controls", "enum", "label", "value", "onChange"])) : (o(), v(B, {
|
|
36
|
+
key: 1,
|
|
37
|
+
controls: e.controls,
|
|
38
|
+
value: i(r),
|
|
39
|
+
onChange: (a) => s(r, a)
|
|
40
|
+
}, null, 8, ["controls", "value", "onChange"]))
|
|
41
|
+
]);
|
|
42
|
+
}), 128)) : _("", !0);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
O as default
|
|
47
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
enum: string[];
|
|
3
|
+
value: string;
|
|
4
|
+
controls?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
change: (v: string) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onChange?: ((v: string) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=ServerVariablesSelect.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerVariablesSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesSelect.vue"],"names":[],"mappings":"AA+DA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;;;;;AA6GF,wBAQG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as v, computed as s, openBlock as r, createBlock as f, unref as a, withCtx as c, createVNode as i, createElementVNode as S, normalizeClass as V, createElementBlock as h, createCommentVNode as g, createTextVNode as C, toDisplayString as k } from "vue";
|
|
2
|
+
import { ScalarListbox as y, ScalarButton as B, ScalarIcon as N } from "@scalar/components";
|
|
3
|
+
const _ = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "sr-only"
|
|
6
|
+
}, x = /* @__PURE__ */ v({
|
|
7
|
+
__name: "ServerVariablesSelect",
|
|
8
|
+
props: {
|
|
9
|
+
enum: {},
|
|
10
|
+
value: {},
|
|
11
|
+
controls: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["change"],
|
|
14
|
+
setup(u, { emit: m }) {
|
|
15
|
+
const o = u, d = m, t = s(
|
|
16
|
+
() => o.enum.map((e) => ({ id: e, label: e }))
|
|
17
|
+
), l = s({
|
|
18
|
+
get: () => t.value.find((e) => e.id === o.value),
|
|
19
|
+
set: (e) => d("change", (e == null ? void 0 : e.id) ?? "")
|
|
20
|
+
});
|
|
21
|
+
return (e, n) => (r(), f(a(y), {
|
|
22
|
+
modelValue: l.value,
|
|
23
|
+
"onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
|
|
24
|
+
options: t.value
|
|
25
|
+
}, {
|
|
26
|
+
default: c(() => [
|
|
27
|
+
i(a(B), {
|
|
28
|
+
"aria-controls": e.controls,
|
|
29
|
+
class: "h-8 p-0 py-1.5 w-full font-normal",
|
|
30
|
+
variant: "ghost"
|
|
31
|
+
}, {
|
|
32
|
+
default: c(() => [
|
|
33
|
+
S("span", {
|
|
34
|
+
class: V({ "text-c-1": e.value })
|
|
35
|
+
}, [
|
|
36
|
+
e.value ? (r(), h("span", _, " Selected: ")) : g("", !0),
|
|
37
|
+
C(" " + k(e.value || "Select value"), 1)
|
|
38
|
+
], 2),
|
|
39
|
+
i(a(N), {
|
|
40
|
+
class: "ml-1",
|
|
41
|
+
icon: "ChevronDown",
|
|
42
|
+
size: "sm"
|
|
43
|
+
})
|
|
44
|
+
]),
|
|
45
|
+
_: 1
|
|
46
|
+
}, 8, ["aria-controls"])
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
}, 8, ["modelValue", "options"]));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
x as default
|
|
54
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: string;
|
|
3
|
+
controls?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
change: (v: string) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onChange?: ((v: string) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLInputElement>;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=ServerVariablesTextbox.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerVariablesTextbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesTextbox.vue"],"names":[],"mappings":"AAiCA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;;;;;;AAuEF,wBAQG"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as c, computed as p, withDirectives as u, openBlock as i, createElementBlock as m, vModelText as d } from "vue";
|
|
2
|
+
const f = ["aria-controls"], x = /* @__PURE__ */ c({
|
|
3
|
+
__name: "ServerVariablesTextbox",
|
|
4
|
+
props: {
|
|
5
|
+
value: {},
|
|
6
|
+
controls: {}
|
|
7
|
+
},
|
|
8
|
+
emits: ["change"],
|
|
9
|
+
setup(l, { emit: n }) {
|
|
10
|
+
const a = l, r = n, t = p({
|
|
11
|
+
get: () => a.value,
|
|
12
|
+
set: (e) => r("change", e)
|
|
13
|
+
});
|
|
14
|
+
return (e, o) => u((i(), m("input", {
|
|
15
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
|
|
16
|
+
"aria-controls": e.controls,
|
|
17
|
+
autocomplete: "off",
|
|
18
|
+
class: "px-1.5 text-c-1 border-transparent -outline-offset-1 w-full",
|
|
19
|
+
placeholder: "value",
|
|
20
|
+
spellcheck: "false",
|
|
21
|
+
type: "text"
|
|
22
|
+
}, null, 8, f)), [
|
|
23
|
+
[d, t.value]
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
x as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
export type ServerVariables = {
|
|
3
|
+
[variable: string]: ServerVariable;
|
|
4
|
+
};
|
|
5
|
+
export type ServerVariableValues = {
|
|
6
|
+
[variable: string]: string;
|
|
7
|
+
};
|
|
8
|
+
export type ServerVariable = OpenAPIV3.ServerVariableObject | OpenAPIV3_1.ServerVariableObject;
|
|
9
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Server/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnE,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,cAAc,GACtB,SAAS,CAAC,oBAAoB,GAC9B,WAAW,CAAC,oBAAoB,CAAA"}
|