@baseplate-dev/project-builder-web 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/-constants-BC9esibq.js +4 -0
- package/dist/assets/-constants-BC9esibq.js.map +1 -0
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BXxolMLm.js → web-BaAZd6c4.js} +2 -2
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-BXxolMLm.js.map → web-BaAZd6c4.js.map} +1 -1
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-C7fVVw7M.js +5 -0
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-C7fVVw7M.js.map +1 -0
- package/dist/assets/__federation_shared_@baseplate-dev/{ui-components-DGE1buQ-.js → ui-components-CbLT5eCP.js} +2 -2
- package/dist/assets/__federation_shared_@baseplate-dev/{ui-components-DGE1buQ-.js.map → ui-components-CbLT5eCP.js.map} +1 -1
- package/dist/assets/{_virtual___federation_fn_import-CE3p-l_2.js → _virtual___federation_fn_import-CzwHXTRo.js} +2 -2
- package/dist/assets/{_virtual___federation_fn_import-CE3p-l_2.js.map → _virtual___federation_fn_import-CzwHXTRo.js.map} +1 -1
- package/dist/assets/{backend-BAEsy0fr.js → backend-B3MDDop9.js} +2 -2
- package/dist/assets/{backend-BAEsy0fr.js.map → backend-B3MDDop9.js.map} +1 -1
- package/dist/assets/{badge-with-type-label-BuG6yCtf.js → badge-with-type-label-CNVJUqNt.js} +2 -2
- package/dist/assets/{badge-with-type-label-BuG6yCtf.js.map → badge-with-type-label-CNVJUqNt.js.map} +1 -1
- package/dist/assets/{edit._id-DPcGRUbG.js → edit._id-Ce2Ymc-o.js} +2 -2
- package/dist/assets/{edit._id-DPcGRUbG.js.map → edit._id-Ce2Ymc-o.js.map} +1 -1
- package/dist/assets/{enum-info-form-BjI1ArPU.js → enum-info-form-CVHvQqYN.js} +2 -2
- package/dist/assets/{enum-info-form-BjI1ArPU.js.map → enum-info-form-CVHvQqYN.js.map} +1 -1
- package/dist/assets/{graphql-DksHNLLL.js → graphql-BlURtGp8.js} +2 -2
- package/dist/assets/{graphql-DksHNLLL.js.map → graphql-BlURtGp8.js.map} +1 -1
- package/dist/assets/{hierarchy-BwshirJR.js → hierarchy-B1V1qwhL.js} +2 -2
- package/dist/assets/{hierarchy-BwshirJR.js.map → hierarchy-B1V1qwhL.js.map} +1 -1
- package/dist/assets/{index-CVRvV2mv.js → index-1DYdEncJ.js} +2 -2
- package/dist/assets/{index-CVRvV2mv.js.map → index-1DYdEncJ.js.map} +1 -1
- package/dist/assets/{index-La9rk06J.js → index-1rH5AIf1.js} +2 -2
- package/dist/assets/{index-La9rk06J.js.map → index-1rH5AIf1.js.map} +1 -1
- package/dist/assets/{index-s17MV-9f.js → index-BEMXZzJT.js} +2 -2
- package/dist/assets/{index-s17MV-9f.js.map → index-BEMXZzJT.js.map} +1 -1
- package/dist/assets/{index-gE__lQ6b.js → index-BMCloLL3.js} +4 -4
- package/dist/assets/{index-gE__lQ6b.js.map → index-BMCloLL3.js.map} +1 -1
- package/dist/assets/{index-Dp90A2TJ.js → index-BRdI-lNh.js} +2 -2
- package/dist/assets/{index-Dp90A2TJ.js.map → index-BRdI-lNh.js.map} +1 -1
- package/dist/assets/{index-E5Zy1ClF.js → index-BazMYfmA.js} +2 -2
- package/dist/assets/{index-E5Zy1ClF.js.map → index-BazMYfmA.js.map} +1 -1
- package/dist/assets/index-Bw18F51O.js +2 -0
- package/dist/assets/index-Bw18F51O.js.map +1 -0
- package/dist/assets/{index-BS45dlQs.js → index-BxN9iLEr.js} +2 -2
- package/dist/assets/{index-BS45dlQs.js.map → index-BxN9iLEr.js.map} +1 -1
- package/dist/assets/{index-B6qfP-Zp.js → index-D9m5kBYP.js} +2 -2
- package/dist/assets/{index-B6qfP-Zp.js.map → index-D9m5kBYP.js.map} +1 -1
- package/dist/assets/{index-C6ezfkGk.js → index-DJrwWHdu.js} +2 -2
- package/dist/assets/{index-C6ezfkGk.js.map → index-DJrwWHdu.js.map} +1 -1
- package/dist/assets/{index-BNK4j9mt.js → index-DlrvL7L-.js} +2 -2
- package/dist/assets/{index-BNK4j9mt.js.map → index-DlrvL7L-.js.map} +1 -1
- package/dist/assets/{index.esm-CyH9wtdI.js → index.esm-C6ngV5UE.js} +2 -2
- package/dist/assets/{index.esm-CyH9wtdI.js.map → index.esm-C6ngV5UE.js.map} +1 -1
- package/dist/assets/{model-info-form-B9t3m8Pj.js → model-info-form-B3UWaCuz.js} +2 -2
- package/dist/assets/{model-info-form-B9t3m8Pj.js.map → model-info-form-B3UWaCuz.js.map} +1 -1
- package/dist/assets/{model-merger-DL4MVNID.js → model-merger-BoPVsTMR.js} +2 -2
- package/dist/assets/{model-merger-DL4MVNID.js.map → model-merger-BoPVsTMR.js.map} +1 -1
- package/dist/assets/{new-app-dialog-Cd7rJ7i5.js → new-app-dialog-DmiiaAcy.js} +2 -2
- package/dist/assets/{new-app-dialog-Cd7rJ7i5.js.map → new-app-dialog-DmiiaAcy.js.map} +1 -1
- package/dist/assets/{new-enum-dialog-Z3aWnnBr.js → new-enum-dialog-eE-ABw-k.js} +2 -2
- package/dist/assets/{new-enum-dialog-Z3aWnnBr.js.map → new-enum-dialog-eE-ABw-k.js.map} +1 -1
- package/dist/assets/new-model-dialog-DsUABBKe.js +2 -0
- package/dist/assets/new-model-dialog-DsUABBKe.js.map +1 -0
- package/dist/assets/{route-BxjC9xAo.js → route-BcszKLdV.js} +2 -2
- package/dist/assets/{route-BxjC9xAo.js.map → route-BcszKLdV.js.map} +1 -1
- package/dist/assets/{route-BOOZxY6E.js → route-CBp4D5qe.js} +2 -2
- package/dist/assets/{route-BOOZxY6E.js.map → route-CBp4D5qe.js.map} +1 -1
- package/dist/assets/{route-BwqWBMDI.js → route-Cey_4lZX.js} +2 -2
- package/dist/assets/{route-BwqWBMDI.js.map → route-Cey_4lZX.js.map} +1 -1
- package/dist/assets/route-CqtFDOsk.js +2 -0
- package/dist/assets/{route-C8YLDv4I.js.map → route-CqtFDOsk.js.map} +1 -1
- package/dist/assets/{route-DrufP1-c.js → route-DioBcaFQ.js} +2 -2
- package/dist/assets/{route-DrufP1-c.js.map → route-DioBcaFQ.js.map} +1 -1
- package/dist/assets/{route-BzTxfPrV.js → route-MODh5ysn.js} +2 -2
- package/dist/assets/{route-BzTxfPrV.js.map → route-MODh5ysn.js.map} +1 -1
- package/dist/assets/{route-_AecKyFO.js → route-VW3n5-PC.js} +2 -2
- package/dist/assets/{route-_AecKyFO.js.map → route-VW3n5-PC.js.map} +1 -1
- package/dist/assets/{route-B2oYTZT4.js → route-rX4E9J5V.js} +2 -2
- package/dist/assets/{route-B2oYTZT4.js.map → route-rX4E9J5V.js.map} +1 -1
- package/dist/assets/{route-B6DRGm3t.js → route-sqtj7nCf.js} +2 -2
- package/dist/assets/{route-B6DRGm3t.js.map → route-sqtj7nCf.js.map} +1 -1
- package/dist/assets/{sections-D-GS6uoS.js → sections-D48VzvlO.js} +2 -2
- package/dist/assets/{sections-D-GS6uoS.js.map → sections-D48VzvlO.js.map} +1 -1
- package/dist/assets/{sections._sectionKey-Bj4VmUuM.js → sections._sectionKey-Cojmxr6C.js} +2 -2
- package/dist/assets/{sections._sectionKey-Bj4VmUuM.js.map → sections._sectionKey-Cojmxr6C.js.map} +1 -1
- package/dist/assets/{service-C6FdRXxU.js → service-CuzPG1Yl.js} +2 -2
- package/dist/assets/{service-C6FdRXxU.js.map → service-CuzPG1Yl.js.map} +1 -1
- package/dist/assets/{template-extractor-D2LqkpO5.js → template-extractor-B9fEhgo_.js} +2 -2
- package/dist/assets/{template-extractor-D2LqkpO5.js.map → template-extractor-B9fEhgo_.js.map} +1 -1
- package/dist/assets/{theme-builder-_PghOvuC.js → theme-builder-Bw8c01EE.js} +2 -2
- package/dist/assets/{theme-builder-_PghOvuC.js.map → theme-builder-Bw8c01EE.js.map} +1 -1
- package/dist/assets/{use-definition-schema-B2FBXmC_.js → use-definition-schema-DANa9pch.js} +2 -2
- package/dist/assets/{use-definition-schema-B2FBXmC_.js.map → use-definition-schema-DANa9pch.js.map} +1 -1
- package/dist/assets/{use-enum-form-DQza9C6Q.js → use-enum-form-Dz-Wnbxj.js} +2 -2
- package/dist/assets/{use-enum-form-DQza9C6Q.js.map → use-enum-form-Dz-Wnbxj.js.map} +1 -1
- package/dist/assets/use-model-form-DMG7DdSK.js +2 -0
- package/dist/assets/use-model-form-DMG7DdSK.js.map +1 -0
- package/dist/assets/{utils-CH9UxfXa.js → utils-95Eli4qP.js} +2 -2
- package/dist/assets/{utils-CH9UxfXa.js.map → utils-95Eli4qP.js.map} +1 -1
- package/dist/assets/{web-C6Idxok-.js → web-B6BjTv_c.js} +2 -2
- package/dist/assets/{web-C6Idxok-.js.map → web-B6BjTv_c.js.map} +1 -1
- package/dist/index.html +4 -4
- package/package.json +6 -6
- package/dist/assets/-constants-gwObfy2j.js +0 -4
- package/dist/assets/-constants-gwObfy2j.js.map +0 -1
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-CDWHycLw.js +0 -5
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-CDWHycLw.js.map +0 -1
- package/dist/assets/index-CwavzuOe.js +0 -2
- package/dist/assets/index-CwavzuOe.js.map +0 -1
- package/dist/assets/new-model-dialog-uEX7hTid.js +0 -2
- package/dist/assets/new-model-dialog-uEX7hTid.js.map +0 -1
- package/dist/assets/route-C8YLDv4I.js +0 -2
- package/dist/assets/use-model-form-D4qoaVd7.js +0 -2
- package/dist/assets/use-model-form-D4qoaVd7.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as s}from"./_virtual___federation_fn_import-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{i as s}from"./_virtual___federation_fn_import-CzwHXTRo.js";import{j as e}from"./index.esm-C6ngV5UE.js";import{H as r}from"./index-BMCloLL3.js";import{N as o}from"./new-model-dialog-DsUABBKe.js";const{useProjectDefinition:a}=await s("@baseplate-dev/project-builder-lib/web"),{Button:t,EmptyDisplay:n}=await s("@baseplate-dev/ui-components"),h=function(){const{definition:i}=a();return i.models.length===0?e.jsx(n,{icon:r,header:"No Models",subtitle:"Create a model to get started",actions:e.jsx(o,{children:e.jsx(t,{children:"New Model"})})}):e.jsxs("div",{className:"max-w-4xl space-y-4 p-4 text-style-prose",children:[e.jsx("h1",{children:"Models"}),e.jsx("p",{children:"Models are the building blocks of your app. They define the data structure of your app."}),e.jsxs("p",{children:["Choose a model to edit from the sidebar or"," ",e.jsx(o,{children:e.jsx(t,{variant:"link",size:"none",children:"create a new model"})}),"."]})]})};export{h as component};
|
|
2
|
+
//# sourceMappingURL=index-1DYdEncJ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-1DYdEncJ.js","sources":["../../src/routes/data/models/index.tsx?tsr-split=component"],"sourcesContent":["import type React from 'react';\n\nimport { useProjectDefinition } from '@baseplate-dev/project-builder-lib/web';\nimport { Button, EmptyDisplay } from '@baseplate-dev/ui-components';\nimport { createFileRoute } from '@tanstack/react-router';\nimport { HiDatabase } from 'react-icons/hi';\n\nimport { NewModelDialog } from './-components/new-model-dialog.js';\n\nexport const Route = createFileRoute('/data/models/')({\n component: ModelsIndexPage,\n});\n\nfunction ModelsIndexPage(): React.JSX.Element {\n const { definition } = useProjectDefinition();\n\n if (definition.models.length === 0) {\n return (\n <EmptyDisplay\n icon={HiDatabase}\n header=\"No Models\"\n subtitle=\"Create a model to get started\"\n actions={\n <NewModelDialog>\n <Button>New Model</Button>\n </NewModelDialog>\n }\n />\n );\n }\n\n return (\n <div className=\"max-w-4xl space-y-4 p-4 text-style-prose\">\n <h1>Models</h1>\n <p>\n Models are the building blocks of your app. They define the data\n structure of your app.\n </p>\n <p>\n Choose a model to edit from the sidebar or{' '}\n <NewModelDialog>\n <Button variant=\"link\" size=\"none\">\n create a new model\n </Button>\n </NewModelDialog>\n .\n </p>\n </div>\n );\n}\n"],"names":["useProjectDefinition","importShared","Button","EmptyDisplay","SplitComponent","definition","models","length","jsx","HiDatabase","NewModelDialog","jsxs"],"mappings":"yMAEA,KAAA,CAAA,qBAAAA,CAAA,EAAA,MAAAC,EAAA,wCAAA,EACA,CAAA,OAAAC,EAAA,aAAAC,CAAA,EAAA,MAAAF,EAAA,8BAAA,EAImEG,EAAA,UAMrB,CACtC,KAAA,CAAEC,WAAAA,GAAeL,EAAqB,EAExCK,OAAAA,EAAWC,OAAOC,SAAW,EAE5BC,EAAA,IAAAL,EAAA,CACC,KAAMM,EACN,OAAO,YACP,SAAS,gCACT,cACGC,EACC,CAAA,SAAAF,EAAAA,IAACN,EAAO,CAAA,SAAA,WAAA,CAAS,CACnB,CAAA,EAEF,EAKJS,EAAA,KAAC,MAAI,CAAA,UAAU,2CACb,SAAA,CAAAH,EAAAA,IAAC,MAAG,SAAM,QAAA,CAAA,EACVA,EAAAA,IAAC,KAAC,SAGF,yFAAA,CAAA,SACC,IAAC,CAAA,SAAA,CAAA,6CAC2C,IAC3CA,EAAAA,IAACE,GACC,SAACF,EAAA,IAAAN,EAAA,CAAO,QAAQ,OAAO,KAAK,OAAM,SAAA,oBAAA,CAElC,CACF,CAAA,EAAgB,GAAA,CAElB,CAAA,CAAA,EACF,CAEJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as o}from"./_virtual___federation_fn_import-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{i as o}from"./_virtual___federation_fn_import-CzwHXTRo.js";import{j as e}from"./index.esm-C6ngV5UE.js";import{s as d}from"./index-BMCloLL3.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:g,InputFieldController:s,SectionList:x,SectionListSection:b,SectionListSectionContent:S,SectionListSectionHeader:v,SectionListSectionTitle:w}=await o("@baseplate-dev/ui-components"),L=function(){const{definition:n,saveDefinitionWithFeedback:r}=j(),i=u({resolver:d(h),defaultValues:n.settings.general}),{handleSubmit:l,control:t,reset:c}=i,a=l(p=>r(m=>{m.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(x,{children:e.jsxs(b,{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(g,{form:i})]})};export{L as component};
|
|
2
|
+
//# sourceMappingURL=index-1rH5AIf1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-1rH5AIf1.js","sources":["../../src/routes/settings/index.tsx?tsr-split=component"],"sourcesContent":["import type React from 'react';\n\nimport { generalSettingsSchema } from '@baseplate-dev/project-builder-lib';\nimport {\n useBlockUnsavedChangesNavigate,\n useProjectDefinition,\n useResettableForm,\n} from '@baseplate-dev/project-builder-lib/web';\nimport {\n FormActionBar,\n InputFieldController,\n SectionList,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { createFileRoute } from '@tanstack/react-router';\n\nexport const Route = createFileRoute('/settings/')({\n component: ProjectSettingsPage,\n beforeLoad: () => ({\n getTitle: () => 'Project Settings',\n }),\n});\n\nfunction ProjectSettingsPage(): React.JSX.Element {\n const { definition, saveDefinitionWithFeedback } = useProjectDefinition();\n\n const form = useResettableForm({\n resolver: zodResolver(generalSettingsSchema),\n defaultValues: definition.settings.general,\n });\n\n const { handleSubmit, control, reset } = form;\n\n const onSubmit = handleSubmit((data) =>\n saveDefinitionWithFeedback((draftConfig) => {\n draftConfig.settings.general = data;\n }),\n );\n\n useBlockUnsavedChangesNavigate({ control, reset, onSubmit });\n\n return (\n <form\n className=\"relative h-full max-h-full pb-(--action-bar-height)\"\n onSubmit={onSubmit}\n >\n <div className=\"flex h-full max-h-full flex-1 flex-col overflow-y-auto px-6\">\n <div className=\"sticky top-0 border-b bg-background py-6\">\n <h1>Project settings</h1>\n </div>\n <SectionList>\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>Settings</SectionListSectionTitle>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"flex max-w-80 flex-col gap-4\">\n <InputFieldController\n name=\"name\"\n label=\"Project Name\"\n description=\"Lowercase letters and dashes, e.g. my-project\"\n control={control}\n placeholder=\"e.g. my-project\"\n />\n <InputFieldController\n name=\"portOffset\"\n label=\"Port Offset\"\n 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.\"\n control={control}\n registerOptions={{ valueAsNumber: true }}\n />\n <InputFieldController\n label=\"Package Scope\"\n name=\"packageScope\"\n description=\"The scope for packages in this project, e.g. my-project will result in @my-project/app-name\"\n control={control}\n />\n </SectionListSectionContent>\n </SectionListSection>\n </SectionList>\n </div>\n <FormActionBar form={form} />\n </form>\n );\n}\n"],"names":["generalSettingsSchema","importShared","useBlockUnsavedChangesNavigate","useProjectDefinition","useResettableForm","FormActionBar","InputFieldController","SectionList","SectionListSection","SectionListSectionContent","SectionListSectionHeader","SectionListSectionTitle","SplitComponent","definition","saveDefinitionWithFeedback","form","resolver","zodResolver","defaultValues","settings","general","handleSubmit","control","reset","onSubmit","draftConfig","data","jsxs","jsx","valueAsNumber"],"mappings":"sJAEA,KAAA,CAAA,sBAAAA,CAAA,EAAA,MAAAC,EAAA,oCAAA,EACA,CAAA,+BAAAC,EAAA,qBAAAC,EAAA,kBAAAC,CAAA,EAAA,MAAAH,EAAA,wCAAA,EAKA,CAAA,cAAAI,EAAA,qBAAAC,EAAA,YAAAC,EAAA,mBAAAC,EAAA,0BAAAC,EAAA,yBAAAC,EAAA,wBAAAC,CAAA,EAAA,MAAAV,EAAA,8BAAA,EASsDW,EAAA,UAUJ,CAC1C,KAAA,CAAEC,WAAAA,EAAYC,2BAAAA,GAA+BX,EAAqB,EAElEY,EAAOX,EAAkB,CAC7BY,SAAUC,EAAYjB,CAAqB,EAC3CkB,cAAeL,EAAWM,SAASC,OAAAA,CACpC,EAEK,CAAEC,aAAAA,EAAcC,QAAAA,EAASC,MAAAA,CAAAA,EAAUR,EAEnCS,EAAWH,EACfP,GAAAA,EAA4CW,GAAA,CAC1CA,EAAYN,SAASC,QAAUM,CAAAA,CAChC,CACH,EAE+B,OAAAxB,EAAA,CAAEoB,QAAAA,EAASC,MAAAA,EAAOC,SAAAA,CAAAA,CAAU,EAGxDG,EAAAA,KAAA,OAAA,CACC,UAAU,sDACV,SAAAH,EAEA,SAAA,CAACG,EAAAA,KAAA,MAAA,CAAI,UAAU,8DACb,SAAA,CAAAC,EAAAA,IAAC,OAAI,UAAU,2CACb,SAACA,MAAA,KAAA,CAAG,4BAAgB,CACtB,CAAA,EACAA,EAAA,IAACrB,EACC,CAAA,SAAAoB,EAAAA,KAACnB,EACC,CAAA,SAAA,CAAAoB,MAAClB,EACC,CAAA,SAAAkB,EAAA,IAACjB,EAAwB,CAAA,SAAA,UAAQ,CAAA,EACnC,EACAgB,EAAAA,KAAClB,EAA0B,CAAA,UAAU,+BACnC,SAAA,CAACmB,EAAAA,IAAAtB,EAAA,CACC,KAAK,OACL,MAAM,eACN,YAAY,gDACZ,QAAAgB,EACA,YAAY,iBAAiB,CAAA,EAE/BM,EAAAA,IAACtB,GACC,KAAK,aACL,MAAM,cACN,YAAY,2JACZ,QAAAgB,EACA,gBAAiB,CAAEO,cAAe,EAAA,EAAO,EAE3CD,MAACtB,GACC,MAAM,gBACN,KAAK,eACL,YAAY,8FACZ,QAAAgB,CAAiB,CAAA,CAAA,CAErB,CAAA,CAAA,CAAA,CACF,CACF,CAAA,CAAA,EACF,EACAM,MAACvB,GAAc,KAAAU,CAAW,CAAA,CAAA,EAC5B,CAEJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as c}from"./_virtual___federation_fn_import-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{i as c}from"./_virtual___federation_fn_import-CzwHXTRo.js";import{j as e,f as S,e as j}from"./index.esm-C6ngV5UE.js";import{S as v,o as f,a as L}from"./index-BMCloLL3.js";import{u as y}from"./use-enum-form-Dz-Wnbxj.js";import{K as C,c as N}from"./index-BxN9iLEr.js";const{SectionListSection:b,SectionListSectionContent:g,SectionListSectionHeader:w,SectionListSectionTitle:E,SwitchFieldController:V}=await c("@baseplate-dev/ui-components");function F({control:s}){return e.jsxs(b,{children:[e.jsx(w,{children:e.jsx(E,{children:"GraphQL"})}),e.jsx(g,{className:"space-y-4",children:e.jsx(V,{label:"Expose in GraphQL schema",control:s,name:"isExposed",description:"Whether to expose this enum in the GraphQL schema"})})]})}function A(s){return s.split("_").map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" ")}const{modelEnumValueEntityType:T}=await c("@baseplate-dev/project-builder-lib"),{Button:d,InputFieldController:u,Label:p,SectionListSection:$,SectionListSectionContent:I,SectionListSectionDescription:k,SectionListSectionHeader:B,SectionListSectionTitle:D}=await c("@baseplate-dev/ui-components");function G({control:s,setValue:l}){const{fields:t,remove:n,append:r,move:a}=S({control:s,name:"values"}),o=j({control:s,name:"values"}),m="grid grid-cols-[repeat(2,minmax(130px,1fr))_80px] gap-3",x=t.map((h,i)=>({id:h.id,element:e.jsxs("div",{className:m,children:[e.jsx(u,{control:s,name:`values.${i}.name`}),e.jsx(u,{control:s,name:`values.${i}.friendlyName`,onFocus:()=>{!o[i].friendlyName&&o[i].name&&l(`values.${i}.friendlyName`,A(o[i].name))}}),e.jsxs(d,{variant:"ghost",size:"icon",onClick:()=>{n(i)},children:[e.jsx(C,{}),e.jsx("div",{className:"sr-only",children:"Delete Enum"})]})]})}));return e.jsxs($,{children:[e.jsxs(B,{children:[e.jsx(D,{children:"Values"}),e.jsx(k,{children:"Configure the allowed values for this enum."})]}),e.jsxs(I,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:N(m,"pl-12"),children:[e.jsx(p,{children:"Value Name, e.g. ACTIVE"}),e.jsx(p,{children:"Value Friendly Name, e.g. Active"}),e.jsx("div",{})]}),t.length===0?e.jsx("p",{className:"pt-4 text-style-muted",children:"Add some values to get started"}):e.jsx(v,{listItems:x,sortItems:a})]}),e.jsx(d,{size:"sm",variant:"secondary",onClick:()=>{r({id:T.generateNewId(),name:"",friendlyName:""})},children:"Add Value"})]})]})}const{useBlockUnsavedChangesNavigate:Q}=await c("@baseplate-dev/project-builder-lib/web"),{FormActionBar:H,SectionList:R}=await c("@baseplate-dev/ui-components"),_=function(){const{key:l}=f.useParams(),{form:t,onSubmit:n,isSavingDefinition:r}=y({omit:["name","featureRef"],enumKey:l}),{control:a,setValue:o}=t;return Q({control:a,reset:t.reset,onSubmit:n}),e.jsx(L,{children:e.jsxs("form",{onSubmit:n,className:"mx-4 max-w-7xl min-w-[700px] flex-1 space-y-4 pb-4",children:[e.jsxs(R,{children:[e.jsx(F,{control:a}),e.jsx(G,{control:a,setValue:o})]}),e.jsx(H,{form:t,disabled:r})]})})};export{_ as component};
|
|
2
|
+
//# sourceMappingURL=index-BEMXZzJT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-s17MV-9f.js","sources":["../../src/routes/data/enums/edit.$key/-components/enum-graph-ql-section.tsx","../../src/utils/casing.ts","../../src/routes/data/enums/edit.$key/-components/enum-values-section.tsx","../../src/routes/data/enums/edit.$key/index.tsx?tsr-split=component"],"sourcesContent":["import type { EnumConfig } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\nimport type { Control } from 'react-hook-form';\n\nimport {\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionHeader,\n SectionListSectionTitle,\n SwitchFieldController,\n} from '@baseplate-dev/ui-components';\n\nexport function EnumGraphQLSection({\n control,\n}: {\n control: Control<EnumConfig>;\n}): React.JSX.Element {\n return (\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>GraphQL</SectionListSectionTitle>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"space-y-4\">\n <SwitchFieldController\n label=\"Expose in GraphQL schema\"\n control={control}\n name=\"isExposed\"\n description=\"Whether to expose this enum in the GraphQL schema\"\n />\n </SectionListSectionContent>\n </SectionListSection>\n );\n}\n","export function underscoreToTitleCase(str: string): string {\n // Split the string into an array of words\n const words = str.split('_');\n\n // Capitalize the first letter of each word and join them back together\n const titleCase = words\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n\n return titleCase;\n}\n","import type { EnumConfig } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\nimport type { Control, UseFormSetValue } from 'react-hook-form';\n\nimport { modelEnumValueEntityType } from '@baseplate-dev/project-builder-lib';\nimport {\n Button,\n InputFieldController,\n Label,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport clsx from 'clsx';\nimport { useFieldArray, useWatch } from 'react-hook-form';\nimport { MdDeleteOutline } from 'react-icons/md';\n\nimport { SortableList } from '#src/components/index.js';\nimport { underscoreToTitleCase } from '#src/utils/casing.js';\n\nexport function EnumValuesSection({\n control,\n setValue,\n}: {\n control: Control<EnumConfig>;\n setValue: UseFormSetValue<EnumConfig>;\n}): React.JSX.Element {\n const {\n fields: valueFields,\n remove: removeValue,\n append: appendValue,\n move: sortValues,\n } = useFieldArray({\n control,\n name: 'values',\n });\n\n const values = useWatch({ control, name: 'values' });\n\n const gridClassNames =\n 'grid grid-cols-[repeat(2,minmax(130px,1fr))_80px] gap-3';\n\n const valueListItems = valueFields.map((field, i) => ({\n id: field.id,\n element: (\n <div className={gridClassNames}>\n <InputFieldController control={control} name={`values.${i}.name`} />\n <InputFieldController\n control={control}\n name={`values.${i}.friendlyName`}\n onFocus={() => {\n if (!values[i].friendlyName && values[i].name) {\n setValue(\n `values.${i}.friendlyName`,\n underscoreToTitleCase(values[i].name),\n );\n }\n }}\n />\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => {\n removeValue(i);\n }}\n >\n <MdDeleteOutline />\n <div className=\"sr-only\">Delete Enum</div>\n </Button>\n </div>\n ),\n }));\n\n return (\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>Values</SectionListSectionTitle>\n <SectionListSectionDescription>\n Configure the allowed values for this enum.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"space-y-4\">\n <div className=\"space-y-2\">\n <div\n className={clsx(\n gridClassNames,\n // account for handle in sortable list\n 'pl-12',\n )}\n >\n <Label>Value Name, e.g. ACTIVE</Label>\n <Label>Value Friendly Name, e.g. Active</Label>\n <div />\n </div>\n {valueFields.length === 0 ? (\n <p className=\"pt-4 text-style-muted\">\n Add some values to get started\n </p>\n ) : (\n <SortableList listItems={valueListItems} sortItems={sortValues} />\n )}\n </div>\n <Button\n size=\"sm\"\n variant=\"secondary\"\n onClick={() => {\n appendValue({\n id: modelEnumValueEntityType.generateNewId(),\n name: '',\n friendlyName: '',\n });\n }}\n >\n Add Value\n </Button>\n </SectionListSectionContent>\n </SectionListSection>\n );\n}\n","import type React from 'react';\n\nimport { useBlockUnsavedChangesNavigate } from '@baseplate-dev/project-builder-lib/web';\nimport { FormActionBar, SectionList } from '@baseplate-dev/ui-components';\nimport { createFileRoute } from '@tanstack/react-router';\n\nimport { ErrorBoundary } from '#src/components/index.js';\n\nimport { useEnumForm } from '../-hooks/use-enum-form.js';\nimport { EnumGraphQLSection } from './-components/enum-graph-ql-section.js';\nimport { EnumValuesSection } from './-components/enum-values-section.js';\n\nexport const Route = createFileRoute('/data/enums/edit/$key/')({\n component: EnumEditPage,\n});\n\nfunction EnumEditPage(): React.JSX.Element {\n const { key } = Route.useParams();\n const { form, onSubmit, isSavingDefinition } = useEnumForm({\n omit: ['name', 'featureRef'],\n enumKey: key,\n });\n const { control, setValue } = form;\n\n useBlockUnsavedChangesNavigate({ control, reset: form.reset, onSubmit });\n\n return (\n <ErrorBoundary>\n <form\n onSubmit={onSubmit}\n className=\"mx-4 max-w-7xl min-w-[700px] flex-1 space-y-4 pb-4\"\n >\n <SectionList>\n <EnumGraphQLSection control={control} />\n <EnumValuesSection control={control} setValue={setValue} />\n </SectionList>\n <FormActionBar form={form} disabled={isSavingDefinition} />\n </form>\n </ErrorBoundary>\n );\n}\n"],"names":["SectionListSection","SectionListSectionContent","SectionListSectionHeader","SectionListSectionTitle","SwitchFieldController","importShared","EnumGraphQLSection","control","jsx","underscoreToTitleCase","str","word","modelEnumValueEntityType","Button","InputFieldController","Label","SectionListSectionDescription","EnumValuesSection","setValue","valueFields","removeValue","appendValue","sortValues","useFieldArray","values","useWatch","gridClassNames","valueListItems","field","jsxs","MdDeleteOutline","clsx","SortableList","useBlockUnsavedChangesNavigate","FormActionBar","SectionList","SplitComponent","key","Route","useParams","form","onSubmit","isSavingDefinition","useEnumForm","omit","enumKey","reset","ErrorBoundary"],"mappings":"iRAIA,KAAA,oBAAAA,EAAA,0BAAAC,EAAA,yBAAAC,EAAAC,wBAAAA,EAAA,sBAAAC,CAAA,EA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CAAA,EAAA,MAAA5B,EAAA,wCAAA,EACA,CAAA,cAAA6B,EAAA,YAAAC,CAAA,EAAA,MAAA9B,EAAA,8BAAA,EAOyE+B,EAAA,UAM9B,CACnC,KAAA,CAAEC,IAAAA,CAAAA,EAAQC,EAAMC,UAAU,EAC1B,CAAEC,KAAAA,EAAMC,SAAAA,EAAUC,mBAAAA,GAAuBC,EAAY,CACzDC,KAAM,CAAC,OAAQ,YAAY,EAC3BC,QAASR,CAAAA,CACV,EACK,CAAE9B,QAAAA,EAASW,SAAAA,CAAAA,EAAasB,EAEC,OAAAP,EAAA,CAAE1B,QAAAA,EAASuC,MAAON,EAAKM,MAAOL,SAAAA,CAAAA,CAAU,QAGpEM,EACC,CAAA,SAAAlB,EAAA,KAAC,OACC,CAAA,SAAAY,EACA,UAAU,qDAEV,SAAA,CAAAZ,OAACM,EACC,CAAA,SAAA,CAAA3B,MAACF,GAAmB,QAAAC,EAAiB,EACrCC,EAAAA,IAACS,EAAkB,CAAA,QAAAV,EAAkB,SAAAW,CAAmB,CAAA,CAAA,EAC1D,EACCV,EAAAA,IAAA0B,EAAA,CAAc,KAAAM,EAAY,SAAUE,CAAmB,CAAA,CAAA,CAAA,CAC1D,CACF,CAAA,CAEJ"}
|
|
1
|
+
{"version":3,"file":"index-BEMXZzJT.js","sources":["../../src/routes/data/enums/edit.$key/-components/enum-graph-ql-section.tsx","../../src/utils/casing.ts","../../src/routes/data/enums/edit.$key/-components/enum-values-section.tsx","../../src/routes/data/enums/edit.$key/index.tsx?tsr-split=component"],"sourcesContent":["import type { EnumConfig } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\nimport type { Control } from 'react-hook-form';\n\nimport {\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionHeader,\n SectionListSectionTitle,\n SwitchFieldController,\n} from '@baseplate-dev/ui-components';\n\nexport function EnumGraphQLSection({\n control,\n}: {\n control: Control<EnumConfig>;\n}): React.JSX.Element {\n return (\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>GraphQL</SectionListSectionTitle>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"space-y-4\">\n <SwitchFieldController\n label=\"Expose in GraphQL schema\"\n control={control}\n name=\"isExposed\"\n description=\"Whether to expose this enum in the GraphQL schema\"\n />\n </SectionListSectionContent>\n </SectionListSection>\n );\n}\n","export function underscoreToTitleCase(str: string): string {\n // Split the string into an array of words\n const words = str.split('_');\n\n // Capitalize the first letter of each word and join them back together\n const titleCase = words\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n\n return titleCase;\n}\n","import type { EnumConfig } from '@baseplate-dev/project-builder-lib';\nimport type React from 'react';\nimport type { Control, UseFormSetValue } from 'react-hook-form';\n\nimport { modelEnumValueEntityType } from '@baseplate-dev/project-builder-lib';\nimport {\n Button,\n InputFieldController,\n Label,\n SectionListSection,\n SectionListSectionContent,\n SectionListSectionDescription,\n SectionListSectionHeader,\n SectionListSectionTitle,\n} from '@baseplate-dev/ui-components';\nimport clsx from 'clsx';\nimport { useFieldArray, useWatch } from 'react-hook-form';\nimport { MdDeleteOutline } from 'react-icons/md';\n\nimport { SortableList } from '#src/components/index.js';\nimport { underscoreToTitleCase } from '#src/utils/casing.js';\n\nexport function EnumValuesSection({\n control,\n setValue,\n}: {\n control: Control<EnumConfig>;\n setValue: UseFormSetValue<EnumConfig>;\n}): React.JSX.Element {\n const {\n fields: valueFields,\n remove: removeValue,\n append: appendValue,\n move: sortValues,\n } = useFieldArray({\n control,\n name: 'values',\n });\n\n const values = useWatch({ control, name: 'values' });\n\n const gridClassNames =\n 'grid grid-cols-[repeat(2,minmax(130px,1fr))_80px] gap-3';\n\n const valueListItems = valueFields.map((field, i) => ({\n id: field.id,\n element: (\n <div className={gridClassNames}>\n <InputFieldController control={control} name={`values.${i}.name`} />\n <InputFieldController\n control={control}\n name={`values.${i}.friendlyName`}\n onFocus={() => {\n if (!values[i].friendlyName && values[i].name) {\n setValue(\n `values.${i}.friendlyName`,\n underscoreToTitleCase(values[i].name),\n );\n }\n }}\n />\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => {\n removeValue(i);\n }}\n >\n <MdDeleteOutline />\n <div className=\"sr-only\">Delete Enum</div>\n </Button>\n </div>\n ),\n }));\n\n return (\n <SectionListSection>\n <SectionListSectionHeader>\n <SectionListSectionTitle>Values</SectionListSectionTitle>\n <SectionListSectionDescription>\n Configure the allowed values for this enum.\n </SectionListSectionDescription>\n </SectionListSectionHeader>\n <SectionListSectionContent className=\"space-y-4\">\n <div className=\"space-y-2\">\n <div\n className={clsx(\n gridClassNames,\n // account for handle in sortable list\n 'pl-12',\n )}\n >\n <Label>Value Name, e.g. ACTIVE</Label>\n <Label>Value Friendly Name, e.g. Active</Label>\n <div />\n </div>\n {valueFields.length === 0 ? (\n <p className=\"pt-4 text-style-muted\">\n Add some values to get started\n </p>\n ) : (\n <SortableList listItems={valueListItems} sortItems={sortValues} />\n )}\n </div>\n <Button\n size=\"sm\"\n variant=\"secondary\"\n onClick={() => {\n appendValue({\n id: modelEnumValueEntityType.generateNewId(),\n name: '',\n friendlyName: '',\n });\n }}\n >\n Add Value\n </Button>\n </SectionListSectionContent>\n </SectionListSection>\n );\n}\n","import type React from 'react';\n\nimport { useBlockUnsavedChangesNavigate } from '@baseplate-dev/project-builder-lib/web';\nimport { FormActionBar, SectionList } from '@baseplate-dev/ui-components';\nimport { createFileRoute } from '@tanstack/react-router';\n\nimport { ErrorBoundary } from '#src/components/index.js';\n\nimport { useEnumForm } from '../-hooks/use-enum-form.js';\nimport { EnumGraphQLSection } from './-components/enum-graph-ql-section.js';\nimport { EnumValuesSection } from './-components/enum-values-section.js';\n\nexport const Route = createFileRoute('/data/enums/edit/$key/')({\n component: EnumEditPage,\n});\n\nfunction EnumEditPage(): React.JSX.Element {\n const { key } = Route.useParams();\n const { form, onSubmit, isSavingDefinition } = useEnumForm({\n omit: ['name', 'featureRef'],\n enumKey: key,\n });\n const { control, setValue } = form;\n\n useBlockUnsavedChangesNavigate({ control, reset: form.reset, onSubmit });\n\n return (\n <ErrorBoundary>\n <form\n onSubmit={onSubmit}\n className=\"mx-4 max-w-7xl min-w-[700px] flex-1 space-y-4 pb-4\"\n >\n <SectionList>\n <EnumGraphQLSection control={control} />\n <EnumValuesSection control={control} setValue={setValue} />\n </SectionList>\n <FormActionBar form={form} disabled={isSavingDefinition} />\n </form>\n </ErrorBoundary>\n );\n}\n"],"names":["SectionListSection","SectionListSectionContent","SectionListSectionHeader","SectionListSectionTitle","SwitchFieldController","importShared","EnumGraphQLSection","control","jsx","underscoreToTitleCase","str","word","modelEnumValueEntityType","Button","InputFieldController","Label","SectionListSectionDescription","EnumValuesSection","setValue","valueFields","removeValue","appendValue","sortValues","useFieldArray","values","useWatch","gridClassNames","valueListItems","field","jsxs","MdDeleteOutline","clsx","SortableList","useBlockUnsavedChangesNavigate","FormActionBar","SectionList","SplitComponent","key","Route","useParams","form","onSubmit","isSavingDefinition","useEnumForm","omit","enumKey","reset","ErrorBoundary"],"mappings":"iRAIA,KAAA,oBAAAA,EAAA,0BAAAC,EAAA,yBAAAC,EAAAC,wBAAAA,EAAA,sBAAAC,CAAA,EAAA,MAAAC,EAAA,8BAAA,EAQO,SAASC,EAAmB,CACjC,QAAAC,CACF,EAEsB,CACpB,cACGP,EACC,CAAA,SAAA,CAAAQ,MAACN,EACC,CAAA,SAAAM,EAAA,IAACL,EAAwB,CAAA,SAAA,SAAO,CAAA,EAClC,EACAK,EAAAA,IAACP,EAA0B,CAAA,UAAU,YACnC,SAAAO,EAAA,IAACJ,EAAA,CACC,MAAM,2BACN,QAAAG,EACA,KAAK,YACL,YAAY,mDAAA,CAAA,CAEhB,CAAA,CAAA,EACF,CAEJ,CChCO,SAASE,EAAsBC,EAAqB,CASlD,OAPOA,EAAI,MAAM,GAAG,EAIxB,IAAKC,GAASA,EAAK,OAAO,CAAC,EAAE,cAAgBA,EAAK,MAAM,CAAC,EAAE,aAAa,EACxE,KAAK,GA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