UNPKG

@baseplate-dev/project-builder-web

Version:

Web interface for constructing project builder JSON

3 lines (2 loc) 1.75 kB
import{i as o}from"./_virtual___federation_fn_import-C4el_tlG.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{s as m}from"./index-BsqYBobW.js";const{monorepoSettingsSchema:u}=await o("@baseplate-dev/project-builder-lib"),{useBlockUnsavedChangesNavigate:f,useProjectDefinition:x,useResettableForm:h}=await o("@baseplate-dev/project-builder-lib/web"),{FormActionBar:b,InputFieldController:g,SectionList:j,SectionListSection:S,SectionListSectionContent:v,SectionListSectionHeader:F,SectionListSectionTitle:w}=await o("@baseplate-dev/ui-components"),y=function(){const{definition:i,saveDefinitionWithFeedback:r}=x(),a=i.settings.monorepo??{appsFolder:"apps"},t=h({resolver:m(u),defaultValues:a}),{handleSubmit:l,control:s,reset:c}=t,n=l(p=>r(d=>{d.settings.monorepo=p}));return f({control:s,reset:c,onSubmit:n}),e.jsxs("form",{className:"relative h-full max-h-full pb-(--action-bar-height)",onSubmit:n,children:[e.jsxs("div",{className:"flex h-full max-h-full flex-1 flex-col overflow-y-auto px-6",children:[e.jsxs("div",{className:"sticky top-0 border-b bg-background py-6",children:[e.jsx("h1",{children:"Monorepo Configuration"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Configure the folder structure for your monorepo packages."})]}),e.jsx(j,{children:e.jsxs(S,{children:[e.jsx(F,{children:e.jsx(w,{children:"Folder Configuration"})}),e.jsx(v,{className:"flex max-w-md flex-col gap-4",children:e.jsx(g,{name:"appsFolder",label:"Apps Folder",description:'Folder where apps are located. Apps will be placed in {appsFolder}/{app-name}, e.g. "apps" results in apps/backend, apps/web',control:s,placeholder:"e.g. apps"})})]})})]}),e.jsx(b,{form:t})]})};export{y as component}; //# sourceMappingURL=monorepo-CbXL6tIR.js.map