@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,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
declare const _default: import("vue").DefineComponent<(import("../../../../v2/features/app/helpers/routes.js").RouteProps & {
|
|
2
|
+
collectionType: "document";
|
|
3
|
+
document: import("@scalar/workspace-store/schemas").WorkspaceDocument;
|
|
4
|
+
}) | (import("../../../../v2/features/app/helpers/routes.js").RouteProps & {
|
|
5
|
+
collectionType: "workspace";
|
|
6
|
+
document: null;
|
|
7
|
+
}), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<(import("../../../../v2/features/app/helpers/routes.js").RouteProps & {
|
|
8
|
+
collectionType: "document";
|
|
9
|
+
document: import("@scalar/workspace-store/schemas").WorkspaceDocument;
|
|
10
|
+
}) | (import("../../../../v2/features/app/helpers/routes.js").RouteProps & {
|
|
11
|
+
collectionType: "workspace";
|
|
12
|
+
document: null;
|
|
13
|
+
})> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
14
|
export default _default;
|
|
14
15
|
//# sourceMappingURL=Overview.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Overview.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Overview.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Overview.vue"],"names":[],"mappings":";;;;;;;;;;;;;AA6ZA,wBAMG"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./Overview.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7c1a2f6c"]]);
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
e as default
|
|
4
7
|
};
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarButton as
|
|
1
|
+
import { defineComponent as g, computed as y, ref as x, useTemplateRef as w, createElementBlock as i, openBlock as t, createElementVNode as o, createBlock as c, createCommentVNode as B, unref as n, withCtx as m, createVNode as d, Fragment as v, nextTick as C } from "vue";
|
|
2
|
+
import { ScalarButton as f, ScalarMarkdown as I } from "@scalar/components";
|
|
3
3
|
import { ScalarIconPencil as b } from "@scalar/icons";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import V from "../../../components/code-input/CodeInput.vue.js";
|
|
5
|
+
const h = { class: "flex flex-col gap-2" }, z = { class: "flex items-center justify-between gap-2 pl-1.5" }, R = { class: "has-[:focus-visible]:bg-b-1 group rounded-lg" }, S = {
|
|
6
6
|
key: 1,
|
|
7
|
-
class: "text-c-3 flex
|
|
8
|
-
},
|
|
7
|
+
class: "text-c-3 flex items-center justify-center rounded-lg border p-4"
|
|
8
|
+
}, j = /* @__PURE__ */ g({
|
|
9
9
|
__name: "Overview",
|
|
10
10
|
props: {
|
|
11
|
-
|
|
11
|
+
document: {},
|
|
12
|
+
eventBus: {},
|
|
13
|
+
layout: {},
|
|
12
14
|
environment: {},
|
|
13
|
-
|
|
15
|
+
workspaceStore: {},
|
|
16
|
+
collectionType: {}
|
|
14
17
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
s.value === "preview" ? (n(), u(o(c), {
|
|
18
|
+
setup(k) {
|
|
19
|
+
const u = y(
|
|
20
|
+
() => k.document?.info?.description ?? ""
|
|
21
|
+
), a = x("preview"), p = w("codeInputRef"), l = async (s) => {
|
|
22
|
+
a.value = s, s === "edit" && (await C(), p.value?.focus());
|
|
23
|
+
};
|
|
24
|
+
return (s, e) => (t(), i("div", h, [
|
|
25
|
+
o("div", z, [
|
|
26
|
+
e[6] || (e[6] = o("h3", { class: "font-bold" }, "Description", -1)),
|
|
27
|
+
a.value === "preview" ? (t(), c(n(f), {
|
|
26
28
|
key: 0,
|
|
27
29
|
class: "text-c-2 hover:text-c-1 flex items-center gap-2",
|
|
28
30
|
size: "sm",
|
|
@@ -30,62 +32,58 @@ const C = { class: "flex flex-col gap-2" }, I = { class: "flex min-h-8 items-cen
|
|
|
30
32
|
variant: "outlined",
|
|
31
33
|
onClick: e[0] || (e[0] = (r) => l("edit"))
|
|
32
34
|
}, {
|
|
33
|
-
default:
|
|
34
|
-
|
|
35
|
+
default: m(() => [
|
|
36
|
+
d(n(b), {
|
|
35
37
|
size: "sm",
|
|
36
38
|
thickness: "1.5"
|
|
37
39
|
}),
|
|
38
|
-
e[5] || (e[5] =
|
|
40
|
+
e[5] || (e[5] = o("span", null, "Edit", -1))
|
|
39
41
|
]),
|
|
40
42
|
_: 1
|
|
41
|
-
})) :
|
|
43
|
+
})) : B("", !0)
|
|
42
44
|
]),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
onBlur: e[3] || (e[3] = (r) => l("preview")),
|
|
82
|
-
"onUpdate:modelValue": e[4] || (e[4] = (r) => g("overview:update:description", r))
|
|
83
|
-
}, null, 8, ["envVariables", "environment", "modelValue"])) : a("", !0)
|
|
84
|
-
])
|
|
45
|
+
o("div", R, [
|
|
46
|
+
a.value === "preview" ? (t(), i(v, { key: 0 }, [
|
|
47
|
+
u.value.trim().length ? (t(), i(v, { key: 0 }, [
|
|
48
|
+
d(n(I), {
|
|
49
|
+
class: "flex-1 rounded border border-transparent p-1.5 hover:border-(--scalar-background-3)",
|
|
50
|
+
value: u.value,
|
|
51
|
+
withImages: "",
|
|
52
|
+
onDblclick: e[1] || (e[1] = (r) => l("edit"))
|
|
53
|
+
}, null, 8, ["value"]),
|
|
54
|
+
e[7] || (e[7] = o("div", { class: "brightness-lifted bg-b-1 absolute inset-0 -z-1 hidden rounded group-hover:block group-has-[:focus-visible]:hidden" }, null, -1))
|
|
55
|
+
], 64)) : (t(), i("div", S, [
|
|
56
|
+
d(n(f), {
|
|
57
|
+
class: "hover:bg-b-2 hover:text-c-1 text-c-2 flex items-center gap-2",
|
|
58
|
+
size: "sm",
|
|
59
|
+
variant: "ghost",
|
|
60
|
+
onClick: e[2] || (e[2] = (r) => l("edit"))
|
|
61
|
+
}, {
|
|
62
|
+
default: m(() => [
|
|
63
|
+
d(n(b), {
|
|
64
|
+
size: "sm",
|
|
65
|
+
thickness: "1.5"
|
|
66
|
+
}),
|
|
67
|
+
e[8] || (e[8] = o("span", null, "Write a description", -1))
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
})
|
|
71
|
+
]))
|
|
72
|
+
], 64)) : (t(), c(n(V), {
|
|
73
|
+
key: 1,
|
|
74
|
+
ref_key: "codeInputRef",
|
|
75
|
+
ref: p,
|
|
76
|
+
class: "border px-0.5 py-0",
|
|
77
|
+
environment: void 0,
|
|
78
|
+
layout: s.layout,
|
|
79
|
+
modelValue: u.value,
|
|
80
|
+
onBlur: e[3] || (e[3] = (r) => l("preview")),
|
|
81
|
+
"onUpdate:modelValue": e[4] || (e[4] = (r) => s.eventBus.emit("document:update:info", { description: r }))
|
|
82
|
+
}, null, 8, ["layout", "modelValue"]))
|
|
85
83
|
])
|
|
86
84
|
]));
|
|
87
85
|
}
|
|
88
86
|
});
|
|
89
87
|
export {
|
|
90
|
-
|
|
88
|
+
j as default
|
|
91
89
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as m, computed as p, createElementBlock as o, openBlock as t, Fragment as u, renderList as d, createBlock as f, unref as h, withCtx as
|
|
1
|
+
import { defineComponent as m, computed as p, createElementBlock as o, openBlock as t, Fragment as u, renderList as d, createBlock as f, unref as h, withCtx as x, createElementVNode as n, normalizeClass as k, toDisplayString as v, capitalize as _ } from "vue";
|
|
2
2
|
import { RouterLink as b } from "vue-router";
|
|
3
3
|
const w = { class: "flex w-full gap-2 border-b pl-1.5 md:ml-1.5 md:pl-0" }, g = ["href", "onClick"], z = /* @__PURE__ */ m({
|
|
4
4
|
__name: "Tabs",
|
|
5
5
|
props: {
|
|
6
6
|
type: {}
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
8
|
+
setup(r) {
|
|
9
9
|
const s = p(
|
|
10
|
-
() =>
|
|
10
|
+
() => r.type === "workspace" ? ["environment", "cookies", "settings"] : [
|
|
11
11
|
"overview",
|
|
12
12
|
"servers",
|
|
13
13
|
"authentication",
|
|
@@ -22,18 +22,18 @@ const w = { class: "flex w-full gap-2 border-b pl-1.5 md:ml-1.5 md:pl-0" }, g =
|
|
|
22
22
|
custom: "",
|
|
23
23
|
to: { name: `${c.type}.${e}` }
|
|
24
24
|
}, {
|
|
25
|
-
default:
|
|
26
|
-
|
|
25
|
+
default: x(({ isActive: i, href: l, navigate: a }) => [
|
|
26
|
+
n("a", {
|
|
27
27
|
class: "-ml-2 flex h-10 cursor-pointer items-center px-2 text-center text-sm font-medium whitespace-nowrap no-underline -outline-offset-1 has-[:focus-visible]:outline",
|
|
28
28
|
href: l,
|
|
29
29
|
onClick: a
|
|
30
30
|
}, [
|
|
31
|
-
|
|
32
|
-
class:
|
|
31
|
+
n("span", {
|
|
32
|
+
class: k([
|
|
33
33
|
"flex-center hover:text-c-1 h-full border-b",
|
|
34
34
|
i ? "text-c-1 border-c-1" : "text-c-2 hover:text-c-1 border-transparent"
|
|
35
35
|
])
|
|
36
|
-
},
|
|
36
|
+
}, v(_(e)), 3)
|
|
37
37
|
], 8, g)
|
|
38
38
|
]),
|
|
39
39
|
_: 2
|
|
@@ -1,98 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import { type Environment, type EnvironmentVariable } from './components/Environment.vue.js';
|
|
1
|
+
import type { CollectionType, WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
+
import type { XScalarEnvironments } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
4
3
|
type __VLS_Props = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/** TODO: remove when we migrate to the new store */
|
|
10
|
-
environment: EntitiesEnvironment;
|
|
11
|
-
envVariables: EnvVariable[];
|
|
12
|
-
};
|
|
13
|
-
type __VLS_Slots = {
|
|
14
|
-
icon: () => unknown;
|
|
15
|
-
};
|
|
16
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
|
-
"environment:reorder": (payload: {
|
|
18
|
-
draggingItem: {
|
|
19
|
-
id: string;
|
|
20
|
-
};
|
|
21
|
-
hoveredItem: {
|
|
22
|
-
id: string;
|
|
23
|
-
};
|
|
24
|
-
}) => any;
|
|
25
|
-
"environment:add": (payload: {
|
|
26
|
-
environment: Environment;
|
|
27
|
-
}) => any;
|
|
28
|
-
"environment:update": (payload: {
|
|
29
|
-
environmentName: string;
|
|
30
|
-
environment: Partial<Environment>;
|
|
31
|
-
}) => any;
|
|
32
|
-
"environment:delete": (payload: {
|
|
33
|
-
environmentName: string;
|
|
34
|
-
}) => any;
|
|
35
|
-
"environment:add:variable": (payload: {
|
|
36
|
-
environmentName: string;
|
|
37
|
-
environmentVariable: Partial<EnvironmentVariable>;
|
|
38
|
-
}) => any;
|
|
39
|
-
"environment:update:variable": (payload: {
|
|
40
|
-
/** Row number */
|
|
41
|
-
id: number;
|
|
42
|
-
/** Environment name */
|
|
43
|
-
environmentName: string;
|
|
44
|
-
/** Payload */
|
|
45
|
-
environmentVariable: Partial<EnvironmentVariable>;
|
|
46
|
-
}) => any;
|
|
47
|
-
"environment:delete:variable": (payload: {
|
|
48
|
-
/** Environment name */
|
|
49
|
-
environmentName: string;
|
|
50
|
-
/** Row number */
|
|
51
|
-
id: number;
|
|
52
|
-
}) => any;
|
|
53
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
54
|
-
"onEnvironment:reorder"?: ((payload: {
|
|
55
|
-
draggingItem: {
|
|
56
|
-
id: string;
|
|
57
|
-
};
|
|
58
|
-
hoveredItem: {
|
|
59
|
-
id: string;
|
|
60
|
-
};
|
|
61
|
-
}) => any) | undefined;
|
|
62
|
-
"onEnvironment:add"?: ((payload: {
|
|
63
|
-
environment: Environment;
|
|
64
|
-
}) => any) | undefined;
|
|
65
|
-
"onEnvironment:update"?: ((payload: {
|
|
66
|
-
environmentName: string;
|
|
67
|
-
environment: Partial<Environment>;
|
|
68
|
-
}) => any) | undefined;
|
|
69
|
-
"onEnvironment:delete"?: ((payload: {
|
|
70
|
-
environmentName: string;
|
|
71
|
-
}) => any) | undefined;
|
|
72
|
-
"onEnvironment:add:variable"?: ((payload: {
|
|
73
|
-
environmentName: string;
|
|
74
|
-
environmentVariable: Partial<EnvironmentVariable>;
|
|
75
|
-
}) => any) | undefined;
|
|
76
|
-
"onEnvironment:update:variable"?: ((payload: {
|
|
77
|
-
/** Row number */
|
|
78
|
-
id: number;
|
|
79
|
-
/** Environment name */
|
|
80
|
-
environmentName: string;
|
|
81
|
-
/** Payload */
|
|
82
|
-
environmentVariable: Partial<EnvironmentVariable>;
|
|
83
|
-
}) => any) | undefined;
|
|
84
|
-
"onEnvironment:delete:variable"?: ((payload: {
|
|
85
|
-
/** Environment name */
|
|
86
|
-
environmentName: string;
|
|
87
|
-
/** Row number */
|
|
88
|
-
id: number;
|
|
89
|
-
}) => any) | undefined;
|
|
90
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
91
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
4
|
+
environments: NonNullable<XScalarEnvironments['x-scalar-environments']>;
|
|
5
|
+
eventBus: WorkspaceEventBus;
|
|
6
|
+
} & CollectionType;
|
|
7
|
+
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>;
|
|
92
8
|
export default _default;
|
|
93
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
94
|
-
new (): {
|
|
95
|
-
$slots: S;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
9
|
//# sourceMappingURL=EnvironmentsList.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/environments/EnvironmentsList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnvironmentsList.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/environments/EnvironmentsList.vue"],"names":[],"mappings":"AA8FA,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,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GAAG,cAAc,CAAC;;AAoLrB,wBAMG"}
|
|
@@ -1,114 +1,66 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { ScalarIconPlus as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import D from "./components/Environment.vue.js";
|
|
9
|
-
const x = {
|
|
10
|
-
key: 0,
|
|
11
|
-
class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4"
|
|
12
|
-
}, q = /* @__PURE__ */ V({
|
|
1
|
+
import { defineComponent as E, ref as y, createElementBlock as u, openBlock as s, Fragment as v, createElementVNode as T, createVNode as l, renderList as b, createBlock as g, unref as r, withCtx as h, createTextVNode as k } from "vue";
|
|
2
|
+
import { useModal as d, ScalarButton as M } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlus as N } from "@scalar/icons";
|
|
4
|
+
import S from "./components/EnvironmentCreateModal.vue.js";
|
|
5
|
+
import w from "./components/EnvironmentDeleteModal.vue.js";
|
|
6
|
+
import C from "./components/Environment.vue.js";
|
|
7
|
+
const D = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" }, z = /* @__PURE__ */ E({
|
|
13
8
|
__name: "EnvironmentsList",
|
|
14
9
|
props: {
|
|
15
|
-
documentName: {},
|
|
16
10
|
environments: {},
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
eventBus: {},
|
|
12
|
+
collectionType: {}
|
|
19
13
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
onReorder: n[0] || (n[0] = (r, d) => a("environment:reorder", {
|
|
44
|
-
draggingItem: r,
|
|
45
|
-
hoveredItem: d
|
|
46
|
-
})),
|
|
47
|
-
"onUpdate:color": () => {
|
|
48
|
-
t.value = e, o(N).show();
|
|
49
|
-
},
|
|
50
|
-
"onUpdate:name": () => {
|
|
51
|
-
t.value = e, o(c).show();
|
|
52
|
-
},
|
|
53
|
-
"onUpdate:variable": ({ id: r, value: d }) => a("environment:update:variable", {
|
|
54
|
-
environmentName: e.name,
|
|
55
|
-
id: r,
|
|
56
|
-
environmentVariable: d
|
|
57
|
-
})
|
|
58
|
-
}, null, 8, ["color", "envVariables", "environment", "isReadonly", "name", "variables", "onAdd:variable", "onDelete", "onDelete:variable", "onUpdate:color", "onUpdate:name", "onUpdate:variable"]))), 128)),
|
|
59
|
-
l.documentName !== null ? (m(), u("div", x, [
|
|
60
|
-
p(o($), {
|
|
14
|
+
setup(i) {
|
|
15
|
+
const m = d(), c = d(), n = y(null), p = (e) => {
|
|
16
|
+
n.value = e, c.show();
|
|
17
|
+
}, f = () => {
|
|
18
|
+
n.value && i.eventBus.emit("environment:delete:environment", {
|
|
19
|
+
environmentName: n.value,
|
|
20
|
+
collectionType: i.collectionType
|
|
21
|
+
});
|
|
22
|
+
}, a = (e) => {
|
|
23
|
+
n.value = e ?? null, m.show();
|
|
24
|
+
};
|
|
25
|
+
return (e, t) => (s(), u(v, null, [
|
|
26
|
+
(s(!0), u(v, null, b(Object.entries(e.environments), ([o, B]) => (s(), g(C, {
|
|
27
|
+
key: o,
|
|
28
|
+
collectionType: e.collectionType,
|
|
29
|
+
environment: B,
|
|
30
|
+
environmentName: o,
|
|
31
|
+
eventBus: e.eventBus,
|
|
32
|
+
onDelete: () => p(o),
|
|
33
|
+
onEdit: () => a(o)
|
|
34
|
+
}, null, 8, ["collectionType", "environment", "environmentName", "eventBus", "onDelete", "onEdit"]))), 128)),
|
|
35
|
+
T("div", D, [
|
|
36
|
+
l(r(M), {
|
|
61
37
|
class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
|
|
62
38
|
size: "sm",
|
|
63
39
|
variant: "ghost",
|
|
64
|
-
onClick:
|
|
40
|
+
onClick: t[0] || (t[0] = () => a())
|
|
65
41
|
}, {
|
|
66
|
-
default:
|
|
67
|
-
|
|
68
|
-
|
|
42
|
+
default: h(() => [
|
|
43
|
+
l(r(N)),
|
|
44
|
+
t[1] || (t[1] = k(" Add Environment ", -1))
|
|
69
45
|
]),
|
|
70
46
|
_: 1
|
|
71
47
|
})
|
|
72
|
-
])
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
name: t.value.name,
|
|
86
|
-
state: o(f),
|
|
87
|
-
onSubmit: n[3] || (n[3] = () => a("environment:delete", {
|
|
88
|
-
environmentName: t.value.name
|
|
89
|
-
}))
|
|
90
|
-
}, null, 8, ["name", "state"])) : i("", !0),
|
|
91
|
-
t.value ? (m(), v(B, {
|
|
92
|
-
key: 2,
|
|
93
|
-
name: t.value.name,
|
|
94
|
-
state: o(c),
|
|
95
|
-
onSubmit: n[4] || (n[4] = (e) => a("environment:update", {
|
|
96
|
-
environmentName: t.value.name,
|
|
97
|
-
environment: { name: e.name }
|
|
98
|
-
}))
|
|
99
|
-
}, null, 8, ["name", "state"])) : i("", !0),
|
|
100
|
-
t.value ? (m(), v(w, {
|
|
101
|
-
key: 3,
|
|
102
|
-
color: t.value.color || "#FFFFFF",
|
|
103
|
-
state: o(N),
|
|
104
|
-
onSubmit: n[5] || (n[5] = (e) => a("environment:update", {
|
|
105
|
-
environmentName: t.value.name,
|
|
106
|
-
environment: { color: e.color }
|
|
107
|
-
}))
|
|
108
|
-
}, null, 8, ["color", "state"])) : i("", !0)
|
|
48
|
+
]),
|
|
49
|
+
l(S, {
|
|
50
|
+
collectionType: e.collectionType,
|
|
51
|
+
environments: e.environments,
|
|
52
|
+
eventBus: e.eventBus,
|
|
53
|
+
selectedEnvironmentName: n.value,
|
|
54
|
+
state: r(m)
|
|
55
|
+
}, null, 8, ["collectionType", "environments", "eventBus", "selectedEnvironmentName", "state"]),
|
|
56
|
+
l(w, {
|
|
57
|
+
name: n.value,
|
|
58
|
+
state: r(c),
|
|
59
|
+
onSubmit: f
|
|
60
|
+
}, null, 8, ["name", "state"])
|
|
109
61
|
], 64));
|
|
110
62
|
}
|
|
111
63
|
});
|
|
112
64
|
export {
|
|
113
|
-
|
|
65
|
+
z as default
|
|
114
66
|
};
|
|
@@ -1,70 +1,16 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export type EnvironmentVariable = {
|
|
4
|
-
name: string;
|
|
5
|
-
value: string;
|
|
6
|
-
};
|
|
7
|
-
export type Environment = {
|
|
8
|
-
name: string;
|
|
9
|
-
color?: string;
|
|
10
|
-
variables: EnvironmentVariable[];
|
|
11
|
-
};
|
|
1
|
+
import type { CollectionType, WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
12
3
|
type __VLS_Props = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
variables: EnvironmentVariable[];
|
|
19
|
-
/** Marks the environment as readonly */
|
|
20
|
-
isReadonly?: boolean;
|
|
21
|
-
/** TODO: remove when we migrate to the new store */
|
|
22
|
-
environment: EntitiesEnvironment;
|
|
23
|
-
envVariables: EnvVariable[];
|
|
24
|
-
};
|
|
25
|
-
type __VLS_Slots = {
|
|
26
|
-
default?(): unknown;
|
|
27
|
-
};
|
|
28
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
|
+
environment: XScalarEnvironment;
|
|
5
|
+
environmentName: string;
|
|
6
|
+
eventBus: WorkspaceEventBus;
|
|
7
|
+
} & CollectionType;
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
29
9
|
delete: () => any;
|
|
30
|
-
|
|
31
|
-
id: number;
|
|
32
|
-
value: Partial<EnvironmentVariable>;
|
|
33
|
-
}) => any;
|
|
34
|
-
reorder: (draggingItem: {
|
|
35
|
-
id: string;
|
|
36
|
-
}, hoveredItem: {
|
|
37
|
-
id: string;
|
|
38
|
-
}) => any;
|
|
39
|
-
"add:variable": (payload: Partial<EnvironmentVariable>) => any;
|
|
40
|
-
"update:name": () => any;
|
|
41
|
-
"update:color": () => any;
|
|
42
|
-
"delete:variable": (payload: {
|
|
43
|
-
id: number;
|
|
44
|
-
}) => any;
|
|
10
|
+
edit: () => any;
|
|
45
11
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
46
12
|
onDelete?: (() => any) | undefined;
|
|
47
|
-
|
|
48
|
-
id: number;
|
|
49
|
-
value: Partial<EnvironmentVariable>;
|
|
50
|
-
}) => any) | undefined;
|
|
51
|
-
onReorder?: ((draggingItem: {
|
|
52
|
-
id: string;
|
|
53
|
-
}, hoveredItem: {
|
|
54
|
-
id: string;
|
|
55
|
-
}) => any) | undefined;
|
|
56
|
-
"onAdd:variable"?: ((payload: Partial<EnvironmentVariable>) => any) | undefined;
|
|
57
|
-
"onUpdate:name"?: (() => any) | undefined;
|
|
58
|
-
"onUpdate:color"?: (() => any) | undefined;
|
|
59
|
-
"onDelete:variable"?: ((payload: {
|
|
60
|
-
id: number;
|
|
61
|
-
}) => any) | undefined;
|
|
13
|
+
onEdit?: (() => any) | undefined;
|
|
62
14
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
64
15
|
export default _default;
|
|
65
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
66
|
-
new (): {
|
|
67
|
-
$slots: S;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
16
|
//# sourceMappingURL=Environment.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/Environment.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Environment.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/Environment.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAInH,KAAK,WAAW,GAAG;IACf,WAAW,EAAE,kBAAkB,CAAA;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GAAG,cAAc,CAAC;;;;;;;;AA6JrB,wBAOG"}
|