@backstage/plugin-scaffolder 1.11.0-next.0 → 1.11.0-next.2
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 +48 -0
- package/alpha/package.json +1 -1
- package/dist/esm/ListTasksPage-6e377096.esm.js +192 -0
- package/dist/esm/ListTasksPage-6e377096.esm.js.map +1 -0
- package/dist/esm/{Router-73a659c0.esm.js → Router-e878e04f.esm.js} +92 -385
- package/dist/esm/Router-e878e04f.esm.js.map +1 -0
- package/dist/esm/{index-42d9f897.esm.js → index-02b0e824.esm.js} +656 -150
- package/dist/esm/index-02b0e824.esm.js.map +1 -0
- package/dist/esm/{index-88194b1f.esm.js → index-9bea2c47.esm.js} +64 -14
- package/dist/esm/index-9bea2c47.esm.js.map +1 -0
- package/dist/index.alpha.d.ts +11 -0
- package/dist/index.esm.js +26 -7
- package/dist/index.esm.js.map +1 -1
- package/package.json +15 -16
- package/dist/esm/Router-73a659c0.esm.js.map +0 -1
- package/dist/esm/default-35e63cd4.esm.js +0 -39
- package/dist/esm/default-35e63cd4.esm.js.map +0 -1
- package/dist/esm/index-42d9f897.esm.js.map +0 -1
- package/dist/esm/index-88194b1f.esm.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { Link, useNavigate, Navigate, useOutlet, Routes, Route } from 'react-router-dom';
|
|
3
|
-
import { Progress, Link as Link$1, DocsIcon, Page, Header, Content, ContentHeader, SupportButton } from '@backstage/core-components';
|
|
3
|
+
import { Progress, Link as Link$1, DocsIcon, Page, Header, Content, ContentHeader, SupportButton, ErrorPage } from '@backstage/core-components';
|
|
4
4
|
import { useEntityTypeFilter, useEntityList, EntityListProvider, CatalogFilterLayout, EntitySearchBar, EntityKindPicker, UserListPicker, EntityTagPicker } from '@backstage/plugin-catalog-react';
|
|
5
5
|
import capitalize from 'lodash/capitalize';
|
|
6
6
|
import { Box, Typography, FormControlLabel, Checkbox, TextField } from '@material-ui/core';
|
|
@@ -17,8 +17,8 @@ import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'
|
|
|
17
17
|
import { usePermission } from '@backstage/plugin-permission-react';
|
|
18
18
|
import { parseEntityRef, stringifyEntityRef } from '@backstage/catalog-model';
|
|
19
19
|
import { TemplateGroup, useTemplateSecrets, scaffolderApiRef, Workflow, useCustomFieldExtensions, useCustomLayouts, SecretsContextProvider } from '@backstage/plugin-scaffolder-react';
|
|
20
|
-
import { v as viewTechDocRouteRef,
|
|
21
|
-
import { D as DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS } from './
|
|
20
|
+
import { v as viewTechDocRouteRef, y as nextSelectedTemplateRouteRef, r as registerComponentRouteRef, C as ContextMenu, z as nextRouteRef, B as nextScaffolderTaskRouteRef, D as nextActionsRouteRef, A as ActionsPage, F as nextScaffolderListTaskRouteRef, G as OngoingTask } from './index-02b0e824.esm.js';
|
|
21
|
+
import { D as DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS, L as ListTasksPage } from './ListTasksPage-6e377096.esm.js';
|
|
22
22
|
import '@backstage/errors';
|
|
23
23
|
import 'qs';
|
|
24
24
|
import 'zen-observable';
|
|
@@ -33,19 +33,38 @@ import '@material-ui/core/Input';
|
|
|
33
33
|
import '@material-ui/core/InputLabel';
|
|
34
34
|
import 'react-use/lib/useDebounce';
|
|
35
35
|
import 'react-use/lib/useEffectOnce';
|
|
36
|
+
import '@material-ui/core/ListItemIcon';
|
|
37
|
+
import '@material-ui/core/ListItemText';
|
|
38
|
+
import '@material-ui/core/MenuItem';
|
|
39
|
+
import '@material-ui/core/MenuList';
|
|
40
|
+
import '@material-ui/core/Popover';
|
|
41
|
+
import '@material-ui/core/styles';
|
|
42
|
+
import '@material-ui/icons/Description';
|
|
43
|
+
import '@material-ui/icons/Edit';
|
|
44
|
+
import '@material-ui/icons/List';
|
|
45
|
+
import '@material-ui/icons/MoreVert';
|
|
46
|
+
import 'use-immer';
|
|
47
|
+
import '@material-ui/icons/RemoveCircleOutline';
|
|
48
|
+
import '@material-ui/icons/PanoramaFishEye';
|
|
49
|
+
import 'classnames';
|
|
50
|
+
import '@material-ui/icons/CheckCircleOutline';
|
|
51
|
+
import '@material-ui/icons/ErrorOutline';
|
|
52
|
+
import 'react-use/lib/useInterval';
|
|
53
|
+
import 'luxon';
|
|
54
|
+
import 'humanize-duration';
|
|
55
|
+
import '@react-hookz/web';
|
|
56
|
+
import '@material-ui/icons/Repeat';
|
|
57
|
+
import '@material-ui/icons/Toc';
|
|
58
|
+
import '@material-ui/icons/Settings';
|
|
59
|
+
import '@material-ui/icons/FontDownload';
|
|
60
|
+
import '@material-ui/core/Typography';
|
|
36
61
|
import '@material-ui/core/Grid';
|
|
37
62
|
import '@material-ui/core/Step';
|
|
38
63
|
import '@material-ui/core/StepLabel';
|
|
39
64
|
import '@material-ui/core/Stepper';
|
|
40
|
-
import '@material-ui/core/styles';
|
|
41
|
-
import '@material-ui/core/Typography';
|
|
42
65
|
import '@material-ui/icons/Cancel';
|
|
43
66
|
import '@material-ui/icons/Check';
|
|
44
67
|
import '@material-ui/icons/FiberManualRecord';
|
|
45
|
-
import 'classnames';
|
|
46
|
-
import 'luxon';
|
|
47
|
-
import 'react-use/lib/useInterval';
|
|
48
|
-
import 'use-immer';
|
|
49
68
|
import '@material-ui/icons/Language';
|
|
50
69
|
|
|
51
70
|
const icon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, { fontSize: "small" });
|
|
@@ -186,7 +205,8 @@ const TemplateListPage = (props) => {
|
|
|
186
205
|
pageTitleOverride: "Create a new component",
|
|
187
206
|
title: "Create a new component",
|
|
188
207
|
subtitle: "Create new software components using standard templates in your organization"
|
|
189
|
-
}
|
|
208
|
+
},
|
|
209
|
+
/* @__PURE__ */ React.createElement(ContextMenu, { ...props.contextMenu })
|
|
190
210
|
), /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, { title: "Available Templates" }, /* @__PURE__ */ React.createElement(
|
|
191
211
|
RegisterExistingButton,
|
|
192
212
|
{
|
|
@@ -210,12 +230,12 @@ const TemplateListPage = (props) => {
|
|
|
210
230
|
|
|
211
231
|
const TemplateWizardPage = (props) => {
|
|
212
232
|
const rootRef = useRouteRef(nextRouteRef);
|
|
213
|
-
const taskRoute = useRouteRef(
|
|
233
|
+
const taskRoute = useRouteRef(nextScaffolderTaskRouteRef);
|
|
214
234
|
const { secrets } = useTemplateSecrets();
|
|
215
235
|
const scaffolderApi = useApi(scaffolderApiRef);
|
|
216
236
|
const navigate = useNavigate();
|
|
217
237
|
const { templateName, namespace } = useRouteRefParams(
|
|
218
|
-
|
|
238
|
+
nextSelectedTemplateRouteRef
|
|
219
239
|
);
|
|
220
240
|
const templateRef = stringifyEntityRef({
|
|
221
241
|
kind: "Template",
|
|
@@ -253,7 +273,13 @@ const TemplateWizardPage = (props) => {
|
|
|
253
273
|
};
|
|
254
274
|
|
|
255
275
|
const Router = (props) => {
|
|
256
|
-
const {
|
|
276
|
+
const {
|
|
277
|
+
components: {
|
|
278
|
+
TemplateCardComponent,
|
|
279
|
+
TemplateOutputsComponent,
|
|
280
|
+
TaskPageComponent = OngoingTask
|
|
281
|
+
} = {}
|
|
282
|
+
} = props;
|
|
257
283
|
const outlet = useOutlet() || props.children;
|
|
258
284
|
const customFieldExtensions = useCustomFieldExtensions(outlet);
|
|
259
285
|
const fieldExtensions = [
|
|
@@ -273,6 +299,7 @@ const Router = (props) => {
|
|
|
273
299
|
TemplateListPage,
|
|
274
300
|
{
|
|
275
301
|
TemplateCardComponent,
|
|
302
|
+
contextMenu: props.contextMenu,
|
|
276
303
|
groups: props.groups
|
|
277
304
|
}
|
|
278
305
|
)
|
|
@@ -290,8 +317,31 @@ const Router = (props) => {
|
|
|
290
317
|
}
|
|
291
318
|
))
|
|
292
319
|
}
|
|
320
|
+
), /* @__PURE__ */ React.createElement(
|
|
321
|
+
Route,
|
|
322
|
+
{
|
|
323
|
+
path: nextScaffolderTaskRouteRef.path,
|
|
324
|
+
element: /* @__PURE__ */ React.createElement(
|
|
325
|
+
TaskPageComponent,
|
|
326
|
+
{
|
|
327
|
+
TemplateOutputsComponent
|
|
328
|
+
}
|
|
329
|
+
)
|
|
330
|
+
}
|
|
331
|
+
), /* @__PURE__ */ React.createElement(Route, { path: nextActionsRouteRef.path, element: /* @__PURE__ */ React.createElement(ActionsPage, null) }), /* @__PURE__ */ React.createElement(
|
|
332
|
+
Route,
|
|
333
|
+
{
|
|
334
|
+
path: nextScaffolderListTaskRouteRef.path,
|
|
335
|
+
element: /* @__PURE__ */ React.createElement(ListTasksPage, null)
|
|
336
|
+
}
|
|
337
|
+
), /* @__PURE__ */ React.createElement(
|
|
338
|
+
Route,
|
|
339
|
+
{
|
|
340
|
+
path: "*",
|
|
341
|
+
element: /* @__PURE__ */ React.createElement(ErrorPage, { status: "404", statusMessage: "Page not found" })
|
|
342
|
+
}
|
|
293
343
|
));
|
|
294
344
|
};
|
|
295
345
|
|
|
296
346
|
export { Router };
|
|
297
|
-
//# sourceMappingURL=index-
|
|
347
|
+
//# sourceMappingURL=index-9bea2c47.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-9bea2c47.esm.js","sources":["../../src/next/TemplateListPage/CategoryPicker.tsx","../../src/next/TemplateListPage/RegisterExistingButton.tsx","../../src/next/TemplateListPage/TemplateGroups.tsx","../../src/next/TemplateListPage/TemplateListPage.tsx","../../src/next/TemplateWizardPage/TemplateWizardPage.tsx","../../src/next/Router/Router.tsx"],"sourcesContent":["/*\n * Copyright 2021 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 React from 'react';\nimport capitalize from 'lodash/capitalize';\nimport { Progress } from '@backstage/core-components';\nimport {\n Box,\n Checkbox,\n FormControlLabel,\n TextField,\n Typography,\n} from '@material-ui/core';\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport { Autocomplete } from '@material-ui/lab';\nimport { useEntityTypeFilter } from '@backstage/plugin-catalog-react';\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\n\nconst icon = <CheckBoxOutlineBlankIcon fontSize=\"small\" />;\nconst checkedIcon = <CheckBoxIcon fontSize=\"small\" />;\n\n/**\n * The Category Picker that is rendered on the left side for picking\n * categories and filtering the template list.\n */\nexport const CategoryPicker = () => {\n const alertApi = useApi(alertApiRef);\n const { error, loading, availableTypes, selectedTypes, setSelectedTypes } =\n useEntityTypeFilter();\n\n if (loading) return <Progress />;\n\n if (error) {\n alertApi.post({\n message: `Failed to load entity types with error: ${error}`,\n severity: 'error',\n });\n return null;\n }\n\n if (!availableTypes) return null;\n\n return (\n <Box pb={1} pt={1}>\n <Typography variant=\"button\">Categories</Typography>\n <Autocomplete\n multiple\n aria-label=\"Categories\"\n options={availableTypes}\n value={selectedTypes}\n onChange={(_: object, value: string[]) => setSelectedTypes(value)}\n renderOption={(option, { selected }) => (\n <FormControlLabel\n control={\n <Checkbox\n icon={icon}\n checkedIcon={checkedIcon}\n checked={selected}\n />\n }\n label={capitalize(option)}\n />\n )}\n size=\"small\"\n popupIcon={<ExpandMoreIcon />}\n renderInput={params => <TextField {...params} variant=\"outlined\" />}\n />\n </Box>\n );\n};\n","/*\n * Copyright 2021 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 { BackstageTheme } from '@backstage/theme';\nimport Button from '@material-ui/core/Button';\nimport IconButton from '@material-ui/core/IconButton';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\nimport React from 'react';\nimport { Link as RouterLink, LinkProps } from 'react-router-dom';\nimport AddCircleOutline from '@material-ui/icons/AddCircleOutline';\nimport { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common';\nimport { usePermission } from '@backstage/plugin-permission-react';\n\n/**\n * Properties for {@link RegisterExistingButton}\n *\n * @alpha\n */\nexport type RegisterExistingButtonProps = {\n title: string;\n} & Partial<Pick<LinkProps, 'to'>>;\n\n/**\n * A button that helps users to register an existing component.\n * @alpha\n */\nexport const RegisterExistingButton = (props: RegisterExistingButtonProps) => {\n const { title, to } = props;\n const { allowed } = usePermission({\n permission: catalogEntityCreatePermission,\n });\n const isXSScreen = useMediaQuery<BackstageTheme>(theme =>\n theme.breakpoints.down('xs'),\n );\n\n if (!to || !allowed) {\n return null;\n }\n\n return isXSScreen ? (\n <IconButton\n component={RouterLink}\n color=\"primary\"\n title={title}\n size=\"small\"\n to={to}\n >\n <AddCircleOutline />\n </IconButton>\n ) : (\n <Button component={RouterLink} variant=\"contained\" color=\"primary\" to={to}>\n {title}\n </Button>\n );\n};\n","/*\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 React, { useCallback } from 'react';\n\nimport {\n Entity,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { useEntityList } from '@backstage/plugin-catalog-react';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { Progress, Link, DocsIcon } from '@backstage/core-components';\nimport { Typography } from '@material-ui/core';\nimport {\n errorApiRef,\n useApi,\n useApp,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport { TemplateGroup } from '@backstage/plugin-scaffolder-react';\nimport { viewTechDocRouteRef } from '../../routes';\nimport { nextSelectedTemplateRouteRef } from '../routes';\nimport { useNavigate } from 'react-router-dom';\n\n/**\n * @alpha\n */\nexport type TemplateGroupFilter = {\n title?: React.ReactNode;\n filter: (entity: Entity) => boolean;\n};\n\nexport interface TemplateGroupsProps {\n groups: TemplateGroupFilter[];\n TemplateCardComponent?: React.ComponentType<{\n template: TemplateEntityV1beta3;\n }>;\n}\n\nexport const TemplateGroups = (props: TemplateGroupsProps) => {\n const { loading, error, entities } = useEntityList();\n const { groups, TemplateCardComponent } = props;\n const errorApi = useApi(errorApiRef);\n const app = useApp();\n const viewTechDocsLink = useRouteRef(viewTechDocRouteRef);\n const templateRoute = useRouteRef(nextSelectedTemplateRouteRef);\n const navigate = useNavigate();\n const onSelected = useCallback(\n (template: TemplateEntityV1beta3) => {\n const { namespace, name } = parseEntityRef(stringifyEntityRef(template));\n navigate(templateRoute({ namespace, templateName: name }));\n },\n [navigate, templateRoute],\n );\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n errorApi.post(error);\n return null;\n }\n\n if (!entities || !entities.length) {\n return (\n <Typography variant=\"body2\">\n No templates found that match your filter. Learn more about{' '}\n <Link to=\"https://backstage.io/docs/features/software-templates/adding-templates\">\n adding templates\n </Link>\n .\n </Typography>\n );\n }\n\n return (\n <>\n {groups.map(({ title, filter }, index) => {\n const templates = entities\n .filter((e): e is TemplateEntityV1beta3 => filter(e))\n .map(template => {\n const { kind, namespace, name } = parseEntityRef(\n stringifyEntityRef(template),\n );\n const additionalLinks =\n template.metadata.annotations?.['backstage.io/techdocs-ref'] &&\n viewTechDocsLink\n ? [\n {\n icon: app.getSystemIcon('docs') ?? DocsIcon,\n text: 'View TechDocs',\n url: viewTechDocsLink({ kind, namespace, name }),\n },\n ]\n : [];\n\n return {\n template,\n additionalLinks,\n };\n });\n\n return (\n <TemplateGroup\n key={index}\n templates={templates}\n title={title}\n components={{ CardComponent: TemplateCardComponent }}\n onSelected={onSelected}\n />\n );\n })}\n </>\n );\n};\n","/*\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 React from 'react';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\n\nimport {\n Content,\n ContentHeader,\n Header,\n Page,\n SupportButton,\n} from '@backstage/core-components';\nimport {\n EntityKindPicker,\n EntityListProvider,\n EntitySearchBar,\n EntityTagPicker,\n CatalogFilterLayout,\n UserListPicker,\n} from '@backstage/plugin-catalog-react';\nimport { CategoryPicker } from './CategoryPicker';\nimport { RegisterExistingButton } from './RegisterExistingButton';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { TemplateGroupFilter, TemplateGroups } from './TemplateGroups';\nimport { registerComponentRouteRef } from '../../routes';\nimport { ContextMenu } from './ContextMenu';\n\nexport type TemplateListPageProps = {\n TemplateCardComponent?: React.ComponentType<{\n template: TemplateEntityV1beta3;\n }>;\n groups?: TemplateGroupFilter[];\n contextMenu?: {\n editor?: boolean;\n actions?: boolean;\n tasks?: boolean;\n };\n};\n\nconst defaultGroup: TemplateGroupFilter = {\n title: 'All Templates',\n filter: () => true,\n};\n\nexport const TemplateListPage = (props: TemplateListPageProps) => {\n const registerComponentLink = useRouteRef(registerComponentRouteRef);\n const { TemplateCardComponent, groups = [] } = props;\n\n return (\n <EntityListProvider>\n <Page themeId=\"website\">\n <Header\n pageTitleOverride=\"Create a new component\"\n title=\"Create a new component\"\n subtitle=\"Create new software components using standard templates in your organization\"\n >\n <ContextMenu {...props.contextMenu} />\n </Header>\n <Content>\n <ContentHeader title=\"Available Templates\">\n <RegisterExistingButton\n title=\"Register Existing Component\"\n to={registerComponentLink && registerComponentLink()}\n />\n <SupportButton>\n Create new software components using standard templates. Different\n templates create different kinds of components (services,\n websites, documentation, ...).\n </SupportButton>\n </ContentHeader>\n\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntitySearchBar />\n <EntityKindPicker initialFilter=\"template\" hidden />\n <UserListPicker\n initialFilter=\"all\"\n availableFilters={['all', 'starred']}\n />\n <CategoryPicker />\n <EntityTagPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <TemplateGroups\n groups={[...groups, defaultGroup]}\n TemplateCardComponent={TemplateCardComponent}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </Content>\n </Page>\n </EntityListProvider>\n );\n};\n","/*\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 React from 'react';\nimport { Navigate, useNavigate } from 'react-router-dom';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport {\n AnalyticsContext,\n useApi,\n useRouteRef,\n useRouteRefParams,\n} from '@backstage/core-plugin-api';\nimport {\n scaffolderApiRef,\n useTemplateSecrets,\n Workflow,\n type LayoutOptions,\n} from '@backstage/plugin-scaffolder-react';\nimport {\n NextFieldExtensionOptions,\n FormProps,\n} from '@backstage/plugin-scaffolder-react';\nimport { JsonValue } from '@backstage/types';\nimport { Header, Page } from '@backstage/core-components';\nimport {\n nextRouteRef,\n nextScaffolderTaskRouteRef,\n nextSelectedTemplateRouteRef,\n} from '../routes';\n\nexport type TemplateWizardPageProps = {\n customFieldExtensions: NextFieldExtensionOptions<any, any>[];\n layouts?: LayoutOptions[];\n FormProps?: FormProps;\n};\n\nexport const TemplateWizardPage = (props: TemplateWizardPageProps) => {\n const rootRef = useRouteRef(nextRouteRef);\n const taskRoute = useRouteRef(nextScaffolderTaskRouteRef);\n const { secrets } = useTemplateSecrets();\n const scaffolderApi = useApi(scaffolderApiRef);\n const navigate = useNavigate();\n const { templateName, namespace } = useRouteRefParams(\n nextSelectedTemplateRouteRef,\n );\n\n const templateRef = stringifyEntityRef({\n kind: 'Template',\n namespace,\n name: templateName,\n });\n\n const onCreate = async (values: Record<string, JsonValue>) => {\n const { taskId } = await scaffolderApi.scaffold({\n templateRef,\n values,\n secrets,\n });\n\n navigate(taskRoute({ taskId }));\n };\n\n const onError = () => <Navigate to={rootRef()} />;\n\n return (\n <AnalyticsContext attributes={{ entityRef: templateRef }}>\n <Page themeId=\"website\">\n <Header\n pageTitleOverride=\"Create a new component\"\n title=\"Create a new component\"\n subtitle=\"Create new software components using standard templates in your organization\"\n />\n <Workflow\n namespace={namespace}\n templateName={templateName}\n onCreate={onCreate}\n onError={onError}\n extensions={props.customFieldExtensions}\n FormProps={props.FormProps}\n layouts={props.layouts}\n />\n </Page>\n </AnalyticsContext>\n );\n};\n","/*\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 React, { PropsWithChildren } from 'react';\nimport { Routes, Route, useOutlet } from 'react-router-dom';\nimport { TemplateListPage } from '../TemplateListPage';\nimport { TemplateWizardPage } from '../TemplateWizardPage';\nimport {\n NextFieldExtensionOptions,\n ScaffolderTaskOutput,\n SecretsContextProvider,\n useCustomFieldExtensions,\n useCustomLayouts,\n type FormProps,\n} from '@backstage/plugin-scaffolder-react';\n\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { TemplateGroupFilter } from '../TemplateListPage/TemplateGroups';\nimport { DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS } from '../../extensions/default';\n\nimport {\n nextActionsRouteRef,\n nextScaffolderListTaskRouteRef,\n nextScaffolderTaskRouteRef,\n nextSelectedTemplateRouteRef,\n} from '../routes';\nimport { ErrorPage } from '@backstage/core-components';\nimport { OngoingTask } from '../OngoingTask';\nimport { ActionsPage } from '../../components/ActionsPage';\nimport { ListTasksPage } from '../../components/ListTasksPage';\n\n/**\n * The Props for the Scaffolder Router\n *\n * @alpha\n */\nexport type NextRouterProps = {\n components?: {\n TemplateCardComponent?: React.ComponentType<{\n template: TemplateEntityV1beta3;\n }>;\n TaskPageComponent?: React.ComponentType<{}>;\n TemplateOutputsComponent?: React.ComponentType<{\n output?: ScaffolderTaskOutput;\n }>;\n };\n groups?: TemplateGroupFilter[];\n // todo(blam): rename this to formProps\n FormProps?: FormProps;\n contextMenu?: {\n /** Whether to show a link to the template editor */\n editor?: boolean;\n /** Whether to show a link to the actions documentation */\n actions?: boolean;\n /** Whether to show a link to the tasks page */\n tasks?: boolean;\n };\n};\n\n/**\n * The Scaffolder Router\n *\n * @alpha\n */\nexport const Router = (props: PropsWithChildren<NextRouterProps>) => {\n const {\n components: {\n TemplateCardComponent,\n TemplateOutputsComponent,\n TaskPageComponent = OngoingTask,\n } = {},\n } = props;\n const outlet = useOutlet() || props.children;\n const customFieldExtensions =\n useCustomFieldExtensions<NextFieldExtensionOptions>(outlet);\n\n const fieldExtensions = [\n ...customFieldExtensions,\n ...DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS.filter(\n ({ name }) =>\n !customFieldExtensions.some(\n customFieldExtension => customFieldExtension.name === name,\n ),\n ),\n ] as NextFieldExtensionOptions[];\n\n const customLayouts = useCustomLayouts(outlet);\n\n return (\n <Routes>\n <Route\n path=\"/\"\n element={\n <TemplateListPage\n TemplateCardComponent={TemplateCardComponent}\n contextMenu={props.contextMenu}\n groups={props.groups}\n />\n }\n />\n <Route\n path={nextSelectedTemplateRouteRef.path}\n element={\n <SecretsContextProvider>\n <TemplateWizardPage\n customFieldExtensions={fieldExtensions}\n layouts={customLayouts}\n FormProps={props.FormProps}\n />\n </SecretsContextProvider>\n }\n />\n <Route\n path={nextScaffolderTaskRouteRef.path}\n element={\n <TaskPageComponent\n TemplateOutputsComponent={TemplateOutputsComponent}\n />\n }\n />\n <Route path={nextActionsRouteRef.path} element={<ActionsPage />} />\n <Route\n path={nextScaffolderListTaskRouteRef.path}\n element={<ListTasksPage />}\n />\n <Route\n path=\"*\"\n element={<ErrorPage status=\"404\" statusMessage=\"Page not found\" />}\n />\n </Routes>\n );\n};\n"],"names":["RouterLink","Link"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,IAAO,mBAAA,KAAA,CAAA,aAAA,CAAC,wBAAyB,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA,CAAA;AACxD,MAAM,WAAc,mBAAA,KAAA,CAAA,aAAA,CAAC,YAAa,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA,CAAA;AAM5C,MAAM,iBAAiB,MAAM;AAClC,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA,CAAA;AACnC,EAAA,M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AAS,kBAAA,KAAA,CAAA,aAAA,CAAC,WAAY,EAAA,IAAA,CAAA,EAAI,CACjE,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,MAAM,8BAA+B,CAAA,IAAA;AAAA,MACrC,OAAA,sCAAU,aAAc,EAAA,IAAA,CAAA;AAAA,KAAA;AAAA,GAE1B,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAK,EAAA,GAAA;AAAA,MACL,yBAAU,KAAA,CAAA,aAAA,CAAA,SAAA,EAAA,EAAU,MAAO,EAAA,KAAA,EAAM,eAAc,gBAAiB,EAAA,CAAA;AAAA,KAAA;AAAA,GAEpE,CAAA,CAAA;AAEJ;;;;"}
|
package/dist/index.alpha.d.ts
CHANGED
|
@@ -228,9 +228,20 @@ export declare type NextRouterProps = {
|
|
|
228
228
|
template: TemplateEntityV1beta3;
|
|
229
229
|
}>;
|
|
230
230
|
TaskPageComponent?: React_2.ComponentType<{}>;
|
|
231
|
+
TemplateOutputsComponent?: React_2.ComponentType<{
|
|
232
|
+
output?: ScaffolderTaskOutput_2;
|
|
233
|
+
}>;
|
|
231
234
|
};
|
|
232
235
|
groups?: TemplateGroupFilter[];
|
|
233
236
|
FormProps?: FormProps_2;
|
|
237
|
+
contextMenu?: {
|
|
238
|
+
/** Whether to show a link to the template editor */
|
|
239
|
+
editor?: boolean;
|
|
240
|
+
/** Whether to show a link to the actions documentation */
|
|
241
|
+
actions?: boolean;
|
|
242
|
+
/** Whether to show a link to the tasks page */
|
|
243
|
+
tasks?: boolean;
|
|
244
|
+
};
|
|
234
245
|
};
|
|
235
246
|
|
|
236
247
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { I as EntityNamePickerFieldExtension, H as EntityPickerFieldExtension, V as EntityPickerFieldSchema, J as EntityTagsPickerFieldExtension, Z as EntityTagsPickerFieldSchema, Q as NextScaffolderPage, L as OwnedEntityPickerFieldExtension, Y as OwnedEntityPickerFieldSchema, K as OwnerPickerFieldExtension, W as OwnerPickerFieldSchema, M as RepoUrlPickerFieldExtension, X as RepoUrlPickerFieldSchema, S as ScaffolderClient, a0 as ScaffolderFieldExtensions, a4 as ScaffolderLayouts, N as ScaffolderPage, h as TaskPage, T as TemplateTypePicker, $ as createScaffolderFieldExtension, a3 as createScaffolderLayout, U as makeFieldSchemaFromZod, z as nextRouteRef, B as nextScaffolderTaskRouteRef, y as nextSelectedTemplateRouteRef, p as repoPickerValidation, _ as rootRouteRef, a2 as scaffolderApiRef, P as scaffolderPlugin, a1 as useTemplateSecrets } from './esm/index-02b0e824.esm.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-router-dom';
|
|
4
4
|
import '@backstage/core-components';
|
|
@@ -27,23 +27,42 @@ import '@material-ui/core/FormHelperText';
|
|
|
27
27
|
import '@material-ui/core/Input';
|
|
28
28
|
import '@material-ui/core/InputLabel';
|
|
29
29
|
import 'react-use/lib/useDebounce';
|
|
30
|
+
import 'luxon';
|
|
31
|
+
import 'humanize-duration';
|
|
32
|
+
import '@material-ui/core/Typography';
|
|
30
33
|
import '@backstage/errors';
|
|
31
34
|
import 'qs';
|
|
32
35
|
import 'zen-observable';
|
|
33
36
|
import 'zod';
|
|
34
37
|
import 'zod-to-json-schema';
|
|
38
|
+
import '@material-ui/core/ListItemIcon';
|
|
39
|
+
import '@material-ui/core/ListItemText';
|
|
40
|
+
import '@material-ui/core/MenuItem';
|
|
41
|
+
import '@material-ui/core/MenuList';
|
|
42
|
+
import '@material-ui/core/Popover';
|
|
43
|
+
import '@material-ui/core/styles';
|
|
44
|
+
import '@material-ui/icons/Description';
|
|
45
|
+
import '@material-ui/icons/Edit';
|
|
46
|
+
import '@material-ui/icons/List';
|
|
47
|
+
import '@material-ui/icons/MoreVert';
|
|
48
|
+
import 'use-immer';
|
|
49
|
+
import '@material-ui/icons/RemoveCircleOutline';
|
|
50
|
+
import '@material-ui/icons/PanoramaFishEye';
|
|
51
|
+
import 'classnames';
|
|
52
|
+
import '@material-ui/icons/CheckCircleOutline';
|
|
53
|
+
import '@material-ui/icons/ErrorOutline';
|
|
54
|
+
import 'react-use/lib/useInterval';
|
|
55
|
+
import '@react-hookz/web';
|
|
56
|
+
import '@material-ui/icons/Repeat';
|
|
57
|
+
import '@material-ui/icons/Toc';
|
|
58
|
+
import '@material-ui/icons/Settings';
|
|
59
|
+
import '@material-ui/icons/FontDownload';
|
|
35
60
|
import '@material-ui/core/Grid';
|
|
36
61
|
import '@material-ui/core/Step';
|
|
37
62
|
import '@material-ui/core/StepLabel';
|
|
38
63
|
import '@material-ui/core/Stepper';
|
|
39
|
-
import '@material-ui/core/styles';
|
|
40
|
-
import '@material-ui/core/Typography';
|
|
41
64
|
import '@material-ui/icons/Cancel';
|
|
42
65
|
import '@material-ui/icons/Check';
|
|
43
66
|
import '@material-ui/icons/FiberManualRecord';
|
|
44
|
-
import 'classnames';
|
|
45
|
-
import 'luxon';
|
|
46
|
-
import 'react-use/lib/useInterval';
|
|
47
|
-
import 'use-immer';
|
|
48
67
|
import '@material-ui/icons/Language';
|
|
49
68
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder",
|
|
3
3
|
"description": "The Backstage plugin that helps you create new things",
|
|
4
|
-
"version": "1.11.0-next.
|
|
4
|
+
"version": "1.11.0-next.2",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"clean": "backstage-cli package clean"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@backstage/catalog-client": "^1.3.1-next.
|
|
37
|
-
"@backstage/catalog-model": "^1.
|
|
36
|
+
"@backstage/catalog-client": "^1.3.1-next.1",
|
|
37
|
+
"@backstage/catalog-model": "^1.2.0-next.1",
|
|
38
38
|
"@backstage/config": "^1.0.6",
|
|
39
|
-
"@backstage/core-components": "^0.12.
|
|
39
|
+
"@backstage/core-components": "^0.12.4-next.1",
|
|
40
40
|
"@backstage/core-plugin-api": "^1.3.0",
|
|
41
41
|
"@backstage/errors": "^1.1.4",
|
|
42
42
|
"@backstage/integration": "^1.4.2",
|
|
43
|
-
"@backstage/integration-react": "^1.1.
|
|
44
|
-
"@backstage/plugin-catalog-common": "^1.0.11-next.
|
|
45
|
-
"@backstage/plugin-catalog-react": "^1.3.0-next.
|
|
43
|
+
"@backstage/integration-react": "^1.1.10-next.1",
|
|
44
|
+
"@backstage/plugin-catalog-common": "^1.0.11-next.1",
|
|
45
|
+
"@backstage/plugin-catalog-react": "^1.3.0-next.2",
|
|
46
46
|
"@backstage/plugin-permission-react": "^0.4.9",
|
|
47
|
-
"@backstage/plugin-scaffolder-common": "^1.2.5-next.
|
|
48
|
-
"@backstage/plugin-scaffolder-react": "^1.1.0-next.
|
|
47
|
+
"@backstage/plugin-scaffolder-common": "^1.2.5-next.1",
|
|
48
|
+
"@backstage/plugin-scaffolder-react": "^1.1.0-next.2",
|
|
49
49
|
"@backstage/theme": "^0.2.16",
|
|
50
50
|
"@backstage/types": "^1.0.2",
|
|
51
51
|
"@codemirror/language": "^6.0.0",
|
|
@@ -56,9 +56,8 @@
|
|
|
56
56
|
"@material-ui/lab": "4.0.0-alpha.57",
|
|
57
57
|
"@react-hookz/web": "^20.0.0",
|
|
58
58
|
"@rjsf/core": "^3.2.1",
|
|
59
|
-
"@rjsf/core-v5": "npm:@rjsf/core@5.0.0-beta.16",
|
|
60
59
|
"@rjsf/material-ui": "^3.2.1",
|
|
61
|
-
"@rjsf/utils": "5.
|
|
60
|
+
"@rjsf/utils": "5.1.0",
|
|
62
61
|
"@uiw/react-codemirror": "^4.9.3",
|
|
63
62
|
"classnames": "^2.2.6",
|
|
64
63
|
"git-url-parse": "^13.0.0",
|
|
@@ -82,11 +81,11 @@
|
|
|
82
81
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
83
82
|
},
|
|
84
83
|
"devDependencies": {
|
|
85
|
-
"@backstage/cli": "^0.22.1",
|
|
86
|
-
"@backstage/core-app-api": "^1.4.0",
|
|
87
|
-
"@backstage/dev-utils": "^1.0.12-next.
|
|
88
|
-
"@backstage/plugin-catalog": "^1.
|
|
89
|
-
"@backstage/test-utils": "^1.2.
|
|
84
|
+
"@backstage/cli": "^0.22.2-next.1",
|
|
85
|
+
"@backstage/core-app-api": "^1.4.1-next.0",
|
|
86
|
+
"@backstage/dev-utils": "^1.0.12-next.2",
|
|
87
|
+
"@backstage/plugin-catalog": "^1.8.0-next.2",
|
|
88
|
+
"@backstage/test-utils": "^1.2.5-next.0",
|
|
90
89
|
"@testing-library/jest-dom": "^5.10.1",
|
|
91
90
|
"@testing-library/react": "^12.1.3",
|
|
92
91
|
"@testing-library/react-hooks": "^8.0.0",
|