@backstage/plugin-scaffolder 1.5.0-next.1 → 1.6.0-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.
- package/CHANGELOG.md +50 -0
- package/alpha/package.json +1 -1
- package/dist/esm/{Router-fa1fcf0c.esm.js → Router-abd92937.esm.js} +3 -3
- package/dist/esm/{Router-fa1fcf0c.esm.js.map → Router-abd92937.esm.js.map} +1 -1
- package/dist/esm/{default-2a48fcb0.esm.js → default-8883888f.esm.js} +2 -2
- package/dist/esm/{default-2a48fcb0.esm.js.map → default-8883888f.esm.js.map} +1 -1
- package/dist/esm/{index-bdece754.esm.js → index-aefc5daf.esm.js} +121 -10
- package/dist/esm/index-aefc5daf.esm.js.map +1 -0
- package/dist/esm/{index-3b171258.esm.js → index-be59d2dd.esm.js} +4 -4
- package/dist/esm/index-be59d2dd.esm.js.map +1 -0
- package/dist/index.alpha.d.ts +2 -2
- package/dist/index.beta.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +1 -1
- package/package.json +18 -17
- package/dist/esm/index-3b171258.esm.js.map +0 -1
- package/dist/esm/index-bdece754.esm.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EntityPicker, m as EntityNamePicker, n as entityNamePickerValidation, o as EntityTagsPicker, R as RepoUrlPicker, p as repoPickerValidation, O as OwnerPicker, q as OwnedEntityPicker } from './index-
|
|
1
|
+
import { E as EntityPicker, m as EntityNamePicker, n as entityNamePickerValidation, o as EntityTagsPicker, R as RepoUrlPicker, p as repoPickerValidation, O as OwnerPicker, q as OwnedEntityPicker } from './index-be59d2dd.esm.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS = [
|
|
4
4
|
{
|
|
@@ -30,4 +30,4 @@ const DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS = [
|
|
|
30
30
|
];
|
|
31
31
|
|
|
32
32
|
export { DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS as D };
|
|
33
|
-
//# sourceMappingURL=default-
|
|
33
|
+
//# sourceMappingURL=default-8883888f.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-
|
|
1
|
+
{"version":3,"file":"default-8883888f.esm.js","sources":["../../src/extensions/default.ts"],"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 */\nimport { EntityPicker } from '../components/fields/EntityPicker/EntityPicker';\nimport { EntityNamePicker } from '../components/fields/EntityNamePicker/EntityNamePicker';\nimport { entityNamePickerValidation } from '../components/fields/EntityNamePicker/validation';\nimport { EntityTagsPicker } from '../components/fields/EntityTagsPicker/EntityTagsPicker';\nimport { OwnerPicker } from '../components/fields/OwnerPicker/OwnerPicker';\nimport { RepoUrlPicker } from '../components/fields/RepoUrlPicker/RepoUrlPicker';\nimport { repoPickerValidation } from '../components/fields/RepoUrlPicker/validation';\nimport { OwnedEntityPicker } from '../components/fields/OwnedEntityPicker/OwnedEntityPicker';\n\nexport const DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS = [\n {\n component: EntityPicker,\n name: 'EntityPicker',\n },\n {\n component: EntityNamePicker,\n name: 'EntityNamePicker',\n validation: entityNamePickerValidation,\n },\n {\n component: EntityTagsPicker,\n name: 'EntityTagsPicker',\n },\n {\n component: RepoUrlPicker,\n name: 'RepoUrlPicker',\n validation: repoPickerValidation,\n },\n {\n component: OwnerPicker,\n name: 'OwnerPicker',\n },\n {\n component: OwnedEntityPicker,\n name: 'OwnedEntityPicker',\n },\n];\n"],"names":[],"mappings":";;AAQY,MAAC,mCAAmC,GAAG;AACnD,EAAE;AACF,IAAI,SAAS,EAAE,YAAY;AAC3B,IAAI,IAAI,EAAE,cAAc;AACxB,GAAG;AACH,EAAE;AACF,IAAI,SAAS,EAAE,gBAAgB;AAC/B,IAAI,IAAI,EAAE,kBAAkB;AAC5B,IAAI,UAAU,EAAE,0BAA0B;AAC1C,GAAG;AACH,EAAE;AACF,IAAI,SAAS,EAAE,gBAAgB;AAC/B,IAAI,IAAI,EAAE,kBAAkB;AAC5B,GAAG;AACH,EAAE;AACF,IAAI,SAAS,EAAE,aAAa;AAC5B,IAAI,IAAI,EAAE,eAAe;AACzB,IAAI,UAAU,EAAE,oBAAoB;AACpC,GAAG;AACH,EAAE;AACF,IAAI,SAAS,EAAE,WAAW;AAC1B,IAAI,IAAI,EAAE,aAAa;AACvB,GAAG;AACH,EAAE;AACF,IAAI,SAAS,EAAE,iBAAiB;AAChC,IAAI,IAAI,EAAE,mBAAmB;AAC7B,GAAG;AACH;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useMemo, useEffect } from 'react';
|
|
2
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';
|
|
3
|
+
import { Progress, ItemCardHeader, MarkdownContent, UserIcon, Button as Button$1, Content, Link as Link$1, ItemCardGrid, ContentHeader, Page, Header, SupportButton, StructuredMetadataTable, 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
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';
|
|
@@ -8,7 +8,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, featureFlagsApiRef, useElementFilter } from '@backstage/core-plugin-api';
|
|
11
|
+
import { useApi, alertApiRef, useRouteRef, errorApiRef, featureFlagsApiRef, useApiHolder, 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,12 +16,13 @@ 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 { 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-
|
|
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-be59d2dd.esm.js';
|
|
20
20
|
import { RELATION_OWNED_BY, parseEntityRef, stringifyEntityRef } from '@backstage/catalog-model';
|
|
21
21
|
import useAsync from 'react-use/lib/useAsync';
|
|
22
22
|
import { withTheme } from '@rjsf/core';
|
|
23
23
|
import { Theme } from '@rjsf/material-ui';
|
|
24
|
-
import {
|
|
24
|
+
import { Draft07 } from 'json-schema-library';
|
|
25
|
+
import { D as DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS } from './default-8883888f.esm.js';
|
|
25
26
|
import '@backstage/errors';
|
|
26
27
|
import 'qs';
|
|
27
28
|
import 'zen-observable';
|
|
@@ -388,12 +389,51 @@ const extractSchemaFromStep = (inputStep) => {
|
|
|
388
389
|
extractUiSchema(returnSchema, uiSchema);
|
|
389
390
|
return { uiSchema, schema: returnSchema };
|
|
390
391
|
};
|
|
392
|
+
const createFieldValidation = () => {
|
|
393
|
+
const fieldValidation = {
|
|
394
|
+
__errors: [],
|
|
395
|
+
addError: (message) => {
|
|
396
|
+
fieldValidation.__errors.push(message);
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
return fieldValidation;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
const createAsyncValidators = (rootSchema, validators, context) => {
|
|
403
|
+
async function validate(formData, pathPrefix = "#") {
|
|
404
|
+
const parsedSchema = new Draft07(rootSchema);
|
|
405
|
+
const formValidation = {};
|
|
406
|
+
for (const [key, value] of Object.entries(formData)) {
|
|
407
|
+
const definitionInSchema = parsedSchema.getSchema(
|
|
408
|
+
`${pathPrefix}/${key}`,
|
|
409
|
+
formData
|
|
410
|
+
);
|
|
411
|
+
if (definitionInSchema && "ui:field" in definitionInSchema) {
|
|
412
|
+
const validator = validators[definitionInSchema["ui:field"]];
|
|
413
|
+
if (validator) {
|
|
414
|
+
const fieldValidation = createFieldValidation();
|
|
415
|
+
try {
|
|
416
|
+
await validator(value, fieldValidation, context);
|
|
417
|
+
} catch (ex) {
|
|
418
|
+
fieldValidation.addError(ex.message);
|
|
419
|
+
}
|
|
420
|
+
formValidation[key] = fieldValidation;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return formValidation;
|
|
425
|
+
}
|
|
426
|
+
return async (formData) => {
|
|
427
|
+
return await validate(formData);
|
|
428
|
+
};
|
|
429
|
+
};
|
|
391
430
|
|
|
392
431
|
const useTemplateSchema = (manifest) => {
|
|
393
432
|
const featureFlags = useApi(featureFlagsApiRef);
|
|
394
433
|
const steps = manifest.steps.map(({ title, description, schema }) => ({
|
|
395
434
|
title,
|
|
396
435
|
description,
|
|
436
|
+
mergedSchema: schema,
|
|
397
437
|
...extractSchemaFromStep(schema)
|
|
398
438
|
}));
|
|
399
439
|
const returningSteps = steps.filter((step) => {
|
|
@@ -421,6 +461,39 @@ const useTemplateSchema = (manifest) => {
|
|
|
421
461
|
};
|
|
422
462
|
};
|
|
423
463
|
|
|
464
|
+
const ReviewState = (props) => {
|
|
465
|
+
const reviewData = Object.fromEntries(
|
|
466
|
+
Object.entries(props.formState).map(([key, value]) => {
|
|
467
|
+
var _a;
|
|
468
|
+
for (const step of props.schemas) {
|
|
469
|
+
const parsedSchema = new Draft07(step.mergedSchema);
|
|
470
|
+
const definitionInSchema = parsedSchema.getSchema(
|
|
471
|
+
`#/${key}`,
|
|
472
|
+
props.formState
|
|
473
|
+
);
|
|
474
|
+
if (definitionInSchema) {
|
|
475
|
+
const backstageReviewOptions = (_a = definitionInSchema["ui:backstage"]) == null ? void 0 : _a.review;
|
|
476
|
+
if (backstageReviewOptions) {
|
|
477
|
+
if (backstageReviewOptions.mask) {
|
|
478
|
+
return [key, backstageReviewOptions.mask];
|
|
479
|
+
}
|
|
480
|
+
if (backstageReviewOptions.show === false) {
|
|
481
|
+
return [];
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if (definitionInSchema["ui:widget"] === "password") {
|
|
485
|
+
return [key, "******"];
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
return [key, value];
|
|
490
|
+
})
|
|
491
|
+
);
|
|
492
|
+
return /* @__PURE__ */ React.createElement(StructuredMetadataTable, {
|
|
493
|
+
metadata: reviewData
|
|
494
|
+
});
|
|
495
|
+
};
|
|
496
|
+
|
|
424
497
|
const useStyles$1 = makeStyles((theme) => ({
|
|
425
498
|
backButton: {
|
|
426
499
|
marginRight: theme.spacing(1)
|
|
@@ -437,30 +510,56 @@ const useStyles$1 = makeStyles((theme) => ({
|
|
|
437
510
|
const Form = withTheme(Theme);
|
|
438
511
|
const Stepper = (props) => {
|
|
439
512
|
const { steps } = useTemplateSchema(props.manifest);
|
|
513
|
+
const apiHolder = useApiHolder();
|
|
440
514
|
const [activeStep, setActiveStep] = useState(0);
|
|
441
515
|
const [formState, setFormState] = useState({});
|
|
516
|
+
const [errors, setErrors] = useState();
|
|
442
517
|
const styles = useStyles$1();
|
|
443
518
|
const extensions = useMemo(() => {
|
|
444
519
|
return Object.fromEntries(
|
|
445
520
|
props.extensions.map(({ name, component }) => [name, component])
|
|
446
521
|
);
|
|
447
522
|
}, [props.extensions]);
|
|
523
|
+
const validators = useMemo(() => {
|
|
524
|
+
return Object.fromEntries(
|
|
525
|
+
props.extensions.map(({ name, validation: validation2 }) => [name, validation2])
|
|
526
|
+
);
|
|
527
|
+
}, [props.extensions]);
|
|
528
|
+
const validation = useMemo(() => {
|
|
529
|
+
var _a;
|
|
530
|
+
return createAsyncValidators((_a = steps[activeStep]) == null ? void 0 : _a.mergedSchema, validators, {
|
|
531
|
+
apiHolder
|
|
532
|
+
});
|
|
533
|
+
}, [steps, activeStep, validators, apiHolder]);
|
|
448
534
|
const handleBack = () => {
|
|
449
535
|
setActiveStep((prevActiveStep) => prevActiveStep - 1);
|
|
450
536
|
};
|
|
451
|
-
const handleNext = ({ formData }) => {
|
|
452
|
-
|
|
537
|
+
const handleNext = async ({ formData }) => {
|
|
538
|
+
setErrors(void 0);
|
|
539
|
+
const returnedValidation = await validation(formData);
|
|
540
|
+
const hasErrors = Object.values(returnedValidation).some((i) => {
|
|
541
|
+
return i.__errors.length > 0;
|
|
542
|
+
});
|
|
543
|
+
if (hasErrors) {
|
|
544
|
+
setErrors(returnedValidation);
|
|
545
|
+
} else {
|
|
546
|
+
setErrors(void 0);
|
|
547
|
+
setActiveStep((prevActiveStep) => prevActiveStep + 1);
|
|
548
|
+
}
|
|
453
549
|
setFormState((current) => ({ ...current, ...formData }));
|
|
454
550
|
};
|
|
551
|
+
const handleCreate = () => {
|
|
552
|
+
};
|
|
455
553
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Stepper$1, {
|
|
456
554
|
activeStep,
|
|
457
555
|
alternativeLabel: true,
|
|
458
556
|
variant: "elevation"
|
|
459
557
|
}, steps.map((step, index) => /* @__PURE__ */ React.createElement(Step, {
|
|
460
558
|
key: index
|
|
461
|
-
}, /* @__PURE__ */ React.createElement(StepLabel, null, step.title)))), /* @__PURE__ */ React.createElement("div", {
|
|
559
|
+
}, /* @__PURE__ */ React.createElement(StepLabel, null, step.title))), /* @__PURE__ */ React.createElement(Step, null, /* @__PURE__ */ React.createElement(StepLabel, null, "Review"))), /* @__PURE__ */ React.createElement("div", {
|
|
462
560
|
className: styles.formWrapper
|
|
463
|
-
}, /* @__PURE__ */ React.createElement(Form, {
|
|
561
|
+
}, activeStep < steps.length ? /* @__PURE__ */ React.createElement(Form, {
|
|
562
|
+
extraErrors: errors,
|
|
464
563
|
formData: formState,
|
|
465
564
|
schema: steps[activeStep].schema,
|
|
466
565
|
uiSchema: steps[activeStep].uiSchema,
|
|
@@ -477,7 +576,19 @@ const Stepper = (props) => {
|
|
|
477
576
|
variant: "contained",
|
|
478
577
|
color: "primary",
|
|
479
578
|
type: "submit"
|
|
480
|
-
}, activeStep === steps.length - 1 ? "Review" : "Next")))
|
|
579
|
+
}, activeStep === steps.length - 1 ? "Review" : "Next"))) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ReviewState, {
|
|
580
|
+
formState,
|
|
581
|
+
schemas: steps
|
|
582
|
+
}), /* @__PURE__ */ React.createElement("div", {
|
|
583
|
+
className: styles.footer
|
|
584
|
+
}, /* @__PURE__ */ React.createElement(Button$2, {
|
|
585
|
+
onClick: handleBack,
|
|
586
|
+
className: styles.backButton,
|
|
587
|
+
disabled: activeStep < 1
|
|
588
|
+
}, "Back"), /* @__PURE__ */ React.createElement(Button$2, {
|
|
589
|
+
variant: "contained",
|
|
590
|
+
onClick: handleCreate
|
|
591
|
+
}, "Create")))));
|
|
481
592
|
};
|
|
482
593
|
|
|
483
594
|
const useStyles = makeStyles(() => ({
|
|
@@ -574,4 +685,4 @@ const Router = (props) => {
|
|
|
574
685
|
};
|
|
575
686
|
|
|
576
687
|
export { Router };
|
|
577
|
-
//# sourceMappingURL=index-
|
|
688
|
+
//# sourceMappingURL=index-aefc5daf.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-aefc5daf.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/createAsyncValidators.ts","../../src/next/TemplateWizardPage/Stepper/useTemplateSchema.ts","../../src/next/TemplateWizardPage/Stepper/ReviewState.tsx","../../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 { FieldValidation, 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/**\n * @alpha\n * Creates a field validation object for use in react jsonschema form\n */\nexport const createFieldValidation = (): FieldValidation => {\n const fieldValidation: FieldValidation = {\n __errors: [] as string[],\n addError: (message: string) => {\n fieldValidation.__errors.push(message);\n },\n };\n\n return fieldValidation;\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 { FieldValidation } from '@rjsf/core';\nimport { JsonObject } from '@backstage/types';\nimport { ApiHolder } from '@backstage/core-plugin-api';\nimport { CustomFieldValidator } from '../../../extensions';\nimport { Draft07 as JSONSchema } from 'json-schema-library';\nimport { createFieldValidation } from './schema';\n\nexport const createAsyncValidators = (\n rootSchema: JsonObject,\n validators: Record<string, undefined | CustomFieldValidator<unknown>>,\n context: {\n apiHolder: ApiHolder;\n },\n) => {\n async function validate(formData: JsonObject, pathPrefix: string = '#') {\n const parsedSchema = new JSONSchema(rootSchema);\n const formValidation: Record<string, FieldValidation> = {};\n for (const [key, value] of Object.entries(formData)) {\n const definitionInSchema = parsedSchema.getSchema(\n `${pathPrefix}/${key}`,\n formData,\n );\n\n if (definitionInSchema && 'ui:field' in definitionInSchema) {\n const validator = validators[definitionInSchema['ui:field']];\n if (validator) {\n const fieldValidation = createFieldValidation();\n try {\n await validator(value, fieldValidation, context);\n } catch (ex) {\n fieldValidation.addError(ex.message);\n }\n formValidation[key] = fieldValidation;\n }\n }\n }\n\n return formValidation;\n }\n\n return async (formData: JsonObject) => {\n return await validate(formData);\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 { 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 interface ParsedTemplateSchema {\n uiSchema: UiSchema;\n mergedSchema: JsonObject;\n schema: JsonObject;\n title: string;\n description?: string;\n}\nexport const useTemplateSchema = (\n manifest: TemplateParameterSchema,\n): { steps: ParsedTemplateSchema[] } => {\n const featureFlags = useApi(featureFlagsApiRef);\n const steps = manifest.steps.map(({ title, description, schema }) => ({\n title,\n description,\n mergedSchema: schema,\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 React from 'react';\nimport { StructuredMetadataTable } from '@backstage/core-components';\nimport { JsonObject } from '@backstage/types';\nimport { ParsedTemplateSchema } from './useTemplateSchema';\nimport { Draft07 as JSONSchema } from 'json-schema-library';\n\ninterface ReviewStateProps {\n schemas: ParsedTemplateSchema[];\n formState: JsonObject;\n}\n\nexport const ReviewState = (props: ReviewStateProps) => {\n const reviewData = Object.fromEntries(\n Object.entries(props.formState).map(([key, value]) => {\n for (const step of props.schemas) {\n const parsedSchema = new JSONSchema(step.mergedSchema);\n const definitionInSchema = parsedSchema.getSchema(\n `#/${key}`,\n props.formState,\n );\n if (definitionInSchema) {\n const backstageReviewOptions =\n definitionInSchema['ui:backstage']?.review;\n\n if (backstageReviewOptions) {\n if (backstageReviewOptions.mask) {\n return [key, backstageReviewOptions.mask];\n }\n if (backstageReviewOptions.show === false) {\n return [];\n }\n }\n\n if (definitionInSchema['ui:widget'] === 'password') {\n return [key, '******'];\n }\n }\n }\n return [key, value];\n }),\n );\n return <StructuredMetadataTable metadata={reviewData} />;\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 { useApiHolder } from '@backstage/core-plugin-api';\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 { FieldValidation, 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 { createAsyncValidators } from './createAsyncValidators';\nimport { useTemplateSchema } from './useTemplateSchema';\nimport { ReviewState } from './ReviewState';\n\nconst useStyles = makeStyles(theme => ({\n backButton: {\n marginRight: theme.spacing(1),\n },\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 apiHolder = useApiHolder();\n const [activeStep, setActiveStep] = useState(0);\n const [formState, setFormState] = useState({});\n const [errors, setErrors] = useState<\n undefined | Record<string, FieldValidation>\n >();\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 validators = useMemo(() => {\n return Object.fromEntries(\n props.extensions.map(({ name, validation }) => [name, validation]),\n );\n }, [props.extensions]);\n\n const validation = useMemo(() => {\n return createAsyncValidators(steps[activeStep]?.mergedSchema, validators, {\n apiHolder,\n });\n }, [steps, activeStep, validators, apiHolder]);\n\n const handleBack = () => {\n setActiveStep(prevActiveStep => prevActiveStep - 1);\n };\n\n const handleNext = async ({ formData }: { formData: JsonObject }) => {\n // TODO(blam): What do we do about loading states, does each field extension get a chance\n // to display it's own loading? Or should we grey out the entire form.\n setErrors(undefined);\n\n const returnedValidation = await validation(formData);\n\n const hasErrors = Object.values(returnedValidation).some(i => {\n return i.__errors.length > 0;\n });\n\n if (hasErrors) {\n setErrors(returnedValidation);\n } else {\n setErrors(undefined);\n setActiveStep(prevActiveStep => prevActiveStep + 1);\n }\n setFormState(current => ({ ...current, ...formData }));\n };\n\n const handleCreate = () => {\n // TODO(blam): Create the template in a modal with the ability to view the logs etc.\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 <MuiStep>\n <MuiStepLabel>Review</MuiStepLabel>\n </MuiStep>\n </MuiStepper>\n <div className={styles.formWrapper}>\n {activeStep < steps.length ? (\n <Form\n extraErrors={errors}\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 ) : (\n <>\n <ReviewState formState={formState} schemas={steps} />\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\" onClick={handleCreate}>\n Create\n </Button>\n </div>\n </>\n )}\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","JSONSchema","MuiTheme","MuiStepper","MuiStep","Mu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aAAa,CAAC,sBAAsB,EAAE,IAAI,kBAAkB,KAAK,CAAC,aAAa,CAAC,kBAAkB,EAAE;AACvI,MAAM,qBAAqB,EAAE,eAAe;AAC5C,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
|
|
@@ -260,7 +260,7 @@ const EntityPicker = (props) => {
|
|
|
260
260
|
);
|
|
261
261
|
const onSelect = useCallback(
|
|
262
262
|
(_, value) => {
|
|
263
|
-
onChange(value
|
|
263
|
+
onChange(value != null ? value : void 0);
|
|
264
264
|
},
|
|
265
265
|
[onChange]
|
|
266
266
|
);
|
|
@@ -1027,7 +1027,7 @@ const OwnerPickerFieldExtension = scaffolderPlugin.provide(
|
|
|
1027
1027
|
const ScaffolderPage = scaffolderPlugin.provide(
|
|
1028
1028
|
createRoutableExtension({
|
|
1029
1029
|
name: "ScaffolderPage",
|
|
1030
|
-
component: () => import('./Router-
|
|
1030
|
+
component: () => import('./Router-abd92937.esm.js').then((m) => m.Router),
|
|
1031
1031
|
mountPoint: rootRouteRef
|
|
1032
1032
|
})
|
|
1033
1033
|
);
|
|
@@ -1046,7 +1046,7 @@ const EntityTagsPickerFieldExtension = scaffolderPlugin.provide(
|
|
|
1046
1046
|
const NextScaffolderPage = scaffolderPlugin.provide(
|
|
1047
1047
|
createRoutableExtension({
|
|
1048
1048
|
name: "NextScaffolderPage",
|
|
1049
|
-
component: () => import('./index-
|
|
1049
|
+
component: () => import('./index-aefc5daf.esm.js').then((m) => m.Router),
|
|
1050
1050
|
mountPoint: nextRouteRef
|
|
1051
1051
|
})
|
|
1052
1052
|
);
|
|
@@ -1513,4 +1513,4 @@ const TaskPage = ({ loadingText }) => {
|
|
|
1513
1513
|
};
|
|
1514
1514
|
|
|
1515
1515
|
export { EntityTagsPickerFieldExtension as A, OwnerPickerFieldExtension as B, OwnedEntityPickerFieldExtension as C, RepoUrlPickerFieldExtension as D, EntityPicker as E, FIELD_EXTENSION_WRAPPER_KEY as F, ScaffolderPage as G, scaffolderPlugin as H, useTemplateSecrets as I, NextScaffolderPage as N, OwnerPicker as O, RepoUrlPicker as R, SecretsContext as S, TemplateTypePicker as T, actionsRouteRef as a, scaffolderListTaskRouteRef as b, scaffolderApiRef as c, scaffolderTaskRouteRef as d, editRouteRef as e, rootRouteRef as f, TaskStatusStepper as g, TaskPageLinks as h, FIELD_EXTENSION_KEY as i, SecretsContextProvider as j, TaskPage as k, legacySelectedTemplateRouteRef as l, EntityNamePicker as m, entityNamePickerValidation as n, EntityTagsPicker as o, repoPickerValidation as p, OwnedEntityPicker as q, registerComponentRouteRef as r, selectedTemplateRouteRef as s, nextSelectedTemplateRouteRef as t, nextRouteRef as u, ScaffolderClient as v, createScaffolderFieldExtension as w, ScaffolderFieldExtensions as x, EntityPickerFieldExtension as y, EntityNamePickerFieldExtension as z };
|
|
1516
|
-
//# sourceMappingURL=index-
|
|
1516
|
+
//# sourceMappingURL=index-be59d2dd.esm.js.map
|