@scalar/api-client
Version:
the open source API testing client
65 lines (64 loc) • 1.95 kB
JavaScript
import { defineComponent as m, ref as p, watch as i, createElementBlock as u, openBlock as d, createElementVNode as a, createVNode as l, unref as f, mergeProps as v } from "vue";
import { RouterView as _ } from "vue-router";
import k from "./components/LabelInput.vue.js";
import w from "./components/Tabs.vue.js";
const h = { class: "custom-scroll h-full" }, x = { class: "w-full md:mx-auto md:max-w-180" }, b = ["aria-label"], W = { class: "group relative ml-1.25" }, V = { class: "px-1.5 py-8" }, g = {}, S = /* @__PURE__ */ m({
...g,
__name: "WorkspaceCollection",
props: {
documentSlug: {},
document: {},
eventBus: {},
layout: {},
path: {},
method: {},
exampleName: {},
environment: {},
securitySchemes: {},
workspaceStore: {},
activeWorkspace: {},
plugins: {},
customThemes: {}
},
setup(s) {
const e = s, o = p(e.activeWorkspace.label);
i(
() => e.activeWorkspace.label,
(t) => {
o.value = t;
}
);
const r = (t) => {
if (t.trim() === "") {
o.value = e.activeWorkspace.label;
return;
}
e.eventBus.emit("workspace:update:name", t);
};
return (t, c) => (d(), u("div", h, [
a("div", x, [
a("div", {
"aria-label": `title: ${s.activeWorkspace.label}`,
class: "mx-auto flex h-fit w-full flex-row items-center gap-2 pt-8 pb-3 md:max-w-180"
}, [
a("div", W, [
l(k, {
modelValue: o.value,
"onUpdate:modelValue": c[0] || (c[0] = (n) => o.value = n),
class: "text-xl font-bold",
inputId: "workspaceName",
onBlur: r
}, null, 8, ["modelValue"])
])
], 8, b),
l(w, { type: "workspace" }),
a("div", V, [
l(f(_), v(e, { collectionType: "workspace" }), null, 16)
])
])
]));
}
});
export {
S as default
};