@baseplate-dev/project-builder-web
Version:
Web interface for constructing project builder JSON
3 lines (2 loc) • 1.78 kB
JavaScript
import{i}from"./_virtual___federation_fn_import-C4el_tlG.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{w,s as v}from"./index-BsqYBobW.js";const{createWebAppSchema:C}=await i("@baseplate-dev/project-builder-lib"),{useBlockUnsavedChangesNavigate:F,useDefinitionSchema:A,useProjectDefinition:D,useResettableForm:L}=await i("@baseplate-dev/project-builder-lib/web"),{FormActionBar:g,InputFieldController:n,SectionList:y,SectionListSection:r,SectionListSectionContent:p,SectionListSectionDescription:m,SectionListSectionHeader:d,SectionListSectionTitle:u,SwitchFieldController:x}=await i("@baseplate-dev/ui-components"),P=function(){const{saveDefinitionWithFeedback:b}=D(),{webDefinition:s}=w.useRouteContext(),j=A(C),o=L({resolver:v(j),values:s}),{control:t,handleSubmit:h,reset:S}=o,a=h(f=>b(c=>{c.apps=c.apps.map(l=>l.id===s.id?f:l)}));return F({control:t,reset:S,onSubmit:a}),e.jsxs("form",{onSubmit:a,className:"w-full max-w-7xl space-y-4 p-4",children:[e.jsxs(y,{children:[e.jsxs(r,{children:[e.jsxs(d,{children:[e.jsx(u,{children:"General"}),e.jsx(m,{children:"Basic configuration for your web application."})]}),e.jsxs(p,{className:"space-y-6",children:[e.jsx(n,{label:"Name",control:t,name:"name"}),e.jsx(n,{label:"Page Title",control:t,name:"title"}),e.jsx(n,{label:"Description Meta Tag",control:t,name:"description"})]})]}),e.jsxs(r,{children:[e.jsxs(d,{children:[e.jsx(u,{children:"Features"}),e.jsx(m,{children:"Configure optional features for your web application."})]}),e.jsxs(p,{className:"space-y-6",children:[e.jsx(x,{label:"Include Auth?",control:t,name:"includeAuth"}),e.jsx(x,{label:"Include Upload Components?",control:t,name:"includeUploadComponents"})]})]})]}),e.jsx(g,{form:o})]})};export{P as component};
//# sourceMappingURL=index-CxBLGzW2.js.map