@backstage/plugin-scaffolder 1.0.0 → 1.0.1-next.0

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.
@@ -0,0 +1,336 @@
1
+ import React, { createContext, useState } from 'react';
2
+ import { useOutlet, Routes, Route } from 'react-router';
3
+ import { Progress, ItemCardHeader, MarkdownContent, UserIcon, Button as Button$1, Content, Link as Link$1, ItemCardGrid, ContentHeader, Page, Header, SupportButton } from '@backstage/core-components';
4
+ import { useEntityTypeFilter, FavoriteEntity, getEntityRelations, EntityRefLinks, useEntityList, EntityListProvider, CatalogFilterLayout, EntitySearchBar, EntityKindPicker, UserListPicker, EntityTagPicker } from '@backstage/plugin-catalog-react';
5
+ import capitalize from 'lodash/capitalize';
6
+ import { Box, Typography, FormControlLabel, Checkbox, TextField, makeStyles, useTheme, Card, CardContent, Divider, Chip, CardActions } from '@material-ui/core';
7
+ import CheckBoxIcon from '@material-ui/icons/CheckBox';
8
+ import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';
9
+ import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
10
+ import { Autocomplete } from '@material-ui/lab';
11
+ import { useApi, alertApiRef, useRouteRef, errorApiRef, useElementFilter } from '@backstage/core-plugin-api';
12
+ import Button from '@material-ui/core/Button';
13
+ import IconButton from '@material-ui/core/IconButton';
14
+ import useMediaQuery from '@material-ui/core/useMediaQuery';
15
+ import { Link } from 'react-router-dom';
16
+ import AddCircleOutline from '@material-ui/icons/AddCircleOutline';
17
+ import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common';
18
+ import { usePermission } from '@backstage/plugin-permission-react';
19
+ import { s as selectedTemplateRouteRef, r as registerComponentRouteRef, F as FIELD_EXTENSION_WRAPPER_KEY, d as FIELD_EXTENSION_KEY } from './index-d7094787.esm.js';
20
+ import { RELATION_OWNED_BY, stringifyEntityRef } from '@backstage/catalog-model';
21
+ import { D as DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS } from './default-ae106e61.esm.js';
22
+ import '@backstage/errors';
23
+ import 'qs';
24
+ import 'zen-observable';
25
+ import '@material-ui/core/FormControl';
26
+ import '@material-ui/lab/Autocomplete';
27
+ import 'react-use/lib/useAsync';
28
+ import 'react-use/lib/useEffectOnce';
29
+ import '@backstage/integration-react';
30
+ import '@material-ui/core/FormHelperText';
31
+ import '@material-ui/core/Input';
32
+ import '@material-ui/core/InputLabel';
33
+ import 'react-use/lib/useDebounce';
34
+ import '@material-ui/core/Grid';
35
+ import '@material-ui/core/Step';
36
+ import '@material-ui/core/StepLabel';
37
+ import '@material-ui/core/Stepper';
38
+ import '@material-ui/core/styles';
39
+ import '@material-ui/core/Typography';
40
+ import '@material-ui/icons/Cancel';
41
+ import '@material-ui/icons/Check';
42
+ import '@material-ui/icons/FiberManualRecord';
43
+ import 'classnames';
44
+ import 'luxon';
45
+ import 'react-use/lib/useInterval';
46
+ import 'use-immer';
47
+ import '@material-ui/icons/Language';
48
+
49
+ const icon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, {
50
+ fontSize: "small"
51
+ });
52
+ const checkedIcon = /* @__PURE__ */ React.createElement(CheckBoxIcon, {
53
+ fontSize: "small"
54
+ });
55
+ const CategoryPicker = () => {
56
+ const alertApi = useApi(alertApiRef);
57
+ const { error, loading, availableTypes, selectedTypes, setSelectedTypes } = useEntityTypeFilter();
58
+ if (loading)
59
+ return /* @__PURE__ */ React.createElement(Progress, null);
60
+ if (error) {
61
+ alertApi.post({
62
+ message: `Failed to load entity types with error: ${error}`,
63
+ severity: "error"
64
+ });
65
+ return null;
66
+ }
67
+ if (!availableTypes)
68
+ return null;
69
+ return /* @__PURE__ */ React.createElement(Box, {
70
+ pb: 1,
71
+ pt: 1
72
+ }, /* @__PURE__ */ React.createElement(Typography, {
73
+ variant: "button"
74
+ }, "Categories"), /* @__PURE__ */ React.createElement(Autocomplete, {
75
+ multiple: true,
76
+ "aria-label": "Categories",
77
+ options: availableTypes,
78
+ value: selectedTypes,
79
+ onChange: (_, value) => setSelectedTypes(value),
80
+ renderOption: (option, { selected }) => /* @__PURE__ */ React.createElement(FormControlLabel, {
81
+ control: /* @__PURE__ */ React.createElement(Checkbox, {
82
+ icon,
83
+ checkedIcon,
84
+ checked: selected
85
+ }),
86
+ label: capitalize(option)
87
+ }),
88
+ size: "small",
89
+ popupIcon: /* @__PURE__ */ React.createElement(ExpandMoreIcon, null),
90
+ renderInput: (params) => /* @__PURE__ */ React.createElement(TextField, {
91
+ ...params,
92
+ variant: "outlined"
93
+ })
94
+ }));
95
+ };
96
+
97
+ const RegisterExistingButton = (props) => {
98
+ const { title, to } = props;
99
+ const { allowed } = usePermission(catalogEntityCreatePermission);
100
+ const isXSScreen = useMediaQuery((theme) => theme.breakpoints.down("xs"));
101
+ if (!to || !allowed) {
102
+ return null;
103
+ }
104
+ return isXSScreen ? /* @__PURE__ */ React.createElement(IconButton, {
105
+ component: Link,
106
+ color: "primary",
107
+ title,
108
+ size: "small",
109
+ to
110
+ }, /* @__PURE__ */ React.createElement(AddCircleOutline, null)) : /* @__PURE__ */ React.createElement(Button, {
111
+ component: Link,
112
+ variant: "contained",
113
+ color: "primary",
114
+ to
115
+ }, title);
116
+ };
117
+
118
+ const useStyles$1 = makeStyles(() => ({
119
+ header: {
120
+ backgroundImage: ({ cardBackgroundImage }) => cardBackgroundImage
121
+ },
122
+ subtitleWrapper: {
123
+ display: "flex",
124
+ justifyContent: "space-between"
125
+ }
126
+ }));
127
+ const CardHeader = (props) => {
128
+ const {
129
+ template: {
130
+ metadata: { title, name },
131
+ spec: { type }
132
+ }
133
+ } = props;
134
+ const { getPageTheme } = useTheme();
135
+ const themeForType = getPageTheme({ themeId: type });
136
+ const styles = useStyles$1({
137
+ cardBackgroundImage: themeForType.backgroundImage
138
+ });
139
+ const SubtitleComponent = /* @__PURE__ */ React.createElement("div", {
140
+ className: styles.subtitleWrapper
141
+ }, /* @__PURE__ */ React.createElement("div", null, type), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(FavoriteEntity, {
142
+ entity: props.template,
143
+ style: { padding: 0 }
144
+ })));
145
+ return /* @__PURE__ */ React.createElement(ItemCardHeader, {
146
+ title: title != null ? title : name,
147
+ subtitle: SubtitleComponent,
148
+ classes: { root: styles.header }
149
+ });
150
+ };
151
+
152
+ const useStyles = makeStyles((theme) => ({
153
+ box: {
154
+ overflow: "hidden",
155
+ textOverflow: "ellipsis",
156
+ display: "-webkit-box",
157
+ "-webkit-line-clamp": 10,
158
+ "-webkit-box-orient": "vertical",
159
+ "& p:first-child": {
160
+ marginTop: 0,
161
+ marginBottom: theme.spacing(2)
162
+ }
163
+ },
164
+ label: {
165
+ color: theme.palette.text.secondary,
166
+ textTransform: "uppercase",
167
+ fontWeight: "bold",
168
+ letterSpacing: 0.5,
169
+ lineHeight: 1,
170
+ fontSize: "0.75rem"
171
+ },
172
+ margin: {
173
+ marginBottom: theme.spacing(2)
174
+ },
175
+ footer: {
176
+ display: "flex",
177
+ justifyContent: "space-between",
178
+ flex: 1,
179
+ alignItems: "center"
180
+ },
181
+ ownedBy: {
182
+ display: "flex",
183
+ alignItems: "center",
184
+ flex: 1,
185
+ color: theme.palette.link
186
+ }
187
+ }));
188
+ const TemplateCard = (props) => {
189
+ var _a, _b, _c, _d;
190
+ const { template } = props;
191
+ const styles = useStyles();
192
+ const ownedByRelations = getEntityRelations(template, RELATION_OWNED_BY);
193
+ const templateRoute = useRouteRef(selectedTemplateRouteRef);
194
+ const href = templateRoute({ templateName: template.metadata.name });
195
+ return /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardHeader, {
196
+ template
197
+ }), /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement(Box, {
198
+ className: styles.box
199
+ }, /* @__PURE__ */ React.createElement(MarkdownContent, {
200
+ content: (_a = template.metadata.description) != null ? _a : "No description"
201
+ })), ((_c = (_b = template.metadata.tags) == null ? void 0 : _b.length) != null ? _c : 0) > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Divider, {
202
+ className: styles.margin
203
+ }), /* @__PURE__ */ React.createElement(Box, null, (_d = template.metadata.tags) == null ? void 0 : _d.map((tag) => /* @__PURE__ */ React.createElement(Chip, {
204
+ size: "small",
205
+ label: tag,
206
+ key: tag
207
+ }))))), /* @__PURE__ */ React.createElement(CardActions, null, /* @__PURE__ */ React.createElement("div", {
208
+ className: styles.footer
209
+ }, /* @__PURE__ */ React.createElement("div", {
210
+ className: styles.ownedBy
211
+ }, ownedByRelations.length > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(UserIcon, null), /* @__PURE__ */ React.createElement(EntityRefLinks, {
212
+ entityRefs: ownedByRelations,
213
+ defaultKind: "Group"
214
+ }))), /* @__PURE__ */ React.createElement(Button$1, {
215
+ size: "small",
216
+ variant: "outlined",
217
+ color: "primary",
218
+ to: href
219
+ }, "Choose"))));
220
+ };
221
+
222
+ const TemplateGroup = (props) => {
223
+ const { templates, title, components: { CardComponent } = {} } = props;
224
+ const titleComponent = typeof title === "string" ? /* @__PURE__ */ React.createElement(ContentHeader, {
225
+ title
226
+ }) : title;
227
+ if (templates.length === 0) {
228
+ return /* @__PURE__ */ React.createElement(Content, null, titleComponent, /* @__PURE__ */ React.createElement(Typography, {
229
+ variant: "body2"
230
+ }, "No templates found that match your filter. Learn more about", " ", /* @__PURE__ */ React.createElement(Link$1, {
231
+ to: "https://backstage.io/docs/features/software-templates/adding-templates"
232
+ }, "adding templates"), "."));
233
+ }
234
+ const Card = CardComponent || TemplateCard;
235
+ return /* @__PURE__ */ React.createElement(Content, null, titleComponent, /* @__PURE__ */ React.createElement(ItemCardGrid, null, templates.map((template) => /* @__PURE__ */ React.createElement(Card, {
236
+ key: stringifyEntityRef(template),
237
+ template
238
+ }))));
239
+ };
240
+
241
+ const TemplateGroups = (props) => {
242
+ const { loading, error, entities } = useEntityList();
243
+ const { groups, TemplateCardComponent } = props;
244
+ const errorApi = useApi(errorApiRef);
245
+ if (loading) {
246
+ return /* @__PURE__ */ React.createElement(Progress, null);
247
+ }
248
+ if (error) {
249
+ errorApi.post(error);
250
+ return null;
251
+ }
252
+ if (!entities || !entities.length) {
253
+ return /* @__PURE__ */ React.createElement(Typography, {
254
+ variant: "body2"
255
+ }, "No templates found that match your filter. Learn more about", " ", /* @__PURE__ */ React.createElement(Link$1, {
256
+ to: "https://backstage.io/docs/features/software-templates/adding-templates"
257
+ }, "adding templates"), ".");
258
+ }
259
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, groups.map(({ title, filter }, index) => /* @__PURE__ */ React.createElement(TemplateGroup, {
260
+ key: index,
261
+ templates: entities.filter((e) => filter(e)),
262
+ title,
263
+ components: { CardComponent: TemplateCardComponent }
264
+ })));
265
+ };
266
+
267
+ const defaultGroup = {
268
+ title: "All Templates",
269
+ filter: () => true
270
+ };
271
+ const TemplateListPage = (props) => {
272
+ const registerComponentLink = useRouteRef(registerComponentRouteRef);
273
+ const { TemplateCardComponent, groups = [defaultGroup] } = props;
274
+ return /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(Page, {
275
+ themeId: "home"
276
+ }, /* @__PURE__ */ React.createElement(Header, {
277
+ pageTitleOverride: "Create a New Component",
278
+ title: "Create a New Component",
279
+ subtitle: "Create new software components using standard templates"
280
+ }), /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, {
281
+ title: "Available Templates"
282
+ }, /* @__PURE__ */ React.createElement(RegisterExistingButton, {
283
+ title: "Register Existing Component",
284
+ to: registerComponentLink && registerComponentLink()
285
+ }), /* @__PURE__ */ React.createElement(SupportButton, null, "Create new software components using standard templates. Different templates create different kinds of components (services, websites, documentation, ...).")), /* @__PURE__ */ React.createElement(CatalogFilterLayout, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout.Filters, null, /* @__PURE__ */ React.createElement(EntitySearchBar, null), /* @__PURE__ */ React.createElement(EntityKindPicker, {
286
+ initialFilter: "template",
287
+ hidden: true
288
+ }), /* @__PURE__ */ React.createElement(UserListPicker, {
289
+ initialFilter: "all",
290
+ availableFilters: ["all", "starred"]
291
+ }), /* @__PURE__ */ React.createElement(CategoryPicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null)), /* @__PURE__ */ React.createElement(CatalogFilterLayout.Content, null, /* @__PURE__ */ React.createElement(TemplateGroups, {
292
+ groups,
293
+ TemplateCardComponent
294
+ }))))));
295
+ };
296
+
297
+ const SecretsContext = createContext(void 0);
298
+ const SecretsContextProvider = ({ children }) => {
299
+ const [secrets, setSecrets] = useState({});
300
+ return /* @__PURE__ */ React.createElement(SecretsContext.Provider, {
301
+ value: { secrets, setSecrets }
302
+ }, children);
303
+ };
304
+
305
+ const TemplateWizardPage = (_props) => {
306
+ return null;
307
+ };
308
+
309
+ const Router = (props) => {
310
+ const { components: { TemplateCardComponent } = {} } = props;
311
+ const outlet = useOutlet() || props.children;
312
+ const customFieldExtensions = useElementFilter(outlet, (elements) => elements.selectByComponentData({
313
+ key: FIELD_EXTENSION_WRAPPER_KEY
314
+ }).findComponentData({
315
+ key: FIELD_EXTENSION_KEY
316
+ }));
317
+ const fieldExtensions = [
318
+ ...customFieldExtensions,
319
+ ...DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS.filter(({ name }) => !customFieldExtensions.some((customFieldExtension) => customFieldExtension.name === name))
320
+ ];
321
+ return /* @__PURE__ */ React.createElement(Routes, null, /* @__PURE__ */ React.createElement(Route, {
322
+ path: "/",
323
+ element: /* @__PURE__ */ React.createElement(TemplateListPage, {
324
+ TemplateCardComponent,
325
+ groups: props.groups
326
+ })
327
+ }), /* @__PURE__ */ React.createElement(Route, {
328
+ path: "/templates/:templateName",
329
+ element: /* @__PURE__ */ React.createElement(SecretsContextProvider, null, /* @__PURE__ */ React.createElement(TemplateWizardPage, {
330
+ customFieldExtensions: fieldExtensions
331
+ }))
332
+ }));
333
+ };
334
+
335
+ export { Router };
336
+ //# sourceMappingURL=index-284296f7.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-284296f7.esm.js","sources":["../../src/next/TemplateListPage/CategoryPicker.tsx","../../src/next/TemplateListPage/RegisterExistingButton.tsx","../../src/next/TemplateListPage/TemplateCard/CardHeader.tsx","../../src/next/TemplateListPage/TemplateCard/TemplateCard.tsx","../../src/next/TemplateListPage/TemplateGroup.tsx","../../src/next/TemplateListPage/TemplateGroups.tsx","../../src/next/TemplateListPage/TemplateListPage.tsx","../../src/next/TemplateWizardPage/SecretsContext/SecretsContext.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(catalogEntityCreatePermission);\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 */\n\nimport React from 'react';\nimport { makeStyles, useTheme } from '@material-ui/core';\nimport { ItemCardHeader } from '@backstage/core-components';\nimport { BackstageTheme } from '@backstage/theme';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { FavoriteEntity } from '@backstage/plugin-catalog-react';\n\nconst useStyles = makeStyles<BackstageTheme, { cardBackgroundImage: string }>(\n () => ({\n header: {\n backgroundImage: ({ cardBackgroundImage }) => cardBackgroundImage,\n },\n subtitleWrapper: {\n display: 'flex',\n justifyContent: 'space-between',\n },\n }),\n);\n\n/**\n * Props for the CardHeader component\n */\nexport interface CardHeaderProps {\n template: TemplateEntityV1beta3;\n}\n\n/**\n * The Card Header with the background for the TemplateCard.\n */\nexport const CardHeader = (props: CardHeaderProps) => {\n const {\n template: {\n metadata: { title, name },\n spec: { type },\n },\n } = props;\n const { getPageTheme } = useTheme<BackstageTheme>();\n const themeForType = getPageTheme({ themeId: type });\n\n const styles = useStyles({\n cardBackgroundImage: themeForType.backgroundImage,\n });\n\n const SubtitleComponent = (\n <div className={styles.subtitleWrapper}>\n <div>{type}</div>\n <div>\n <FavoriteEntity entity={props.template} style={{ padding: 0 }} />\n </div>\n </div>\n );\n\n return (\n <ItemCardHeader\n title={title ?? name}\n subtitle={SubtitleComponent}\n classes={{ root: styles.header }}\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 */\nimport React from 'react';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport {\n Box,\n Card,\n CardActions,\n CardContent,\n Chip,\n Divider,\n makeStyles,\n} from '@material-ui/core';\nimport { CardHeader } from './CardHeader';\nimport { MarkdownContent, UserIcon, Button } from '@backstage/core-components';\nimport { RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n getEntityRelations,\n} from '@backstage/plugin-catalog-react';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { selectedTemplateRouteRef } from '../../../routes';\nimport { BackstageTheme } from '@backstage/theme';\n\nconst useStyles = makeStyles<BackstageTheme>(theme => ({\n box: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n '-webkit-line-clamp': 10,\n '-webkit-box-orient': 'vertical',\n /** to make the styles for React Markdown not leak into the description */\n '& p:first-child': {\n marginTop: 0,\n marginBottom: theme.spacing(2),\n },\n },\n label: {\n color: theme.palette.text.secondary,\n textTransform: 'uppercase',\n fontWeight: 'bold',\n letterSpacing: 0.5,\n lineHeight: 1,\n fontSize: '0.75rem',\n },\n margin: {\n marginBottom: theme.spacing(2),\n },\n footer: {\n display: 'flex',\n justifyContent: 'space-between',\n flex: 1,\n alignItems: 'center',\n },\n ownedBy: {\n display: 'flex',\n alignItems: 'center',\n flex: 1,\n color: theme.palette.link,\n },\n}));\n\n/**\n * The Props for the Template Card component\n * @alpha\n */\nexport interface TemplateCardProps {\n template: TemplateEntityV1beta3;\n deprecated?: boolean;\n}\n\n/**\n * The Template Card component that is rendered in a list for each template\n * @alpha\n */\nexport const TemplateCard = (props: TemplateCardProps) => {\n const { template } = props;\n const styles = useStyles();\n const ownedByRelations = getEntityRelations(template, RELATION_OWNED_BY);\n const templateRoute = useRouteRef(selectedTemplateRouteRef);\n const href = templateRoute({ templateName: template.metadata.name });\n\n return (\n <Card>\n <CardHeader template={template} />\n <CardContent>\n <Box className={styles.box}>\n <MarkdownContent\n content={template.metadata.description ?? 'No description'}\n />\n </Box>\n {(template.metadata.tags?.length ?? 0) > 0 && (\n <>\n <Divider className={styles.margin} />\n <Box>\n {template.metadata.tags?.map(tag => (\n <Chip size=\"small\" label={tag} key={tag} />\n ))}\n </Box>\n </>\n )}\n </CardContent>\n <CardActions>\n <div className={styles.footer}>\n <div className={styles.ownedBy}>\n {ownedByRelations.length > 0 && (\n <>\n <UserIcon />\n <EntityRefLinks\n entityRefs={ownedByRelations}\n defaultKind=\"Group\"\n />\n </>\n )}\n </div>\n <Button size=\"small\" variant=\"outlined\" color=\"primary\" to={href}>\n Choose\n </Button>\n </div>\n </CardActions>\n </Card>\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 { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport React from 'react';\nimport {\n Content,\n ContentHeader,\n ItemCardGrid,\n Link,\n} from '@backstage/core-components';\nimport { Typography } from '@material-ui/core';\nimport { TemplateCard, TemplateCardProps } from './TemplateCard';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nexport interface TemplateGroupProps {\n templates: TemplateEntityV1beta3[];\n title: React.ReactNode;\n components?: {\n CardComponent?: React.ComponentType<TemplateCardProps>;\n };\n}\n\nexport const TemplateGroup = (props: TemplateGroupProps) => {\n const { templates, title, components: { CardComponent } = {} } = props;\n const titleComponent =\n typeof title === 'string' ? <ContentHeader title={title} /> : title;\n\n if (templates.length === 0) {\n return (\n <Content>\n {titleComponent}\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 </Content>\n );\n }\n\n const Card = CardComponent || TemplateCard;\n\n return (\n <Content>\n {titleComponent}\n <ItemCardGrid>\n {templates.map(template => (\n <Card key={stringifyEntityRef(template)} template={template} />\n ))}\n </ItemCardGrid>\n </Content>\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 { TemplateGroup } from './TemplateGroup';\nimport { Entity } from '@backstage/catalog-model';\nimport { useEntityList } from '@backstage/plugin-catalog-react';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { Progress, Link } from '@backstage/core-components';\nimport { Typography } from '@material-ui/core';\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\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\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 <TemplateGroup\n key={index}\n templates={entities.filter((e): e is TemplateEntityV1beta3 =>\n filter(e),\n )}\n title={title}\n components={{ CardComponent: TemplateCardComponent }}\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 { registerComponentRouteRef } from '../../routes';\nimport { TemplateGroupFilter, TemplateGroups } from './TemplateGroups';\n\nexport type TemplateListPageProps = {\n TemplateCardComponent?: React.ComponentType<{\n template: TemplateEntityV1beta3;\n }>;\n groups?: TemplateGroupFilter[];\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 = [defaultGroup] } = props;\n\n return (\n <EntityListProvider>\n <Page themeId=\"home\">\n <Header\n pageTitleOverride=\"Create a New Component\"\n title=\"Create a New Component\"\n subtitle=\"Create new software components using standard templates\"\n />\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}\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, {\n useState,\n useCallback,\n useContext,\n createContext,\n PropsWithChildren,\n} from 'react';\n\ntype SecretsContextContents = {\n secrets: Record<string, string>;\n setSecrets: React.Dispatch<React.SetStateAction<Record<string, string>>>;\n};\n\n/**\n * The actual context object.\n */\nexport const SecretsContext = createContext<SecretsContextContents | undefined>(\n undefined,\n);\n\n/**\n * The Context Provider that holds the state for the secrets.\n *\n * @alpha\n */\nexport const SecretsContextProvider = ({ children }: PropsWithChildren<{}>) => {\n const [secrets, setSecrets] = useState<Record<string, string>>({});\n\n return (\n <SecretsContext.Provider value={{ secrets, setSecrets }}>\n {children}\n </SecretsContext.Provider>\n );\n};\n\n/**\n * Hook to access the secrets context.\n * @alpha\n */\nexport const useTemplateSecrets = () => {\n const value = useContext(SecretsContext);\n if (!value) {\n throw new Error(\n 'useTemplateSecrets must be used within a SecretsContextProvider',\n );\n }\n\n const { setSecrets } = value;\n\n const setSecret = useCallback(\n (input: Record<string, string>) => {\n setSecrets(currentSecrets => ({ ...currentSecrets, ...input }));\n },\n [setSecrets],\n );\n\n return { setSecret };\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 { FieldExtensionOptions } from '../../extensions';\n\nexport interface TemplateWizardPageProps {\n customFieldExtensions: FieldExtensionOptions<any, any>[];\n}\n\nexport const TemplateWizardPage = (_props: TemplateWizardPageProps) => {\n return null;\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';\nimport { TemplateListPage } from '../TemplateListPage';\nimport { SecretsContextProvider } from '../TemplateWizardPage/SecretsContext';\nimport { TemplateWizardPage } from '../TemplateWizardPage';\nimport {\n FieldExtensionOptions,\n FIELD_EXTENSION_WRAPPER_KEY,\n FIELD_EXTENSION_KEY,\n DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS,\n} from '../../extensions';\n\nimport { useElementFilter } from '@backstage/core-plugin-api';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { TemplateGroupFilter } from '../TemplateListPage/TemplateGroups';\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 };\n groups?: TemplateGroupFilter[];\n};\n\n/**\n * The Scaffolder Router\n *\n * @alpha\n */\nexport const Router = (props: PropsWithChildren<NextRouterProps>) => {\n const { components: { TemplateCardComponent } = {} } = props;\n\n const outlet = useOutlet() || props.children;\n\n const customFieldExtensions = useElementFilter(outlet, elements =>\n elements\n .selectByComponentData({\n key: FIELD_EXTENSION_WRAPPER_KEY,\n })\n .findComponentData<FieldExtensionOptions>({\n key: FIELD_EXTENSION_KEY,\n }),\n );\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 ];\n\n return (\n <Routes>\n <Route\n path=\"/\"\n element={\n <TemplateListPage\n TemplateCardComponent={TemplateCardComponent}\n groups={props.groups}\n />\n }\n />\n\n <Route\n path=\"/templates/:templateName\"\n element={\n <SecretsContextProvider>\n <TemplateWizardPage customFieldExtensions={fieldExtensions} />\n </SecretsContextProvider>\n }\n />\n </Routes>\n );\n};\n"],"names":["RouterLink","useStyles","Button","Link"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,uBAAQ,KAAA,CAAA,aAAA,CAAA,wBAAA,EAAA;AAAA,EAAyB,QAAS,EAAA,OAAA;AAAA,CAAQ,CAAA,CAAA;AACxD,MAAM,8BAAe,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA;AAAA,EAAa,QAAS,EAAA,OAAA;AAAA,CAAQ,CAAA,CAAA;AAM5C,MAAM,iBAAiB,MAAM;AAClC,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA,CAAA;AACnC,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,cAAgB,EAAA,aAAA,EAAe,qBACrD,mBAAoB,EAAA,CAAA;AAEtB,EAAI,IAAA,OAAA;AAAS,IAAA,2CAAQ,QAAS,EAAA,IAAA,CAAA,CAAA;AAE9B,EAAA,IAAI,KAAO,EAAA;AACT,IAAA,QAAA,CAAS,IAAK,CAAA;AAAA,MACZ,SAAS,CAA2C,wCAAA,EAAA,KAAA,CAAA,CAAA;AAAA,MACpD,QAAU,EAAA,OAAA;AAAA,KACX,CAAA,CAAA;AACD,IAAO,OAAA,IAAA,CAAA;AAAA,GACT;AAEA,EAAA,IAAI,CAAC,cAAA;AAAgB,IAAO,OAAA,IAAA,CAAA;AAE5B,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA;AAAA,IAAI,EAAI,EAAA,CAAA;AAAA,IAAG,EAAI,EAAA,CAAA;AAAA,GAAA,kBACb,KAAA,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AkB,GAAA;AAAA,IACtB,GAAG,qBAAA;AAAA,IACH,GAAG,mCAAA,CAAoC,MACrC,CAAA,CAAC,EAAE,IAAA,EAAA,KACD,CAAC,qBAAA,CAAsB,IACrB,CAAA,CAAA,oBAAA,KAAwB,oBAAqB,CAAA,IAAA,KAAS,IACxD,CACJ,CAAA;AAAA,GACF,CAAA;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,8BACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IACC,IAAK,EAAA,GAAA;AAAA,IACL,yBACG,KAAA,CAAA,aAAA,CAAA,gBAAA,EAAA;AAAA,MACC,qBAAA;AAAA,MACA,QAAQ,KAAM,CAAA,MAAA;AAAA,KAChB,CAAA;AAAA,GAEJ,mBAEC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IACC,IAAK,EAAA,0BAAA;AAAA,IACL,OAAA,kBACG,KAAA,CAAA,aAAA,CAAA,sBAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA;AAAA,MAAmB,qBAAuB,EAAA,eAAA;AAAA,KAAiB,CAC9D,CAAA;AAAA,GAEJ,CACF,CAAA,CAAA;AAEJ;;;;"}
@@ -839,7 +839,7 @@ const OwnerPickerFieldExtension = scaffolderPlugin.provide(createScaffolderField
839
839
  }));
