@backstage/plugin-scaffolder 1.4.0 → 1.5.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 +35 -0
- package/alpha/package.json +1 -1
- package/dist/esm/{Router-e14e5f4e.esm.js → Router-fa1fcf0c.esm.js} +289 -175
- package/dist/esm/{Router-e14e5f4e.esm.js.map → Router-fa1fcf0c.esm.js.map} +1 -1
- package/dist/esm/{default-ffab2851.esm.js → default-2a48fcb0.esm.js} +2 -2
- package/dist/esm/{default-ffab2851.esm.js.map → default-2a48fcb0.esm.js.map} +1 -1
- package/dist/esm/{index-a298f509.esm.js → index-3b171258.esm.js} +388 -265
- package/dist/esm/index-3b171258.esm.js.map +1 -0
- package/dist/esm/{index-8dd91f94.esm.js → index-bdece754.esm.js} +290 -51
- package/dist/esm/index-bdece754.esm.js.map +1 -0
- package/dist/index.alpha.d.ts +3 -1
- package/dist/index.beta.d.ts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.esm.js +1 -1
- package/package.json +14 -14
- package/dist/esm/index-8dd91f94.esm.js.map +0 -1
- package/dist/esm/index-a298f509.esm.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import 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';
|
|
1
|
+
import React, { useState, useMemo, useEffect } from 'react';
|
|
2
|
+
import { useParams, Navigate, 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, InfoCard } from '@backstage/core-components';
|
|
4
4
|
import { useEntityTypeFilter, FavoriteEntity, getEntityRelations, EntityRefLinks, useEntityList, EntityListProvider, CatalogFilterLayout, EntitySearchBar, EntityKindPicker, UserListPicker, EntityTagPicker } from '@backstage/plugin-catalog-react';
|
|
5
5
|
import capitalize from 'lodash/capitalize';
|
|
6
|
-
import { Box, Typography, FormControlLabel, Checkbox, TextField, makeStyles, useTheme, Card, CardContent, Divider, Chip, CardActions } from '@material-ui/core';
|
|
6
|
+
import { Box, Typography, FormControlLabel, Checkbox, TextField, makeStyles, useTheme, Card, CardContent, Divider, Chip, CardActions, Stepper as Stepper$1, Step, StepLabel, Button as Button$2 } from '@material-ui/core';
|
|
7
7
|
import CheckBoxIcon from '@material-ui/icons/CheckBox';
|
|
8
8
|
import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';
|
|
9
9
|
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
|
|
10
10
|
import { Autocomplete } from '@material-ui/lab';
|
|
11
|
-
import { useApi, alertApiRef, useRouteRef, errorApiRef, useElementFilter } from '@backstage/core-plugin-api';
|
|
11
|
+
import { useApi, alertApiRef, useRouteRef, errorApiRef, featureFlagsApiRef, useElementFilter } from '@backstage/core-plugin-api';
|
|
12
12
|
import Button from '@material-ui/core/Button';
|
|
13
13
|
import IconButton from '@material-ui/core/IconButton';
|
|
14
14
|
import useMediaQuery from '@material-ui/core/useMediaQuery';
|
|
@@ -16,15 +16,17 @@ import { Link } from 'react-router-dom';
|
|
|
16
16
|
import AddCircleOutline from '@material-ui/icons/AddCircleOutline';
|
|
17
17
|
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common';
|
|
18
18
|
import { usePermission } from '@backstage/plugin-permission-react';
|
|
19
|
-
import {
|
|
19
|
+
import { t as nextSelectedTemplateRouteRef, r as registerComponentRouteRef, u as nextRouteRef, c as scaffolderApiRef, F as FIELD_EXTENSION_WRAPPER_KEY, i as FIELD_EXTENSION_KEY, j as SecretsContextProvider } from './index-3b171258.esm.js';
|
|
20
20
|
import { RELATION_OWNED_BY, parseEntityRef, stringifyEntityRef } from '@backstage/catalog-model';
|
|
21
|
-
import
|
|
21
|
+
import useAsync from 'react-use/lib/useAsync';
|
|
22
|
+
import { withTheme } from '@rjsf/core';
|
|
23
|
+
import { Theme } from '@rjsf/material-ui';
|
|
24
|
+
import { D as DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS } from './default-2a48fcb0.esm.js';
|
|
22
25
|
import '@backstage/errors';
|
|
23
26
|
import 'qs';
|
|
24
27
|
import 'zen-observable';
|
|
25
28
|
import '@material-ui/core/FormControl';
|
|
26
29
|
import '@material-ui/lab/Autocomplete';
|
|
27
|
-
import 'react-use/lib/useAsync';
|
|
28
30
|
import 'react-use/lib/useEffectOnce';
|
|
29
31
|
import '@backstage/integration-react';
|
|
30
32
|
import '@material-ui/core/FormHelperText';
|
|
@@ -99,7 +101,9 @@ const RegisterExistingButton = (props) => {
|
|
|
99
101
|
const { allowed } = usePermission({
|
|
100
102
|
permission: catalogEntityCreatePermission
|
|
101
103
|
});
|
|
102
|
-
const isXSScreen = useMediaQuery(
|
|
104
|
+
const isXSScreen = useMediaQuery(
|
|
105
|
+
(theme) => theme.breakpoints.down("xs")
|
|
106
|
+
);
|
|
103
107
|
if (!to || !allowed) {
|
|
104
108
|
return null;
|
|
105
109
|
}
|
|
@@ -117,15 +121,17 @@ const RegisterExistingButton = (props) => {
|
|
|
117
121
|
}, title);
|
|
118
122
|
};
|
|
119
123
|
|
|
120
|
-
const useStyles$
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
124
|
+
const useStyles$3 = makeStyles(
|
|
125
|
+
() => ({
|
|
126
|
+
header: {
|
|
127
|
+
backgroundImage: ({ cardBackgroundImage }) => cardBackgroundImage
|
|
128
|
+
},
|
|
129
|
+
subtitleWrapper: {
|
|
130
|
+
display: "flex",
|
|
131
|
+
justifyContent: "space-between"
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
);
|
|
129
135
|
const CardHeader = (props) => {
|
|
130
136
|
const {
|
|
131
137
|
template: {
|
|
@@ -135,7 +141,7 @@ const CardHeader = (props) => {
|
|
|
135
141
|
} = props;
|
|
136
142
|
const { getPageTheme } = useTheme();
|
|
137
143
|
const themeForType = getPageTheme({ themeId: type });
|
|
138
|
-
const styles = useStyles$
|
|
144
|
+
const styles = useStyles$3({
|
|
139
145
|
cardBackgroundImage: themeForType.backgroundImage
|
|
140
146
|
});
|
|
141
147
|
const SubtitleComponent = /* @__PURE__ */ React.createElement("div", {
|
|
@@ -151,16 +157,17 @@ const CardHeader = (props) => {
|
|
|
151
157
|
});
|
|
152
158
|
};
|
|
153
159
|
|
|
154
|
-
const useStyles = makeStyles((theme) => ({
|
|
160
|
+
const useStyles$2 = makeStyles((theme) => ({
|
|
155
161
|
box: {
|
|
156
162
|
overflow: "hidden",
|
|
157
163
|
textOverflow: "ellipsis",
|
|
158
164
|
display: "-webkit-box",
|
|
159
165
|
"-webkit-line-clamp": 10,
|
|
160
|
-
"-webkit-box-orient": "vertical"
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
166
|
+
"-webkit-box-orient": "vertical"
|
|
167
|
+
},
|
|
168
|
+
markdown: {
|
|
169
|
+
"& :first-child": {
|
|
170
|
+
marginTop: 0
|
|
164
171
|
}
|
|
165
172
|
},
|
|
166
173
|
label: {
|
|
@@ -190,16 +197,22 @@ const useStyles = makeStyles((theme) => ({
|
|
|
190
197
|
const TemplateCard = (props) => {
|
|
191
198
|
var _a, _b, _c, _d;
|
|
192
199
|
const { template } = props;
|
|
193
|
-
const styles = useStyles();
|
|
200
|
+
const styles = useStyles$2();
|
|
194
201
|
const ownedByRelations = getEntityRelations(template, RELATION_OWNED_BY);
|
|
195
|
-
const templateRoute = useRouteRef(
|
|
196
|
-
const { name, namespace } = parseEntityRef(
|
|
197
|
-
|
|
202
|
+
const templateRoute = useRouteRef(nextSelectedTemplateRouteRef);
|
|
203
|
+
const { name, namespace } = parseEntityRef(
|
|
204
|
+
stringifyEntityRef(props.template)
|
|
205
|
+
);
|
|
206
|
+
const href = templateRoute({
|
|
207
|
+
templateName: name,
|
|
208
|
+
namespace
|
|
209
|
+
});
|
|
198
210
|
return /* @__PURE__ */ React.createElement(Card, null, /* @__PURE__ */ React.createElement(CardHeader, {
|
|
199
211
|
template
|
|
200
212
|
}), /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement(Box, {
|
|
201
213
|
className: styles.box
|
|
202
214
|
}, /* @__PURE__ */ React.createElement(MarkdownContent, {
|
|
215
|
+
className: styles.markdown,
|
|
203
216
|
content: (_a = template.metadata.description) != null ? _a : "No description"
|
|
204
217
|
})), ((_c = (_b = template.metadata.tags) == null ? void 0 : _b.length) != null ? _c : 0) > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Divider, {
|
|
205
218
|
className: styles.margin
|
|
@@ -261,7 +274,9 @@ const TemplateGroups = (props) => {
|
|
|
261
274
|
}
|
|
262
275
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, groups.map(({ title, filter }, index) => /* @__PURE__ */ React.createElement(TemplateGroup, {
|
|
263
276
|
key: index,
|
|
264
|
-
templates: entities.filter(
|
|
277
|
+
templates: entities.filter(
|
|
278
|
+
(e) => filter(e)
|
|
279
|
+
),
|
|
265
280
|
title,
|
|
266
281
|
components: { CardComponent: TemplateCardComponent }
|
|
267
282
|
})));
|
|
@@ -273,13 +288,13 @@ const defaultGroup = {
|
|
|
273
288
|
};
|
|
274
289
|
const TemplateListPage = (props) => {
|
|
275
290
|
const registerComponentLink = useRouteRef(registerComponentRouteRef);
|
|
276
|
-
const { TemplateCardComponent, groups = [
|
|
291
|
+
const { TemplateCardComponent, groups = [] } = props;
|
|
277
292
|
return /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(Page, {
|
|
278
|
-
themeId: "
|
|
293
|
+
themeId: "website"
|
|
279
294
|
}, /* @__PURE__ */ React.createElement(Header, {
|
|
280
|
-
pageTitleOverride: "Create a
|
|
281
|
-
title: "Create a
|
|
282
|
-
subtitle: "Create new software components using standard templates"
|
|
295
|
+
pageTitleOverride: "Create a new component",
|
|
296
|
+
title: "Create a new component",
|
|
297
|
+
subtitle: "Create new software components using standard templates in your organization"
|
|
283
298
|
}), /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, {
|
|
284
299
|
title: "Available Templates"
|
|
285
300
|
}, /* @__PURE__ */ React.createElement(RegisterExistingButton, {
|
|
@@ -292,34 +307,258 @@ const TemplateListPage = (props) => {
|
|
|
292
307
|
initialFilter: "all",
|
|
293
308
|
availableFilters: ["all", "starred"]
|
|
294
309
|
}), /* @__PURE__ */ React.createElement(CategoryPicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null)), /* @__PURE__ */ React.createElement(CatalogFilterLayout.Content, null, /* @__PURE__ */ React.createElement(TemplateGroups, {
|
|
295
|
-
groups,
|
|
310
|
+
groups: [...groups, defaultGroup],
|
|
296
311
|
TemplateCardComponent
|
|
297
312
|
}))))));
|
|
298
313
|
};
|
|
299
314
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
315
|
+
function isObject(value) {
|
|
316
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
317
|
+
}
|
|
318
|
+
function extractUiSchema(schema, uiSchema) {
|
|
319
|
+
if (!isObject(schema)) {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
const { properties, items, anyOf, oneOf, allOf, dependencies } = schema;
|
|
323
|
+
for (const propName in schema) {
|
|
324
|
+
if (!schema.hasOwnProperty(propName)) {
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
if (propName.startsWith("ui:")) {
|
|
328
|
+
uiSchema[propName] = schema[propName];
|
|
329
|
+
delete schema[propName];
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
if (isObject(properties)) {
|
|
333
|
+
for (const propName in properties) {
|
|
334
|
+
if (!properties.hasOwnProperty(propName)) {
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
const schemaNode = properties[propName];
|
|
338
|
+
if (!isObject(schemaNode)) {
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
const innerUiSchema = {};
|
|
342
|
+
uiSchema[propName] = innerUiSchema;
|
|
343
|
+
extractUiSchema(schemaNode, innerUiSchema);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
if (isObject(items)) {
|
|
347
|
+
const innerUiSchema = {};
|
|
348
|
+
uiSchema.items = innerUiSchema;
|
|
349
|
+
extractUiSchema(items, innerUiSchema);
|
|
350
|
+
}
|
|
351
|
+
if (Array.isArray(anyOf)) {
|
|
352
|
+
for (const schemaNode of anyOf) {
|
|
353
|
+
if (!isObject(schemaNode)) {
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
extractUiSchema(schemaNode, uiSchema);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (Array.isArray(oneOf)) {
|
|
360
|
+
for (const schemaNode of oneOf) {
|
|
361
|
+
if (!isObject(schemaNode)) {
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
extractUiSchema(schemaNode, uiSchema);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if (Array.isArray(allOf)) {
|
|
368
|
+
for (const schemaNode of allOf) {
|
|
369
|
+
if (!isObject(schemaNode)) {
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
extractUiSchema(schemaNode, uiSchema);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
if (isObject(dependencies)) {
|
|
376
|
+
for (const depName of Object.keys(dependencies)) {
|
|
377
|
+
const schemaNode = dependencies[depName];
|
|
378
|
+
if (!isObject(schemaNode)) {
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
extractUiSchema(schemaNode, uiSchema);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
const extractSchemaFromStep = (inputStep) => {
|
|
386
|
+
const uiSchema = {};
|
|
387
|
+
const returnSchema = JSON.parse(JSON.stringify(inputStep));
|
|
388
|
+
extractUiSchema(returnSchema, uiSchema);
|
|
389
|
+
return { uiSchema, schema: returnSchema };
|
|
306
390
|
};
|
|
307
391
|
|
|
308
|
-
const
|
|
309
|
-
|
|
392
|
+
const useTemplateSchema = (manifest) => {
|
|
393
|
+
const featureFlags = useApi(featureFlagsApiRef);
|
|
394
|
+
const steps = manifest.steps.map(({ title, description, schema }) => ({
|
|
395
|
+
title,
|
|
396
|
+
description,
|
|
397
|
+
...extractSchemaFromStep(schema)
|
|
398
|
+
}));
|
|
399
|
+
const returningSteps = steps.filter((step) => {
|
|
400
|
+
var _a;
|
|
401
|
+
const stepFeatureFlag = (_a = step.uiSchema["ui:backstage"]) == null ? void 0 : _a.featureFlag;
|
|
402
|
+
return stepFeatureFlag ? featureFlags.isActive(stepFeatureFlag) : true;
|
|
403
|
+
}).map((step) => ({
|
|
404
|
+
...step,
|
|
405
|
+
schema: {
|
|
406
|
+
...step.schema,
|
|
407
|
+
title: void 0,
|
|
408
|
+
properties: Object.fromEntries(
|
|
409
|
+
Object.entries(step.schema.properties).filter(
|
|
410
|
+
([key]) => {
|
|
411
|
+
var _a, _b;
|
|
412
|
+
const stepFeatureFlag = (_b = (_a = step.uiSchema[key]) == null ? void 0 : _a["ui:backstage"]) == null ? void 0 : _b.featureFlag;
|
|
413
|
+
return stepFeatureFlag ? featureFlags.isActive(stepFeatureFlag) : true;
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
)
|
|
417
|
+
}
|
|
418
|
+
}));
|
|
419
|
+
return {
|
|
420
|
+
steps: returningSteps
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
const useStyles$1 = makeStyles((theme) => ({
|
|
425
|
+
backButton: {
|
|
426
|
+
marginRight: theme.spacing(1)
|
|
427
|
+
},
|
|
428
|
+
footer: {
|
|
429
|
+
display: "flex",
|
|
430
|
+
flexDirection: "row",
|
|
431
|
+
justifyContent: "right"
|
|
432
|
+
},
|
|
433
|
+
formWrapper: {
|
|
434
|
+
padding: theme.spacing(2)
|
|
435
|
+
}
|
|
436
|
+
}));
|
|
437
|
+
const Form = withTheme(Theme);
|
|
438
|
+
const Stepper = (props) => {
|
|
439
|
+
const { steps } = useTemplateSchema(props.manifest);
|
|
440
|
+
const [activeStep, setActiveStep] = useState(0);
|
|
441
|
+
const [formState, setFormState] = useState({});
|
|
442
|
+
const styles = useStyles$1();
|
|
443
|
+
const extensions = useMemo(() => {
|
|
444
|
+
return Object.fromEntries(
|
|
445
|
+
props.extensions.map(({ name, component }) => [name, component])
|
|
446
|
+
);
|
|
447
|
+
}, [props.extensions]);
|
|
448
|
+
const handleBack = () => {
|
|
449
|
+
setActiveStep((prevActiveStep) => prevActiveStep - 1);
|
|
450
|
+
};
|
|
451
|
+
const handleNext = ({ formData }) => {
|
|
452
|
+
setActiveStep((prevActiveStep) => prevActiveStep + 1);
|
|
453
|
+
setFormState((current) => ({ ...current, ...formData }));
|
|
454
|
+
};
|
|
455
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Stepper$1, {
|
|
456
|
+
activeStep,
|
|
457
|
+
alternativeLabel: true,
|
|
458
|
+
variant: "elevation"
|
|
459
|
+
}, steps.map((step, index) => /* @__PURE__ */ React.createElement(Step, {
|
|
460
|
+
key: index
|
|
461
|
+
}, /* @__PURE__ */ React.createElement(StepLabel, null, step.title)))), /* @__PURE__ */ React.createElement("div", {
|
|
462
|
+
className: styles.formWrapper
|
|
463
|
+
}, /* @__PURE__ */ React.createElement(Form, {
|
|
464
|
+
formData: formState,
|
|
465
|
+
schema: steps[activeStep].schema,
|
|
466
|
+
uiSchema: steps[activeStep].uiSchema,
|
|
467
|
+
onSubmit: handleNext,
|
|
468
|
+
fields: extensions,
|
|
469
|
+
showErrorList: false
|
|
470
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
471
|
+
className: styles.footer
|
|
472
|
+
}, /* @__PURE__ */ React.createElement(Button$2, {
|
|
473
|
+
onClick: handleBack,
|
|
474
|
+
className: styles.backButton,
|
|
475
|
+
disabled: activeStep < 1
|
|
476
|
+
}, "Back"), /* @__PURE__ */ React.createElement(Button$2, {
|
|
477
|
+
variant: "contained",
|
|
478
|
+
color: "primary",
|
|
479
|
+
type: "submit"
|
|
480
|
+
}, activeStep === steps.length - 1 ? "Review" : "Next")))));
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
const useStyles = makeStyles(() => ({
|
|
484
|
+
markdown: {
|
|
485
|
+
"& :first-child": {
|
|
486
|
+
marginTop: 0
|
|
487
|
+
},
|
|
488
|
+
"& :last-child": {
|
|
489
|
+
marginBottom: 0
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}));
|
|
493
|
+
const useTemplateParameterSchema = (templateRef) => {
|
|
494
|
+
const scaffolderApi = useApi(scaffolderApiRef);
|
|
495
|
+
const { value, loading, error } = useAsync(
|
|
496
|
+
() => scaffolderApi.getTemplateParameterSchema(templateRef),
|
|
497
|
+
[scaffolderApi, templateRef]
|
|
498
|
+
);
|
|
499
|
+
return { manifest: value, loading, error };
|
|
500
|
+
};
|
|
501
|
+
const TemplateWizardPage = (props) => {
|
|
502
|
+
var _a;
|
|
503
|
+
const styles = useStyles();
|
|
504
|
+
const rootRef = useRouteRef(nextRouteRef);
|
|
505
|
+
const { templateName, namespace } = useParams();
|
|
506
|
+
const errorApi = useApi(errorApiRef);
|
|
507
|
+
const { loading, manifest, error } = useTemplateParameterSchema(
|
|
508
|
+
stringifyEntityRef({
|
|
509
|
+
kind: "Template",
|
|
510
|
+
namespace,
|
|
511
|
+
name: templateName
|
|
512
|
+
})
|
|
513
|
+
);
|
|
514
|
+
useEffect(() => {
|
|
515
|
+
if (error) {
|
|
516
|
+
errorApi.post(new Error(`Failed to load template, ${error}`));
|
|
517
|
+
}
|
|
518
|
+
}, [error, errorApi]);
|
|
519
|
+
if (error) {
|
|
520
|
+
return /* @__PURE__ */ React.createElement(Navigate, {
|
|
521
|
+
to: rootRef()
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
return /* @__PURE__ */ React.createElement(Page, {
|
|
525
|
+
themeId: "website"
|
|
526
|
+
}, /* @__PURE__ */ React.createElement(Header, {
|
|
527
|
+
pageTitleOverride: "Create a new component",
|
|
528
|
+
title: "Create a new component",
|
|
529
|
+
subtitle: "Create new software components using standard templates in your organization"
|
|
530
|
+
}), /* @__PURE__ */ React.createElement(Content, null, loading && /* @__PURE__ */ React.createElement(Progress, null), manifest && /* @__PURE__ */ React.createElement(InfoCard, {
|
|
531
|
+
title: manifest.title,
|
|
532
|
+
subheader: /* @__PURE__ */ React.createElement(MarkdownContent, {
|
|
533
|
+
className: styles.markdown,
|
|
534
|
+
content: (_a = manifest.description) != null ? _a : "No description"
|
|
535
|
+
}),
|
|
536
|
+
noPadding: true,
|
|
537
|
+
titleTypographyProps: { component: "h2" }
|
|
538
|
+
}, /* @__PURE__ */ React.createElement(Stepper, {
|
|
539
|
+
manifest,
|
|
540
|
+
extensions: props.customFieldExtensions
|
|
541
|
+
}))));
|
|
310
542
|
};
|
|
311
543
|
|
|
312
544
|
const Router = (props) => {
|
|
313
545
|
const { components: { TemplateCardComponent } = {} } = props;
|
|
314
546
|
const outlet = useOutlet() || props.children;
|
|
315
|
-
const customFieldExtensions = useElementFilter(
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
547
|
+
const customFieldExtensions = useElementFilter(
|
|
548
|
+
outlet,
|
|
549
|
+
(elements) => elements.selectByComponentData({
|
|
550
|
+
key: FIELD_EXTENSION_WRAPPER_KEY
|
|
551
|
+
}).findComponentData({
|
|
552
|
+
key: FIELD_EXTENSION_KEY
|
|
553
|
+
})
|
|
554
|
+
);
|
|
320
555
|
const fieldExtensions = [
|
|
321
556
|
...customFieldExtensions,
|
|
322
|
-
...DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS.filter(
|
|
557
|
+
...DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS.filter(
|
|
558
|
+
({ name }) => !customFieldExtensions.some(
|
|
559
|
+
(customFieldExtension) => customFieldExtension.name === name
|
|
560
|
+
)
|
|
561
|
+
)
|
|
323
562
|
];
|
|
324
563
|
return /* @__PURE__ */ React.createElement(Routes, null, /* @__PURE__ */ React.createElement(Route, {
|
|
325
564
|
element: /* @__PURE__ */ React.createElement(TemplateListPage, {
|
|
@@ -327,7 +566,7 @@ const Router = (props) => {
|
|
|
327
566
|
groups: props.groups
|
|
328
567
|
})
|
|
329
568
|
}), /* @__PURE__ */ React.createElement(Route, {
|
|
330
|
-
path:
|
|
569
|
+
path: nextSelectedTemplateRouteRef.path,
|
|
331
570
|
element: /* @__PURE__ */ React.createElement(SecretsContextProvider, null, /* @__PURE__ */ React.createElement(TemplateWizardPage, {
|
|
332
571
|
customFieldExtensions: fieldExtensions
|
|
333
572
|
}))
|
|
@@ -335,4 +574,4 @@ const Router = (props) => {
|
|
|
335
574
|
};
|
|
336
575
|
|
|
337
576
|
export { Router };
|
|
338
|
-
//# sourceMappingURL=index-
|
|
577
|
+
//# sourceMappingURL=index-bdece754.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-bdece754.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/Stepper/schema.ts","../../src/next/TemplateWizardPage/Stepper/useTemplateSchema.ts","../../src/next/TemplateWizardPage/Stepper/Stepper.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 */\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 {\n parseEntityRef,\n RELATION_OWNED_BY,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n getEntityRelations,\n} from '@backstage/plugin-catalog-react';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { nextSelectedTemplateRouteRef } 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 },\n markdown: {\n /** to make the styles for React Markdown not leak into the description */\n '& :first-child': {\n marginTop: 0,\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(nextSelectedTemplateRouteRef);\n const { name, namespace } = parseEntityRef(\n stringifyEntityRef(props.template),\n );\n const href = templateRoute({\n templateName: name,\n namespace: namespace,\n });\n\n return (\n <Card>\n <CardHeader template={template} />\n <CardContent>\n <Box className={styles.box}>\n <MarkdownContent\n className={styles.markdown}\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 = [] } = 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 <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 { JsonObject } from '@backstage/types';\nimport { UiSchema } from '@rjsf/core';\n\nfunction isObject(value: unknown): value is JsonObject {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction extractUiSchema(schema: JsonObject, uiSchema: JsonObject) {\n if (!isObject(schema)) {\n return;\n }\n\n const { properties, items, anyOf, oneOf, allOf, dependencies } = schema;\n\n for (const propName in schema) {\n if (!schema.hasOwnProperty(propName)) {\n continue;\n }\n\n if (propName.startsWith('ui:')) {\n uiSchema[propName] = schema[propName];\n delete schema[propName];\n }\n }\n\n if (isObject(properties)) {\n for (const propName in properties) {\n if (!properties.hasOwnProperty(propName)) {\n continue;\n }\n\n const schemaNode = properties[propName];\n if (!isObject(schemaNode)) {\n continue;\n }\n const innerUiSchema = {};\n uiSchema[propName] = innerUiSchema;\n extractUiSchema(schemaNode, innerUiSchema);\n }\n }\n\n if (isObject(items)) {\n const innerUiSchema = {};\n uiSchema.items = innerUiSchema;\n extractUiSchema(items, innerUiSchema);\n }\n\n if (Array.isArray(anyOf)) {\n for (const schemaNode of anyOf) {\n if (!isObject(schemaNode)) {\n continue;\n }\n extractUiSchema(schemaNode, uiSchema);\n }\n }\n\n if (Array.isArray(oneOf)) {\n for (const schemaNode of oneOf) {\n if (!isObject(schemaNode)) {\n continue;\n }\n extractUiSchema(schemaNode, uiSchema);\n }\n }\n\n if (Array.isArray(allOf)) {\n for (const schemaNode of allOf) {\n if (!isObject(schemaNode)) {\n continue;\n }\n extractUiSchema(schemaNode, uiSchema);\n }\n }\n\n if (isObject(dependencies)) {\n for (const depName of Object.keys(dependencies)) {\n const schemaNode = dependencies[depName];\n if (!isObject(schemaNode)) {\n continue;\n }\n extractUiSchema(schemaNode, uiSchema);\n }\n }\n}\n\n/**\n * @alpha\n * Takes a step from a Backstage Template Manifest and converts it to a JSON Schema and UI Schema for rjsf\n */\nexport const extractSchemaFromStep = (\n inputStep: JsonObject,\n): { uiSchema: UiSchema; schema: JsonObject } => {\n const uiSchema: UiSchema = {};\n const returnSchema: JsonObject = JSON.parse(JSON.stringify(inputStep));\n extractUiSchema(returnSchema, uiSchema);\n return { uiSchema, schema: returnSchema };\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 { featureFlagsApiRef, useApi } from '@backstage/core-plugin-api';\nimport { JsonObject } from '@backstage/types';\nimport { UiSchema } from '@rjsf/core';\nimport { TemplateParameterSchema } from '../../../types';\nimport { extractSchemaFromStep } from './schema';\n\nexport const useTemplateSchema = (\n manifest: TemplateParameterSchema,\n): {\n steps: {\n uiSchema: UiSchema;\n schema: JsonObject;\n title: string;\n description?: string;\n }[];\n} => {\n const featureFlags = useApi(featureFlagsApiRef);\n const steps = manifest.steps.map(({ title, description, schema }) => ({\n title,\n description,\n ...extractSchemaFromStep(schema),\n }));\n\n const returningSteps = steps\n // Filter out steps that are not enabled with the feature flags\n .filter(step => {\n const stepFeatureFlag = step.uiSchema['ui:backstage']?.featureFlag;\n return stepFeatureFlag ? featureFlags.isActive(stepFeatureFlag) : true;\n })\n // Then filter out the properties that are not enabled with feature flag\n .map(step => ({\n ...step,\n schema: {\n ...step.schema,\n // Title is rendered at the top of the page, so let's ignore this from jsonschemaform\n title: undefined,\n properties: Object.fromEntries(\n Object.entries(step.schema.properties as JsonObject).filter(\n ([key]) => {\n const stepFeatureFlag =\n step.uiSchema[key]?.['ui:backstage']?.featureFlag;\n return stepFeatureFlag\n ? featureFlags.isActive(stepFeatureFlag)\n : true;\n },\n ),\n ),\n },\n }));\n\n return {\n steps: returningSteps,\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 { JsonObject } from '@backstage/types';\nimport {\n Stepper as MuiStepper,\n Step as MuiStep,\n StepLabel as MuiStepLabel,\n Button,\n makeStyles,\n} from '@material-ui/core';\nimport { withTheme } from '@rjsf/core';\nimport { Theme as MuiTheme } from '@rjsf/material-ui';\nimport React, { useMemo, useState } from 'react';\nimport { FieldExtensionOptions } from '../../../extensions';\nimport { TemplateParameterSchema } from '../../../types';\nimport { useTemplateSchema } from './useTemplateSchema';\n\nconst useStyles = makeStyles(theme => ({\n backButton: {\n marginRight: theme.spacing(1),\n },\n footer: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'right',\n },\n formWrapper: {\n padding: theme.spacing(2),\n },\n}));\n\nexport interface StepperProps {\n manifest: TemplateParameterSchema;\n extensions: FieldExtensionOptions<any, any>[];\n}\n\nconst Form = withTheme(MuiTheme);\n\nexport const Stepper = (props: StepperProps) => {\n const { steps } = useTemplateSchema(props.manifest);\n const [activeStep, setActiveStep] = useState(0);\n const [formState, setFormState] = useState({});\n const styles = useStyles();\n\n const extensions = useMemo(() => {\n return Object.fromEntries(\n props.extensions.map(({ name, component }) => [name, component]),\n );\n }, [props.extensions]);\n\n const handleBack = () => {\n setActiveStep(prevActiveStep => prevActiveStep - 1);\n };\n\n const handleNext = ({ formData }: { formData: JsonObject }) => {\n setActiveStep(prevActiveStep => prevActiveStep + 1);\n setFormState(current => ({ ...current, ...formData }));\n };\n\n return (\n <>\n <MuiStepper activeStep={activeStep} alternativeLabel variant=\"elevation\">\n {steps.map((step, index) => (\n <MuiStep key={index}>\n <MuiStepLabel>{step.title}</MuiStepLabel>\n </MuiStep>\n ))}\n </MuiStepper>\n <div className={styles.formWrapper}>\n <Form\n formData={formState}\n schema={steps[activeStep].schema}\n uiSchema={steps[activeStep].uiSchema}\n onSubmit={handleNext}\n fields={extensions}\n showErrorList={false}\n >\n <div className={styles.footer}>\n <Button\n onClick={handleBack}\n className={styles.backButton}\n disabled={activeStep < 1}\n >\n Back\n </Button>\n <Button variant=\"contained\" color=\"primary\" type=\"submit\">\n {activeStep === steps.length - 1 ? 'Review' : 'Next'}\n </Button>\n </div>\n </Form>\n </div>\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, { useEffect } from 'react';\nimport {\n Page,\n Header,\n Content,\n Progress,\n InfoCard,\n MarkdownContent,\n} from '@backstage/core-components';\nimport { FieldExtensionOptions } from '../../extensions';\nimport { Navigate, useParams } from 'react-router';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { errorApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport { scaffolderApiRef } from '../../api';\nimport useAsync from 'react-use/lib/useAsync';\nimport { makeStyles } from '@material-ui/core';\nimport { Stepper } from './Stepper';\nimport { BackstageTheme } from '@backstage/theme';\nimport { nextRouteRef } from '../../routes';\n\nexport interface TemplateWizardPageProps {\n customFieldExtensions: FieldExtensionOptions<any, any>[];\n}\n\nconst useStyles = makeStyles<BackstageTheme>(() => ({\n markdown: {\n /** to make the styles for React Markdown not leak into the description */\n '& :first-child': {\n marginTop: 0,\n },\n '& :last-child': {\n marginBottom: 0,\n },\n },\n}));\n\nconst useTemplateParameterSchema = (templateRef: string) => {\n const scaffolderApi = useApi(scaffolderApiRef);\n const { value, loading, error } = useAsync(\n () => scaffolderApi.getTemplateParameterSchema(templateRef),\n [scaffolderApi, templateRef],\n );\n\n return { manifest: value, loading, error };\n};\n\nexport const TemplateWizardPage = (props: TemplateWizardPageProps) => {\n const styles = useStyles();\n const rootRef = useRouteRef(nextRouteRef);\n const { templateName, namespace } = useParams();\n const errorApi = useApi(errorApiRef);\n const { loading, manifest, error } = useTemplateParameterSchema(\n stringifyEntityRef({\n kind: 'Template',\n namespace,\n name: templateName,\n }),\n );\n\n useEffect(() => {\n if (error) {\n errorApi.post(new Error(`Failed to load template, ${error}`));\n }\n }, [error, errorApi]);\n\n if (error) {\n return <Navigate to={rootRef()} />;\n }\n\n return (\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 <Content>\n {loading && <Progress />}\n {manifest && (\n <InfoCard\n title={manifest.title}\n subheader={\n <MarkdownContent\n className={styles.markdown}\n content={manifest.description ?? 'No description'}\n />\n }\n noPadding\n titleTypographyProps={{ component: 'h2' }}\n >\n <Stepper\n manifest={manifest}\n extensions={props.customFieldExtensions}\n />\n </InfoCard>\n )}\n </Content>\n </Page>\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';\nimport { TemplateListPage } from '../TemplateListPage';\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';\nimport { nextSelectedTemplateRouteRef } from '../../routes';\nimport { SecretsContextProvider } from '../../components/secrets/SecretsContext';\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 element={\n <TemplateListPage\n TemplateCardComponent={TemplateCardComponent}\n groups={props.groups}\n />\n }\n />\n\n <Route\n path={nextSelectedTemplateRouteRef.path}\n element={\n <SecretsContextProvider>\n <TemplateWizardPage customFieldExtensions={fieldExtensions} />\n </SecretsContextProvider>\n }\n />\n </Routes>\n );\n};\n"],"names":["RouterLink","useStyles","Button","Link","MuiTheme","MuiStepper","MuiStep","MuiStepLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAM,IAAI,mBAAmB,KAAK,CAAC,aAAa,CAAC,wBAAwB,EAAE;AAC3E,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,CAAC,CAAC;AACH,MAAM,WAAW,mBAAmB,KAAK,CAAC,aAAa,CAAC,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|
427
427
|
root: RouteRef<undefined>;
|
|
428
428
|
}, {
|
|
429
429
|
registerComponent: ExternalRouteRef<undefined, true>;
|
|
430
|
-
}>;
|
|
430
|
+
}, {}>;
|
|
431
431
|
|
|
432
432
|
/**
|
|
433
433
|
* The input options to the `scaffold` method of the `ScaffolderClient`.
|
|
@@ -528,8 +528,10 @@ export declare type TemplateGroupFilter = {
|
|
|
528
528
|
*/
|
|
529
529
|
export declare type TemplateParameterSchema = {
|
|
530
530
|
title: string;
|
|
531
|
+
description?: string;
|
|
531
532
|
steps: Array<{
|
|
532
533
|
title: string;
|
|
534
|
+
description?: string;
|
|
533
535
|
schema: JsonObject;
|
|
534
536
|
}>;
|
|
535
537
|
};
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -410,7 +410,7 @@ export declare const scaffolderPlugin: BackstagePlugin< {
|
|
|
410
410
|
root: RouteRef<undefined>;
|
|
411
411
|
}, {
|
|
412
412
|
registerComponent: ExternalRouteRef<undefined, true>;
|
|
413
|
-
}>;
|
|
413
|
+
}, {}>;
|
|
414
414
|
|
|
415
415
|
/**
|
|
416
416
|
* The input options to the `scaffold` method of the `ScaffolderClient`.
|
|
@@ -505,8 +505,10 @@ export declare type TaskPageProps = {
|
|
|
505
505
|
*/
|
|
506
506
|
export declare type TemplateParameterSchema = {
|
|
507
507
|
title: string;
|
|
508
|
+
description?: string;
|
|
508
509
|
steps: Array<{
|
|
509
510
|
title: string;
|
|
511
|
+
description?: string;
|
|
510
512
|
schema: JsonObject;
|
|
511
513
|
}>;
|
|
512
514
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -410,7 +410,7 @@ export declare const scaffolderPlugin: BackstagePlugin< {
|
|
|
410
410
|
root: RouteRef<undefined>;
|
|
411
411
|
}, {
|
|
412
412
|
registerComponent: ExternalRouteRef<undefined, true>;
|
|
413
|
-
}>;
|
|
413
|
+
}, {}>;
|
|
414
414
|
|
|
415
415
|
/**
|
|
416
416
|
* The input options to the `scaffold` method of the `ScaffolderClient`.
|
|
@@ -505,8 +505,10 @@ export declare type TaskPageProps = {
|
|
|
505
505
|
*/
|
|
506
506
|
export declare type TemplateParameterSchema = {
|
|
507
507
|
title: string;
|
|
508
|
+
description?: string;
|
|
508
509
|
steps: Array<{
|
|
509
510
|
title: string;
|
|
511
|
+
description?: string;
|
|
510
512
|
schema: JsonObject;
|
|
511
513
|
}>;
|
|
512
514
|
};
|