@scalar/api-client 2.3.26 → 2.3.27
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 +31 -0
- 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 +75 -72
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +48 -45
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -0
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +46 -43
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +82 -92
- package/dist/components/Form/Form.vue.d.ts +2 -2
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +17 -14
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +2 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +30 -30
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +16 -0
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +3 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +76 -54
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts +2 -2
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +5 -4
- package/dist/hooks/useClientConfig.d.ts +6 -6
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +3 -3
- package/dist/layouts/Modal/create-api-client-modal.d.ts +6 -6
- package/dist/layouts/Web/create-api-client-web.d.ts +3 -3
- package/dist/libs/create-client.d.ts +3 -3
- package/dist/libs/env-helpers.d.ts +10 -2
- package/dist/libs/env-helpers.d.ts.map +1 -1
- package/dist/libs/env-helpers.js +4 -2
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +9 -9
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/string-template.d.ts.map +1 -1
- package/dist/libs/string-template.js +35 -21
- package/dist/routes.d.ts +10 -10
- package/dist/store/active-entities.js +34 -34
- package/dist/store/environment.js +1 -1
- package/dist/store/store.d.ts +3 -3
- package/dist/store/workspace.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/views/Collection/CollectionCookies.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionOverview.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionScripts.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServerForm.vue.js +39 -34
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServers.vue2.js +58 -78
- package/dist/views/Collection/CollectionSync.vue.d.ts +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts +1 -1
- package/dist/views/Cookies/CookieRaw.vue.d.ts +1 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +208 -188
- package/dist/views/Environment/EnvironmentColors.vue.js +5 -5
- package/dist/views/Environment/EnvironmentModal.vue.js +21 -21
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
- package/dist/views/Environment/handle-drag.d.ts +13 -0
- package/dist/views/Environment/handle-drag.d.ts.map +1 -0
- package/dist/views/Environment/handle-drag.js +32 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -88
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +62 -56
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +4 -4
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +42 -47
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/package.json +13 -13
|
@@ -1,55 +1,62 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { LibraryIcon as
|
|
4
|
-
import { useToasts as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { useSidebar as
|
|
1
|
+
import { defineComponent as de, ref as C, computed as ve, watch as fe, onMounted as pe, onBeforeUnmount as be, openBlock as f, createBlock as _, withCtx as c, createVNode as u, createElementVNode as b, unref as l, createElementBlock as O, Fragment as B, renderList as L, normalizeClass as K, createTextVNode as G, toDisplayString as J, withDirectives as xe, withModifiers as he, createCommentVNode as T, vShow as Ee, createSlots as Ce } from "vue";
|
|
2
|
+
import { useModal as j, ScalarIcon as H, ScalarButton as ke, ScalarModal as ge } from "@scalar/components";
|
|
3
|
+
import { LibraryIcon as ye } from "@scalar/icons/library";
|
|
4
|
+
import { useToasts as _e } from "@scalar/use-toasts";
|
|
5
|
+
import { useRouter as we, useRoute as De } from "vue-router";
|
|
6
|
+
import Ie from "../../components/CodeInput/CodeInput.vue.js";
|
|
7
|
+
import Me from "../../components/Sidebar/Actions/EditSidebarListElement.vue.js";
|
|
8
|
+
import Se from "../../components/Sidebar/Sidebar.vue.js";
|
|
9
|
+
import $e from "../../components/Sidebar/SidebarButton.vue.js";
|
|
10
|
+
import Ve from "../../components/Sidebar/SidebarList.vue.js";
|
|
11
|
+
import P from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
12
|
+
import Oe from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
13
|
+
import je from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
14
|
+
import Fe from "../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
15
|
+
import { useSidebar as Ne } from "../../hooks/useSidebar.js";
|
|
16
16
|
import { PathId as i } from "../../routes.js";
|
|
17
|
-
import { useActiveEntities as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
|
|
17
|
+
import { useActiveEntities as Re } from "../../store/active-entities.js";
|
|
18
|
+
import We from "./EnvironmentColorModal.vue.js";
|
|
19
|
+
import Ue from "./EnvironmentModal.vue.js";
|
|
20
|
+
import { environmentDragHandlerFactory as ze } from "./handle-drag.js";
|
|
21
|
+
import { useWorkspace as Ae } from "../../store/store.js";
|
|
22
|
+
const Be = { class: "flex-1" }, Le = ["onClick"], Ke = { class: "flex h-5 max-w-[14px] items-center justify-center" }, vn = /* @__PURE__ */ de({
|
|
22
23
|
__name: "Environment",
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
activeWorkspace:
|
|
26
|
-
activeEnvironment:
|
|
27
|
-
activeWorkspaceCollections:
|
|
28
|
-
activeEnvVariables:
|
|
29
|
-
} =
|
|
30
|
-
function
|
|
24
|
+
setup(Ge) {
|
|
25
|
+
const k = we(), g = De(), {
|
|
26
|
+
activeWorkspace: p,
|
|
27
|
+
activeEnvironment: F,
|
|
28
|
+
activeWorkspaceCollections: d,
|
|
29
|
+
activeEnvVariables: q
|
|
30
|
+
} = Re(), { events: N, workspaceMutators: Q, collectionMutators: x } = Ae(), { collapsedSidebarFolders: y, toggleSidebarFolder: w } = Ne(), D = j(), I = j(), M = j(), R = C(null), s = C("default"), W = C(""), h = C(void 0), v = C(void 0), S = C(void 0), { toast: U } = _e(), X = (e) => JSON.parse(e);
|
|
31
|
+
function z(e, o, n) {
|
|
31
32
|
var t;
|
|
32
33
|
e && (o.uid === n ? U(
|
|
33
34
|
`Environment name already used in ${(t = o.info) == null ? void 0 : t.title}`,
|
|
34
35
|
"error"
|
|
35
36
|
) : U("Environment name already used in another collection", "error"));
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
const E = ve(() => d.value.filter(
|
|
39
|
+
(e) => {
|
|
40
|
+
var o;
|
|
41
|
+
return ((o = e.info) == null ? void 0 : o.title) !== "Drafts";
|
|
42
|
+
}
|
|
43
|
+
));
|
|
44
|
+
function Y(e) {
|
|
45
|
+
E.value.some(
|
|
39
46
|
(n) => {
|
|
40
47
|
const t = Object.keys(
|
|
41
48
|
n["x-scalar-environments"] || {}
|
|
42
49
|
).includes(e.name);
|
|
43
|
-
return
|
|
50
|
+
return z(t, n, e.collectionId), t;
|
|
44
51
|
}
|
|
45
|
-
) || (e.collectionId && (
|
|
52
|
+
) || (e.collectionId && (x.addEnvironment(
|
|
46
53
|
e.name,
|
|
47
54
|
{
|
|
48
55
|
variables: {},
|
|
49
56
|
color: e.color
|
|
50
57
|
},
|
|
51
58
|
e.collectionId
|
|
52
|
-
), y[e.collectionId] ||
|
|
59
|
+
), y[e.collectionId] || w(e.collectionId), k.push({
|
|
53
60
|
name: "environment.collection",
|
|
54
61
|
params: {
|
|
55
62
|
[i.Collection]: e.collectionId,
|
|
@@ -57,176 +64,186 @@ const De = { class: "flex-1" }, Ue = ["onClick"], We = { class: "flex h-5 max-w-
|
|
|
57
64
|
}
|
|
58
65
|
})), I.hide());
|
|
59
66
|
}
|
|
60
|
-
function
|
|
61
|
-
var
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
);
|
|
77
|
-
if ((n = a == null ? void 0 : a["x-scalar-environments"]) != null && n[s.value ?? ""]) {
|
|
78
|
-
const l = a["x-scalar-environments"][s.value ?? ""];
|
|
79
|
-
l && (l.variables = t, k.edit(
|
|
80
|
-
a.uid,
|
|
81
|
-
"x-scalar-environments",
|
|
82
|
-
a["x-scalar-environments"]
|
|
83
|
-
));
|
|
67
|
+
function Z(e) {
|
|
68
|
+
var n, t;
|
|
69
|
+
if (!F)
|
|
70
|
+
return;
|
|
71
|
+
const o = X(e);
|
|
72
|
+
if (s.value === "default")
|
|
73
|
+
Q.edit(
|
|
74
|
+
(n = p.value) == null ? void 0 : n.uid,
|
|
75
|
+
"environments",
|
|
76
|
+
o
|
|
77
|
+
);
|
|
78
|
+
else {
|
|
79
|
+
const a = d.value.find(
|
|
80
|
+
(r) => {
|
|
81
|
+
var m;
|
|
82
|
+
return (m = r["x-scalar-environments"]) == null ? void 0 : m[s.value ?? ""];
|
|
84
83
|
}
|
|
84
|
+
);
|
|
85
|
+
if ((t = a == null ? void 0 : a["x-scalar-environments"]) != null && t[s.value ?? ""]) {
|
|
86
|
+
const r = a["x-scalar-environments"][s.value ?? ""];
|
|
87
|
+
r && (r.variables = o, x.edit(
|
|
88
|
+
a.uid,
|
|
89
|
+
"x-scalar-environments",
|
|
90
|
+
a["x-scalar-environments"]
|
|
91
|
+
));
|
|
85
92
|
}
|
|
86
93
|
}
|
|
87
94
|
}
|
|
88
95
|
const $ = (e) => {
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
},
|
|
96
|
+
h.value = e, I.show();
|
|
97
|
+
}, ee = (e, o) => {
|
|
98
|
+
v.value = e, h.value = o, S.value = e, M.show();
|
|
99
|
+
}, ne = (e) => {
|
|
93
100
|
var o, n, t;
|
|
94
|
-
R.value = e,
|
|
101
|
+
R.value = e, W.value = ((t = (n = (o = d.value.find(
|
|
95
102
|
(a) => {
|
|
96
|
-
var
|
|
97
|
-
return (
|
|
103
|
+
var r;
|
|
104
|
+
return (r = a["x-scalar-environments"]) == null ? void 0 : r[e];
|
|
98
105
|
}
|
|
99
|
-
)) == null ? void 0 : o["x-scalar-environments"]) == null ? void 0 : n[e]) == null ? void 0 : t.color) ?? "",
|
|
100
|
-
},
|
|
106
|
+
)) == null ? void 0 : o["x-scalar-environments"]) == null ? void 0 : n[e]) == null ? void 0 : t.color) ?? "", D.show();
|
|
107
|
+
}, te = (e) => {
|
|
101
108
|
const o = R.value;
|
|
102
|
-
typeof o == "string" && (
|
|
109
|
+
typeof o == "string" && (d.value.some(
|
|
103
110
|
(t) => {
|
|
104
111
|
var a;
|
|
105
112
|
return (a = t["x-scalar-environments"]) == null ? void 0 : a[o];
|
|
106
113
|
}
|
|
107
|
-
) &&
|
|
114
|
+
) && d.value.forEach((t) => {
|
|
108
115
|
var a;
|
|
109
|
-
(a = t["x-scalar-environments"]) != null && a[o] && (t["x-scalar-environments"][o].color = e,
|
|
116
|
+
(a = t["x-scalar-environments"]) != null && a[o] && (t["x-scalar-environments"][o].color = e, x.edit(
|
|
110
117
|
t.uid,
|
|
111
118
|
"x-scalar-environments",
|
|
112
119
|
t["x-scalar-environments"]
|
|
113
120
|
));
|
|
114
|
-
}),
|
|
121
|
+
}), D.hide());
|
|
115
122
|
};
|
|
116
|
-
function
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
function oe(e) {
|
|
124
|
+
var n;
|
|
125
|
+
E.value.forEach((t) => {
|
|
126
|
+
x.removeEnvironment(e, t.uid);
|
|
119
127
|
});
|
|
120
|
-
const o =
|
|
121
|
-
(
|
|
128
|
+
const o = E.value.flatMap(
|
|
129
|
+
(t) => Object.keys(t["x-scalar-environments"] || {})
|
|
122
130
|
);
|
|
123
131
|
if (o.length > 0) {
|
|
124
|
-
const
|
|
125
|
-
if (!
|
|
132
|
+
const t = o[o.length - 1];
|
|
133
|
+
if (!t)
|
|
126
134
|
return;
|
|
127
|
-
const
|
|
128
|
-
(
|
|
129
|
-
|
|
135
|
+
const a = d.value.find(
|
|
136
|
+
(r) => Object.keys(r["x-scalar-environments"] || {}).includes(
|
|
137
|
+
t
|
|
130
138
|
)
|
|
131
139
|
);
|
|
132
|
-
s.value =
|
|
140
|
+
s.value = t, k.push({
|
|
133
141
|
name: "environment.collection",
|
|
134
142
|
params: {
|
|
135
|
-
|
|
136
|
-
|
|
143
|
+
[i.Collection]: a == null ? void 0 : a.uid,
|
|
144
|
+
[i.Environment]: t
|
|
137
145
|
}
|
|
138
|
-
}),
|
|
146
|
+
}), a && !y[a.uid] && w(a.uid);
|
|
139
147
|
} else
|
|
140
|
-
s.value = "default",
|
|
141
|
-
name: "environment",
|
|
142
|
-
params: {
|
|
148
|
+
s.value = "default", k.push({
|
|
149
|
+
name: "environment.default",
|
|
150
|
+
params: {
|
|
151
|
+
[i.Workspace]: (n = p.value) == null ? void 0 : n.uid
|
|
152
|
+
}
|
|
143
153
|
});
|
|
144
154
|
}
|
|
145
|
-
const
|
|
155
|
+
const ae = () => s.value === "default" ? "Global Environment" : s.value, re = () => {
|
|
146
156
|
var e, o, n, t;
|
|
147
|
-
return s.value === "default" ? JSON.stringify((e =
|
|
148
|
-
(t = (n = (o =
|
|
157
|
+
return s.value === "default" ? JSON.stringify((e = p.value) == null ? void 0 : e.environments, null, 2) : JSON.stringify(
|
|
158
|
+
(t = (n = (o = d.value.find(
|
|
149
159
|
(a) => {
|
|
150
|
-
var
|
|
151
|
-
return (
|
|
160
|
+
var r;
|
|
161
|
+
return (r = a["x-scalar-environments"]) == null ? void 0 : r[s.value ?? ""];
|
|
152
162
|
}
|
|
153
163
|
)) == null ? void 0 : o["x-scalar-environments"]) == null ? void 0 : n[s.value ?? ""]) == null ? void 0 : t.variables,
|
|
154
164
|
null,
|
|
155
165
|
2
|
|
156
166
|
);
|
|
157
|
-
},
|
|
158
|
-
e != null && e.createNew &&
|
|
167
|
+
}, le = (e) => y[e], A = (e) => {
|
|
168
|
+
e != null && e.createNew && g.name === "environment" && $();
|
|
159
169
|
};
|
|
160
|
-
|
|
161
|
-
() => [
|
|
170
|
+
fe(
|
|
171
|
+
() => [g.params[i.Collection], g.params[i.Environment]],
|
|
162
172
|
([e, o]) => {
|
|
163
173
|
e ? s.value = o : s.value = "default";
|
|
164
174
|
}
|
|
165
|
-
),
|
|
166
|
-
s.value =
|
|
167
|
-
const e =
|
|
168
|
-
e && !y[e] &&
|
|
169
|
-
}),
|
|
170
|
-
const
|
|
171
|
-
var a,
|
|
175
|
+
), pe(() => {
|
|
176
|
+
s.value = g.params[i.Environment] || "default", N.hotKeys.on(A);
|
|
177
|
+
const e = g.params[i.Collection];
|
|
178
|
+
e && !y[e] && w(e);
|
|
179
|
+
}), be(() => N.hotKeys.off(A));
|
|
180
|
+
const se = (e, o, n) => {
|
|
181
|
+
var a, r;
|
|
172
182
|
const t = n ? {
|
|
173
183
|
name: "environment.collection",
|
|
174
184
|
params: {
|
|
175
|
-
[i.Workspace]: (a =
|
|
185
|
+
[i.Workspace]: (a = p.value) == null ? void 0 : a.uid,
|
|
176
186
|
[i.Collection]: n,
|
|
177
187
|
[i.Environment]: o
|
|
178
188
|
}
|
|
179
189
|
} : {
|
|
180
190
|
name: "environment.default",
|
|
181
191
|
params: {
|
|
182
|
-
[i.Workspace]: (
|
|
192
|
+
[i.Workspace]: (r = p.value) == null ? void 0 : r.uid,
|
|
183
193
|
[i.Environment]: o
|
|
184
194
|
}
|
|
185
195
|
};
|
|
186
|
-
e.metaKey ? window.open(
|
|
196
|
+
e.metaKey ? window.open(k.resolve(t).href, "_blank") : k.push(t);
|
|
187
197
|
};
|
|
188
|
-
function
|
|
189
|
-
|
|
198
|
+
function ie() {
|
|
199
|
+
v.value = void 0, h.value = void 0, S.value = void 0, M.hide();
|
|
190
200
|
}
|
|
191
|
-
function
|
|
192
|
-
|
|
201
|
+
function ue(e) {
|
|
202
|
+
E.value.some(
|
|
193
203
|
(n) => {
|
|
194
204
|
const t = Object.keys(
|
|
195
205
|
n["x-scalar-environments"] || {}
|
|
196
206
|
).includes(e);
|
|
197
|
-
return
|
|
207
|
+
return z(
|
|
198
208
|
t,
|
|
199
209
|
n,
|
|
200
|
-
|
|
210
|
+
h.value
|
|
201
211
|
), t;
|
|
202
212
|
}
|
|
203
|
-
) || (e &&
|
|
213
|
+
) || (e && v.value !== "default" && d.value.forEach((n) => {
|
|
204
214
|
var t;
|
|
205
|
-
if ((t = n["x-scalar-environments"]) != null && t[
|
|
206
|
-
const a = n["x-scalar-environments"]
|
|
207
|
-
a
|
|
215
|
+
if ((t = n["x-scalar-environments"]) != null && t[v.value ?? ""]) {
|
|
216
|
+
const a = n["x-scalar-environments"], r = {};
|
|
217
|
+
Object.keys(a).forEach((m) => {
|
|
218
|
+
const V = a[m];
|
|
219
|
+
V && (m === v.value ? r[e] = V : r[m] = V);
|
|
220
|
+
}), n["x-scalar-environments"] = r, x.edit(
|
|
208
221
|
n.uid,
|
|
209
222
|
"x-scalar-environments",
|
|
210
223
|
n["x-scalar-environments"]
|
|
211
|
-
)
|
|
224
|
+
);
|
|
212
225
|
}
|
|
213
|
-
}), e && s.value ===
|
|
226
|
+
}), e && s.value === v.value && (s.value = e), v.value = void 0, h.value = void 0, S.value = void 0, M.hide());
|
|
214
227
|
}
|
|
215
|
-
|
|
228
|
+
const { handleDragEnd: me, isDroppable: ce } = ze(
|
|
229
|
+
d,
|
|
230
|
+
x
|
|
231
|
+
);
|
|
232
|
+
return (e, o) => (f(), _(Oe, null, {
|
|
216
233
|
default: c(() => [
|
|
217
|
-
|
|
234
|
+
u(Se, { title: "Collections" }, {
|
|
218
235
|
content: c(() => [
|
|
219
|
-
|
|
220
|
-
|
|
236
|
+
b("div", Be, [
|
|
237
|
+
u(Ve, null, {
|
|
221
238
|
default: c(() => [
|
|
222
|
-
(
|
|
239
|
+
(f(), _(P, {
|
|
223
240
|
key: "default",
|
|
224
241
|
class: "text-xs",
|
|
225
242
|
isCopyable: !1,
|
|
226
243
|
to: {
|
|
227
|
-
name: "environment
|
|
244
|
+
name: "environment",
|
|
228
245
|
params: {
|
|
229
|
-
[
|
|
246
|
+
[l(i).Environment]: "default"
|
|
230
247
|
}
|
|
231
248
|
},
|
|
232
249
|
type: "environment",
|
|
@@ -237,85 +254,88 @@ const De = { class: "flex-1" }, Ue = ["onClick"], We = { class: "flex h-5 max-w-
|
|
|
237
254
|
isDefault: !0
|
|
238
255
|
}
|
|
239
256
|
}, null, 8, ["to"])),
|
|
240
|
-
(
|
|
257
|
+
(f(!0), O(B, null, L(E.value, (n) => {
|
|
241
258
|
var t;
|
|
242
|
-
return
|
|
259
|
+
return f(), O("li", {
|
|
243
260
|
key: n.uid,
|
|
244
261
|
class: "gap-1/2 flex flex-col"
|
|
245
262
|
}, [
|
|
246
|
-
|
|
263
|
+
b("button", {
|
|
247
264
|
class: "hover:bg-b-2 group flex w-full items-center gap-1.5 break-words rounded p-1.5 text-left text-sm font-medium",
|
|
248
265
|
type: "button",
|
|
249
|
-
onClick: (a) =>
|
|
266
|
+
onClick: (a) => l(w)(n.uid)
|
|
250
267
|
}, [
|
|
251
|
-
|
|
252
|
-
|
|
268
|
+
b("span", Ke, [
|
|
269
|
+
u(l(ye), {
|
|
253
270
|
class: "text-sidebar-c-2 size-3.5 min-w-3.5 stroke-2 group-hover:hidden",
|
|
254
271
|
src: n["x-scalar-icon"] || "interface-content-folder"
|
|
255
272
|
}, null, 8, ["src"]),
|
|
256
|
-
|
|
257
|
-
class:
|
|
258
|
-
"rotate-90":
|
|
273
|
+
b("div", {
|
|
274
|
+
class: K({
|
|
275
|
+
"rotate-90": l(y)[n.uid]
|
|
259
276
|
})
|
|
260
277
|
}, [
|
|
261
|
-
|
|
278
|
+
u(l(H), {
|
|
262
279
|
class: "text-c-3 hover:text-c-1 hidden text-sm group-hover:block",
|
|
263
280
|
icon: "ChevronRight",
|
|
264
281
|
size: "md"
|
|
265
282
|
})
|
|
266
283
|
], 2)
|
|
267
284
|
]),
|
|
268
|
-
|
|
269
|
-
], 8,
|
|
270
|
-
|
|
271
|
-
class:
|
|
285
|
+
G(" " + J(((t = n.info) == null ? void 0 : t.title) ?? ""), 1)
|
|
286
|
+
], 8, Le),
|
|
287
|
+
xe(b("div", {
|
|
288
|
+
class: K({
|
|
272
289
|
"before:bg-border before:z-1 relative mb-[.5px] before:pointer-events-none before:absolute before:left-3 before:top-0 before:h-[calc(100%_+_.5px)] before:w-[.5px] last:mb-0 last:before:h-full": Object.keys(n["x-scalar-environments"] || {}).length > 0
|
|
273
290
|
})
|
|
274
291
|
}, [
|
|
275
|
-
(
|
|
276
|
-
key:
|
|
277
|
-
class: "text-xs
|
|
292
|
+
(f(!0), O(B, null, L(n["x-scalar-environments"], (a, r) => (f(), _(P, {
|
|
293
|
+
key: r,
|
|
294
|
+
class: "text-xs",
|
|
278
295
|
collectionId: n.uid,
|
|
279
296
|
isCopyable: !1,
|
|
280
297
|
isDeletable: !0,
|
|
281
298
|
isRenameable: !0,
|
|
299
|
+
isDraggable: !0,
|
|
300
|
+
isDroppable: l(ce),
|
|
282
301
|
to: {
|
|
283
|
-
name: "collection
|
|
302
|
+
name: "environment.collection",
|
|
284
303
|
params: {
|
|
285
|
-
[
|
|
286
|
-
[
|
|
304
|
+
[l(i).Collection]: n.uid,
|
|
305
|
+
[l(i).Environment]: r
|
|
287
306
|
}
|
|
288
307
|
},
|
|
289
308
|
type: "environment",
|
|
290
309
|
variable: {
|
|
291
|
-
name:
|
|
292
|
-
uid:
|
|
293
|
-
color: a.color ?? "#
|
|
310
|
+
name: r,
|
|
311
|
+
uid: r,
|
|
312
|
+
color: a.color ?? "#FFFFFF",
|
|
294
313
|
isDefault: !1
|
|
295
314
|
},
|
|
296
315
|
warningMessage: "Are you sure you want to delete this environment?",
|
|
297
|
-
onClick:
|
|
298
|
-
onColorModal: (
|
|
299
|
-
onDelete: (
|
|
300
|
-
onRename: (
|
|
301
|
-
|
|
302
|
-
|
|
316
|
+
onClick: he((m) => se(m, r, n.uid), ["prevent"]),
|
|
317
|
+
onColorModal: (m) => ne(r),
|
|
318
|
+
onDelete: (m) => oe(r),
|
|
319
|
+
onRename: (m) => ee(r, n.uid),
|
|
320
|
+
onOnDragEnd: l(me)
|
|
321
|
+
}, null, 8, ["collectionId", "isDroppable", "to", "variable", "onClick", "onColorModal", "onDelete", "onRename", "onOnDragEnd"]))), 128)),
|
|
322
|
+
Object.keys(n["x-scalar-environments"] || {}).length === 0 ? (f(), _(l(ke), {
|
|
303
323
|
key: 0,
|
|
304
324
|
class: "text-c-1 hover:bg-b-2 flex h-8 w-full justify-start gap-1.5 py-0 pl-6 text-xs",
|
|
305
325
|
variant: "ghost",
|
|
306
326
|
onClick: (a) => $(n.uid)
|
|
307
327
|
}, {
|
|
308
328
|
default: c(() => [
|
|
309
|
-
|
|
329
|
+
u(l(H), {
|
|
310
330
|
icon: "Add",
|
|
311
331
|
size: "sm"
|
|
312
332
|
}),
|
|
313
|
-
o[2] || (o[2] =
|
|
333
|
+
o[2] || (o[2] = b("span", null, "Add Environment", -1))
|
|
314
334
|
]),
|
|
315
335
|
_: 2
|
|
316
|
-
}, 1032, ["onClick"])) :
|
|
336
|
+
}, 1032, ["onClick"])) : T("", !0)
|
|
317
337
|
], 2), [
|
|
318
|
-
[
|
|
338
|
+
[Ee, le(n.uid)]
|
|
319
339
|
])
|
|
320
340
|
]);
|
|
321
341
|
}), 128))
|
|
@@ -325,42 +345,42 @@ const De = { class: "flex-1" }, Ue = ["onClick"], We = { class: "flex h-5 max-w-
|
|
|
325
345
|
])
|
|
326
346
|
]),
|
|
327
347
|
button: c(() => [
|
|
328
|
-
|
|
348
|
+
u($e, {
|
|
329
349
|
click: $,
|
|
330
350
|
hotkey: "N"
|
|
331
351
|
}, {
|
|
332
352
|
title: c(() => o[3] || (o[3] = [
|
|
333
|
-
|
|
353
|
+
G(" Add Environment ")
|
|
334
354
|
])),
|
|
335
355
|
_: 1
|
|
336
356
|
})
|
|
337
357
|
]),
|
|
338
358
|
_: 1
|
|
339
359
|
}),
|
|
340
|
-
|
|
360
|
+
u(je, { class: "flex-1" }, {
|
|
341
361
|
default: c(() => [
|
|
342
|
-
|
|
362
|
+
u(Fe, null, Ce({
|
|
343
363
|
default: c(() => [
|
|
344
|
-
s.value &&
|
|
364
|
+
s.value && l(p) ? (f(), _(Ie, {
|
|
345
365
|
key: 0,
|
|
346
366
|
class: "py-2 pl-px pr-2 md:px-4",
|
|
347
|
-
envVariables:
|
|
348
|
-
environment:
|
|
367
|
+
envVariables: l(q),
|
|
368
|
+
environment: l(F),
|
|
349
369
|
isCopyable: "",
|
|
350
370
|
language: "json",
|
|
351
371
|
lineNumbers: "",
|
|
352
372
|
lint: "",
|
|
353
|
-
modelValue:
|
|
354
|
-
workspace:
|
|
355
|
-
"onUpdate:modelValue":
|
|
356
|
-
}, null, 8, ["envVariables", "environment", "modelValue", "workspace"])) :
|
|
373
|
+
modelValue: re(),
|
|
374
|
+
workspace: l(p),
|
|
375
|
+
"onUpdate:modelValue": Z
|
|
376
|
+
}, null, 8, ["envVariables", "environment", "modelValue", "workspace"])) : T("", !0)
|
|
357
377
|
]),
|
|
358
378
|
_: 2
|
|
359
379
|
}, [
|
|
360
380
|
s.value ? {
|
|
361
381
|
name: "title",
|
|
362
382
|
fn: c(() => [
|
|
363
|
-
|
|
383
|
+
b("span", null, J(ae()), 1)
|
|
364
384
|
]),
|
|
365
385
|
key: "0"
|
|
366
386
|
} : void 0
|
|
@@ -368,29 +388,29 @@ const De = { class: "flex-1" }, Ue = ["onClick"], We = { class: "flex h-5 max-w-
|
|
|
368
388
|
]),
|
|
369
389
|
_: 1
|
|
370
390
|
}),
|
|
371
|
-
|
|
372
|
-
selectedColor:
|
|
373
|
-
state:
|
|
374
|
-
onCancel: o[0] || (o[0] = (n) =>
|
|
375
|
-
onSubmit:
|
|
391
|
+
u(We, {
|
|
392
|
+
selectedColor: W.value,
|
|
393
|
+
state: l(D),
|
|
394
|
+
onCancel: o[0] || (o[0] = (n) => l(D).hide()),
|
|
395
|
+
onSubmit: te
|
|
376
396
|
}, null, 8, ["selectedColor", "state"]),
|
|
377
|
-
|
|
378
|
-
activeWorkspaceCollections:
|
|
379
|
-
collectionId:
|
|
380
|
-
state:
|
|
381
|
-
onCancel: o[1] || (o[1] = (n) =>
|
|
382
|
-
onSubmit:
|
|
397
|
+
u(Ue, {
|
|
398
|
+
activeWorkspaceCollections: E.value,
|
|
399
|
+
collectionId: h.value,
|
|
400
|
+
state: l(I),
|
|
401
|
+
onCancel: o[1] || (o[1] = (n) => l(I).hide()),
|
|
402
|
+
onSubmit: Y
|
|
383
403
|
}, null, 8, ["activeWorkspaceCollections", "collectionId", "state"]),
|
|
384
|
-
|
|
404
|
+
u(l(ge), {
|
|
385
405
|
size: "xxs",
|
|
386
|
-
state:
|
|
387
|
-
title: `Edit ${
|
|
406
|
+
state: l(M),
|
|
407
|
+
title: `Edit ${v.value}`
|
|
388
408
|
}, {
|
|
389
409
|
default: c(() => [
|
|
390
|
-
|
|
410
|
+
u(Me, {
|
|
391
411
|
name: S.value ?? "",
|
|
392
|
-
onClose:
|
|
393
|
-
onEdit:
|
|
412
|
+
onClose: ie,
|
|
413
|
+
onEdit: ue
|
|
394
414
|
}, null, 8, ["name"])
|
|
395
415
|
]),
|
|
396
416
|
_: 1
|
|
@@ -401,5 +421,5 @@ const De = { class: "flex-1" }, Ue = ["onClick"], We = { class: "flex h-5 max-w-
|
|
|
401
421
|
}
|
|
402
422
|
});
|
|
403
423
|
export {
|
|
404
|
-
|
|
424
|
+
vn as default
|
|
405
425
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as E, ref as v, computed as I, watch as S, openBlock as t, createElementBlock as d, Fragment as w, normalizeClass as s, normalizeStyle as f, createBlock as h, unref as m, createCommentVNode as c, renderList as j, createElementVNode as n, withDirectives as D, vModelText as V, createVNode as $, nextTick as N } from "vue";
|
|
2
2
|
import { ScalarIcon as p } from "@scalar/components";
|
|
3
|
-
const R = ["onClick"], T = ["placeholder"], U = /* @__PURE__ */
|
|
3
|
+
const R = ["onClick"], T = ["placeholder"], U = /* @__PURE__ */ E({
|
|
4
4
|
__name: "EnvironmentColors",
|
|
5
5
|
props: {
|
|
6
6
|
activeColor: {},
|
|
7
7
|
selector: { type: Boolean, default: !1 }
|
|
8
8
|
},
|
|
9
9
|
emits: ["select"],
|
|
10
|
-
setup(x, { emit:
|
|
11
|
-
const e = x, z =
|
|
12
|
-
{ color: "#
|
|
10
|
+
setup(x, { emit: F }) {
|
|
11
|
+
const e = x, z = F, o = v(""), C = v(null), a = v(!1), u = v(!1), k = [
|
|
12
|
+
{ color: "#FFFFFF" },
|
|
13
13
|
{ color: "#EF0006" },
|
|
14
14
|
{ color: "#EDBE20" },
|
|
15
15
|
{ color: "#069061" },
|