UNPKG

@baseplate-dev/project-builder-web

Version:

Web interface for constructing project builder JSON

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