@backstage/plugin-scaffolder 1.34.0-next.2 → 1.34.0-next.3
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/CHANGELOG.md +13 -0
- package/dist/alpha/components/TemplateEditorPage/TemplateEditor.esm.js +15 -9
- package/dist/alpha/components/TemplateEditorPage/TemplateEditor.esm.js.map +1 -1
- package/dist/alpha/components/TemplateEditorPage/TemplateEditorLayout.esm.js +42 -8
- package/dist/alpha/components/TemplateEditorPage/TemplateEditorLayout.esm.js.map +1 -1
- package/dist/alpha/components/TemplateEditorPage/TemplateFormPreviewer.esm.js +25 -19
- package/dist/alpha/components/TemplateEditorPage/TemplateFormPreviewer.esm.js.map +1 -1
- package/dist/plugins/scaffolder/package.json.esm.js +2 -1
- package/dist/plugins/scaffolder/package.json.esm.js.map +1 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder
|
|
2
2
|
|
|
3
|
+
## 1.34.0-next.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b1c0696: Add resizable panels width for the editor and preview panels in the template editor and template form playground layouts. Users can now resize these panels by dragging the divider between the two areas.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/frontend-plugin-api@0.11.0-next.2
|
|
13
|
+
- @backstage/core-compat-api@0.5.0-next.3
|
|
14
|
+
- @backstage/core-components@0.17.5-next.2
|
|
15
|
+
|
|
3
16
|
## 1.34.0-next.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -5,7 +5,7 @@ import { useRouteRef } from '@backstage/core-plugin-api';
|
|
|
5
5
|
import { editRouteRef } from '../../../routes.esm.js';
|
|
6
6
|
import { useTemplateDirectory } from './useTemplateDirectory.esm.js';
|
|
7
7
|
import { DirectoryEditorProvider } from './DirectoryEditorContext.esm.js';
|
|
8
|
-
import { TemplateEditorLayout, TemplateEditorLayoutToolbar, TemplateEditorLayoutBrowser, TemplateEditorLayoutFiles, TemplateEditorLayoutPreview, TemplateEditorLayoutConsole } from './TemplateEditorLayout.esm.js';
|
|
8
|
+
import { TemplateEditorLayout, TemplateEditorLayoutToolbar, TemplateEditorLayoutBrowser, TemplateEditorPanels, TemplateEditorLayoutFiles, TemplateEditorLayoutPreview, TemplateEditorLayoutConsole } from './TemplateEditorLayout.esm.js';
|
|
9
9
|
import { TemplateEditorToolbar } from './TemplateEditorToolbar.esm.js';
|
|
10
10
|
import { TemplateEditorToolbarFileMenu } from './TemplateEditorToolbarFileMenu.esm.js';
|
|
11
11
|
import { TemplateEditorBrowser } from './TemplateEditorBrowser.esm.js';
|
|
@@ -38,16 +38,22 @@ const TemplateEditor = (props) => {
|
|
|
38
38
|
}
|
|
39
39
|
) }) }),
|
|
40
40
|
/* @__PURE__ */ jsx(TemplateEditorLayoutBrowser, { children: /* @__PURE__ */ jsx(TemplateEditorBrowser, { onClose: closeDirectory }) }),
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
42
|
-
|
|
43
|
-
TemplateEditorForm.DirectoryEditorDryRun,
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
TemplateEditorPanels,
|
|
44
43
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
autoSaveId: "template-editor",
|
|
45
|
+
files: /* @__PURE__ */ jsx(TemplateEditorLayoutFiles, { children: /* @__PURE__ */ jsx(TemplateEditorTextArea.DirectoryEditor, { errorText }) }),
|
|
46
|
+
preview: /* @__PURE__ */ jsx(TemplateEditorLayoutPreview, { children: /* @__PURE__ */ jsx(
|
|
47
|
+
TemplateEditorForm.DirectoryEditorDryRun,
|
|
48
|
+
{
|
|
49
|
+
setErrorText,
|
|
50
|
+
fieldExtensions,
|
|
51
|
+
layouts,
|
|
52
|
+
formProps
|
|
53
|
+
}
|
|
54
|
+
) })
|
|
49
55
|
}
|
|
50
|
-
)
|
|
56
|
+
),
|
|
51
57
|
/* @__PURE__ */ jsx(TemplateEditorLayoutConsole, { children: /* @__PURE__ */ jsx(DryRunResults, {}) })
|
|
52
58
|
] }) }) });
|
|
53
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateEditor.esm.js","sources":["../../../../src/alpha/components/TemplateEditorPage/TemplateEditor.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useCallback, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\n\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport type {\n FormProps,\n LayoutOptions,\n FieldExtensionOptions,\n} from '@backstage/plugin-scaffolder-react';\n\nimport { editRouteRef } from '../../../routes';\n\nimport { useTemplateDirectory } from './useTemplateDirectory';\nimport { DirectoryEditorProvider } from './DirectoryEditorContext';\nimport {\n TemplateEditorLayout,\n TemplateEditorLayoutToolbar,\n TemplateEditorLayoutBrowser,\n TemplateEditorLayoutFiles,\n TemplateEditorLayoutPreview,\n TemplateEditorLayoutConsole,\n} from './TemplateEditorLayout';\nimport { TemplateEditorToolbar } from './TemplateEditorToolbar';\nimport { TemplateEditorToolbarFileMenu } from './TemplateEditorToolbarFileMenu';\nimport { TemplateEditorBrowser } from './TemplateEditorBrowser';\nimport { TemplateEditorTextArea } from './TemplateEditorTextArea';\nimport { TemplateEditorForm } from './TemplateEditorForm';\nimport { DryRunProvider } from './DryRunContext';\nimport { DryRunResults } from './DryRunResults';\n\n/** @public */\nexport type ScaffolderTemplateEditorClassKey =\n | 'root'\n | 'toolbar'\n | 'browser'\n | 'editor'\n | 'preview'\n | 'results';\n\nexport const TemplateEditor = (props: {\n layouts?: LayoutOptions[];\n formProps?: FormProps;\n fieldExtensions?: FieldExtensionOptions<any, any>[];\n}) => {\n const { layouts, formProps, fieldExtensions } = props;\n const [errorText, setErrorText] = useState<string>();\n const navigate = useNavigate();\n const editLink = useRouteRef(editRouteRef);\n const {\n directory,\n openDirectory: handleOpenDirectory,\n createDirectory: handleCreateDirectory,\n closeDirectory,\n } = useTemplateDirectory();\n\n const handleCloseDirectory = useCallback(() => {\n closeDirectory().then(() => navigate(editLink()));\n }, [closeDirectory, navigate, editLink]);\n\n return (\n <DirectoryEditorProvider directory={directory}>\n <DryRunProvider>\n <TemplateEditorLayout>\n <TemplateEditorLayoutToolbar>\n <TemplateEditorToolbar fieldExtensions={fieldExtensions}>\n <TemplateEditorToolbarFileMenu\n onOpenDirectory={handleOpenDirectory}\n onCreateDirectory={handleCreateDirectory}\n onCloseDirectory={handleCloseDirectory}\n />\n </TemplateEditorToolbar>\n </TemplateEditorLayoutToolbar>\n <TemplateEditorLayoutBrowser>\n <TemplateEditorBrowser onClose={closeDirectory} />\n </TemplateEditorLayoutBrowser>\n <TemplateEditorLayoutFiles>\n
|
|
1
|
+
{"version":3,"file":"TemplateEditor.esm.js","sources":["../../../../src/alpha/components/TemplateEditorPage/TemplateEditor.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useCallback, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\n\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport type {\n FormProps,\n LayoutOptions,\n FieldExtensionOptions,\n} from '@backstage/plugin-scaffolder-react';\n\nimport { editRouteRef } from '../../../routes';\n\nimport { useTemplateDirectory } from './useTemplateDirectory';\nimport { DirectoryEditorProvider } from './DirectoryEditorContext';\nimport {\n TemplateEditorLayout,\n TemplateEditorLayoutToolbar,\n TemplateEditorLayoutBrowser,\n TemplateEditorLayoutFiles,\n TemplateEditorLayoutPreview,\n TemplateEditorLayoutConsole,\n TemplateEditorPanels,\n} from './TemplateEditorLayout';\nimport { TemplateEditorToolbar } from './TemplateEditorToolbar';\nimport { TemplateEditorToolbarFileMenu } from './TemplateEditorToolbarFileMenu';\nimport { TemplateEditorBrowser } from './TemplateEditorBrowser';\nimport { TemplateEditorTextArea } from './TemplateEditorTextArea';\nimport { TemplateEditorForm } from './TemplateEditorForm';\nimport { DryRunProvider } from './DryRunContext';\nimport { DryRunResults } from './DryRunResults';\n\n/** @public */\nexport type ScaffolderTemplateEditorClassKey =\n | 'root'\n | 'toolbar'\n | 'browser'\n | 'editor'\n | 'preview'\n | 'results';\n\nexport const TemplateEditor = (props: {\n layouts?: LayoutOptions[];\n formProps?: FormProps;\n fieldExtensions?: FieldExtensionOptions<any, any>[];\n}) => {\n const { layouts, formProps, fieldExtensions } = props;\n const [errorText, setErrorText] = useState<string>();\n const navigate = useNavigate();\n const editLink = useRouteRef(editRouteRef);\n const {\n directory,\n openDirectory: handleOpenDirectory,\n createDirectory: handleCreateDirectory,\n closeDirectory,\n } = useTemplateDirectory();\n\n const handleCloseDirectory = useCallback(() => {\n closeDirectory().then(() => navigate(editLink()));\n }, [closeDirectory, navigate, editLink]);\n\n return (\n <DirectoryEditorProvider directory={directory}>\n <DryRunProvider>\n <TemplateEditorLayout>\n <TemplateEditorLayoutToolbar>\n <TemplateEditorToolbar fieldExtensions={fieldExtensions}>\n <TemplateEditorToolbarFileMenu\n onOpenDirectory={handleOpenDirectory}\n onCreateDirectory={handleCreateDirectory}\n onCloseDirectory={handleCloseDirectory}\n />\n </TemplateEditorToolbar>\n </TemplateEditorLayoutToolbar>\n <TemplateEditorLayoutBrowser>\n <TemplateEditorBrowser onClose={closeDirectory} />\n </TemplateEditorLayoutBrowser>\n <TemplateEditorPanels\n autoSaveId=\"template-editor\"\n files={\n <TemplateEditorLayoutFiles>\n <TemplateEditorTextArea.DirectoryEditor errorText={errorText} />\n </TemplateEditorLayoutFiles>\n }\n preview={\n <TemplateEditorLayoutPreview>\n <TemplateEditorForm.DirectoryEditorDryRun\n setErrorText={setErrorText}\n fieldExtensions={fieldExtensions}\n layouts={layouts}\n formProps={formProps}\n />\n </TemplateEditorLayoutPreview>\n }\n />\n <TemplateEditorLayoutConsole>\n <DryRunResults />\n </TemplateEditorLayoutConsole>\n </TemplateEditorLayout>\n </DryRunProvider>\n </DirectoryEditorProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAuDa,MAAA,cAAA,GAAiB,CAAC,KAIzB,KAAA;AACJ,EAAA,MAAM,EAAE,OAAA,EAAS,SAAW,EAAA,eAAA,EAAoB,GAAA,KAAA;AAChD,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,QAAiB,EAAA;AACnD,EAAA,MAAM,WAAW,WAAY,EAAA;AAC7B,EAAM,MAAA,QAAA,GAAW,YAAY,YAAY,CAAA;AACzC,EAAM,MAAA;AAAA,IACJ,SAAA;AAAA,IACA,aAAe,EAAA,mBAAA;AAAA,IACf,eAAiB,EAAA,qBAAA;AAAA,IACjB;AAAA,MACE,oBAAqB,EAAA;AAEzB,EAAM,MAAA,oBAAA,GAAuB,YAAY,MAAM;AAC7C,IAAA,cAAA,GAAiB,IAAK,CAAA,MAAM,QAAS,CAAA,QAAA,EAAU,CAAC,CAAA;AAAA,GAC/C,EAAA,CAAC,cAAgB,EAAA,QAAA,EAAU,QAAQ,CAAC,CAAA;AAEvC,EAAA,2BACG,uBAAwB,EAAA,EAAA,SAAA,EACvB,QAAC,kBAAA,GAAA,CAAA,cAAA,EAAA,EACC,+BAAC,oBACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,2BAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,qBAAA,EAAA,EAAsB,eACrB,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,6BAAA;AAAA,MAAA;AAAA,QACC,eAAiB,EAAA,mBAAA;AAAA,QACjB,iBAAmB,EAAA,qBAAA;AAAA,QACnB,gBAAkB,EAAA;AAAA;AAAA,OAEtB,CACF,EAAA,CAAA;AAAA,wBACC,2BACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,qBAAsB,EAAA,EAAA,OAAA,EAAS,gBAAgB,CAClD,EAAA,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,oBAAA;AAAA,MAAA;AAAA,QACC,UAAW,EAAA,iBAAA;AAAA,QACX,KAAA,sBACG,yBACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,uBAAuB,eAAvB,EAAA,EAAuC,WAAsB,CAChE,EAAA,CAAA;AAAA,QAEF,OAAA,sBACG,2BACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,UAAC,kBAAmB,CAAA,qBAAA;AAAA,UAAnB;AAAA,YACC,YAAA;AAAA,YACA,eAAA;AAAA,YACA,OAAA;AAAA,YACA;AAAA;AAAA,SAEJ,EAAA;AAAA;AAAA,KAEJ;AAAA,oBACC,GAAA,CAAA,2BAAA,EAAA,EACC,QAAC,kBAAA,GAAA,CAAA,aAAA,EAAA,EAAc,CACjB,EAAA;AAAA,GAAA,EACF,GACF,CACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { withStyles } from '@material-ui/core/styles';
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { withStyles, useTheme } from '@material-ui/core/styles';
|
|
3
|
+
import { PanelResizeHandle, PanelGroup, Panel } from 'react-resizable-panels';
|
|
4
|
+
import useMediaQuery from '@material-ui/core/useMediaQuery';
|
|
3
5
|
|
|
4
6
|
const TemplateEditorLayout = withStyles(
|
|
5
7
|
(theme) => ({
|
|
@@ -20,7 +22,7 @@ const TemplateEditorLayout = withStyles(
|
|
|
20
22
|
"browser editor preview"
|
|
21
23
|
"results results results"
|
|
22
24
|
`,
|
|
23
|
-
gridTemplateColumns: "1fr
|
|
25
|
+
gridTemplateColumns: "1fr 5fr",
|
|
24
26
|
gridTemplateRows: "auto 1fr auto"
|
|
25
27
|
}
|
|
26
28
|
}
|
|
@@ -48,12 +50,15 @@ const TemplateEditorLayoutBrowser = withStyles(
|
|
|
48
50
|
{ name: "ScaffolderTemplateEditorLayoutBrowser" }
|
|
49
51
|
)(({ children, classes }) => /* @__PURE__ */ jsx("section", { className: classes.root, children }));
|
|
50
52
|
const TemplateEditorLayoutFiles = withStyles(
|
|
51
|
-
{
|
|
53
|
+
(theme) => ({
|
|
52
54
|
root: {
|
|
53
55
|
gridArea: "editor",
|
|
54
|
-
overflow: "auto"
|
|
56
|
+
overflow: "auto",
|
|
57
|
+
[theme.breakpoints.up("md")]: {
|
|
58
|
+
height: "100%"
|
|
59
|
+
}
|
|
55
60
|
}
|
|
56
|
-
},
|
|
61
|
+
}),
|
|
57
62
|
{ name: "ScaffolderTemplateEditorLayoutFiles" }
|
|
58
63
|
)(({ children, classes }) => /* @__PURE__ */ jsx("section", { className: classes.root, children }));
|
|
59
64
|
const TemplateEditorLayoutPreview = withStyles(
|
|
@@ -63,7 +68,7 @@ const TemplateEditorLayoutPreview = withStyles(
|
|
|
63
68
|
position: "relative",
|
|
64
69
|
backgroundColor: theme.palette.background.default,
|
|
65
70
|
[theme.breakpoints.up("md")]: {
|
|
66
|
-
|
|
71
|
+
height: "100%"
|
|
67
72
|
}
|
|
68
73
|
},
|
|
69
74
|
scroll: {
|
|
@@ -89,6 +94,35 @@ const TemplateEditorLayoutConsole = withStyles(
|
|
|
89
94
|
},
|
|
90
95
|
{ name: "ScaffolderTemplateEditorLayoutConsole" }
|
|
91
96
|
)(({ children, classes }) => /* @__PURE__ */ jsx("section", { className: classes.root, children }));
|
|
97
|
+
const TemplateEditorPanelResizeHandle = withStyles(
|
|
98
|
+
{
|
|
99
|
+
root: {
|
|
100
|
+
width: 8,
|
|
101
|
+
cursor: "col-resize",
|
|
102
|
+
background: "rgba(0,0,0,0.04)"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{ name: "ScaffolderTemplateEditorPanelResizeHandle" }
|
|
106
|
+
)(({ classes }) => /* @__PURE__ */ jsx(PanelResizeHandle, { className: classes.root }));
|
|
107
|
+
function TemplateEditorPanels({
|
|
108
|
+
files,
|
|
109
|
+
preview,
|
|
110
|
+
autoSaveId = "template-editor-panels"
|
|
111
|
+
}) {
|
|
112
|
+
const theme = useTheme();
|
|
113
|
+
const isMdUp = useMediaQuery(theme.breakpoints.up("md"));
|
|
114
|
+
if (isMdUp) {
|
|
115
|
+
return /* @__PURE__ */ jsxs(PanelGroup, { direction: "horizontal", autoSaveId, children: [
|
|
116
|
+
/* @__PURE__ */ jsx(Panel, { minSize: 15, defaultSize: 50, children: files }),
|
|
117
|
+
/* @__PURE__ */ jsx(TemplateEditorPanelResizeHandle, {}),
|
|
118
|
+
/* @__PURE__ */ jsx(Panel, { minSize: 15, defaultSize: 50, children: preview })
|
|
119
|
+
] });
|
|
120
|
+
}
|
|
121
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
122
|
+
files,
|
|
123
|
+
preview
|
|
124
|
+
] });
|
|
125
|
+
}
|
|
92
126
|
|
|
93
|
-
export { TemplateEditorLayout, TemplateEditorLayoutBrowser, TemplateEditorLayoutConsole, TemplateEditorLayoutFiles, TemplateEditorLayoutPreview, TemplateEditorLayoutToolbar };
|
|
127
|
+
export { TemplateEditorLayout, TemplateEditorLayoutBrowser, TemplateEditorLayoutConsole, TemplateEditorLayoutFiles, TemplateEditorLayoutPreview, TemplateEditorLayoutToolbar, TemplateEditorPanelResizeHandle, TemplateEditorPanels };
|
|
94
128
|
//# sourceMappingURL=TemplateEditorLayout.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateEditorLayout.esm.js","sources":["../../../../src/alpha/components/TemplateEditorPage/TemplateEditorLayout.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PropsWithChildren } from 'react';\nimport { WithStyles, withStyles } from '@material-ui/core/styles';\n\nexport const TemplateEditorLayout = withStyles(\n theme => ({\n root: {\n height: '100%',\n gridArea: 'pageContent',\n display: 'grid',\n gridTemplateAreas: `\n \"toolbar\"\n \"browser\"\n \"editor\"\n \"preview\"\n \"results\"\n `,\n [theme.breakpoints.up('md')]: {\n gridTemplateAreas: `\n \"toolbar toolbar toolbar\"\n \"browser editor preview\"\n \"results results results\"\n `,\n gridTemplateColumns: '1fr
|
|
1
|
+
{"version":3,"file":"TemplateEditorLayout.esm.js","sources":["../../../../src/alpha/components/TemplateEditorPage/TemplateEditorLayout.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { PropsWithChildren, ReactNode } from 'react';\nimport { WithStyles, withStyles } from '@material-ui/core/styles';\nimport { PanelGroup, Panel, PanelResizeHandle } from 'react-resizable-panels';\nimport { useTheme } from '@material-ui/core/styles';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\n\nexport const TemplateEditorLayout = withStyles(\n theme => ({\n root: {\n height: '100%',\n gridArea: 'pageContent',\n display: 'grid',\n gridTemplateAreas: `\n \"toolbar\"\n \"browser\"\n \"editor\"\n \"preview\"\n \"results\"\n `,\n [theme.breakpoints.up('md')]: {\n gridTemplateAreas: `\n \"toolbar toolbar toolbar\"\n \"browser editor preview\"\n \"results results results\"\n `,\n gridTemplateColumns: '1fr 5fr',\n gridTemplateRows: 'auto 1fr auto',\n },\n },\n }),\n { name: 'ScaffolderTemplateEditorLayout' },\n)(({ children, classes }: PropsWithChildren<WithStyles>) => (\n <main className={classes.root}>{children}</main>\n));\n\nexport const TemplateEditorLayoutToolbar = withStyles(\n {\n root: {\n gridArea: 'toolbar',\n },\n },\n { name: 'ScaffolderTemplateEditorLayoutToolbar' },\n)(({ children, classes }: PropsWithChildren<WithStyles>) => (\n <section className={classes.root}>{children}</section>\n));\n\nexport const TemplateEditorLayoutBrowser = withStyles(\n theme => ({\n root: {\n gridArea: 'browser',\n overflow: 'auto',\n [theme.breakpoints.up('md')]: {\n borderRight: `1px solid ${theme.palette.divider}`,\n },\n },\n }),\n { name: 'ScaffolderTemplateEditorLayoutBrowser' },\n)(({ children, classes }: PropsWithChildren<WithStyles>) => (\n <section className={classes.root}>{children}</section>\n));\n\nexport const TemplateEditorLayoutFiles = withStyles(\n theme => ({\n root: {\n gridArea: 'editor',\n overflow: 'auto',\n [theme.breakpoints.up('md')]: {\n height: '100%',\n },\n },\n }),\n { name: 'ScaffolderTemplateEditorLayoutFiles' },\n)(({ children, classes }: PropsWithChildren<WithStyles>) => (\n <section className={classes.root}>{children}</section>\n));\n\nexport const TemplateEditorLayoutPreview = withStyles(\n theme => ({\n root: {\n gridArea: 'preview',\n position: 'relative',\n backgroundColor: theme.palette.background.default,\n [theme.breakpoints.up('md')]: {\n height: '100%',\n },\n },\n scroll: {\n height: '100%',\n padding: theme.spacing(1),\n [theme.breakpoints.up('md')]: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n overflow: 'auto',\n },\n },\n }),\n { name: 'ScaffolderTemplateEditorLayoutPreview' },\n)(({ children, classes }: PropsWithChildren<WithStyles>) => (\n <section className={classes.root}>\n <div className={classes.scroll}>{children}</div>\n </section>\n));\n\nexport const TemplateEditorLayoutConsole = withStyles(\n {\n root: {\n gridArea: 'results',\n },\n },\n { name: 'ScaffolderTemplateEditorLayoutConsole' },\n)(({ children, classes }: PropsWithChildren<WithStyles>) => (\n <section className={classes.root}>{children}</section>\n));\n\nexport const TemplateEditorPanelResizeHandle = withStyles(\n {\n root: {\n width: 8,\n cursor: 'col-resize',\n background: 'rgba(0,0,0,0.04)',\n },\n },\n { name: 'ScaffolderTemplateEditorPanelResizeHandle' },\n)(({ classes }: { classes: WithStyles['classes'] }) => (\n <PanelResizeHandle className={classes.root} />\n));\n\nexport function TemplateEditorPanels({\n files,\n preview,\n autoSaveId = 'template-editor-panels',\n}: {\n files: ReactNode;\n preview: ReactNode;\n autoSaveId?: string;\n}) {\n const theme = useTheme();\n const isMdUp = useMediaQuery(theme.breakpoints.up('md'));\n\n if (isMdUp) {\n return (\n <PanelGroup direction=\"horizontal\" autoSaveId={autoSaveId}>\n <Panel minSize={15} defaultSize={50}>\n {files}\n </Panel>\n <TemplateEditorPanelResizeHandle />\n <Panel minSize={15} defaultSize={50}>\n {preview}\n </Panel>\n </PanelGroup>\n );\n }\n // Stack as rows for small screens, just render children in a plain block\n return (\n <>\n {files}\n {preview}\n </>\n );\n}\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,oBAAuB,GAAA,UAAA;AAAA,EAClC,CAAU,KAAA,MAA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AU,EAAA,YAAA,EAAa,UACjC,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,KAAM,EAAA,EAAA,OAAA,EAAS,EAAI,EAAA,WAAA,EAAa,IAC9B,QACH,EAAA,KAAA,EAAA,CAAA;AAAA,0BACC,+BAAgC,EAAA,EAAA,CAAA;AAAA,0BAChC,KAAM,EAAA,EAAA,OAAA,EAAS,EAAI,EAAA,WAAA,EAAa,IAC9B,QACH,EAAA,OAAA,EAAA;AAAA,KACF,EAAA,CAAA;AAAA;AAIJ,EAAA,uBAEK,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,IAAA,KAAA;AAAA,IACA;AAAA,GACH,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -7,7 +7,7 @@ import { makeStyles } from '@material-ui/core/styles';
|
|
|
7
7
|
import { useApi, alertApiRef, useRouteRef } from '@backstage/core-plugin-api';
|
|
8
8
|
import { catalogApiRef, humanizeEntityRef } from '@backstage/plugin-catalog-react';
|
|
9
9
|
import { editRouteRef } from '../../../routes.esm.js';
|
|
10
|
-
import { TemplateEditorLayout, TemplateEditorLayoutToolbar, TemplateEditorLayoutFiles, TemplateEditorLayoutPreview } from './TemplateEditorLayout.esm.js';
|
|
10
|
+
import { TemplateEditorLayout, TemplateEditorLayoutToolbar, TemplateEditorPanels, TemplateEditorLayoutFiles, TemplateEditorLayoutPreview } from './TemplateEditorLayout.esm.js';
|
|
11
11
|
import { TemplateEditorToolbar } from './TemplateEditorToolbar.esm.js';
|
|
12
12
|
import { TemplateEditorToolbarFileMenu } from './TemplateEditorToolbarFileMenu.esm.js';
|
|
13
13
|
import { TemplateEditorToolbarTemplatesMenu } from './TemplateEditorToolbarTemplatesMenu.esm.js';
|
|
@@ -69,7 +69,7 @@ const useStyles = makeStyles(
|
|
|
69
69
|
"textArea preview"
|
|
70
70
|
`,
|
|
71
71
|
gridTemplateRows: "auto 1fr",
|
|
72
|
-
gridTemplateColumns: "1fr
|
|
72
|
+
gridTemplateColumns: "1fr"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
files: {
|
|
@@ -148,25 +148,31 @@ const TemplateFormPreviewer = ({
|
|
|
148
148
|
}
|
|
149
149
|
)
|
|
150
150
|
] }) }),
|
|
151
|
-
/* @__PURE__ */ jsx(
|
|
152
|
-
|
|
151
|
+
/* @__PURE__ */ jsx(
|
|
152
|
+
TemplateEditorPanels,
|
|
153
153
|
{
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
autoSaveId: "template-form-previewer",
|
|
155
|
+
files: /* @__PURE__ */ jsx(TemplateEditorLayoutFiles, { classes: { root: classes.files }, children: /* @__PURE__ */ jsx(
|
|
156
|
+
TemplateEditorTextArea,
|
|
157
|
+
{
|
|
158
|
+
content: templateYaml,
|
|
159
|
+
onUpdate: setTemplateYaml,
|
|
160
|
+
errorText
|
|
161
|
+
}
|
|
162
|
+
) }),
|
|
163
|
+
preview: /* @__PURE__ */ jsx(TemplateEditorLayoutPreview, { children: /* @__PURE__ */ jsx(
|
|
164
|
+
TemplateEditorForm,
|
|
165
|
+
{
|
|
166
|
+
content: templateYaml,
|
|
167
|
+
contentIsSpec: true,
|
|
168
|
+
fieldExtensions: customFieldExtensions,
|
|
169
|
+
setErrorText,
|
|
170
|
+
layouts,
|
|
171
|
+
formProps
|
|
172
|
+
}
|
|
173
|
+
) })
|
|
157
174
|
}
|
|
158
|
-
)
|
|
159
|
-
/* @__PURE__ */ jsx(TemplateEditorLayoutPreview, { children: /* @__PURE__ */ jsx(
|
|
160
|
-
TemplateEditorForm,
|
|
161
|
-
{
|
|
162
|
-
content: templateYaml,
|
|
163
|
-
contentIsSpec: true,
|
|
164
|
-
fieldExtensions: customFieldExtensions,
|
|
165
|
-
setErrorText,
|
|
166
|
-
layouts,
|
|
167
|
-
formProps
|
|
168
|
-
}
|
|
169
|
-
) })
|
|
175
|
+
)
|
|
170
176
|
] });
|
|
171
177
|
};
|
|
172
178
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateFormPreviewer.esm.js","sources":["../../../../src/alpha/components/TemplateEditorPage/TemplateFormPreviewer.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport yaml from 'yaml';\nimport { useCallback, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport useAsync from 'react-use/esm/useAsync';\n\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport { alertApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n humanizeEntityRef,\n} from '@backstage/plugin-catalog-react';\nimport {\n LayoutOptions,\n FieldExtensionOptions,\n FormProps,\n} from '@backstage/plugin-scaffolder-react';\n\nimport { editRouteRef } from '../../../routes';\n\nimport {\n TemplateEditorLayout,\n TemplateEditorLayoutToolbar,\n TemplateEditorLayoutFiles,\n TemplateEditorLayoutPreview,\n} from './TemplateEditorLayout';\nimport { TemplateEditorToolbar } from './TemplateEditorToolbar';\nimport { TemplateEditorToolbarFileMenu } from './TemplateEditorToolbarFileMenu';\nimport {\n TemplateOption,\n TemplateEditorToolbarTemplatesMenu,\n} from './TemplateEditorToolbarTemplatesMenu';\nimport { TemplateEditorForm } from './TemplateEditorForm';\nimport { TemplateEditorTextArea } from './TemplateEditorTextArea';\n\nconst EXAMPLE_TEMPLATE_PARAMS_YAML = `# Edit the template parameters below to see how they will render in the scaffolder form UI\nparameters:\n - title: Fill in some steps\n required:\n - name\n properties:\n name:\n title: Name\n type: string\n description: Unique name of the component\n owner:\n title: Owner\n type: string\n description: Owner of the component\n ui:field: OwnerPicker\n ui:options:\n catalogFilter:\n kind: Group\n - title: Choose a location\n required:\n - repoUrl\n properties:\n repoUrl:\n title: Repository Location\n type: string\n ui:field: RepoUrlPicker\n ui:options:\n allowedHosts:\n - github.com\nsteps:\n - id: fetch-base\n name: Fetch Base\n action: fetch:template\n input:\n url: ./template\n values:\n name: \\${{parameters.name}}\n`;\n\n/** @public */\nexport type ScaffolderTemplateFormPreviewerClassKey =\n | 'root'\n | 'toolbar'\n | 'controls'\n | 'textArea'\n | 'preview';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n height: '100%',\n gridArea: 'pageContent',\n display: 'grid',\n gridTemplateAreas: `\n \"toolbar\"\n \"textArea\"\n \"preview\"\n `,\n [theme.breakpoints.up('md')]: {\n gridTemplateAreas: `\n \"toolbar toolbar\"\n \"textArea preview\"\n `,\n gridTemplateRows: 'auto 1fr',\n gridTemplateColumns: '1fr 1fr',\n },\n },\n files: {\n gridArea: 'textArea',\n },\n }),\n { name: 'ScaffolderTemplateFormPreviewer' },\n);\n\nexport const TemplateFormPreviewer = ({\n defaultPreviewTemplate = EXAMPLE_TEMPLATE_PARAMS_YAML,\n customFieldExtensions = [],\n layouts = [],\n formProps,\n}: {\n defaultPreviewTemplate?: string;\n customFieldExtensions?: FieldExtensionOptions<any, any>[];\n onClose?: () => void;\n layouts?: LayoutOptions[];\n formProps?: FormProps;\n}) => {\n const classes = useStyles();\n const alertApi = useApi(alertApiRef);\n const catalogApi = useApi(catalogApiRef);\n const navigate = useNavigate();\n const editLink = useRouteRef(editRouteRef);\n\n const [errorText, setErrorText] = useState<string>();\n const [selectedTemplate, setSelectedTemplate] = useState<TemplateOption>();\n const [templateOptions, setTemplateOptions] = useState<TemplateOption[]>([]);\n const [templateYaml, setTemplateYaml] = useState(defaultPreviewTemplate);\n\n const handleCloseDirectory = useCallback(() => {\n navigate(editLink());\n }, [navigate, editLink]);\n\n useAsync(\n () =>\n catalogApi\n .getEntities({\n filter: { kind: 'template' },\n fields: [\n 'kind',\n 'metadata.namespace',\n 'metadata.name',\n 'metadata.title',\n 'spec.parameters',\n 'spec.steps',\n 'spec.output',\n ],\n })\n .then(({ items }) =>\n setTemplateOptions(\n items.map(template => ({\n label:\n template.metadata.title ??\n humanizeEntityRef(template, { defaultKind: 'template' }),\n value: template,\n })),\n ),\n )\n .catch(e =>\n alertApi.post({\n message: `Error loading existing templates: ${e.message}`,\n severity: 'error',\n }),\n ),\n [catalogApi],\n );\n\n const handleSelectChange = useCallback(\n // TODO(Rugvip): Afaik this should be Entity, but didn't want to make runtime changes while fixing types\n (selected: TemplateOption) => {\n setSelectedTemplate(selected);\n setTemplateYaml(yaml.stringify(selected.value.spec));\n },\n [setSelectedTemplate, setTemplateYaml],\n );\n\n return (\n <TemplateEditorLayout classes={{ root: classes.root }}>\n <TemplateEditorLayoutToolbar>\n <TemplateEditorToolbar fieldExtensions={customFieldExtensions}>\n <TemplateEditorToolbarFileMenu\n onCloseDirectory={handleCloseDirectory}\n />\n <TemplateEditorToolbarTemplatesMenu\n options={templateOptions}\n selectedOption={selectedTemplate}\n onSelectOption={handleSelectChange}\n />\n </TemplateEditorToolbar>\n </TemplateEditorLayoutToolbar>\n <TemplateEditorLayoutFiles classes={{ root: classes.files }}>\n <TemplateEditorTextArea\n content={templateYaml}\n onUpdate={setTemplateYaml}\n errorText={errorText}\n />\n </TemplateEditorLayoutFiles>\n <TemplateEditorLayoutPreview>\n <TemplateEditorForm\n content={templateYaml}\n contentIsSpec\n fieldExtensions={customFieldExtensions}\n setErrorText={setErrorText}\n layouts={layouts}\n formProps={formProps}\n />\n </TemplateEditorLayoutPreview>\n </TemplateEditorLayout>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAmDA,MAAM,4BAA+B,GAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAAA,GACvC;AAEA,EAAA,4BACG,oBAAqB,EAAA,EAAA,OAAA,EAAS,EAAE,IAAM,EAAA,OAAA,CAAQ,MAC7C,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,2BACC,EAAA,EAAA,QAAA,kBAAA,IAAA,CAAC,qBAAsB,EAAA,EAAA,eAAA,EAAiB,qBACtC,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,6BAAA;AAAA,QAAA;AAAA,UACC,gBAAkB,EAAA;AAAA;AAAA,OACpB;AAAA,sBACA,GAAA;AAAA,QAAC,kCAAA;AAAA,QAAA;AAAA,UACC,OAAS,EAAA,eAAA;AAAA,UACT,cAAgB,EAAA,gBAAA;AAAA,UAChB,cAAgB,EAAA;AAAA;AAAA;AAClB,KAAA,EACF,CACF,EAAA,CAAA;AAAA,wBACC,yBAA0B,EAAA,EAAA,OAAA,EAAS,EAAE,IAAM,EAAA,OAAA,CAAQ,OAClD,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,sBAAA;AAAA,MAAA;AAAA,QACC,OAAS,EAAA,YAAA;AAAA,QACT,QAAU,EAAA,eAAA;AAAA,QACV;AAAA;AAAA,KAEJ,EAAA,CAAA;AAAA,wBACC,2BACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,kBAAA;AAAA,MAAA;AAAA,QACC,OAAS,EAAA,YAAA;AAAA,QACT,aAAa,EAAA,IAAA;AAAA,QACb,eAAiB,EAAA,qBAAA;AAAA,QACjB,YAAA;AAAA,QACA,OAAA;AAAA,QACA;AAAA;AAAA,KAEJ,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"TemplateFormPreviewer.esm.js","sources":["../../../../src/alpha/components/TemplateEditorPage/TemplateFormPreviewer.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport yaml from 'yaml';\nimport { useCallback, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport useAsync from 'react-use/esm/useAsync';\n\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport { alertApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n humanizeEntityRef,\n} from '@backstage/plugin-catalog-react';\nimport {\n LayoutOptions,\n FieldExtensionOptions,\n FormProps,\n} from '@backstage/plugin-scaffolder-react';\n\nimport { editRouteRef } from '../../../routes';\n\nimport {\n TemplateEditorLayout,\n TemplateEditorLayoutToolbar,\n TemplateEditorLayoutFiles,\n TemplateEditorLayoutPreview,\n TemplateEditorPanels,\n} from './TemplateEditorLayout';\nimport { TemplateEditorToolbar } from './TemplateEditorToolbar';\nimport { TemplateEditorToolbarFileMenu } from './TemplateEditorToolbarFileMenu';\nimport {\n TemplateOption,\n TemplateEditorToolbarTemplatesMenu,\n} from './TemplateEditorToolbarTemplatesMenu';\nimport { TemplateEditorForm } from './TemplateEditorForm';\nimport { TemplateEditorTextArea } from './TemplateEditorTextArea';\n\nconst EXAMPLE_TEMPLATE_PARAMS_YAML = `# Edit the template parameters below to see how they will render in the scaffolder form UI\nparameters:\n - title: Fill in some steps\n required:\n - name\n properties:\n name:\n title: Name\n type: string\n description: Unique name of the component\n owner:\n title: Owner\n type: string\n description: Owner of the component\n ui:field: OwnerPicker\n ui:options:\n catalogFilter:\n kind: Group\n - title: Choose a location\n required:\n - repoUrl\n properties:\n repoUrl:\n title: Repository Location\n type: string\n ui:field: RepoUrlPicker\n ui:options:\n allowedHosts:\n - github.com\nsteps:\n - id: fetch-base\n name: Fetch Base\n action: fetch:template\n input:\n url: ./template\n values:\n name: \\${{parameters.name}}\n`;\n\n/** @public */\nexport type ScaffolderTemplateFormPreviewerClassKey =\n | 'root'\n | 'toolbar'\n | 'controls'\n | 'textArea'\n | 'preview';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n height: '100%',\n gridArea: 'pageContent',\n display: 'grid',\n gridTemplateAreas: `\n \"toolbar\"\n \"textArea\"\n \"preview\"\n `,\n [theme.breakpoints.up('md')]: {\n gridTemplateAreas: `\n \"toolbar toolbar\"\n \"textArea preview\"\n `,\n gridTemplateRows: 'auto 1fr',\n gridTemplateColumns: '1fr',\n },\n },\n files: {\n gridArea: 'textArea',\n },\n }),\n { name: 'ScaffolderTemplateFormPreviewer' },\n);\n\nexport const TemplateFormPreviewer = ({\n defaultPreviewTemplate = EXAMPLE_TEMPLATE_PARAMS_YAML,\n customFieldExtensions = [],\n layouts = [],\n formProps,\n}: {\n defaultPreviewTemplate?: string;\n customFieldExtensions?: FieldExtensionOptions<any, any>[];\n onClose?: () => void;\n layouts?: LayoutOptions[];\n formProps?: FormProps;\n}) => {\n const classes = useStyles();\n const alertApi = useApi(alertApiRef);\n const catalogApi = useApi(catalogApiRef);\n const navigate = useNavigate();\n const editLink = useRouteRef(editRouteRef);\n\n const [errorText, setErrorText] = useState<string>();\n const [selectedTemplate, setSelectedTemplate] = useState<TemplateOption>();\n const [templateOptions, setTemplateOptions] = useState<TemplateOption[]>([]);\n const [templateYaml, setTemplateYaml] = useState(defaultPreviewTemplate);\n\n const handleCloseDirectory = useCallback(() => {\n navigate(editLink());\n }, [navigate, editLink]);\n\n useAsync(\n () =>\n catalogApi\n .getEntities({\n filter: { kind: 'template' },\n fields: [\n 'kind',\n 'metadata.namespace',\n 'metadata.name',\n 'metadata.title',\n 'spec.parameters',\n 'spec.steps',\n 'spec.output',\n ],\n })\n .then(({ items }) =>\n setTemplateOptions(\n items.map(template => ({\n label:\n template.metadata.title ??\n humanizeEntityRef(template, { defaultKind: 'template' }),\n value: template,\n })),\n ),\n )\n .catch(e =>\n alertApi.post({\n message: `Error loading existing templates: ${e.message}`,\n severity: 'error',\n }),\n ),\n [catalogApi],\n );\n\n const handleSelectChange = useCallback(\n // TODO(Rugvip): Afaik this should be Entity, but didn't want to make runtime changes while fixing types\n (selected: TemplateOption) => {\n setSelectedTemplate(selected);\n setTemplateYaml(yaml.stringify(selected.value.spec));\n },\n [setSelectedTemplate, setTemplateYaml],\n );\n\n return (\n <TemplateEditorLayout classes={{ root: classes.root }}>\n <TemplateEditorLayoutToolbar>\n <TemplateEditorToolbar fieldExtensions={customFieldExtensions}>\n <TemplateEditorToolbarFileMenu\n onCloseDirectory={handleCloseDirectory}\n />\n <TemplateEditorToolbarTemplatesMenu\n options={templateOptions}\n selectedOption={selectedTemplate}\n onSelectOption={handleSelectChange}\n />\n </TemplateEditorToolbar>\n </TemplateEditorLayoutToolbar>\n <TemplateEditorPanels\n autoSaveId=\"template-form-previewer\"\n files={\n <TemplateEditorLayoutFiles classes={{ root: classes.files }}>\n <TemplateEditorTextArea\n content={templateYaml}\n onUpdate={setTemplateYaml}\n errorText={errorText}\n />\n </TemplateEditorLayoutFiles>\n }\n preview={\n <TemplateEditorLayoutPreview>\n <TemplateEditorForm\n content={templateYaml}\n contentIsSpec\n fieldExtensions={customFieldExtensions}\n setErrorText={setErrorText}\n layouts={layouts}\n formProps={formProps}\n />\n </TemplateEditorLayoutPreview>\n }\n />\n </TemplateEditorLayout>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoDA,MAAM,4BAA+B,GAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AA+CrC,MAAM,SAAY,GAAA,UA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,GAAA,CAAC,2BACC,EAAA,EAAA,QAAA,kBAAA,IAAA,CAAC,qBAAsB,EAAA,EAAA,eAAA,EAAiB,qBACtC,EAAA,QAAA,EAAA;AAAA,sBAAA,GAAA;AAAA,QAAC,6BAAA;AAAA,QAAA;AAAA,UACC,gBAAkB,EAAA;AAAA;AAAA,OACpB;AAAA,sBACA,GAAA;AAAA,QAAC,kCAAA;AAAA,QAAA;AAAA,UACC,OAAS,EAAA,eAAA;AAAA,UACT,cAAgB,EAAA,gBAAA;AAAA,UAChB,cAAgB,EAAA;AAAA;AAAA;AAClB,KAAA,EACF,CACF,EAAA,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,oBAAA;AAAA,MAAA;AAAA,QACC,UAAW,EAAA,yBAAA;AAAA,QACX,KAAA,sBACG,yBAA0B,EAAA,EAAA,OAAA,EAAS,EAAE,IAAM,EAAA,OAAA,CAAQ,OAClD,EAAA,QAAA,kBAAA,GAAA;AAAA,UAAC,sBAAA;AAAA,UAAA;AAAA,YACC,OAAS,EAAA,YAAA;AAAA,YACT,QAAU,EAAA,eAAA;AAAA,YACV;AAAA;AAAA,SAEJ,EAAA,CAAA;AAAA,QAEF,OAAA,sBACG,2BACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,UAAC,kBAAA;AAAA,UAAA;AAAA,YACC,OAAS,EAAA,YAAA;AAAA,YACT,aAAa,EAAA,IAAA;AAAA,YACb,eAAiB,EAAA,qBAAA;AAAA,YACjB,YAAA;AAAA,YACA,OAAA;AAAA,YACA;AAAA;AAAA,SAEJ,EAAA;AAAA;AAAA;AAEJ,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "@backstage/plugin-scaffolder";
|
|
2
|
-
var version = "1.34.0-next.
|
|
2
|
+
var version = "1.34.0-next.3";
|
|
3
3
|
var description = "The Backstage plugin that helps you create new things";
|
|
4
4
|
var backstage = {
|
|
5
5
|
role: "frontend-plugin",
|
|
@@ -95,6 +95,7 @@ var dependencies = {
|
|
|
95
95
|
luxon: "^3.0.0",
|
|
96
96
|
qs: "^6.9.4",
|
|
97
97
|
"react-resizable": "^3.0.5",
|
|
98
|
+
"react-resizable-panels": "^3.0.4",
|
|
98
99
|
"react-use": "^17.2.4",
|
|
99
100
|
"react-window": "^1.8.10",
|
|
100
101
|
yaml: "^2.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder",
|
|
3
|
-
"version": "1.34.0-next.
|
|
3
|
+
"version": "1.34.0-next.3",
|
|
4
4
|
"description": "The Backstage plugin that helps you create new things",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@backstage/catalog-client": "1.11.0-next.0",
|
|
74
74
|
"@backstage/catalog-model": "1.7.5",
|
|
75
|
-
"@backstage/core-compat-api": "0.5.0-next.
|
|
76
|
-
"@backstage/core-components": "0.17.5-next.
|
|
75
|
+
"@backstage/core-compat-api": "0.5.0-next.3",
|
|
76
|
+
"@backstage/core-components": "0.17.5-next.2",
|
|
77
77
|
"@backstage/core-plugin-api": "1.10.9",
|
|
78
78
|
"@backstage/errors": "1.2.7",
|
|
79
|
-
"@backstage/frontend-plugin-api": "0.11.0-next.
|
|
79
|
+
"@backstage/frontend-plugin-api": "0.11.0-next.2",
|
|
80
80
|
"@backstage/integration": "1.17.1",
|
|
81
81
|
"@backstage/integration-react": "1.2.9",
|
|
82
82
|
"@backstage/plugin-catalog-common": "1.1.5",
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
"luxon": "^3.0.0",
|
|
109
109
|
"qs": "^6.9.4",
|
|
110
110
|
"react-resizable": "^3.0.5",
|
|
111
|
+
"react-resizable-panels": "^3.0.4",
|
|
111
112
|
"react-use": "^17.2.4",
|
|
112
113
|
"react-window": "^1.8.10",
|
|
113
114
|
"yaml": "^2.0.0",
|
|
@@ -115,7 +116,7 @@
|
|
|
115
116
|
"zod-to-json-schema": "^3.20.4"
|
|
116
117
|
},
|
|
117
118
|
"devDependencies": {
|
|
118
|
-
"@backstage/cli": "0.34.0-next.
|
|
119
|
+
"@backstage/cli": "0.34.0-next.2",
|
|
119
120
|
"@backstage/core-app-api": "1.18.0",
|
|
120
121
|
"@backstage/dev-utils": "1.1.13-next.1",
|
|
121
122
|
"@backstage/plugin-catalog": "1.31.2-next.2",
|