@baseplate-dev/project-builder-web
Version:
Web interface for constructing project builder JSON
3 lines (2 loc) • 2.43 kB
JavaScript
import{i as s}from"./_virtual___federation_fn_import-o6aKHb82.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{g as k,s as g}from"./index-D_oO4W9-.js";import{u as v}from"./use-definition-schema-Bxe6QzcW.js";const{createBackendAppSchema:L}=await s("@baseplate-dev/project-builder-lib"),{useBlockUnsavedChangesNavigate:E,useProjectDefinition:B,useResettableForm:P}=await s("@baseplate-dev/project-builder-lib/web"),{FormActionBar:w,InputFieldController:l,SectionList:y,SectionListSection:p,SectionListSectionContent:d,SectionListSectionDescription:b,SectionListSectionHeader:m,SectionListSectionTitle:u,SwitchFieldController:i}=await s("@baseplate-dev/ui-components"),N=function(){const{saveDefinitionWithFeedback:x}=B(),{backendDefinition:n}=k.useLoaderData(),j=v(L),o=P({resolver:g(j),values:n}),{control:a,handleSubmit:h,reset:S}=o,t=h(f=>x(r=>{r.apps=r.apps.map(c=>c.id===n.id?f:c)}));return E({control:a,reset:S,onSubmit:t}),e.jsxs("form",{className:"w-full max-w-7xl space-y-4 px-4",onSubmit:t,children:[e.jsxs(y,{children:[e.jsxs(p,{children:[e.jsxs(m,{children:[e.jsx(u,{children:"General"}),e.jsx(b,{children:"Basic configuration for your backend application."})]}),e.jsxs(d,{className:"space-y-6",children:[e.jsx(l,{label:"Name",control:a,name:"name"}),e.jsx(l,{label:"Package Location (optional)",placeholder:"e.g. packages/backend",control:a,name:"packageLocation"})]})]}),e.jsxs(p,{children:[e.jsxs(m,{children:[e.jsx(u,{children:"Configuration"}),e.jsx(b,{children:"Enable or disable external services and features for your backend application."})]}),e.jsx(d,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(i,{control:a,name:"enableStripe",label:"Stripe",description:"Enable Stripe for payment processing"}),e.jsx(i,{control:a,name:"enablePostmark",label:"Postmark",description:"Enable Postmark for email delivery"}),e.jsx(i,{control:a,name:"enableRedis",label:"Redis",description:"Enable Redis for caching and session storage"}),e.jsx(i,{control:a,name:"enableBullQueue",label:"Bull Queue",description:"Enable Bull Queue for background job processing"}),e.jsx(i,{control:a,name:"enableSubscriptions",label:"GraphQL Subscriptions",description:"Enable GraphQL Subscriptions for real-time updates"}),e.jsx(i,{control:a,name:"enableAxios",label:"Axios",description:"Enable Axios for HTTP requests"})]})})]})]}),e.jsx(w,{form:o})]})};export{N as component};
//# sourceMappingURL=backend-DrT1hDB6.js.map