@scalar/api-client 2.1.36 → 2.1.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 +33 -0
- package/dist/components/AddressBar/AddressBarServer.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarServer.vue.js +8 -7
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +43 -42
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -2
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +38 -40
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +2 -2
- package/dist/components/SideNav/SideNav.vue2.js +42 -29
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -0
- 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 +32 -28
- package/dist/layouts/App/create-api-client-app.d.ts +70 -6
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +140 -12
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +70 -6
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +76 -9
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +92 -80
- package/dist/store/collections.d.ts +1 -0
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +1 -0
- package/dist/store/cookies.d.ts.map +1 -1
- package/dist/store/environment.d.ts +1 -0
- package/dist/store/environment.d.ts.map +1 -1
- package/dist/store/environment.js +6 -7
- package/dist/store/request-example.d.ts +1 -0
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +55 -4
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +2 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +9 -9
- package/dist/store/servers.d.ts +1 -0
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +138 -10
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts +1 -0
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +1 -0
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +98 -83
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +16 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +1 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.js +40 -0
- package/dist/views/Environment/EnvironmentColorModal.vue2.js +4 -0
- package/dist/views/Environment/EnvironmentColors.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentColors.vue.js +84 -29
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +20 -0
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -0
- package/dist/views/Environment/EnvironmentModal.vue.js +52 -0
- package/dist/views/Environment/EnvironmentModal.vue2.js +4 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +2 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +51 -50
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +12 -12
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +8 -8
|
@@ -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":";WA6NS,OAAO;;WAAP,OAAO;;AAibhB,wBAMG"}
|
|
@@ -1,61 +1,70 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
1
|
+
import { defineComponent as B, ref as m, onMounted as K, onBeforeUnmount as L, openBlock as i, createBlock as p, withCtx as r, createVNode as u, createElementVNode as R, createElementBlock as y, Fragment as U, renderList as O, unref as a, createTextVNode as T, createSlots as j, createCommentVNode as F, toDisplayString as H, withKeys as J, nextTick as W } from "vue";
|
|
2
|
+
import q from "../../components/CodeInput/CodeInput.vue.js";
|
|
3
|
+
import z from "../../components/Sidebar/Sidebar.vue.js";
|
|
4
|
+
import G from "../../components/Sidebar/SidebarButton.vue.js";
|
|
5
|
+
import P from "../../components/Sidebar/SidebarList.vue.js";
|
|
6
|
+
import Q from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
7
|
+
import X from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
8
|
+
import Y from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
9
|
+
import Z from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
10
|
+
import { useModal as x } from "@scalar/components";
|
|
11
|
+
import { environmentSchema as ee } from "@scalar/oas-utils/entities/environment";
|
|
12
|
+
import { nanoid as te } from "nanoid";
|
|
13
|
+
import { useRouter as oe, useRoute as ne } from "vue-router";
|
|
14
|
+
import le from "./EnvironmentColorModal.vue.js";
|
|
15
|
+
import ae from "./EnvironmentModal.vue.js";
|
|
16
|
+
import { useWorkspace as re } from "../../store/store.js";
|
|
17
|
+
const ue = { class: "flex-1" }, ie = ["value"], we = /* @__PURE__ */ B({
|
|
16
18
|
__name: "Environment",
|
|
17
19
|
props: {
|
|
18
20
|
isApp: { type: Boolean }
|
|
19
21
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
name:
|
|
25
|
-
uid:
|
|
26
|
-
color:
|
|
27
|
-
|
|
28
|
-
parsed: [],
|
|
22
|
+
setup(se) {
|
|
23
|
+
const E = oe(), h = ne(), { environments: l, environmentMutators: s, events: k } = re(), d = x(), f = x(), t = m(null), g = m(null), c = m(!1), v = m(null), C = m("");
|
|
24
|
+
function _(e) {
|
|
25
|
+
const o = ee.parse({
|
|
26
|
+
name: e.name,
|
|
27
|
+
uid: te(),
|
|
28
|
+
color: e.color,
|
|
29
|
+
value: JSON.stringify({ exampleKey: "exampleValue" }, null, 2),
|
|
29
30
|
isDefault: !1
|
|
30
31
|
});
|
|
31
|
-
s.add(
|
|
32
|
+
s.add(o), t.value = o.uid, E.push(t.value), f.hide();
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
|
|
34
|
+
function N(e) {
|
|
35
|
+
t.value && s.edit(t.value, "value", e);
|
|
35
36
|
}
|
|
36
|
-
const
|
|
37
|
-
s.delete(
|
|
38
|
-
}, D = (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
const w = (e) => {
|
|
38
|
+
s.delete(e), t.value === e && (t.value = null);
|
|
39
|
+
}, D = (e) => {
|
|
40
|
+
v.value = e, C.value = l[e].color || "", d.show();
|
|
41
|
+
}, M = (e) => {
|
|
42
|
+
v.value && (s.edit(v.value, "color", e), d.hide());
|
|
43
|
+
}, V = () => {
|
|
44
|
+
E.currentRoute.value.params.environment === "default" && (t.value = l.default.uid);
|
|
45
|
+
}, $ = () => {
|
|
46
|
+
t.value && !l[t.value].isDefault && (c.value = !0, W(() => {
|
|
47
|
+
var e;
|
|
48
|
+
(e = g.value) == null || e.focus();
|
|
42
49
|
}));
|
|
43
|
-
},
|
|
44
|
-
const n =
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
|
|
50
|
+
}, S = (e) => {
|
|
51
|
+
const n = e.target.value;
|
|
52
|
+
t.value && !l[t.value].isDefault && s.edit(t.value, "name", n);
|
|
53
|
+
}, b = (e) => {
|
|
54
|
+
e != null && e.createNew && h.name === "environment" && _({ name: "", color: "" });
|
|
55
|
+
}, A = () => {
|
|
56
|
+
f.show();
|
|
48
57
|
};
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
default:
|
|
53
|
-
u(
|
|
54
|
-
content:
|
|
55
|
-
|
|
56
|
-
u(
|
|
57
|
-
default:
|
|
58
|
-
(
|
|
58
|
+
return K(() => {
|
|
59
|
+
V(), k.hotKeys.on(b);
|
|
60
|
+
}), L(() => k.hotKeys.off(b)), (e, o) => (i(), p(X, null, {
|
|
61
|
+
default: r(() => [
|
|
62
|
+
u(z, { title: "Environment" }, {
|
|
63
|
+
content: r(() => [
|
|
64
|
+
R("div", ue, [
|
|
65
|
+
u(P, null, {
|
|
66
|
+
default: r(() => [
|
|
67
|
+
(i(!0), y(U, null, O(a(l), (n) => (i(), p(Q, {
|
|
59
68
|
key: n.uid,
|
|
60
69
|
class: "text-xs",
|
|
61
70
|
variable: {
|
|
@@ -65,79 +74,85 @@ const Y = { class: "flex-1" }, Z = ["value"], ee = { class: "colors ml-auto" },
|
|
|
65
74
|
isDefault: n.isDefault
|
|
66
75
|
},
|
|
67
76
|
warningMessage: "Are you sure you want to delete this environment?",
|
|
68
|
-
onClick: (
|
|
69
|
-
|
|
77
|
+
onClick: (I) => t.value = n.uid,
|
|
78
|
+
onColorModal: D,
|
|
79
|
+
onDelete: (I) => w(n.uid)
|
|
70
80
|
}, null, 8, ["variable", "onClick", "onDelete"]))), 128))
|
|
71
81
|
]),
|
|
72
82
|
_: 1
|
|
73
83
|
})
|
|
74
84
|
])
|
|
75
85
|
]),
|
|
76
|
-
button:
|
|
77
|
-
u(
|
|
78
|
-
click:
|
|
86
|
+
button: r(() => [
|
|
87
|
+
u(G, {
|
|
88
|
+
click: A,
|
|
79
89
|
hotkey: "N",
|
|
80
|
-
isApp:
|
|
90
|
+
isApp: e.isApp
|
|
81
91
|
}, {
|
|
82
|
-
title:
|
|
83
|
-
|
|
92
|
+
title: r(() => o[4] || (o[4] = [
|
|
93
|
+
T("Add Environment")
|
|
84
94
|
])),
|
|
85
95
|
_: 1
|
|
86
96
|
}, 8, ["isApp"])
|
|
87
97
|
]),
|
|
88
98
|
_: 1
|
|
89
99
|
}),
|
|
90
|
-
u(
|
|
91
|
-
default:
|
|
92
|
-
u(
|
|
93
|
-
default:
|
|
94
|
-
|
|
100
|
+
u(Y, { class: "flex-1" }, {
|
|
101
|
+
default: r(() => [
|
|
102
|
+
u(Z, null, j({
|
|
103
|
+
default: r(() => [
|
|
104
|
+
t.value ? (i(), p(q, {
|
|
95
105
|
key: 0,
|
|
96
106
|
class: "pl-px pr-2 md:px-2 py-2.5",
|
|
97
107
|
language: "json",
|
|
98
108
|
lineNumbers: "",
|
|
99
|
-
modelValue:
|
|
100
|
-
"onUpdate:modelValue":
|
|
101
|
-
}, null, 8, ["modelValue"])) :
|
|
109
|
+
modelValue: a(l)[t.value].value,
|
|
110
|
+
"onUpdate:modelValue": N
|
|
111
|
+
}, null, 8, ["modelValue"])) : F("", !0)
|
|
102
112
|
]),
|
|
103
113
|
_: 2
|
|
104
114
|
}, [
|
|
105
|
-
|
|
115
|
+
t.value ? {
|
|
106
116
|
name: "title",
|
|
107
|
-
fn:
|
|
108
|
-
!
|
|
117
|
+
fn: r(() => [
|
|
118
|
+
!c.value || a(l)[t.value].isDefault ? (i(), y("span", {
|
|
109
119
|
key: 0,
|
|
110
|
-
onDblclick:
|
|
111
|
-
},
|
|
120
|
+
onDblclick: $
|
|
121
|
+
}, H(a(l)[t.value].name), 33)) : (i(), y("input", {
|
|
112
122
|
key: 1,
|
|
113
123
|
ref_key: "nameInputRef",
|
|
114
|
-
ref:
|
|
124
|
+
ref: g,
|
|
115
125
|
class: "ring-1 ring-offset-4 ring-b-outline rounded",
|
|
116
126
|
spellcheck: "false",
|
|
117
127
|
type: "text",
|
|
118
|
-
value:
|
|
119
|
-
onBlur:
|
|
120
|
-
onInput:
|
|
121
|
-
onKeyup:
|
|
122
|
-
}, null, 40,
|
|
123
|
-
k("div", ee, [
|
|
124
|
-
u(Q, {
|
|
125
|
-
activeColor: i(o)[e.value].color,
|
|
126
|
-
onSelect: D
|
|
127
|
-
}, null, 8, ["activeColor"])
|
|
128
|
-
])
|
|
128
|
+
value: a(l)[t.value].name,
|
|
129
|
+
onBlur: o[0] || (o[0] = (n) => c.value = !1),
|
|
130
|
+
onInput: S,
|
|
131
|
+
onKeyup: o[1] || (o[1] = J((n) => c.value = !1, ["enter"]))
|
|
132
|
+
}, null, 40, ie))
|
|
129
133
|
]),
|
|
130
134
|
key: "0"
|
|
131
135
|
} : void 0
|
|
132
136
|
]), 1024)
|
|
133
137
|
]),
|
|
134
138
|
_: 1
|
|
135
|
-
})
|
|
139
|
+
}),
|
|
140
|
+
u(le, {
|
|
141
|
+
selectedColor: C.value,
|
|
142
|
+
state: a(d),
|
|
143
|
+
onCancel: o[2] || (o[2] = (n) => a(d).hide()),
|
|
144
|
+
onSubmit: M
|
|
145
|
+
}, null, 8, ["selectedColor", "state"]),
|
|
146
|
+
u(ae, {
|
|
147
|
+
state: a(f),
|
|
148
|
+
onCancel: o[3] || (o[3] = (n) => a(f).hide()),
|
|
149
|
+
onSubmit: _
|
|
150
|
+
}, null, 8, ["state"])
|
|
136
151
|
]),
|
|
137
152
|
_: 1
|
|
138
153
|
}));
|
|
139
154
|
}
|
|
140
155
|
});
|
|
141
156
|
export {
|
|
142
|
-
|
|
157
|
+
we as default
|
|
143
158
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ModalState } from '@scalar/components';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
state: ModalState;
|
|
4
|
+
selectedColor: string;
|
|
5
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
submit: (color: string) => any;
|
|
7
|
+
cancel: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
9
|
+
state: ModalState;
|
|
10
|
+
selectedColor: string;
|
|
11
|
+
}> & Readonly<{
|
|
12
|
+
onSubmit?: ((color: string) => any) | undefined;
|
|
13
|
+
onCancel?: (() => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=EnvironmentColorModal.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentColorModal.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentColorModal.vue"],"names":[],"mappings":"AA2CA,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,oBAAoB,CAAA;;WAQxD,UAAU;mBACF,MAAM;;;;;WADd,UAAU;mBACF,MAAM;;;;;AAiJvB,wBAUG"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as c, ref as d, openBlock as f, createBlock as p, unref as u, withCtx as C, createElementVNode as v, createVNode as n } from "vue";
|
|
2
|
+
import x from "../../components/Sidebar/Actions/SidebarListElementForm.vue.js";
|
|
3
|
+
import { ScalarModal as _ } from "@scalar/components";
|
|
4
|
+
import E from "./EnvironmentColors.vue.js";
|
|
5
|
+
const S = { class: "flex flex-col gap-4" }, B = /* @__PURE__ */ c({
|
|
6
|
+
__name: "EnvironmentColorModal",
|
|
7
|
+
props: {
|
|
8
|
+
state: {},
|
|
9
|
+
selectedColor: {}
|
|
10
|
+
},
|
|
11
|
+
emits: ["cancel", "submit"],
|
|
12
|
+
setup(r, { emit: s }) {
|
|
13
|
+
const a = r, l = s, t = d(""), i = (o) => {
|
|
14
|
+
t.value = o;
|
|
15
|
+
};
|
|
16
|
+
return (o, e) => (f(), p(u(_), {
|
|
17
|
+
size: "xxs",
|
|
18
|
+
state: o.state,
|
|
19
|
+
title: "Edit Environment Color"
|
|
20
|
+
}, {
|
|
21
|
+
default: C(() => [
|
|
22
|
+
v("div", S, [
|
|
23
|
+
n(E, {
|
|
24
|
+
activeColor: t.value || a.selectedColor,
|
|
25
|
+
class: "p-1 w-full",
|
|
26
|
+
onSelect: i
|
|
27
|
+
}, null, 8, ["activeColor"]),
|
|
28
|
+
n(x, {
|
|
29
|
+
onCancel: e[0] || (e[0] = (m) => l("cancel")),
|
|
30
|
+
onSubmit: e[1] || (e[1] = (m) => l("submit", t.value))
|
|
31
|
+
})
|
|
32
|
+
])
|
|
33
|
+
]),
|
|
34
|
+
_: 1
|
|
35
|
+
}, 8, ["state"]));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
B as default
|
|
40
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentColors.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentColors.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"EnvironmentColors.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentColors.vue"],"names":[],"mappings":";iBAuHe,MAAM;;;;iBAAN,MAAM;;;;AA2OrB,wBASG"}
|
|
@@ -1,38 +1,93 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIcon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as h, ref as v, computed as x, watch as w, openBlock as n, createElementBlock as c, normalizeClass as E, Fragment as b, renderList as z, createElementVNode as s, normalizeStyle as m, createBlock as g, unref as p, createCommentVNode as a, withDirectives as B, vModelText as $, createVNode as F, nextTick as I } from "vue";
|
|
2
|
+
import { ScalarIcon as f } from "@scalar/components";
|
|
3
|
+
const D = ["onClick"], V = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "!py-0 flex flex-1 gap-2 items-center rounded"
|
|
6
|
+
}, j = ["placeholder"], T = /* @__PURE__ */ h({
|
|
4
7
|
__name: "EnvironmentColors",
|
|
5
8
|
props: {
|
|
6
9
|
activeColor: {}
|
|
7
10
|
},
|
|
8
11
|
emits: ["select"],
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
{ color: "
|
|
12
|
-
{ color: "
|
|
13
|
-
{ color: "
|
|
14
|
-
{ color: "
|
|
15
|
-
{ color: "
|
|
16
|
-
{ color: "
|
|
17
|
-
{ color: "
|
|
18
|
-
{ color: "
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
12
|
+
setup(y) {
|
|
13
|
+
const u = y, t = v(!1), o = v(""), i = v(null), d = [
|
|
14
|
+
{ color: "#8E8E8E" },
|
|
15
|
+
{ color: "#EF0006" },
|
|
16
|
+
{ color: "#EDBE20" },
|
|
17
|
+
{ color: "#069061" },
|
|
18
|
+
{ color: "#FB892C" },
|
|
19
|
+
{ color: "#0082D0" },
|
|
20
|
+
{ color: "#5203D1" },
|
|
21
|
+
{ color: "#FFC0CB" }
|
|
22
|
+
], C = x(() => u.activeColor && !d.some((e) => e.color === u.activeColor) || o.value ? `background-color: ${u.activeColor || o.value};` : "background: linear-gradient(to right, rgb(235, 87, 87), rgb(242, 201, 76), rgb(76, 183, 130), rgb(78, 167, 252), rgb(250, 96, 122));"), k = () => {
|
|
23
|
+
t.value = !t.value, I(() => {
|
|
24
|
+
i.value && i.value.focus();
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
return w(o, (e) => {
|
|
28
|
+
e && !e.startsWith("#") && (o.value = `#${e}`), t.value = !0;
|
|
29
|
+
}), (e, r) => (n(), c("div", {
|
|
30
|
+
class: E(["flex flex-row gap-1.5 items-center justify-between space-x-1 min-h-10 min-w-[296px] py-1", t.value ? "pl-2 pr-1.5" : "px-2"])
|
|
31
|
+
}, [
|
|
32
|
+
t.value ? a("", !0) : (n(), c(b, { key: 0 }, [
|
|
33
|
+
(n(), c(b, null, z(d, (l) => s("div", {
|
|
34
|
+
key: l.color,
|
|
35
|
+
class: "flex h-5 w-5 cursor-pointer items-center justify-center rounded-full",
|
|
36
|
+
style: m({ backgroundColor: l.color }),
|
|
37
|
+
onClick: (N) => e.$emit("select", l.color)
|
|
38
|
+
}, [
|
|
39
|
+
e.activeColor === l.color && !o.value ? (n(), g(p(f), {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: "text-c-btn",
|
|
42
|
+
icon: "Checkmark",
|
|
43
|
+
size: "xs"
|
|
44
|
+
})) : a("", !0)
|
|
45
|
+
], 12, D)), 64)),
|
|
46
|
+
r[2] || (r[2] = s("hr", { class: "w-0.5 h-5 border-ghost border-l" }, null, -1)),
|
|
47
|
+
s("label", {
|
|
48
|
+
class: "cursor-pointer flex flex-row justify-center h-5 w-5 gap-2 items-center rounded-full z-10",
|
|
49
|
+
style: m(C.value),
|
|
50
|
+
onClick: k
|
|
51
|
+
}, [
|
|
52
|
+
!t.value && (e.activeColor === o.value || e.activeColor && !d.some((l) => l.color === e.activeColor)) ? (n(), g(p(f), {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: "text-c-btn",
|
|
55
|
+
icon: "Checkmark",
|
|
56
|
+
size: "xs"
|
|
57
|
+
})) : a("", !0)
|
|
58
|
+
], 4)
|
|
59
|
+
], 64)),
|
|
60
|
+
t.value ? (n(), c("div", V, [
|
|
61
|
+
r[3] || (r[3] = s("span", { class: "absolute border border-dashed h-5 w-5 rounded-full" }, null, -1)),
|
|
62
|
+
s("span", {
|
|
63
|
+
class: "h-5 w-5 rounded-full z-[1]",
|
|
64
|
+
style: m(C.value)
|
|
65
|
+
}, null, 4),
|
|
66
|
+
B(s("input", {
|
|
67
|
+
ref_key: "customColorInputRef",
|
|
68
|
+
ref: i,
|
|
69
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
|
|
70
|
+
class: "border-transparent flex-1 outline-none w-full text-sm",
|
|
71
|
+
placeholder: e.activeColor || "#000000",
|
|
72
|
+
type: "text",
|
|
73
|
+
onInput: r[1] || (r[1] = (l) => e.$emit("select", o.value))
|
|
74
|
+
}, null, 40, j), [
|
|
75
|
+
[$, o.value]
|
|
76
|
+
]),
|
|
77
|
+
s("button", {
|
|
78
|
+
class: "text-c-3 hover:bg-b-2 p-1.5 rounded-lg",
|
|
79
|
+
type: "button",
|
|
80
|
+
onClick: k
|
|
81
|
+
}, [
|
|
82
|
+
F(p(f), {
|
|
83
|
+
icon: "Checkmark",
|
|
84
|
+
size: "xs"
|
|
85
|
+
})
|
|
86
|
+
])
|
|
87
|
+
])) : a("", !0)
|
|
88
|
+
], 2));
|
|
34
89
|
}
|
|
35
90
|
});
|
|
36
91
|
export {
|
|
37
|
-
|
|
92
|
+
T as default
|
|
38
93
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ModalState } from '@scalar/components';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
state: ModalState;
|
|
4
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
5
|
+
submit: (environment: {
|
|
6
|
+
name: string;
|
|
7
|
+
color: string;
|
|
8
|
+
}) => any;
|
|
9
|
+
cancel: () => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
11
|
+
state: ModalState;
|
|
12
|
+
}> & Readonly<{
|
|
13
|
+
onSubmit?: ((environment: {
|
|
14
|
+
name: string;
|
|
15
|
+
color: string;
|
|
16
|
+
}) => any) | undefined;
|
|
17
|
+
onCancel?: (() => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
20
|
+
//# sourceMappingURL=EnvironmentModal.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentModal.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentModal.vue"],"names":[],"mappings":"AAkEA,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAA;;WAQlB,UAAU;;;cA0LsB,MAAM;eAAS,MAAM;;;;WA1LrD,UAAU;;;cA0LsB,MAAM;eAAS,MAAM;;;;AAR9D,wBAUG"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent as p, ref as m, watch as v, openBlock as f, createBlock as E, unref as s, withCtx as x, createElementVNode as C, createVNode as a } from "vue";
|
|
2
|
+
import S from "../../components/Sidebar/Actions/SidebarListElementForm.vue.js";
|
|
3
|
+
import { ScalarModal as V, ScalarTextField as b } from "@scalar/components";
|
|
4
|
+
import _ from "./EnvironmentColors.vue.js";
|
|
5
|
+
const w = { class: "flex flex-col gap-3" }, F = /* @__PURE__ */ p({
|
|
6
|
+
__name: "EnvironmentModal",
|
|
7
|
+
props: {
|
|
8
|
+
state: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["cancel", "submit"],
|
|
11
|
+
setup(i, { emit: u }) {
|
|
12
|
+
const c = i, r = u, o = m(""), l = m("#8E8E8E"), d = (t) => {
|
|
13
|
+
l.value = t;
|
|
14
|
+
};
|
|
15
|
+
return v(
|
|
16
|
+
() => c.state.open,
|
|
17
|
+
(t) => {
|
|
18
|
+
t && (o.value = "", l.value = "#8E8E8E");
|
|
19
|
+
}
|
|
20
|
+
), (t, e) => (f(), E(s(V), {
|
|
21
|
+
size: "xxs",
|
|
22
|
+
state: t.state,
|
|
23
|
+
title: "Add Environment"
|
|
24
|
+
}, {
|
|
25
|
+
default: x(() => [
|
|
26
|
+
C("div", w, [
|
|
27
|
+
a(s(b), {
|
|
28
|
+
modelValue: o.value,
|
|
29
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => o.value = n),
|
|
30
|
+
placeholder: "Environment name"
|
|
31
|
+
}, null, 8, ["modelValue"]),
|
|
32
|
+
a(_, {
|
|
33
|
+
activeColor: l.value,
|
|
34
|
+
class: "p-3 w-full",
|
|
35
|
+
onSelect: d
|
|
36
|
+
}, null, 8, ["activeColor"]),
|
|
37
|
+
a(S, {
|
|
38
|
+
onCancel: e[1] || (e[1] = (n) => r("cancel")),
|
|
39
|
+
onSubmit: e[2] || (e[2] = (n) => r("submit", {
|
|
40
|
+
name: o.value,
|
|
41
|
+
color: l.value
|
|
42
|
+
}))
|
|
43
|
+
})
|
|
44
|
+
])
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
}, 8, ["state"]));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
F as default
|
|
52
|
+
};
|
|
@@ -2,6 +2,7 @@ import type { WorkspaceStore } from '../../store/index.js';
|
|
|
2
2
|
import type { Router } from 'vue-router';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
query: string;
|
|
5
|
+
activeEnvironment: WorkspaceStore["activeEnvironment"];
|
|
5
6
|
activeEnvVariables: WorkspaceStore["activeEnvVariables"];
|
|
6
7
|
router: Router;
|
|
7
8
|
dropdownPosition?: {
|
|
@@ -15,6 +16,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
16
|
select: (variable: string) => any;
|
|
16
17
|
}, string, import("vue").PublicProps, Readonly<{
|
|
17
18
|
query: string;
|
|
19
|
+
activeEnvironment: WorkspaceStore["activeEnvironment"];
|
|
18
20
|
activeEnvVariables: WorkspaceStore["activeEnvVariables"];
|
|
19
21
|
router: Router;
|
|
20
22
|
dropdownPosition?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAkKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;;WAK/B,MAAM;uBACM,cAAc,CAAC,mBAAmB,CAAC;wBAClC,cAAc,CAAC,oBAAoB,CAAC;YAChD,MAAM;uBAEK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;;gCA0Df,IAAI,GAAG,MAAM;;;;;WA/DvC,MAAM;uBACM,cAAc,CAAC,mBAAmB,CAAC;wBAClC,cAAc,CAAC,oBAAoB,CAAC;YAChD,MAAM;uBAEK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;;;;AA+RlD,wBAUG"}
|