@baseplate-dev/project-builder-web
Version:
Web interface for constructing project builder JSON
3 lines (2 loc) • 1.7 kB
JavaScript
import{i as a}from"./_virtual___federation_fn_import-DOo8C-zl.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{A as x}from"./index-G5ZRloOW.js";import{N as h}from"./new-dialog-Dom1lleR.js";import{s as r}from"./sortBy-C9bvycg5.js";const{appEntityType:u,libraryEntityType:j}=await a("@baseplate-dev/project-builder-lib"),{useProjectDefinition:y}=await a("@baseplate-dev/project-builder-lib/web"),{Button:b,NavigationMenu:n,NavigationMenuItemWithLink:o,NavigationMenuList:d,SidebarLayout:f,SidebarLayoutContent:g,SidebarLayoutSidebar:k}=await a("@baseplate-dev/ui-components"),{Link:c,Outlet:N}=await a("@tanstack/react-router");function F(){const{definition:m}=y(),{apps:l,libraries:p=[]}=m,s=r(l,[t=>t.name]),i=r(p,[t=>t.name]);return e.jsxs(f,{className:"flex-1",children:[e.jsxs(k,{className:"space-y-4",width:"sm",children:[e.jsx(h,{children:e.jsxs(b,{variant:"secondary",className:"w-full",children:[e.jsx(x,{}),"New"]})}),s.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"px-2 text-sm font-medium text-muted-foreground",children:"Apps"}),e.jsx(n,{orientation:"vertical",children:e.jsx(d,{children:s.map(t=>e.jsx(o,{asChild:!0,children:e.jsx(c,{to:"/packages/apps/$key",params:{key:u.keyFromId(t.id)},children:t.name})},t.id))})})]}),i.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"mt-2 px-2 text-sm font-medium text-muted-foreground",children:"Libraries"}),e.jsx(n,{orientation:"vertical",children:e.jsx(d,{children:i.map(t=>e.jsx(o,{asChild:!0,children:e.jsx(c,{to:"/packages/libs/$key",params:{key:j.keyFromId(t.id)},children:t.name})},t.id))})})]})]}),e.jsx(g,{children:e.jsx(N,{})})]})}export{F as component};
//# sourceMappingURL=route-B4Nd0KNw.js.map