840
840
  const ScaffolderPage = scaffolderPlugin.provide(createRoutableExtension({
841
841
  name: "ScaffolderPage",
842
- component: () => import('./Router-773d053b.esm.js').then((m) => m.Router),
842
+ component: () => import('./Router-6d65a0e4.esm.js').then((m) => m.Router),
843
843
  mountPoint: rootRouteRef
844
844
  }));
845
845
  const OwnedEntityPickerFieldExtension = scaffolderPlugin.provide(createScaffolderFieldExtension({
@@ -850,6 +850,11 @@ const EntityTagsPickerFieldExtension = scaffolderPlugin.provide(createScaffolder
850
850
  component: EntityTagsPicker,
851
851
  name: "EntityTagsPicker"
852
852
  }));
853
+ const NextScaffolderPage = scaffolderPlugin.provide(createRoutableExtension({
854
+ name: "NextScaffolderPage",
855
+ component: () => import('./index-284296f7.esm.js').then((m) => m.Router),
856
+ mountPoint: rootRouteRef
857
+ }));
853
858
 
854
859
  const icon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, {
855
860
  fontSize: "small"
@@ -1287,5 +1292,5 @@ const TaskPage = ({ loadingText }) => {
1287
1292
  })))))));
1288
1293
  };
1289
1294
 
