@scalar/api-client 2.9.0 → 2.9.1
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 +12 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.js +9 -9
- package/dist/style.css +1 -1
- package/dist/v2/components/code-input/CodeInput.test.d.ts +2 -0
- package/dist/v2/components/code-input/CodeInput.test.d.ts.map +1 -0
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +140 -0
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -0
- package/dist/v2/components/code-input/CodeInput.vue.js +8 -0
- package/dist/v2/components/code-input/CodeInput.vue2.js +202 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts +21 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -0
- package/dist/v2/components/code-input/code-variable-widget.js +106 -0
- package/dist/v2/components/code-input/code-variable-widget.test.d.ts +2 -0
- package/dist/v2/components/code-input/code-variable-widget.test.d.ts.map +1 -0
- package/dist/v2/components/code-input/index.d.ts +2 -0
- package/dist/v2/components/code-input/index.d.ts.map +1 -0
- package/dist/v2/components/code-input/index.js +4 -0
- package/dist/v2/components/data-table/DataTable.vue.d.ts +22 -0
- package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTable.vue.js +38 -0
- package/dist/v2/components/data-table/DataTable.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableCell.vue.d.ts +19 -0
- package/dist/v2/components/data-table/DataTableCell.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableCell.vue.js +26 -0
- package/dist/v2/components/data-table/DataTableCell.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +14 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +53 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.d.ts +13 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.js +18 -0
- package/dist/v2/components/data-table/DataTableHeader.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +53 -0
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableInput.vue.js +7 -0
- package/dist/v2/components/data-table/DataTableInput.vue2.js +117 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +16 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +146 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableRow.vue.d.ts +13 -0
- package/dist/v2/components/data-table/DataTableRow.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableRow.vue.js +12 -0
- package/dist/v2/components/data-table/DataTableText.vue.d.ts +16 -0
- package/dist/v2/components/data-table/DataTableText.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableText.vue.js +23 -0
- package/dist/v2/components/data-table/DataTableText.vue2.js +4 -0
- package/dist/v2/components/data-table/index.d.ts +9 -0
- package/dist/v2/components/data-table/index.d.ts.map +1 -0
- package/dist/v2/components/data-table/index.js +18 -0
- package/dist/v2/features/app/App.test.d.ts +2 -0
- package/dist/v2/features/app/App.test.d.ts.map +1 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +56 -41
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +3 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +8 -7
- package/dist/v2/features/app/components/DesktopTabs.vue2.js +6 -0
- package/dist/v2/features/app/helpers/routes.d.ts +12 -9
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +0 -6
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue2.js +58 -45
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +12 -10
- package/dist/v2/features/collection/components/Environment.vue.d.ts +13 -87
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue2.js +20 -25
- package/dist/v2/features/collection/components/Overview.vue.d.ts +13 -12
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +5 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +64 -66
- package/dist/v2/features/collection/components/Tabs.vue.js +8 -8
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts +6 -95
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js +50 -98
- package/dist/v2/features/environments/components/Environment.vue.d.ts +9 -63
- package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue.js +41 -92
- package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +105 -81
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts +7 -14
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +61 -39
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +3 -3
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts +21 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +109 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +4 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts +7 -20
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +3 -3
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +85 -71
- package/dist/v2/features/environments/index.d.ts +0 -3
- package/dist/v2/features/environments/index.d.ts.map +1 -1
- package/dist/v2/features/environments/index.js +2 -4
- package/dist/v2/helpers/test-utils.d.ts +4 -0
- package/dist/v2/helpers/test-utils.d.ts.map +1 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts +2 -1
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +23 -9
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +13 -13
- package/dist/v2/features/collection/WorkspaceCollection.test.d.ts +0 -2
- package/dist/v2/features/collection/WorkspaceCollection.test.d.ts.map +0 -1
- package/dist/v2/features/environments/Environments.test.d.ts +0 -2
- package/dist/v2/features/environments/Environments.test.d.ts.map +0 -1
- package/dist/v2/features/environments/Environments.vue.d.ts +0 -31
- package/dist/v2/features/environments/Environments.vue.d.ts.map +0 -1
- package/dist/v2/features/environments/Environments.vue.js +0 -65
- package/dist/v2/features/environments/Environments.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts +0 -20
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.js +0 -48
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts +0 -18
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.js +0 -35
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue2.js +0 -4
|
@@ -1,104 +1,53 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const h = { class: "bg-b-2 flex cursor-grab justify-between rounded-t-lg px-1 py-1 text-sm" }, C = { class: "flex items-center gap-1" }, D = {
|
|
7
|
-
key: 1,
|
|
8
|
-
class: "flex h-6 w-6 items-center justify-center p-1"
|
|
9
|
-
}, E = {
|
|
10
|
-
key: 3,
|
|
11
|
-
class: "px-1 py-0.5 text-sm"
|
|
12
|
-
}, j = /* @__PURE__ */ g({
|
|
1
|
+
import { defineComponent as c, createElementBlock as a, openBlock as d, createElementVNode as n, createVNode as i, normalizeStyle as p, toDisplayString as v, unref as t } from "vue";
|
|
2
|
+
import { ScalarIconButton as r } from "@scalar/components";
|
|
3
|
+
import { ScalarIconNotePencil as u, ScalarIconTrash as f } from "@scalar/icons";
|
|
4
|
+
import y from "./EnvironmentVariablesTable.vue.js";
|
|
5
|
+
const _ = { class: "group rounded-lg border" }, b = { class: "bg-b-2 flex justify-between rounded-t-lg px-1 py-1 text-sm" }, g = { class: "flex items-center gap-1" }, h = { class: "flex h-6 w-6 items-center justify-center p-1" }, N = { class: "px-1 py-0.5 text-sm" }, B = { class: "hidden flex-row items-center gap-1 group-hover:flex" }, w = /* @__PURE__ */ c({
|
|
13
6
|
__name: "Environment",
|
|
14
7
|
props: {
|
|
15
|
-
name: {},
|
|
16
|
-
color: {},
|
|
17
|
-
variables: {},
|
|
18
|
-
isReadonly: { type: Boolean, default: !1 },
|
|
19
8
|
environment: {},
|
|
20
|
-
|
|
9
|
+
environmentName: {},
|
|
10
|
+
eventBus: {},
|
|
11
|
+
collectionType: {}
|
|
21
12
|
},
|
|
22
|
-
emits: ["
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onOnDragEnd: y
|
|
34
|
-
}, {
|
|
35
|
-
default: s(() => [
|
|
36
|
-
d("div", h, [
|
|
37
|
-
d("div", C, [
|
|
38
|
-
e.isReadonly ? (l(), u("div", D, [
|
|
39
|
-
d("span", {
|
|
40
|
-
class: "h-2.5 w-2.5 rounded-full",
|
|
41
|
-
style: p({ backgroundColor: e.color || "#FFFFFF" })
|
|
42
|
-
}, null, 4)
|
|
43
|
-
])) : (l(), t(r(i), {
|
|
44
|
-
key: 0,
|
|
45
|
-
class: "hover:bg-b-3 flex h-6 w-6 p-1",
|
|
46
|
-
disabled: e.isReadonly,
|
|
47
|
-
variant: "ghost",
|
|
48
|
-
onClick: a[0] || (a[0] = (n) => o("update:color"))
|
|
49
|
-
}, {
|
|
50
|
-
default: s(() => [
|
|
51
|
-
d("span", {
|
|
52
|
-
class: "h-2.5 w-2.5 rounded-full",
|
|
53
|
-
style: p({ backgroundColor: e.color || "#FFFFFF" })
|
|
54
|
-
}, null, 4)
|
|
55
|
-
]),
|
|
56
|
-
_: 1
|
|
57
|
-
}, 8, ["disabled"])),
|
|
58
|
-
e.isReadonly ? (l(), u("span", E, v(e.name), 1)) : (l(), t(r(i), {
|
|
59
|
-
key: 2,
|
|
60
|
-
class: "hover:bg-b-3 rounded px-1 py-0.5 text-sm",
|
|
61
|
-
disabled: e.isReadonly,
|
|
62
|
-
variant: "ghost",
|
|
63
|
-
onClick: a[1] || (a[1] = (n) => o("update:name"))
|
|
64
|
-
}, {
|
|
65
|
-
default: s(() => [
|
|
66
|
-
F(v(e.name), 1)
|
|
67
|
-
]),
|
|
68
|
-
_: 1
|
|
69
|
-
}, 8, ["disabled"]))
|
|
13
|
+
emits: ["edit", "delete"],
|
|
14
|
+
setup(E, { emit: s }) {
|
|
15
|
+
const l = s;
|
|
16
|
+
return (e, o) => (d(), a("div", _, [
|
|
17
|
+
n("div", b, [
|
|
18
|
+
n("div", g, [
|
|
19
|
+
n("div", h, [
|
|
20
|
+
n("span", {
|
|
21
|
+
class: "h-2.5 w-2.5 rounded-full",
|
|
22
|
+
style: p({ backgroundColor: e.environment.color })
|
|
23
|
+
}, null, 4)
|
|
70
24
|
]),
|
|
71
|
-
|
|
72
|
-
key: 0,
|
|
73
|
-
class: "text-c-2 hover:text-c-1 hover:bg-b-3 h-fit rounded p-1",
|
|
74
|
-
size: "sm",
|
|
75
|
-
variant: "ghost",
|
|
76
|
-
onClick: a[2] || (a[2] = (n) => o("delete"))
|
|
77
|
-
}, {
|
|
78
|
-
default: s(() => [
|
|
79
|
-
b(r(R), { class: "size-3.5" })
|
|
80
|
-
]),
|
|
81
|
-
_: 1
|
|
82
|
-
}))
|
|
25
|
+
n("span", N, v(e.environmentName), 1)
|
|
83
26
|
]),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
27
|
+
n("div", B, [
|
|
28
|
+
i(t(r), {
|
|
29
|
+
icon: t(u),
|
|
30
|
+
label: "Edit Environment",
|
|
31
|
+
size: "sm",
|
|
32
|
+
onClick: o[0] || (o[0] = (m) => l("edit"))
|
|
33
|
+
}, null, 8, ["icon"]),
|
|
34
|
+
i(t(r), {
|
|
35
|
+
icon: t(f),
|
|
36
|
+
label: "Delete Environment",
|
|
37
|
+
size: "sm",
|
|
38
|
+
onClick: o[1] || (o[1] = (m) => l("delete"))
|
|
39
|
+
}, null, 8, ["icon"])
|
|
96
40
|
])
|
|
97
41
|
]),
|
|
98
|
-
|
|
99
|
-
|
|
42
|
+
i(y, {
|
|
43
|
+
collectionType: e.collectionType,
|
|
44
|
+
environment: e.environment,
|
|
45
|
+
environmentName: e.environmentName,
|
|
46
|
+
eventBus: e.eventBus
|
|
47
|
+
}, null, 8, ["collectionType", "environment", "environmentName", "eventBus"])
|
|
48
|
+
]));
|
|
100
49
|
}
|
|
101
50
|
});
|
|
102
51
|
export {
|
|
103
|
-
|
|
52
|
+
w as default
|
|
104
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentColors.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentColors.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnvironmentColors.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentColors.vue"],"names":[],"mappings":"AA6LA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC;;;;;;AAyUF,wBAOG"}
|
|
@@ -1,97 +1,121 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIcon as
|
|
3
|
-
const
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "flex min-h-10 min-w-[296px] flex-row items-center justify-between gap-1.5 space-x-1"
|
|
6
|
-
}, N = ["onClick"], R = {
|
|
1
|
+
import { defineComponent as D, ref as d, computed as m, createElementBlock as a, openBlock as l, createCommentVNode as c, normalizeStyle as v, createBlock as k, unref as C, createElementVNode as s, Fragment as S, renderList as $, withDirectives as j, vModelText as N, createVNode as T, nextTick as V } from "vue";
|
|
2
|
+
import { ScalarIcon as f } from "@scalar/components";
|
|
3
|
+
const A = {
|
|
7
4
|
key: 1,
|
|
8
|
-
class: "flex
|
|
9
|
-
},
|
|
5
|
+
class: "color-selector flex h-4 flex-row items-center justify-between gap-1.5 space-x-1"
|
|
6
|
+
}, R = ["onClick"], L = {
|
|
7
|
+
key: 2,
|
|
8
|
+
class: "color-selector flex h-4 flex-1 items-center gap-2 rounded"
|
|
9
|
+
}, U = ["placeholder"], W = "linear-gradient(to right, rgb(235, 87, 87), rgb(242, 201, 76), rgb(76, 183, 130), rgb(78, 167, 252), rgb(250, 96, 122))", P = /* @__PURE__ */ D({
|
|
10
10
|
__name: "EnvironmentColors",
|
|
11
11
|
props: {
|
|
12
12
|
activeColor: {}
|
|
13
13
|
},
|
|
14
14
|
emits: ["select"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
|
|
15
|
+
setup(i, { emit: w }) {
|
|
16
|
+
const F = w, t = d(""), p = d(null), r = d(!1), n = d(!1), b = [
|
|
17
|
+
"#FFFFFF",
|
|
18
|
+
"#EF0006",
|
|
19
|
+
"#EDBE20",
|
|
20
|
+
"#069061",
|
|
21
|
+
"#FB892C",
|
|
22
|
+
"#0082D0",
|
|
23
|
+
"#5203D1",
|
|
24
|
+
"#FFC0CB"
|
|
25
|
+
], E = m(
|
|
26
|
+
() => b.includes(i.activeColor)
|
|
27
|
+
), h = m(
|
|
28
|
+
() => i.activeColor && !E.value && !r.value
|
|
29
|
+
), I = (e) => i.activeColor === e, y = m(() => {
|
|
30
|
+
const e = t.value || i.activeColor;
|
|
31
|
+
return h.value || t.value ? `background-color: ${e};` : `background: ${W};`;
|
|
32
|
+
}), g = async () => {
|
|
33
|
+
r.value = !r.value, n.value = !1, r.value && (await V(), p.value?.focus());
|
|
34
|
+
}, z = () => {
|
|
35
|
+
n.value = !n.value;
|
|
36
|
+
}, x = (e) => {
|
|
37
|
+
const o = e && !e.startsWith("#") ? `#${e}` : e;
|
|
38
|
+
F("select", o), n.value = !1;
|
|
39
|
+
}, B = () => {
|
|
40
|
+
if (!t.value)
|
|
41
|
+
return;
|
|
42
|
+
const e = t.value.startsWith("#") ? t.value : `#${t.value}`;
|
|
43
|
+
t.value = e, x(e);
|
|
36
44
|
};
|
|
37
|
-
return (e,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class: "
|
|
41
|
-
style:
|
|
42
|
-
|
|
43
|
-
I(r("input", {
|
|
44
|
-
ref_key: "customColorInputRef",
|
|
45
|
-
ref: u,
|
|
46
|
-
"onUpdate:modelValue": l[0] || (l[0] = (o) => t.value = o),
|
|
47
|
-
class: "w-full flex-1 border-transparent text-sm outline-none",
|
|
48
|
-
placeholder: e.activeColor || "#000000",
|
|
49
|
-
type: "text",
|
|
50
|
-
onInput: l[1] || (l[1] = (o) => g(t.value))
|
|
51
|
-
}, null, 40, S), [
|
|
52
|
-
[D, t.value]
|
|
53
|
-
]),
|
|
54
|
-
r("button", {
|
|
55
|
-
class: "text-c-3 hover:bg-b-2 rounded-lg p-1.5",
|
|
56
|
-
type: "button",
|
|
57
|
-
onClick: b
|
|
45
|
+
return (e, o) => (l(), a("div", null, [
|
|
46
|
+
!r.value && !n.value ? (l(), a("div", {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: "flex h-4 w-4 cursor-pointer items-center justify-center rounded-full",
|
|
49
|
+
style: v({ backgroundColor: e.activeColor }),
|
|
50
|
+
onClick: z
|
|
58
51
|
}, [
|
|
59
|
-
|
|
60
|
-
icon: "Checkmark",
|
|
61
|
-
size: "xs"
|
|
62
|
-
})
|
|
63
|
-
])
|
|
64
|
-
])) : (s(), v("div", j, [
|
|
65
|
-
(s(), v(B, null, E(i, (o) => r("div", {
|
|
66
|
-
key: o.color,
|
|
67
|
-
class: "flex h-5 w-5 cursor-pointer items-center justify-center rounded-full",
|
|
68
|
-
"data-testid": "color-option",
|
|
69
|
-
style: C({ backgroundColor: o.color }),
|
|
70
|
-
onClick: (G) => g(o.color)
|
|
71
|
-
}, [
|
|
72
|
-
e.activeColor === o.color && !t.value ? (s(), h(f(p), {
|
|
73
|
-
key: 0,
|
|
74
|
-
class: "text-c-btn",
|
|
75
|
-
icon: "Checkmark",
|
|
76
|
-
size: "xs"
|
|
77
|
-
})) : x("", !0)
|
|
78
|
-
], 12, N)), 64)),
|
|
79
|
-
l[2] || (l[2] = r("hr", { class: "border-ghost h-5 w-0.5 border-l" }, null, -1)),
|
|
80
|
-
r("label", {
|
|
81
|
-
class: "z-10 flex h-5 w-5 cursor-pointer flex-row items-center justify-center gap-2 rounded-full",
|
|
82
|
-
style: C(k.value),
|
|
83
|
-
onClick: b
|
|
84
|
-
}, [
|
|
85
|
-
!n.value && (e.activeColor === t.value || e.activeColor && !i.some((o) => o.color === e.activeColor)) ? (s(), h(f(p), {
|
|
52
|
+
e.activeColor ? (l(), k(C(f), {
|
|
86
53
|
key: 0,
|
|
87
|
-
class: "text-c-btn",
|
|
54
|
+
class: "text-c-btn p-0.5",
|
|
88
55
|
icon: "Checkmark",
|
|
89
56
|
size: "xs"
|
|
90
|
-
})) :
|
|
91
|
-
], 4)
|
|
57
|
+
})) : c("", !0)
|
|
58
|
+
], 4)) : c("", !0),
|
|
59
|
+
!r.value && n.value ? (l(), a("div", A, [
|
|
60
|
+
(l(), a(S, null, $(b, (u) => s("div", {
|
|
61
|
+
key: u,
|
|
62
|
+
class: "flex h-4 w-4 cursor-pointer items-center justify-center rounded-full",
|
|
63
|
+
style: v({ backgroundColor: u }),
|
|
64
|
+
onClick: (G) => x(u)
|
|
65
|
+
}, [
|
|
66
|
+
I(u) ? (l(), k(C(f), {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: "text-c-btn p-0.5",
|
|
69
|
+
icon: "Checkmark",
|
|
70
|
+
size: "xs"
|
|
71
|
+
})) : c("", !0)
|
|
72
|
+
], 12, R)), 64)),
|
|
73
|
+
o[1] || (o[1] = s("hr", { class: "border-ghost h-5 w-0.5 border-l" }, null, -1)),
|
|
74
|
+
s("button", {
|
|
75
|
+
class: "z-10 flex h-4 w-4 cursor-pointer flex-row items-center justify-center gap-2 rounded-full",
|
|
76
|
+
style: v(y.value),
|
|
77
|
+
type: "button",
|
|
78
|
+
onClick: g
|
|
79
|
+
}, [
|
|
80
|
+
h.value ? (l(), k(C(f), {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: "text-c-btn",
|
|
83
|
+
icon: "Checkmark",
|
|
84
|
+
size: "xs"
|
|
85
|
+
})) : c("", !0)
|
|
86
|
+
], 4)
|
|
87
|
+
])) : c("", !0),
|
|
88
|
+
r.value ? (l(), a("div", L, [
|
|
89
|
+
o[2] || (o[2] = s("span", { class: "absolute h-4 w-4 rounded-full border border-dashed" }, null, -1)),
|
|
90
|
+
s("span", {
|
|
91
|
+
class: "z-[1] h-4 w-4 rounded-full",
|
|
92
|
+
style: v(y.value)
|
|
93
|
+
}, null, 4),
|
|
94
|
+
j(s("input", {
|
|
95
|
+
ref_key: "customColorInputRef",
|
|
96
|
+
ref: p,
|
|
97
|
+
"onUpdate:modelValue": o[0] || (o[0] = (u) => t.value = u),
|
|
98
|
+
class: "w-full flex-1 border-transparent text-sm outline-none",
|
|
99
|
+
placeholder: e.activeColor || "#000000",
|
|
100
|
+
type: "text",
|
|
101
|
+
onInput: B
|
|
102
|
+
}, null, 40, U), [
|
|
103
|
+
[N, t.value]
|
|
104
|
+
]),
|
|
105
|
+
s("button", {
|
|
106
|
+
class: "text-c-3 hover:bg-b-2 rounded-lg p-1.5",
|
|
107
|
+
type: "button",
|
|
108
|
+
onClick: g
|
|
109
|
+
}, [
|
|
110
|
+
T(C(f), {
|
|
111
|
+
icon: "Checkmark",
|
|
112
|
+
size: "xs"
|
|
113
|
+
})
|
|
114
|
+
])
|
|
115
|
+
])) : c("", !0)
|
|
92
116
|
]));
|
|
93
117
|
}
|
|
94
118
|
});
|
|
95
119
|
export {
|
|
96
|
-
|
|
120
|
+
P as default
|
|
97
121
|
};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { type ModalState } from '@scalar/components';
|
|
2
|
+
import type { CollectionType, WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
|
+
import type { XScalarEnvironments } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
2
4
|
type __VLS_Props = {
|
|
5
|
+
environments: NonNullable<XScalarEnvironments['x-scalar-environments']>;
|
|
6
|
+
selectedEnvironmentName: string | null;
|
|
3
7
|
state: ModalState;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
name: string;
|
|
8
|
-
color: string;
|
|
9
|
-
}) => any;
|
|
10
|
-
cancel: () => any;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
-
onSubmit?: ((environment: {
|
|
13
|
-
name: string;
|
|
14
|
-
color: string;
|
|
15
|
-
}) => any) | undefined;
|
|
16
|
-
onCancel?: (() => any) | undefined;
|
|
17
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
eventBus: WorkspaceEventBus;
|
|
9
|
+
} & CollectionType;
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
11
|
export default _default;
|
|
19
12
|
//# sourceMappingURL=EnvironmentCreateModal.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentCreateModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentCreateModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnvironmentCreateModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentCreateModal.vue"],"names":[],"mappings":"AA+IA,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2EAA2E,CAAA;AAQpH,KAAK,WAAW,GAAG;IACf,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,uBAAuB,CAAC,CAAC,CAAA;IACvE,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAA;IACtC,KAAK,EAAE,UAAU,CAAA;IACjB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GAAG,cAAc,CAAC;;AA8MrB,wBAMG"}
|
|
@@ -1,55 +1,77 @@
|
|
|
1
|
-
import { defineComponent as f, ref as
|
|
2
|
-
import { ScalarModal as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as f, ref as r, watch as N, computed as E, createBlock as y, openBlock as c, unref as h, withCtx as a, createVNode as m, createElementVNode as C, createElementBlock as b, createCommentVNode as x, createTextVNode as T, toDisplayString as F } from "vue";
|
|
2
|
+
import { ScalarModal as V } from "@scalar/components";
|
|
3
|
+
import k from "../../../../components/CommandPalette/CommandActionForm.vue.js";
|
|
4
|
+
import B from "../../../../components/CommandPalette/CommandActionInput.vue.js";
|
|
5
|
+
import S from "./EnvironmentColors.vue.js";
|
|
6
|
+
const O = { class: "flex items-start gap-2" }, g = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "text-red text-xs"
|
|
9
|
+
}, s = "#FFFFFF", w = /* @__PURE__ */ f({
|
|
7
10
|
__name: "EnvironmentCreateModal",
|
|
8
11
|
props: {
|
|
9
|
-
|
|
12
|
+
environments: {},
|
|
13
|
+
selectedEnvironmentName: {},
|
|
14
|
+
state: {},
|
|
15
|
+
eventBus: {},
|
|
16
|
+
collectionType: {}
|
|
10
17
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
e.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
setup(e) {
|
|
19
|
+
const t = r(""), n = r(s);
|
|
20
|
+
N(
|
|
21
|
+
() => e.state.open,
|
|
22
|
+
(l) => {
|
|
23
|
+
if (l) {
|
|
24
|
+
const o = e.environments[e.selectedEnvironmentName ?? ""];
|
|
25
|
+
e.selectedEnvironmentName && o ? (t.value = e.selectedEnvironmentName, n.value = o.color) : (t.value = "", n.value = s);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
const d = (l) => {
|
|
30
|
+
n.value = l;
|
|
31
|
+
}, v = () => {
|
|
32
|
+
e.selectedEnvironmentName ? e.eventBus.emit("environment:upsert:environment", {
|
|
33
|
+
oldEnvironmentName: e.selectedEnvironmentName,
|
|
34
|
+
payload: {
|
|
35
|
+
color: n.value
|
|
36
|
+
},
|
|
37
|
+
environmentName: t.value.trim(),
|
|
38
|
+
collectionType: e.collectionType
|
|
39
|
+
}) : e.eventBus.emit("environment:upsert:environment", {
|
|
40
|
+
environmentName: t.value.trim(),
|
|
41
|
+
payload: {
|
|
42
|
+
color: n.value
|
|
43
|
+
},
|
|
44
|
+
collectionType: e.collectionType
|
|
45
|
+
}), e.state.hide();
|
|
46
|
+
}, i = E(() => e.selectedEnvironmentName ? t.value !== e.selectedEnvironmentName && Object.keys(e.environments).includes(t.value) : Object.keys(e.environments).includes(t.value));
|
|
47
|
+
return (l, o) => (c(), y(h(V), {
|
|
24
48
|
bodyClass: "border-t-0 rounded-t-lg",
|
|
25
49
|
size: "xs",
|
|
26
|
-
state:
|
|
27
|
-
onClose: m
|
|
50
|
+
state: l.state
|
|
28
51
|
}, {
|
|
29
52
|
default: a(() => [
|
|
30
|
-
|
|
31
|
-
disabled: !
|
|
32
|
-
|
|
33
|
-
onSubmit: c
|
|
53
|
+
m(k, {
|
|
54
|
+
disabled: !t.value.trim() || i.value,
|
|
55
|
+
onSubmit: v
|
|
34
56
|
}, {
|
|
35
|
-
submit: a(() => [
|
|
36
|
-
|
|
37
|
-
])
|
|
57
|
+
submit: a(() => [
|
|
58
|
+
T(F(l.selectedEnvironmentName ? "Update" : "Add") + " Environment ", 1)
|
|
59
|
+
]),
|
|
38
60
|
default: a(() => [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
activeColor:
|
|
61
|
+
C("div", O, [
|
|
62
|
+
m(S, {
|
|
63
|
+
activeColor: n.value,
|
|
42
64
|
class: "peer",
|
|
43
|
-
|
|
44
|
-
onSelect: t[0] || (t[0] = (l) => o.value = l)
|
|
65
|
+
onSelect: d
|
|
45
66
|
}, null, 8, ["activeColor"]),
|
|
46
|
-
|
|
47
|
-
modelValue:
|
|
48
|
-
"onUpdate:modelValue":
|
|
67
|
+
m(B, {
|
|
68
|
+
modelValue: t.value,
|
|
69
|
+
"onUpdate:modelValue": o[0] || (o[0] = (u) => t.value = u),
|
|
49
70
|
class: "-mt-[.5px] !p-0 peer-has-[.color-selector]:hidden",
|
|
50
71
|
placeholder: "Environment name"
|
|
51
72
|
}, null, 8, ["modelValue"])
|
|
52
|
-
])
|
|
73
|
+
]),
|
|
74
|
+
i.value ? (c(), b("div", g, " This environment name is already in use. ")) : x("", !0)
|
|
53
75
|
]),
|
|
54
76
|
_: 1
|
|
55
77
|
}, 8, ["disabled"])
|
|
@@ -59,5 +81,5 @@ const N = { class: "flex items-start gap-2" }, M = /* @__PURE__ */ f({
|
|
|
59
81
|
}
|
|
60
82
|
});
|
|
61
83
|
export {
|
|
62
|
-
|
|
84
|
+
w as default
|
|
63
85
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ModalState } from '@scalar/components';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
state: ModalState;
|
|
4
|
-
name: string;
|
|
4
|
+
name: string | null;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
7
|
submit: () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentDeleteModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentDeleteModal.vue"],"names":[],"mappings":"AAoDA,OAAO,EAA6B,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/E,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,UAAU,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"EnvironmentDeleteModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentDeleteModal.vue"],"names":[],"mappings":"AAoDA,OAAO,EAA6B,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/E,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,UAAU,CAAA;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB,CAAC;;;;;;;;AAwHF,wBAOG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as m, createBlock as u, openBlock as f, unref as n, withCtx as o, createElementVNode as a, createVNode as l, createTextVNode as i } from "vue";
|
|
2
2
|
import { ScalarModal as p, ScalarButton as r } from "@scalar/components";
|
|
3
|
-
const x = { class: "flex justify-between" },
|
|
3
|
+
const x = { class: "flex justify-between" }, k = /* @__PURE__ */ m({
|
|
4
4
|
__name: "EnvironmentDeleteModal",
|
|
5
5
|
props: {
|
|
6
6
|
state: {},
|
|
7
|
-
name: {}
|
|
7
|
+
name: { default: "unknown" }
|
|
8
8
|
},
|
|
9
9
|
emits: ["cancel", "submit"],
|
|
10
10
|
setup(b, { emit: d }) {
|
|
@@ -49,5 +49,5 @@ const x = { class: "flex justify-between" }, y = /* @__PURE__ */ m({
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
k as default
|
|
53
53
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
query: string;
|
|
4
|
+
environment: XScalarEnvironment;
|
|
5
|
+
dropdownPosition?: {
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
11
|
+
handleArrowKey: (direction: "up" | "down") => void;
|
|
12
|
+
handleSelect: () => void;
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
select: (variable: string) => any;
|
|
15
|
+
redirect: () => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onSelect?: ((variable: string) => any) | undefined;
|
|
18
|
+
onRedirect?: (() => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=EnvironmentVariablesDropdown.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentVariablesDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesDropdown.vue"],"names":[],"mappings":"AAkKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAKnH,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCAqDiC,IAAI,GAAG,MAAM;;;;;;;;;AA0OhD,wBAQG"}
|