@baseplate-dev/project-builder-web
Version:
Web interface for constructing project builder JSON
3 lines (2 loc) • 1.93 kB
JavaScript
import{i as o}from"./_virtual___federation_fn_import-DOo8C-zl.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{b as m}from"./index-DiAhmW9l.js";const{generalSettingsSchema:h}=await o("@baseplate-dev/project-builder-lib"),{useBlockUnsavedChangesNavigate:f,useProjectDefinition:j,useResettableForm:u}=await o("@baseplate-dev/project-builder-lib/web"),{FormActionBar:b,InputFieldController:s,SectionList:g,SectionListSection:x,SectionListSectionContent:S,SectionListSectionHeader:v,SectionListSectionTitle:w}=await o("@baseplate-dev/ui-components");function N(){const{definition:n,saveDefinitionWithFeedback:r}=j(),i=u({resolver:m(h),defaultValues:n.settings.general}),{handleSubmit:l,control:t,reset:c}=i,a=l(p=>r(d=>{d.settings.general=p}));return f({control:t,reset:c,onSubmit:a}),e.jsxs("form",{className:"relative h-full max-h-full pb-(--action-bar-height)",onSubmit:a,children:[e.jsxs("div",{className:"flex h-full max-h-full flex-1 flex-col overflow-y-auto px-6",children:[e.jsx("div",{className:"sticky top-0 border-b bg-background py-6",children:e.jsx("h1",{children:"Project settings"})}),e.jsx(g,{children:e.jsxs(x,{children:[e.jsx(v,{children:e.jsx(w,{children:"Settings"})}),e.jsxs(S,{className:"flex max-w-80 flex-col gap-4",children:[e.jsx(s,{name:"name",label:"Project Name",description:"Lowercase letters and dashes, e.g. my-project",control:t,placeholder:"e.g. my-project"}),e.jsx(s,{name:"portOffset",label:"Port Offset",description:"Multiple of 1000, e.g. 4000. This will offset the ports used by the project, e.g. API at 4001, database at 4432, to avoid conflicts with other projects.",control:t,registerOptions:{valueAsNumber:!0}}),e.jsx(s,{label:"Package Scope",name:"packageScope",description:"The scope for packages in this project, e.g. my-project will result in @my-project/app-name",control:t})]})]})})]}),e.jsx(b,{form:i})]})}export{N as component};
//# sourceMappingURL=index-CYArZEz0.js.map