1290
- export { EntityPicker as E, FIELD_EXTENSION_WRAPPER_KEY as F, OwnerPicker as O, RepoUrlPicker as R, SecretsContext as S, TemplateTypePicker as T, EntityNamePicker as a, EntityTagsPicker as b, OwnedEntityPicker as c, registerComponentRouteRef as d, entityNamePickerValidation as e, scaffolderApiRef as f, scaffolderTaskRouteRef as g, rootRouteRef as h, FIELD_EXTENSION_KEY as i, SecretsContextProvider as j, TaskPage as k, ScaffolderClient as l, createScaffolderFieldExtension as m, ScaffolderFieldExtensions as n, EntityPickerFieldExtension as o, EntityNamePickerFieldExtension as p, EntityTagsPickerFieldExtension as q, repoPickerValidation as r, selectedTemplateRouteRef as s, OwnerPickerFieldExtension as t, OwnedEntityPickerFieldExtension as u, RepoUrlPickerFieldExtension as v, ScaffolderPage as w, scaffolderPlugin as x, useTemplateSecrets as y };
1291
- //# sourceMappingURL=index-25fdb62e.esm.js.map
1295
+ export { EntityPicker as E, FIELD_EXTENSION_WRAPPER_KEY as F, NextScaffolderPage as N, OwnerPicker as O, RepoUrlPicker as R, SecretsContext as S, TemplateTypePicker as T, scaffolderApiRef as a, scaffolderTaskRouteRef as b, rootRouteRef as c, FIELD_EXTENSION_KEY as d, SecretsContextProvider as e, TaskPage as f, EntityNamePicker as g, entityNamePickerValidation as h, EntityTagsPicker as i, repoPickerValidation as j, OwnedEntityPicker as k, ScaffolderClient as l, createScaffolderFieldExtension as m, ScaffolderFieldExtensions as n, EntityPickerFieldExtension as o, EntityNamePickerFieldExtension as p, EntityTagsPickerFieldExtension as q, registerComponentRouteRef as r, selectedTemplateRouteRef as s, OwnerPickerFieldExtension as t, OwnedEntityPickerFieldExtension as u, RepoUrlPickerFieldExtension as v, ScaffolderPage as w, scaffolderPlugin as x, useTemplateSecrets as y };
1296
+ //# sourceMappingURL=index-d7094787.esm.js.map