@backstage/plugin-scaffolder-react 1.8.0 → 1.8.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.d.ts +18 -1
- package/dist/alpha.esm.js +32 -23
- package/dist/alpha.esm.js.map +1 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-react
|
|
2
2
|
|
|
3
|
+
## 1.8.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 930b5c1: Added 'root' and 'label' class key to TemplateCategoryPicker
|
|
8
|
+
- 6d649d2: Updated dependency `flatted` to `3.3.1`.
|
|
9
|
+
- 0cecb09: Updated dependency `@rjsf/utils` to `5.17.1`.
|
|
10
|
+
Updated dependency `@rjsf/core` to `5.17.1`.
|
|
11
|
+
Updated dependency `@rjsf/material-ui` to `5.17.1`.
|
|
12
|
+
Updated dependency `@rjsf/validator-ajv8` to `5.17.1`.
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @backstage/theme@0.5.2-next.0
|
|
15
|
+
- @backstage/core-components@0.14.1-next.0
|
|
16
|
+
- @backstage/plugin-catalog-react@1.10.1-next.0
|
|
17
|
+
- @backstage/catalog-client@1.6.1-next.0
|
|
18
|
+
- @backstage/catalog-model@1.4.5-next.0
|
|
19
|
+
- @backstage/core-plugin-api@1.9.1-next.0
|
|
20
|
+
- @backstage/types@1.1.1
|
|
21
|
+
- @backstage/version-bridge@1.0.7
|
|
22
|
+
- @backstage/plugin-scaffolder-common@1.5.1-next.0
|
|
23
|
+
|
|
3
24
|
## 1.8.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { TemplatePresentationV1beta3, TemplateEntityV1beta3, TaskStep } from '@b
|
|
|
6
6
|
import { UiSchema, FieldValidation } from '@rjsf/utils';
|
|
7
7
|
import { TemplateParameterSchema, FieldExtensionOptions, FormProps, ReviewStepProps, LayoutOptions, CustomFieldValidator, TemplateGroupFilter, ScaffolderTaskOutput, ScaffolderRJSFFormProps, ScaffolderStep } from '@backstage/plugin-scaffolder-react';
|
|
8
8
|
import { ApiHolder, IconComponent } from '@backstage/core-plugin-api';
|
|
9
|
+
import { Overrides } from '@material-ui/core/styles/overrides';
|
|
10
|
+
import { StyleRules } from '@material-ui/core/styles/withStyles';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* This is the parsed template schema that is returned from the {@link useTemplateSchema} hook.
|
|
@@ -209,6 +211,8 @@ declare const TaskLogStream: (props: {
|
|
|
209
211
|
};
|
|
210
212
|
}) => React__default.JSX.Element;
|
|
211
213
|
|
|
214
|
+
/** @alpha */
|
|
215
|
+
type ScaffolderReactTemplateCategoryPickerClassKey = 'root' | 'label';
|
|
212
216
|
/**
|
|
213
217
|
* The Category Picker that is rendered on the left side for picking
|
|
214
218
|
* categories and filtering the template list.
|
|
@@ -286,4 +290,17 @@ declare const useTemplateParameterSchema: (templateRef: string) => {
|
|
|
286
290
|
*/
|
|
287
291
|
declare const useFilteredSchemaProperties: (manifest: TemplateParameterSchema | undefined) => TemplateParameterSchema | undefined;
|
|
288
292
|
|
|
289
|
-
|
|
293
|
+
/** @alpha */
|
|
294
|
+
type ScaffolderReactComponentsNameToClassKey = {
|
|
295
|
+
ScaffolderReactTemplateCategoryPicker: ScaffolderReactTemplateCategoryPickerClassKey;
|
|
296
|
+
};
|
|
297
|
+
/** @alpha */
|
|
298
|
+
type BackstageOverrides = Overrides & {
|
|
299
|
+
[Name in keyof ScaffolderReactComponentsNameToClassKey]?: Partial<StyleRules<ScaffolderReactComponentsNameToClassKey[Name]>>;
|
|
300
|
+
};
|
|
301
|
+
declare module '@backstage/theme' {
|
|
302
|
+
interface OverrideComponentNameToClassKeys extends ScaffolderReactComponentsNameToClassKey {
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export { BackstageOverrides, DefaultTemplateOutputs, EmbeddableWorkflow, Form, FormValidation, ParsedTemplateSchema, ReviewState, ReviewStateProps, ScaffolderField, ScaffolderFieldProps, ScaffolderPageContextMenu, ScaffolderPageContextMenuProps, ScaffolderReactComponentsNameToClassKey, ScaffolderReactTemplateCategoryPickerClassKey, Stepper, StepperProps, TaskLogStream, TaskSteps, TaskStepsProps, TemplateCard, TemplateCardProps, TemplateCategoryPicker, TemplateGroup, TemplateGroupProps, TemplateGroups, TemplateGroupsProps, Workflow, WorkflowProps, createAsyncValidators, createFieldValidation, extractSchemaFromStep, useFilteredSchemaProperties, useFormDataFromQuery, useTemplateParameterSchema, useTemplateSchema };
|
package/dist/alpha.esm.js
CHANGED
|
@@ -412,7 +412,7 @@ var FieldOverrides = /*#__PURE__*/Object.freeze({
|
|
|
412
412
|
DescriptionField: DescriptionField
|
|
413
413
|
});
|
|
414
414
|
|
|
415
|
-
const useStyles$
|
|
415
|
+
const useStyles$c = makeStyles((theme) => ({
|
|
416
416
|
markdownDescription: {
|
|
417
417
|
fontSize: theme.typography.caption.fontSize,
|
|
418
418
|
margin: 0,
|
|
@@ -435,7 +435,7 @@ const ScaffolderField = (props) => {
|
|
|
435
435
|
required,
|
|
436
436
|
disabled
|
|
437
437
|
} = props;
|
|
438
|
-
const classes = useStyles$
|
|
438
|
+
const classes = useStyles$c();
|
|
439
439
|
return /* @__PURE__ */ React.createElement(
|
|
440
440
|
FormControl,
|
|
441
441
|
{
|
|
@@ -516,7 +516,7 @@ const FieldTemplate = (props) => {
|
|
|
516
516
|
);
|
|
517
517
|
};
|
|
518
518
|
|
|
519
|
-
const useStyles$
|
|
519
|
+
const useStyles$b = makeStyles((theme) => ({
|
|
520
520
|
markdownDescription: {
|
|
521
521
|
fontSize: theme.typography.caption.fontSize,
|
|
522
522
|
margin: 0,
|
|
@@ -530,7 +530,7 @@ const useStyles$a = makeStyles((theme) => ({
|
|
|
530
530
|
}));
|
|
531
531
|
const DescriptionFieldTemplate = (props) => {
|
|
532
532
|
const { id, description } = props;
|
|
533
|
-
const classes = useStyles$
|
|
533
|
+
const classes = useStyles$b();
|
|
534
534
|
if (description) {
|
|
535
535
|
if (typeof description === "string") {
|
|
536
536
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -582,7 +582,7 @@ const Form = (props) => {
|
|
|
582
582
|
return /* @__PURE__ */ React.createElement(WrappedForm, { ...props, templates, fields: wrappedFields });
|
|
583
583
|
};
|
|
584
584
|
|
|
585
|
-
const useStyles$
|
|
585
|
+
const useStyles$a = makeStyles(
|
|
586
586
|
(_theme) => createStyles({
|
|
587
587
|
list: {
|
|
588
588
|
width: "100%"
|
|
@@ -593,7 +593,7 @@ const useStyles$9 = makeStyles(
|
|
|
593
593
|
})
|
|
594
594
|
);
|
|
595
595
|
const ErrorListTemplate = ({ errors }) => {
|
|
596
|
-
const classes = useStyles$
|
|
596
|
+
const classes = useStyles$a();
|
|
597
597
|
return /* @__PURE__ */ React.createElement(Paper, null, /* @__PURE__ */ React.createElement(List, { dense: true, className: classes.list }, errors.map((error, index) => /* @__PURE__ */ React.createElement(ListItem, { key: index }, /* @__PURE__ */ React.createElement(ListItemIcon, null, /* @__PURE__ */ React.createElement(ErrorIcon, { color: "error" })), /* @__PURE__ */ React.createElement(
|
|
598
598
|
ListItemText,
|
|
599
599
|
{
|
|
@@ -603,7 +603,7 @@ const ErrorListTemplate = ({ errors }) => {
|
|
|
603
603
|
)))));
|
|
604
604
|
};
|
|
605
605
|
|
|
606
|
-
const useStyles$
|
|
606
|
+
const useStyles$9 = makeStyles((theme) => ({
|
|
607
607
|
backButton: {
|
|
608
608
|
marginRight: theme.spacing(1)
|
|
609
609
|
},
|
|
@@ -634,7 +634,7 @@ const Stepper = (stepperProps) => {
|
|
|
634
634
|
const [isValidating, setIsValidating] = useState(false);
|
|
635
635
|
const [formState, setFormState] = useFormDataFromQuery(props.initialState);
|
|
636
636
|
const [errors, setErrors] = useState();
|
|
637
|
-
const styles = useStyles$
|
|
637
|
+
const styles = useStyles$9();
|
|
638
638
|
const extensions = useMemo(() => {
|
|
639
639
|
return Object.fromEntries(
|
|
640
640
|
props.extensions.map(({ name, component }) => [name, component])
|
|
@@ -785,7 +785,7 @@ const Stepper = (stepperProps) => {
|
|
|
785
785
|
)));
|
|
786
786
|
};
|
|
787
787
|
|
|
788
|
-
const useStyles$
|
|
788
|
+
const useStyles$8 = makeStyles(() => ({
|
|
789
789
|
header: {
|
|
790
790
|
backgroundImage: ({ cardBackgroundImage }) => cardBackgroundImage,
|
|
791
791
|
color: ({ cardFontColor }) => cardFontColor
|
|
@@ -804,7 +804,7 @@ const CardHeader = (props) => {
|
|
|
804
804
|
} = props;
|
|
805
805
|
const { getPageTheme } = useTheme();
|
|
806
806
|
const themeForType = getPageTheme({ themeId: type });
|
|
807
|
-
const styles = useStyles$
|
|
807
|
+
const styles = useStyles$8({
|
|
808
808
|
cardFontColor: themeForType.fontColor,
|
|
809
809
|
cardBackgroundImage: themeForType.backgroundImage
|
|
810
810
|
});
|
|
@@ -819,18 +819,18 @@ const CardHeader = (props) => {
|
|
|
819
819
|
);
|
|
820
820
|
};
|
|
821
821
|
|
|
822
|
-
const useStyles$
|
|
822
|
+
const useStyles$7 = makeStyles(() => ({
|
|
823
823
|
linkText: {
|
|
824
824
|
display: "inline-flex",
|
|
825
825
|
alignItems: "center"
|
|
826
826
|
}
|
|
827
827
|
}));
|
|
828
828
|
const CardLink = ({ icon: Icon, text, url }) => {
|
|
829
|
-
const styles = useStyles$
|
|
829
|
+
const styles = useStyles$7();
|
|
830
830
|
return /* @__PURE__ */ React.createElement("div", { className: styles.linkText }, /* @__PURE__ */ React.createElement(Icon, { fontSize: "small" }), /* @__PURE__ */ React.createElement(Link, { style: { marginLeft: "8px" }, to: url }, text || url));
|
|
831
831
|
};
|
|
832
832
|
|
|
833
|
-
const useStyles$
|
|
833
|
+
const useStyles$6 = makeStyles((theme) => ({
|
|
834
834
|
box: {
|
|
835
835
|
overflow: "hidden",
|
|
836
836
|
textOverflow: "ellipsis",
|
|
@@ -868,7 +868,7 @@ const useStyles$5 = makeStyles((theme) => ({
|
|
|
868
868
|
const TemplateCard = (props) => {
|
|
869
869
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
870
870
|
const { template } = props;
|
|
871
|
-
const styles = useStyles$
|
|
871
|
+
const styles = useStyles$6();
|
|
872
872
|
const ownedByRelations = getEntityRelations(template, RELATION_OWNED_BY);
|
|
873
873
|
const app = useApp();
|
|
874
874
|
const iconResolver = (key) => {
|
|
@@ -989,7 +989,7 @@ const TemplateGroups = (props) => {
|
|
|
989
989
|
}));
|
|
990
990
|
};
|
|
991
991
|
|
|
992
|
-
const useStyles$
|
|
992
|
+
const useStyles$5 = makeStyles({
|
|
993
993
|
markdown: {
|
|
994
994
|
/** to make the styles for React Markdown not leak into the description */
|
|
995
995
|
"& :first-child": {
|
|
@@ -1003,7 +1003,7 @@ const useStyles$4 = makeStyles({
|
|
|
1003
1003
|
const Workflow = (workflowProps) => {
|
|
1004
1004
|
var _a;
|
|
1005
1005
|
const { title, description, namespace, templateName, ...props } = workflowProps;
|
|
1006
|
-
const styles = useStyles$
|
|
1006
|
+
const styles = useStyles$5();
|
|
1007
1007
|
const templateRef = stringifyEntityRef({
|
|
1008
1008
|
kind: "Template",
|
|
1009
1009
|
namespace,
|
|
@@ -1046,7 +1046,7 @@ const Workflow = (workflowProps) => {
|
|
|
1046
1046
|
};
|
|
1047
1047
|
const EmbeddableWorkflow = (props) => /* @__PURE__ */ React.createElement(SecretsContextProvider, null, /* @__PURE__ */ React.createElement(Workflow, { ...props }));
|
|
1048
1048
|
|
|
1049
|
-
const useStyles$
|
|
1049
|
+
const useStyles$4 = makeStyles({
|
|
1050
1050
|
root: {
|
|
1051
1051
|
"&:hover": {
|
|
1052
1052
|
textDecoration: "none"
|
|
@@ -1055,7 +1055,7 @@ const useStyles$3 = makeStyles({
|
|
|
1055
1055
|
});
|
|
1056
1056
|
const LinkOutputs = (props) => {
|
|
1057
1057
|
const { links = [] } = props.output;
|
|
1058
|
-
const classes = useStyles$
|
|
1058
|
+
const classes = useStyles$4();
|
|
1059
1059
|
const app = useApp();
|
|
1060
1060
|
const entityRoute = useRouteRef(entityRouteRef);
|
|
1061
1061
|
const iconResolver = (key) => {
|
|
@@ -1217,7 +1217,7 @@ const StepTime = (props) => {
|
|
|
1217
1217
|
return /* @__PURE__ */ React.createElement(Typography, { variant: "caption" }, time);
|
|
1218
1218
|
};
|
|
1219
1219
|
|
|
1220
|
-
const useStyles$
|
|
1220
|
+
const useStyles$3 = makeStyles((theme) => ({
|
|
1221
1221
|
failed: {
|
|
1222
1222
|
backgroundColor: theme.palette.error.main
|
|
1223
1223
|
},
|
|
@@ -1226,7 +1226,7 @@ const useStyles$2 = makeStyles((theme) => ({
|
|
|
1226
1226
|
}
|
|
1227
1227
|
}));
|
|
1228
1228
|
const TaskBorder = (props) => {
|
|
1229
|
-
const styles = useStyles$
|
|
1229
|
+
const styles = useStyles$3();
|
|
1230
1230
|
if (!props.isComplete) {
|
|
1231
1231
|
return /* @__PURE__ */ React.createElement(LinearProgress, { variant: "indeterminate" });
|
|
1232
1232
|
}
|
|
@@ -1281,7 +1281,7 @@ const TaskSteps = (props) => {
|
|
|
1281
1281
|
)));
|
|
1282
1282
|
};
|
|
1283
1283
|
|
|
1284
|
-
const useStyles$
|
|
1284
|
+
const useStyles$2 = makeStyles$1({
|
|
1285
1285
|
root: {
|
|
1286
1286
|
width: "100%",
|
|
1287
1287
|
height: "100%",
|
|
@@ -1289,7 +1289,7 @@ const useStyles$1 = makeStyles$1({
|
|
|
1289
1289
|
}
|
|
1290
1290
|
});
|
|
1291
1291
|
const TaskLogStream = (props) => {
|
|
1292
|
-
const styles = useStyles$
|
|
1292
|
+
const styles = useStyles$2();
|
|
1293
1293
|
return /* @__PURE__ */ React.createElement("div", { className: styles.root }, /* @__PURE__ */ React.createElement(
|
|
1294
1294
|
LogViewer,
|
|
1295
1295
|
{
|
|
@@ -1300,7 +1300,15 @@ const TaskLogStream = (props) => {
|
|
|
1300
1300
|
|
|
1301
1301
|
const icon = /* @__PURE__ */ React.createElement(CheckBoxOutlineBlankIcon, { fontSize: "small" });
|
|
1302
1302
|
const checkedIcon = /* @__PURE__ */ React.createElement(CheckBoxIcon, { fontSize: "small" });
|
|
1303
|
+
const useStyles$1 = makeStyles(
|
|
1304
|
+
{
|
|
1305
|
+
root: {},
|
|
1306
|
+
label: {}
|
|
1307
|
+
},
|
|
1308
|
+
{ name: "ScaffolderReactTemplateCategoryPicker" }
|
|
1309
|
+
);
|
|
1303
1310
|
const TemplateCategoryPicker = () => {
|
|
1311
|
+
const classes = useStyles$1();
|
|
1304
1312
|
const alertApi = useApi(alertApiRef);
|
|
1305
1313
|
const { error, loading, availableTypes, selectedTypes, setSelectedTypes } = useEntityTypeFilter();
|
|
1306
1314
|
if (loading)
|
|
@@ -1314,9 +1322,10 @@ const TemplateCategoryPicker = () => {
|
|
|
1314
1322
|
}
|
|
1315
1323
|
if (!availableTypes)
|
|
1316
1324
|
return null;
|
|
1317
|
-
return /* @__PURE__ */ React.createElement(Box, { pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(
|
|
1325
|
+
return /* @__PURE__ */ React.createElement(Box, { className: classes.root, pb: 1, pt: 1 }, /* @__PURE__ */ React.createElement(
|
|
1318
1326
|
Typography,
|
|
1319
1327
|
{
|
|
1328
|
+
className: classes.label,
|
|
1320
1329
|
variant: "button",
|
|
1321
1330
|
component: "label",
|
|
1322
1331
|
htmlFor: "categories-picker"
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":["../src/next/lib/schema.ts","../src/next/components/Stepper/utils.ts","../src/next/components/Stepper/createAsyncValidators.ts","../src/next/components/ReviewState/ReviewState.tsx","../src/next/hooks/useTemplateSchema.ts","../src/next/hooks/useFormDataFromQuery.ts","../src/next/hooks/useTemplateParameterSchema.ts","../src/next/hooks/useFilteredSchemaProperties.ts","../src/next/hooks/useTransformSchemaToProps.ts","../src/next/components/Stepper/FieldOverrides/DescriptionField.tsx","../src/next/components/ScaffolderField/ScaffolderField.tsx","../src/next/components/Form/FieldTemplate.tsx","../src/next/components/Form/DescriptionFieldTemplate.tsx","../src/next/components/Form/Form.tsx","../src/next/components/Stepper/ErrorListTemplate/errorListTemplate.tsx","../src/next/components/Stepper/Stepper.tsx","../src/next/components/TemplateCard/CardHeader.tsx","../src/next/components/TemplateCard/CardLink.tsx","../src/next/components/TemplateCard/TemplateCard.tsx","../src/next/components/TemplateGroup/TemplateGroup.tsx","../src/next/components/TemplateGroups/TemplateGroups.tsx","../src/next/components/Workflow/Workflow.tsx","../src/next/components/TemplateOutputs/LinkOutputs.tsx","../src/next/components/TemplateOutputs/TextOutputs.tsx","../src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx","../src/next/components/TaskSteps/StepIcon.tsx","../src/next/components/TaskSteps/StepTime.tsx","../src/next/components/TaskSteps/TaskBorder.tsx","../src/next/components/TaskSteps/TaskSteps.tsx","../src/next/components/TaskLogStream/TaskLogStream.tsx","../src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx","../src/next/components/ScaffolderPageContextMenu/ScaffolderPageContextMenu.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { JsonObject } from '@backstage/types';\nimport { stringify, parse } from 'flatted';\nimport { FieldValidation, UiSchema } from '@rjsf/utils';\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 {\n properties,\n items,\n anyOf,\n oneOf,\n allOf,\n dependencies,\n then,\n else: _else,\n } = 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\n if (!isObject(uiSchema[propName])) {\n const innerUiSchema = {};\n uiSchema[propName] = innerUiSchema;\n }\n\n extractUiSchema(schemaNode, uiSchema[propName] as JsonObject);\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 if (isObject(then)) {\n extractUiSchema(then, uiSchema);\n }\n\n if (isObject(_else)) {\n extractUiSchema(_else, uiSchema);\n }\n}\n\n/**\n * Takes a step from a Backstage Template Manifest and converts it to a JSON Schema and UI Schema for rjsf\n * @alpha\n */\nexport const extractSchemaFromStep = (\n inputStep: JsonObject,\n): { uiSchema: UiSchema; schema: JsonObject } => {\n const uiSchema: UiSchema = {};\n const returnSchema: JsonObject = parse(stringify(inputStep));\n extractUiSchema(returnSchema, uiSchema);\n return { uiSchema, schema: returnSchema };\n};\n\n/**\n * Creates a field validation object for use in react jsonschema form\n * @alpha\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 2023 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 type { JsonObject, JsonValue } from '@backstage/types';\nimport type { FieldValidation } from '@rjsf/utils';\nimport { FormValidation } from './createAsyncValidators';\n\nfunction isFieldValidation(error: any): error is FieldValidation {\n return !!error && '__errors' in error;\n}\n\nexport function hasErrors(errors?: FormValidation): boolean {\n if (!errors) {\n return false;\n }\n\n for (const error of Object.values(errors)) {\n if (isFieldValidation(error)) {\n if ((error.__errors ?? []).length > 0) {\n return true;\n }\n\n continue;\n }\n\n if (hasErrors(error)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function isObject(value: JsonValue | undefined): value is JsonObject {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\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/utils';\nimport type { JsonObject, JsonValue } from '@backstage/types';\nimport { ApiHolder } from '@backstage/core-plugin-api';\nimport { Draft07 as JSONSchema } from 'json-schema-library';\nimport { createFieldValidation, extractSchemaFromStep } from '../../lib';\nimport {\n CustomFieldValidator,\n FieldExtensionUiSchema,\n} from '@backstage/plugin-scaffolder-react';\nimport { isObject } from './utils';\n\n/** @alpha */\nexport type FormValidation = {\n [name: string]: FieldValidation | FormValidation;\n};\n\n/** @alpha */\nexport const createAsyncValidators = (\n rootSchema: JsonObject,\n validators: Record<\n string,\n undefined | CustomFieldValidator<unknown, unknown>\n >,\n context: {\n apiHolder: ApiHolder;\n },\n) => {\n async function validate(\n formData: JsonObject,\n pathPrefix: string = '#',\n current: JsonObject = formData,\n ): Promise<FormValidation> {\n const parsedSchema = new JSONSchema(rootSchema);\n const formValidation: FormValidation = {};\n\n const validateForm = async (\n validatorName: string,\n key: string,\n value: JsonValue | undefined,\n schema: JsonObject,\n uiSchema: FieldExtensionUiSchema<unknown, unknown>,\n ) => {\n const validator = validators[validatorName];\n if (validator) {\n const fieldValidation = createFieldValidation();\n try {\n await validator(value, fieldValidation, {\n ...context,\n formData,\n schema,\n uiSchema,\n });\n } catch (ex) {\n fieldValidation.addError(ex.message);\n }\n formValidation[key] = fieldValidation;\n }\n };\n\n for (const [key, value] of Object.entries(current)) {\n const path = `${pathPrefix}/${key}`;\n const definitionInSchema = parsedSchema.getSchema(path, formData);\n const { schema, uiSchema } = extractSchemaFromStep(definitionInSchema);\n\n const hasItems = definitionInSchema && definitionInSchema.items;\n\n const doValidateItem = async (\n propValue: JsonObject,\n itemSchema: JsonObject,\n itemUiSchema: FieldExtensionUiSchema<unknown, unknown>,\n ) => {\n await validateForm(\n propValue['ui:field'] as string,\n key,\n value,\n itemSchema,\n itemUiSchema,\n );\n };\n\n const doValidate = async (propValue: JsonObject) => {\n if ('ui:field' in propValue) {\n const { schema: itemsSchema, uiSchema: itemsUiSchema } =\n extractSchemaFromStep(definitionInSchema.items);\n await doValidateItem(propValue, itemsSchema, itemsUiSchema);\n }\n };\n\n if (definitionInSchema && 'ui:field' in definitionInSchema) {\n await doValidateItem(definitionInSchema, schema, uiSchema);\n } else if (hasItems && 'ui:field' in definitionInSchema.items) {\n await doValidate(definitionInSchema.items);\n } else if (hasItems && definitionInSchema.items.type === 'object') {\n const properties = (definitionInSchema.items?.properties ??\n []) as JsonObject[];\n for (const [, propValue] of Object.entries(properties)) {\n await doValidate(propValue);\n }\n } else if (isObject(value)) {\n formValidation[key] = await validate(formData, path, value);\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 React from 'react';\nimport { StructuredMetadataTable } from '@backstage/core-components';\nimport { JsonObject } from '@backstage/types';\nimport { Draft07 as JSONSchema } from 'json-schema-library';\nimport { ParsedTemplateSchema } from '../../hooks/useTemplateSchema';\n\n/**\n * The props for the {@link ReviewState} component.\n * @alpha\n */\nexport type ReviewStateProps = {\n schemas: ParsedTemplateSchema[];\n formState: JsonObject;\n};\n\n/**\n * The component used by the {@link Stepper} to render the review step.\n * @alpha\n */\nexport const ReviewState = (props: ReviewStateProps) => {\n const reviewData = Object.fromEntries(\n Object.entries(props.formState)\n .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 if (definitionInSchema.enum && definitionInSchema.enumNames) {\n return [\n key,\n definitionInSchema.enumNames[\n definitionInSchema.enum.indexOf(value)\n ] || value,\n ];\n }\n }\n }\n return [key, value];\n })\n .filter(prop => prop.length > 0),\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 { featureFlagsApiRef, useApi } from '@backstage/core-plugin-api';\nimport { TemplatePresentationV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { JsonObject } from '@backstage/types';\nimport { UiSchema } from '@rjsf/utils';\nimport { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';\nimport { extractSchemaFromStep } from '../lib';\n\n/**\n * This is the parsed template schema that is returned from the {@link useTemplateSchema} hook.\n * @alpha\n */\nexport interface ParsedTemplateSchema {\n uiSchema: UiSchema;\n mergedSchema: JsonObject;\n schema: JsonObject;\n title: string;\n description?: string;\n}\n\n/**\n * This hook will parse the template schema and return the steps with the\n * parsed schema and uiSchema. Filtering out any steps or properties that\n * are not enabled with feature flags.\n * @alpha\n */\nexport const useTemplateSchema = (\n manifest: TemplateParameterSchema,\n): {\n steps: ParsedTemplateSchema[];\n presentation?: TemplatePresentationV1beta3;\n} => {\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 const strippedSchema = {\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 },\n } as ParsedTemplateSchema;\n\n if (step.schema?.properties || !step.schema?.dependencies) {\n strippedSchema.schema.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 return strippedSchema;\n });\n\n return {\n presentation: manifest.presentation,\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 */\n\nimport { JsonValue } from '@backstage/types';\nimport qs from 'qs';\nimport { useState } from 'react';\n\n/**\n * This hook is used to get the formData from the query string.\n * @alpha\n */\nexport const useFormDataFromQuery = (\n initialState?: Record<string, JsonValue>,\n) => {\n return useState<Record<string, any>>(() => {\n if (initialState) {\n return initialState;\n }\n\n const query = qs.parse(window.location.search, {\n ignoreQueryPrefix: true,\n });\n\n try {\n return JSON.parse(query.formData as string);\n } catch (e) {\n return {};\n }\n });\n};\n","/*\n * Copyright 2023 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 useAsync from 'react-use/lib/useAsync';\nimport { scaffolderApiRef } from '../../api/ref';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';\n\n/**\n * @alpha\n */\nexport const 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 {\n manifest: value as TemplateParameterSchema | undefined,\n loading,\n error,\n };\n};\n","/*\n * Copyright 2023 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 cloneDeep from 'lodash/cloneDeep';\nimport { useApi, featureFlagsApiRef } from '@backstage/core-plugin-api';\nimport { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';\n\n/**\n * Returns manifest of software templates with steps without a featureFlag tag.\n * @alpha\n */\n\nexport const useFilteredSchemaProperties = (\n manifest: TemplateParameterSchema | undefined,\n): TemplateParameterSchema | undefined => {\n const featureFlagKey = 'backstage:featureFlag';\n const featureFlagApi = useApi(featureFlagsApiRef);\n\n if (!manifest) {\n return undefined;\n }\n\n const filteredSteps = manifest?.steps\n .filter(step => {\n const featureFlag = step.schema[featureFlagKey];\n return (\n typeof featureFlag !== 'string' || featureFlagApi.isActive(featureFlag)\n );\n })\n .map(step => {\n const filteredStep = cloneDeep(step);\n const removedPropertyKeys: Array<string> = [];\n if (filteredStep.schema.properties) {\n filteredStep.schema.properties = Object.fromEntries(\n Object.entries(filteredStep.schema.properties).filter(\n ([key, value]) => {\n if (value[featureFlagKey]) {\n if (featureFlagApi.isActive(value[featureFlagKey])) {\n return true;\n }\n\n removedPropertyKeys.push(key);\n return false;\n }\n return true;\n },\n ),\n );\n\n // remove the feature flag property key from required if they are not active\n filteredStep.schema.required = Array.isArray(\n filteredStep.schema.required,\n )\n ? filteredStep.schema.required?.filter(\n r => !removedPropertyKeys.includes(r as string),\n )\n : filteredStep.schema.required;\n }\n\n return filteredStep;\n });\n\n return { ...manifest, steps: filteredSteps };\n};\n","/*\n * Copyright 2023 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 { LayoutOptions } from '../../layouts';\nimport { type ParsedTemplateSchema } from './useTemplateSchema';\n\ninterface Options {\n layouts?: LayoutOptions[];\n}\n\nexport const useTransformSchemaToProps = (\n step: ParsedTemplateSchema,\n options: Options = {},\n): ParsedTemplateSchema => {\n const { layouts = [] } = options;\n const objectFieldTemplate = step?.uiSchema['ui:ObjectFieldTemplate'] as\n | string\n | undefined;\n\n if (typeof objectFieldTemplate !== 'string') {\n return step;\n }\n\n const Layout = layouts.find(\n layout => layout.name === objectFieldTemplate,\n )?.component;\n\n if (!Layout) {\n return step;\n }\n\n return {\n ...step,\n uiSchema: {\n ...step.uiSchema,\n ['ui:ObjectFieldTemplate']: Layout,\n },\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 React from 'react';\nimport { MarkdownContent } from '@backstage/core-components';\nimport { FieldProps } from '@rjsf/utils';\n\nexport const DescriptionField = ({ description }: FieldProps) =>\n description && <MarkdownContent content={description} linkTarget=\"_blank\" />;\n","/*\n * Copyright 2023 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, ReactElement } from 'react';\n\nimport { MarkdownContent } from '@backstage/core-components';\nimport { FormControl, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n markdownDescription: {\n fontSize: theme.typography.caption.fontSize,\n margin: 0,\n color: theme.palette.text.secondary,\n '& :first-child': {\n margin: 0,\n marginTop: '3px', // to keep the standard browser padding\n },\n },\n}));\n\n/**\n * Props for the {@link ScaffolderField} component\n * @alpha\n */\nexport interface ScaffolderFieldProps {\n rawDescription?: string;\n errors?: ReactElement;\n rawErrors?: string[];\n help?: ReactElement;\n rawHelp?: string;\n required?: boolean;\n disabled?: boolean;\n displayLabel?: boolean;\n}\n\n/**\n * A component to wrap up a input field which helps with formatting and supporting markdown\n * on the field types\n * @alpha\n */\nexport const ScaffolderField = (\n props: PropsWithChildren<ScaffolderFieldProps>,\n) => {\n const {\n children,\n displayLabel = true,\n rawErrors = [],\n errors,\n help,\n rawDescription,\n required,\n disabled,\n } = props;\n const classes = useStyles();\n return (\n <FormControl\n fullWidth\n error={rawErrors.length ? true : false}\n required={required}\n disabled={disabled}\n >\n {children}\n {displayLabel && rawDescription ? (\n <MarkdownContent\n content={rawDescription}\n className={classes.markdownDescription}\n />\n ) : null}\n {errors}\n {help}\n </FormControl>\n );\n};\n","/*\n * Copyright 2023 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';\n\nimport {\n FieldTemplateProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n getTemplate,\n getUiOptions,\n} from '@rjsf/utils';\n\nimport { ScaffolderField } from '../ScaffolderField';\n\n/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field\n * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.\n * @alpha\n * @param props - The `FieldTemplateProps` for this component\n */\nexport const FieldTemplate = <\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(\n props: FieldTemplateProps<T, S, F>,\n) => {\n const {\n id,\n children,\n classNames,\n style,\n disabled,\n displayLabel,\n hidden,\n label,\n onDropPropertyClick,\n onKeyChange,\n readonly,\n required,\n rawErrors = [],\n errors,\n help,\n rawDescription,\n schema,\n uiSchema,\n registry,\n } = props;\n\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const WrapIfAdditionalTemplate = getTemplate<\n 'WrapIfAdditionalTemplate',\n T,\n S,\n F\n >('WrapIfAdditionalTemplate', registry, uiOptions);\n\n if (hidden) {\n return <div style={{ display: 'none' }}>{children}</div>;\n }\n return (\n <WrapIfAdditionalTemplate\n classNames={classNames}\n style={style}\n disabled={disabled}\n id={id}\n label={label}\n onDropPropertyClick={onDropPropertyClick}\n onKeyChange={onKeyChange}\n readonly={readonly}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n >\n <ScaffolderField\n displayLabel={displayLabel}\n rawErrors={rawErrors}\n help={help}\n disabled={disabled}\n rawDescription={rawDescription}\n errors={errors}\n required={required}\n >\n {children}\n </ScaffolderField>\n </WrapIfAdditionalTemplate>\n );\n};\n","/*\n * Copyright 2023 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';\n\nimport { MarkdownContent } from '@backstage/core-components';\nimport { makeStyles, Typography } from '@material-ui/core';\nimport {\n DescriptionFieldProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\nconst useStyles = makeStyles(theme => ({\n markdownDescription: {\n fontSize: theme.typography.caption.fontSize,\n margin: 0,\n color: theme.palette.text.secondary,\n '& :first-child': {\n margin: 0,\n marginTop: '3px', // to keep the standard browser padding\n },\n },\n}));\n\n/** The `DescriptionField` is the template to use to render the description of a field\n * @alpha\n * @param props - The `DescriptionFieldProps` for this component\n */\nexport const DescriptionFieldTemplate = <\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(\n props: DescriptionFieldProps<T, S, F>,\n) => {\n const { id, description } = props;\n const classes = useStyles();\n\n if (description) {\n if (typeof description === 'string') {\n return (\n <MarkdownContent\n content={description}\n className={classes.markdownDescription}\n />\n );\n }\n\n return (\n <Typography id={id} variant=\"subtitle2\" style={{ marginTop: '5px' }}>\n {description}\n </Typography>\n );\n }\n\n return null;\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { withTheme } from '@rjsf/core';\nimport React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { FieldTemplate } from './FieldTemplate';\nimport { DescriptionFieldTemplate } from './DescriptionFieldTemplate';\nimport { FieldProps } from '@rjsf/utils';\nimport { ScaffolderRJSFFormProps } from '@backstage/plugin-scaffolder-react';\nimport { Theme as MuiTheme } from '@rjsf/material-ui';\n\nconst WrappedForm = withTheme(MuiTheme);\n\n/**\n * The Form component\n * @alpha\n */\nexport const Form = (props: PropsWithChildren<ScaffolderRJSFFormProps>) => {\n // This is where we unbreak the changes from RJSF, and make it work with our custom fields so we don't pass on this\n // breaking change to our users. We will look more into a better API for this in scaffolderv2.\n const wrappedFields = React.useMemo(\n () =>\n Object.fromEntries(\n Object.entries(props.fields ?? {}).map(([key, Component]) => [\n key,\n (wrapperProps: FieldProps) => {\n return (\n <Component\n {...wrapperProps}\n uiSchema={wrapperProps.uiSchema ?? {}}\n formData={wrapperProps.formData}\n rawErrors={wrapperProps.rawErrors ?? []}\n />\n );\n },\n ]),\n ),\n [props.fields],\n );\n\n const templates = React.useMemo(\n () => ({\n FieldTemplate,\n DescriptionFieldTemplate,\n ...props.templates,\n }),\n [props.templates],\n );\n\n return (\n <WrappedForm {...props} templates={templates} fields={wrappedFields} />\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 { ErrorListProps } from '@rjsf/utils';\nimport {\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Paper,\n Theme,\n createStyles,\n makeStyles,\n} from '@material-ui/core';\nimport ErrorIcon from '@material-ui/icons/Error';\n\nconst useStyles = makeStyles((_theme: Theme) =>\n createStyles({\n list: {\n width: '100%',\n },\n text: {\n textWrap: 'wrap',\n },\n }),\n);\n\n/**\n * Shows a list of errors found in the form\n *\n * @public\n */\nexport const ErrorListTemplate = ({ errors }: ErrorListProps) => {\n const classes = useStyles();\n\n return (\n <Paper>\n <List dense className={classes.list}>\n {errors.map((error, index) => (\n <ListItem key={index}>\n <ListItemIcon>\n <ErrorIcon color=\"error\" />\n </ListItemIcon>\n <ListItemText\n classes={{ primary: classes.text }}\n primary={error.stack}\n />\n </ListItem>\n ))}\n </List>\n </Paper>\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 { useAnalytics, useApiHolder } from '@backstage/core-plugin-api';\nimport { JsonValue } from '@backstage/types';\nimport {\n Stepper as MuiStepper,\n Step as MuiStep,\n StepLabel as MuiStepLabel,\n Button,\n makeStyles,\n LinearProgress,\n} from '@material-ui/core';\nimport { type IChangeEvent } from '@rjsf/core';\nimport { ErrorSchema } from '@rjsf/utils';\nimport React, {\n useCallback,\n useMemo,\n useState,\n type ReactNode,\n ComponentType,\n} from 'react';\nimport {\n createAsyncValidators,\n type FormValidation,\n} from './createAsyncValidators';\nimport { ReviewState, type ReviewStateProps } from '../ReviewState';\nimport { useTemplateSchema } from '../../hooks/useTemplateSchema';\nimport validator from '@rjsf/validator-ajv8';\nimport { useFormDataFromQuery } from '../../hooks';\nimport { useTransformSchemaToProps } from '../../hooks/useTransformSchemaToProps';\nimport { hasErrors } from './utils';\nimport * as FieldOverrides from './FieldOverrides';\nimport { Form } from '../Form';\nimport {\n TemplateParameterSchema,\n LayoutOptions,\n FieldExtensionOptions,\n FormProps,\n} from '@backstage/plugin-scaffolder-react';\nimport { ReviewStepProps } from '@backstage/plugin-scaffolder-react';\nimport { ErrorListTemplate } from './ErrorListTemplate';\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 marginTop: theme.spacing(2),\n },\n formWrapper: {\n padding: theme.spacing(2),\n },\n}));\n\n/**\n * The Props for {@link Stepper} component\n * @alpha\n */\nexport type StepperProps = {\n manifest: TemplateParameterSchema;\n extensions: FieldExtensionOptions<any, any>[];\n templateName?: string;\n formProps?: FormProps;\n initialState?: Record<string, JsonValue>;\n onCreate: (values: Record<string, JsonValue>) => Promise<void>;\n components?: {\n ReviewStepComponent?: ComponentType<ReviewStepProps>;\n ReviewStateComponent?: (props: ReviewStateProps) => JSX.Element;\n backButtonText?: ReactNode;\n createButtonText?: ReactNode;\n reviewButtonText?: ReactNode;\n };\n layouts?: LayoutOptions[];\n};\n\n/**\n * The `Stepper` component is the Wizard that is rendered when a user selects a template\n * @alpha\n */\nexport const Stepper = (stepperProps: StepperProps) => {\n const { layouts = [], components = {}, ...props } = stepperProps;\n const {\n ReviewStateComponent = ReviewState,\n ReviewStepComponent,\n backButtonText = 'Back',\n createButtonText = 'Create',\n reviewButtonText = 'Review',\n } = components;\n const analytics = useAnalytics();\n const { presentation, steps } = useTemplateSchema(props.manifest);\n const apiHolder = useApiHolder();\n const [activeStep, setActiveStep] = useState(0);\n const [isValidating, setIsValidating] = useState(false);\n const [formState, setFormState] = useFormDataFromQuery(props.initialState);\n\n const [errors, setErrors] = useState<undefined | FormValidation>();\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 fields = useMemo(\n () => ({ ...FieldOverrides, ...extensions }),\n [extensions],\n );\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 handleChange = useCallback(\n (e: IChangeEvent) =>\n setFormState(current => ({ ...current, ...e.formData })),\n [setFormState],\n );\n\n const handleCreate = useCallback(() => {\n props.onCreate(formState);\n const name =\n typeof formState.name === 'string' ? formState.name : undefined;\n analytics.captureEvent('create', name ?? props.templateName ?? 'unknown');\n }, [props, formState, analytics]);\n\n const currentStep = useTransformSchemaToProps(steps[activeStep], { layouts });\n\n const handleNext = async ({\n formData = {},\n }: {\n formData?: Record<string, JsonValue>;\n }) => {\n // The validation should never throw, as the validators are wrapped in a try/catch.\n // This makes it fine to set and unset state without try/catch.\n setErrors(undefined);\n setIsValidating(true);\n\n const returnedValidation = await validation(formData);\n\n setIsValidating(false);\n\n if (hasErrors(returnedValidation)) {\n setErrors(returnedValidation);\n } else {\n setErrors(undefined);\n setActiveStep(prevActiveStep => {\n const stepNum = prevActiveStep + 1;\n analytics.captureEvent('click', `Next Step (${stepNum})`);\n return stepNum;\n });\n }\n setFormState(current => ({ ...current, ...formData }));\n };\n\n const backLabel =\n presentation?.buttonLabels?.backButtonText ?? backButtonText;\n const createLabel =\n presentation?.buttonLabels?.createButtonText ?? createButtonText;\n const reviewLabel =\n presentation?.buttonLabels?.reviewButtonText ?? reviewButtonText;\n\n return (\n <>\n {isValidating && <LinearProgress variant=\"indeterminate\" />}\n <MuiStepper\n activeStep={activeStep}\n alternativeLabel\n variant=\"elevation\"\n style={{ overflowX: 'auto' }}\n >\n {steps.map((step, index) => {\n const isAllowedLabelClick = activeStep > index;\n return (\n <MuiStep key={index}>\n <MuiStepLabel\n aria-label={`Step ${index + 1}`}\n style={{ cursor: isAllowedLabelClick ? 'pointer' : 'default' }}\n onClick={() => {\n if (isAllowedLabelClick) setActiveStep(index);\n }}\n >\n {step.title}\n </MuiStepLabel>\n </MuiStep>\n );\n })}\n <MuiStep>\n <MuiStepLabel>Review</MuiStepLabel>\n </MuiStep>\n </MuiStepper>\n <div className={styles.formWrapper}>\n {/* eslint-disable-next-line no-nested-ternary */}\n {activeStep < steps.length ? (\n <Form\n validator={validator}\n extraErrors={errors as unknown as ErrorSchema}\n formData={formState}\n formContext={{ formData: formState }}\n schema={currentStep.schema}\n uiSchema={currentStep.uiSchema}\n onSubmit={handleNext}\n fields={fields}\n showErrorList=\"top\"\n templates={{ ErrorListTemplate }}\n onChange={handleChange}\n experimental_defaultFormStateBehavior={{\n allOf: 'populateDefaults',\n }}\n {...(props.formProps ?? {})}\n >\n <div className={styles.footer}>\n <Button\n onClick={handleBack}\n className={styles.backButton}\n disabled={activeStep < 1 || isValidating}\n >\n {backLabel}\n </Button>\n <Button\n variant=\"contained\"\n color=\"primary\"\n type=\"submit\"\n disabled={isValidating}\n >\n {activeStep === steps.length - 1 ? reviewLabel : 'Next'}\n </Button>\n </div>\n </Form>\n ) : // TODO: potentially move away from this pattern, deprecate?\n ReviewStepComponent ? (\n <ReviewStepComponent\n disableButtons={isValidating}\n formData={formState}\n handleBack={handleBack}\n handleReset={() => {}}\n steps={steps}\n handleCreate={handleCreate}\n />\n ) : (\n <>\n <ReviewStateComponent 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\n variant=\"contained\"\n color=\"primary\"\n onClick={handleCreate}\n >\n {createLabel}\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 */\n\nimport React from 'react';\nimport { Theme, makeStyles, useTheme } from '@material-ui/core';\nimport { ItemCardHeader } from '@backstage/core-components';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { FavoriteEntity } from '@backstage/plugin-catalog-react';\n\nconst useStyles = makeStyles<\n Theme,\n {\n cardFontColor: string;\n cardBackgroundImage: string;\n }\n>(() => ({\n header: {\n backgroundImage: ({ cardBackgroundImage }) => cardBackgroundImage,\n color: ({ cardFontColor }) => cardFontColor,\n },\n subtitleWrapper: {\n display: 'flex',\n justifyContent: 'space-between',\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();\n const themeForType = getPageTheme({ themeId: type });\n\n const styles = useStyles({\n cardFontColor: themeForType.fontColor,\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 */\n\nimport { IconComponent } from '@backstage/core-plugin-api';\nimport { Link } from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core';\nimport React from 'react';\n\ninterface CardLinkProps {\n icon: IconComponent;\n text: string;\n url: string;\n}\n\nconst useStyles = makeStyles(() => ({\n linkText: {\n display: 'inline-flex',\n alignItems: 'center',\n },\n}));\n\nexport const CardLink = ({ icon: Icon, text, url }: CardLinkProps) => {\n const styles = useStyles();\n\n return (\n <div className={styles.linkText}>\n <Icon fontSize=\"small\" />\n <Link style={{ marginLeft: '8px' }} to={url}>\n {text || url}\n </Link>\n </div>\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 { RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport { MarkdownContent, UserIcon } from '@backstage/core-components';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport {\n EntityRefLinks,\n getEntityRelations,\n} from '@backstage/plugin-catalog-react';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport {\n Box,\n Card,\n CardActions,\n CardContent,\n Chip,\n Divider,\n Button,\n Grid,\n makeStyles,\n Theme,\n} from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { CardHeader } from './CardHeader';\nimport { CardLink } from './CardLink';\n\nconst useStyles = makeStyles<Theme>(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 margin: 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 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 {@link TemplateCard} component\n * @alpha\n */\nexport interface TemplateCardProps {\n template: TemplateEntityV1beta3;\n additionalLinks?: {\n icon: IconComponent;\n text: string;\n url: string;\n }[];\n\n onSelected?: (template: TemplateEntityV1beta3) => void;\n}\n\n/**\n * The `TemplateCard` 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 app = useApp();\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n const hasTags = !!template.metadata.tags?.length;\n const hasLinks =\n !!props.additionalLinks?.length || !!template.metadata.links?.length;\n const displayDefaultDivider = !hasTags && !hasLinks;\n\n return (\n <Card>\n <CardHeader template={template} />\n <CardContent>\n <Grid container spacing={2}>\n <Grid item xs={12}>\n <Box className={styles.box}>\n <MarkdownContent\n className={styles.markdown}\n content={template.metadata.description ?? 'No description'}\n />\n </Box>\n </Grid>\n {displayDefaultDivider && (\n <Grid item xs={12}>\n <Divider data-testid=\"template-card-separator\" />\n </Grid>\n )}\n {hasTags && (\n <>\n <Grid item xs={12}>\n <Divider data-testid=\"template-card-separator--tags\" />\n </Grid>\n <Grid item xs={12}>\n <Grid container spacing={2}>\n {template.metadata.tags?.map(tag => (\n <Grid key={`grid-${tag}`} item>\n <Chip\n style={{ margin: 0 }}\n size=\"small\"\n label={tag}\n key={tag}\n />\n </Grid>\n ))}\n </Grid>\n </Grid>\n </>\n )}\n {hasLinks && (\n <>\n <Grid item xs={12}>\n <Divider data-testid=\"template-card-separator--links\" />\n </Grid>\n <Grid item xs={12}>\n <Grid container spacing={2}>\n {props.additionalLinks?.map(({ icon, text, url }, index) => (\n <Grid className={styles.linkText} item xs={6} key={index}>\n <CardLink icon={icon} text={text} url={url} />\n </Grid>\n ))}\n {template.metadata.links?.map(\n ({ url, icon, title }, index) => (\n <Grid className={styles.linkText} item xs={6} key={index}>\n <CardLink\n icon={iconResolver(icon)}\n text={title || url}\n url={url}\n />\n </Grid>\n ),\n )}\n </Grid>\n </Grid>\n </>\n )}\n </Grid>\n </CardContent>\n <CardActions style={{ padding: '16px', flex: 1, alignItems: 'flex-end' }}>\n <div className={styles.footer}>\n <div className={styles.ownedBy}>\n {ownedByRelations.length > 0 && (\n <>\n <UserIcon fontSize=\"small\" />\n <EntityRefLinks\n style={{ marginLeft: '8px' }}\n entityRefs={ownedByRelations}\n defaultKind=\"Group\"\n hideIcons\n />\n </>\n )}\n </div>\n <Button\n size=\"small\"\n variant=\"outlined\"\n color=\"primary\"\n onClick={() => props.onSelected?.(template)}\n >\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} from '@backstage/core-components';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { TemplateCardProps, TemplateCard } from '../TemplateCard';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\n/**\n * The props for the {@link TemplateGroup} component.\n * @alpha\n */\nexport interface TemplateGroupProps {\n templates: {\n template: TemplateEntityV1beta3;\n additionalLinks?: {\n icon: IconComponent;\n text: string;\n url: string;\n }[];\n }[];\n onSelected: (template: TemplateEntityV1beta3) => void;\n title: React.ReactNode;\n components?: {\n CardComponent?: React.ComponentType<TemplateCardProps>;\n };\n}\n\n/**\n * The `TemplateGroup` component is used to display a group of templates with a title.\n * @alpha\n */\nexport const TemplateGroup = (props: TemplateGroupProps) => {\n const {\n templates,\n title,\n components: { CardComponent } = {},\n onSelected,\n } = props;\n const titleComponent =\n typeof title === 'string' ? <ContentHeader title={title} /> : title;\n\n if (templates.length === 0) {\n return null;\n }\n\n const Card = CardComponent || TemplateCard;\n\n return (\n <Content>\n {titleComponent}\n <ItemCardGrid>\n {templates.map(({ template, additionalLinks }) => (\n <Card\n key={stringifyEntityRef(template)}\n additionalLinks={additionalLinks}\n template={template}\n onSelected={onSelected}\n />\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, { useCallback } from 'react';\n\nimport { useEntityList } from '@backstage/plugin-catalog-react';\nimport {\n isTemplateEntityV1beta3,\n TemplateEntityV1beta3,\n} from '@backstage/plugin-scaffolder-common';\nimport { Progress, Link } from '@backstage/core-components';\nimport { Typography } from '@material-ui/core';\nimport { errorApiRef, IconComponent, useApi } from '@backstage/core-plugin-api';\nimport { TemplateGroupFilter } from '@backstage/plugin-scaffolder-react';\nimport { TemplateGroup } from '../TemplateGroup/TemplateGroup';\n\n/**\n * @alpha\n */\nexport interface TemplateGroupsProps {\n groups: TemplateGroupFilter[];\n templateFilter?: (entity: TemplateEntityV1beta3) => boolean;\n TemplateCardComponent?: React.ComponentType<{\n template: TemplateEntityV1beta3;\n }>;\n onTemplateSelected?: (template: TemplateEntityV1beta3) => void;\n additionalLinksForEntity?: (template: TemplateEntityV1beta3) => {\n icon: IconComponent;\n text: string;\n url: string;\n }[];\n}\n\n/**\n * @alpha\n */\nexport const TemplateGroups = (props: TemplateGroupsProps) => {\n const { loading, error, entities } = useEntityList();\n const { groups, templateFilter, TemplateCardComponent, onTemplateSelected } =\n props;\n const errorApi = useApi(errorApiRef);\n const onSelected = useCallback(\n (template: TemplateEntityV1beta3) => {\n onTemplateSelected?.(template);\n },\n [onTemplateSelected],\n );\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n errorApi.post(error);\n return null;\n }\n\n if (!entities || !entities.length) {\n return (\n <Typography variant=\"body2\">\n No templates found that match your filter. Learn more about{' '}\n <Link to=\"https://backstage.io/docs/features/software-templates/adding-templates\">\n adding templates\n </Link>\n .\n </Typography>\n );\n }\n\n return (\n <>\n {groups.map(({ title, filter }, index) => {\n const templates = entities\n .filter(isTemplateEntityV1beta3)\n .filter(e => (templateFilter ? templateFilter(e) : true))\n .filter(filter)\n .map(template => {\n const additionalLinks =\n props.additionalLinksForEntity?.(template) ?? [];\n\n return {\n template,\n additionalLinks,\n };\n });\n\n return (\n <TemplateGroup\n key={index}\n templates={templates}\n title={title}\n components={{ CardComponent: TemplateCardComponent }}\n onSelected={onSelected}\n />\n );\n })}\n </>\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useEffect } from 'react';\nimport {\n Content,\n InfoCard,\n MarkdownContent,\n Progress,\n} from '@backstage/core-components';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { makeStyles } from '@material-ui/core';\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useTemplateParameterSchema } from '../../hooks/useTemplateParameterSchema';\nimport { Stepper, type StepperProps } from '../Stepper/Stepper';\nimport { SecretsContextProvider } from '../../../secrets/SecretsContext';\nimport { useFilteredSchemaProperties } from '../../hooks/useFilteredSchemaProperties';\nimport { ReviewStepProps } from '@backstage/plugin-scaffolder-react';\n\nconst useStyles = makeStyles({\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\n/**\n * @alpha\n */\nexport type WorkflowProps = {\n title?: string;\n description?: string;\n namespace: string;\n templateName: string;\n components?: {\n ReviewStepComponent?: React.ComponentType<ReviewStepProps>;\n };\n onError(error: Error | undefined): JSX.Element | null;\n} & Pick<\n StepperProps,\n | 'extensions'\n | 'formProps'\n | 'components'\n | 'onCreate'\n | 'initialState'\n | 'layouts'\n>;\n\n/**\n * @alpha\n */\nexport const Workflow = (workflowProps: WorkflowProps): JSX.Element | null => {\n const { title, description, namespace, templateName, ...props } =\n workflowProps;\n\n const styles = useStyles();\n const templateRef = stringifyEntityRef({\n kind: 'Template',\n namespace: namespace,\n name: templateName,\n });\n\n const errorApi = useApi(errorApiRef);\n\n const { loading, manifest, error } = useTemplateParameterSchema(templateRef);\n\n const sortedManifest = useFilteredSchemaProperties(manifest);\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 props.onError(error);\n }\n\n return (\n <Content>\n {loading && <Progress />}\n {sortedManifest && (\n <InfoCard\n title={title ?? sortedManifest.title}\n subheader={\n <MarkdownContent\n className={styles.markdown}\n content={\n description ?? sortedManifest.description ?? 'No description'\n }\n />\n }\n noPadding\n titleTypographyProps={{ component: 'h2' }}\n >\n <Stepper\n manifest={sortedManifest}\n templateName={templateName}\n {...props}\n />\n </InfoCard>\n )}\n </Content>\n );\n};\n\n/**\n * @alpha\n */\nexport const EmbeddableWorkflow = (props: WorkflowProps) => (\n <SecretsContextProvider>\n <Workflow {...props} />\n </SecretsContextProvider>\n);\n","/*\n * Copyright 2023 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 { IconComponent, useApp, useRouteRef } from '@backstage/core-plugin-api';\nimport { entityRouteRef } from '@backstage/plugin-catalog-react';\nimport { Button, makeStyles } from '@material-ui/core';\nimport React from 'react';\nimport LinkIcon from '@material-ui/icons/Link';\nimport { parseEntityRef } from '@backstage/catalog-model';\nimport { Link } from '@backstage/core-components';\nimport { ScaffolderTaskOutput } from '../../../api';\n\nconst useStyles = makeStyles({\n root: {\n '&:hover': {\n textDecoration: 'none',\n },\n },\n});\n\nexport const LinkOutputs = (props: { output: ScaffolderTaskOutput }) => {\n const { links = [] } = props.output;\n const classes = useStyles();\n const app = useApp();\n const entityRoute = useRouteRef(entityRouteRef);\n\n const iconResolver = (key?: string): IconComponent =>\n app.getSystemIcon(key!) ?? LinkIcon;\n\n return (\n <>\n {links\n .filter(({ url, entityRef }) => url || entityRef)\n .map(({ url, entityRef, title, icon }) => {\n if (entityRef) {\n const entityName = parseEntityRef(entityRef);\n const target = entityRoute(entityName);\n return { title, icon, url: target };\n }\n return { title, icon, url: url! };\n })\n .map(({ url, title, icon }, i) => {\n const Icon = iconResolver(icon);\n return (\n <Link to={url} key={i} classes={{ root: classes.root }}>\n <Button startIcon={<Icon />} component=\"div\" color=\"primary\">\n {title}\n </Button>\n </Link>\n );\n })}\n </>\n );\n};\n","/*\n * Copyright 2023 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 { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { Button } from '@material-ui/core';\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport React from 'react';\nimport { ScaffolderTaskOutput } from '../../../api';\n\nexport const TextOutputs = (props: {\n output: ScaffolderTaskOutput;\n index?: number;\n setIndex?: (index: number | undefined) => void;\n}) => {\n const {\n output: { text = [] },\n index,\n setIndex,\n } = props;\n\n const app = useApp();\n\n const iconResolver = (key?: string): IconComponent =>\n app.getSystemIcon(key!) ?? DescriptionIcon;\n\n return (\n <>\n {text\n .filter(({ content }) => content !== undefined)\n .map(({ title, icon }, i) => {\n const Icon = iconResolver(icon);\n return (\n <Button\n key={i}\n startIcon={<Icon />}\n component=\"div\"\n color=\"primary\"\n onClick={() => {\n if (index !== i) {\n setIndex?.(i);\n }\n }}\n variant={index === i ? 'outlined' : undefined}\n >\n {title}\n </Button>\n );\n })}\n </>\n );\n};\n","/*\n * Copyright 2023 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 { InfoCard, MarkdownContent } from '@backstage/core-components';\nimport {\n ScaffolderOutputText,\n ScaffolderTaskOutput,\n} from '@backstage/plugin-scaffolder-react';\nimport { Box, Paper } from '@material-ui/core';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { LinkOutputs } from './LinkOutputs';\nimport { TextOutputs } from './TextOutputs';\n\n/**\n * The DefaultOutputs renderer for the scaffolder task output\n *\n * @alpha\n */\nexport const DefaultTemplateOutputs = (props: {\n output?: ScaffolderTaskOutput;\n}) => {\n const { output } = props;\n const [textOutputIndex, setTextOutputIndex] = useState<number | undefined>(\n undefined,\n );\n\n useEffect(() => {\n if (textOutputIndex === undefined && output?.text) {\n const defaultIndex = output.text.findIndex(\n (t: ScaffolderOutputText) => t.default,\n );\n setTextOutputIndex(defaultIndex >= 0 ? defaultIndex : 0);\n }\n }, [textOutputIndex, output]);\n\n const textOutput = useMemo(\n () =>\n textOutputIndex !== undefined ? output?.text?.[textOutputIndex] : null,\n [output, textOutputIndex],\n );\n\n if (!output) {\n return null;\n }\n\n return (\n <>\n <Box paddingBottom={2}>\n <Paper>\n <Box padding={2} justifyContent=\"center\" display=\"flex\" gridGap={16}>\n <TextOutputs\n output={output}\n index={textOutputIndex}\n setIndex={setTextOutputIndex}\n />\n <LinkOutputs output={output} />\n </Box>\n </Paper>\n </Box>\n {textOutput ? (\n <Box paddingBottom={2}>\n <InfoCard\n title={textOutput.title ?? 'Text Output'}\n noPadding\n titleTypographyProps={{ component: 'h2' }}\n >\n <Box padding={2} height=\"100%\">\n <MarkdownContent content={textOutput.content ?? ''} />\n </Box>\n </InfoCard>\n </Box>\n ) : null}\n </>\n );\n};\n","/*\n * Copyright 2023 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 { CircularProgress, makeStyles, StepIconProps } from '@material-ui/core';\nimport RemoveCircleOutline from '@material-ui/icons/RemoveCircleOutline';\nimport PanoramaFishEyeIcon from '@material-ui/icons/PanoramaFishEye';\nimport classNames from 'classnames';\nimport CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';\nimport ErrorOutline from '@material-ui/icons/ErrorOutline';\n\nconst useStepIconStyles = makeStyles(theme => ({\n root: {\n color: theme.palette.text.disabled,\n },\n completed: {\n color: theme.palette.status.ok,\n },\n error: {\n color: theme.palette.status.error,\n },\n}));\n\nexport const StepIcon = (props: StepIconProps & { skipped: boolean }) => {\n const classes = useStepIconStyles();\n const { active, completed, error, skipped } = props;\n\n const getMiddle = () => {\n if (active) {\n return <CircularProgress size=\"20px\" />;\n }\n if (completed) {\n return <CheckCircleOutline />;\n }\n\n if (error) {\n return <ErrorOutline />;\n }\n\n if (skipped) {\n return <RemoveCircleOutline />;\n }\n\n return <PanoramaFishEyeIcon />;\n };\n\n return (\n <div\n className={classNames(classes.root, {\n [classes.completed]: completed,\n [classes.error]: error,\n })}\n >\n {getMiddle()}\n </div>\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React, { useCallback, useState } from 'react';\nimport useInterval from 'react-use/lib/useInterval';\nimport { DateTime, Interval } from 'luxon';\nimport humanizeDuration from 'humanize-duration';\nimport { Typography } from '@material-ui/core';\nimport { useMountEffect } from '@react-hookz/web';\n\nexport const StepTime = (props: {\n step: {\n id: string;\n name: string;\n startedAt?: string;\n endedAt?: string;\n };\n}) => {\n const [time, setTime] = useState('');\n const { step } = props;\n\n const getDelay = () => {\n if (step.startedAt && step.endedAt && time) {\n return null;\n }\n if (step.startedAt && step.endedAt) {\n return 1;\n }\n return 1000;\n };\n\n const calculate = useCallback(() => {\n if (!step.startedAt) {\n setTime('');\n return;\n }\n\n const end = step.endedAt\n ? DateTime.fromISO(step.endedAt)\n : DateTime.local();\n\n const startedAt = DateTime.fromISO(step.startedAt);\n const formatted = Interval.fromDateTimes(startedAt, end)\n .toDuration()\n .valueOf();\n\n setTime(humanizeDuration(formatted, { round: true }));\n }, [step.endedAt, step.startedAt]);\n\n useMountEffect(calculate);\n useInterval(calculate, getDelay());\n\n return <Typography variant=\"caption\">{time}</Typography>;\n};\n","/*\n * Copyright 2023 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 { LinearProgress, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n failed: {\n backgroundColor: theme.palette.error.main,\n },\n success: {\n backgroundColor: theme.palette.success.main,\n },\n}));\n\n/**\n * The visual progress of the task event stream\n */\nexport const TaskBorder = (props: {\n isComplete: boolean;\n isError: boolean;\n}) => {\n const styles = useStyles();\n\n if (!props.isComplete) {\n return <LinearProgress variant=\"indeterminate\" />;\n }\n\n return (\n <LinearProgress\n variant=\"determinate\"\n classes={{ bar: props.isError ? styles.failed : styles.success }}\n value={100}\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 {\n Stepper as MuiStepper,\n Step as MuiStep,\n StepButton as MuiStepButton,\n StepLabel as MuiStepLabel,\n StepIconProps,\n Box,\n Paper,\n} from '@material-ui/core';\nimport { TaskStep } from '@backstage/plugin-scaffolder-common';\nimport { StepIcon } from './StepIcon';\nimport { StepTime } from './StepTime';\nimport { TaskBorder } from './TaskBorder';\nimport { ScaffolderStep } from '@backstage/plugin-scaffolder-react';\n\n/**\n * Props for the TaskSteps component\n *\n * @alpha\n */\nexport interface TaskStepsProps {\n steps: (TaskStep & ScaffolderStep)[];\n activeStep?: number;\n isComplete?: boolean;\n isError?: boolean;\n}\n\n/**\n * The visual stepper of the task event stream\n *\n * @alpha\n */\nexport const TaskSteps = (props: TaskStepsProps) => {\n return (\n <Paper style={{ position: 'relative', overflow: 'hidden' }}>\n <TaskBorder\n isComplete={props.isComplete ?? false}\n isError={props.isError ?? false}\n />\n <Box padding={2}>\n <MuiStepper\n activeStep={props.activeStep}\n alternativeLabel\n variant=\"elevation\"\n style={{ overflowX: 'auto' }}\n >\n {props.steps.map(step => {\n const isCompleted = step.status === 'completed';\n const isFailed = step.status === 'failed';\n const isActive = step.status === 'processing';\n const isSkipped = step.status === 'skipped';\n const stepIconProps: Partial<StepIconProps & { skipped: boolean }> =\n {\n completed: isCompleted,\n error: isFailed,\n active: isActive,\n skipped: isSkipped,\n };\n\n return (\n <MuiStep key={step.id}>\n <MuiStepButton>\n <MuiStepLabel\n StepIconProps={stepIconProps}\n StepIconComponent={StepIcon}\n data-testid=\"step-label\"\n >\n <Box>{step.name}</Box>\n {!isSkipped && <StepTime step={step} />}\n </MuiStepLabel>\n </MuiStepButton>\n </MuiStep>\n );\n })}\n </MuiStepper>\n </Box>\n </Paper>\n );\n};\n","/*\n * Copyright 2023 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 { LogViewer } from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n position: 'relative',\n },\n});\n\n/**\n * The text of the event stream\n *\n * @alpha\n */\nexport const TaskLogStream = (props: { logs: { [k: string]: string[] } }) => {\n const styles = useStyles();\n return (\n <div className={styles.root}>\n <LogViewer\n text={Object.values(props.logs)\n .map(l => l.join('\\n'))\n .filter(Boolean)\n .join('\\n')}\n />\n </div>\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 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 * @alpha\n */\nexport const TemplateCategoryPicker = () => {\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\n variant=\"button\"\n component=\"label\"\n htmlFor=\"categories-picker\"\n >\n Categories\n </Typography>\n <Autocomplete<string, true>\n multiple\n id=\"categories-picker\"\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 2020 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 IconButton from '@material-ui/core/IconButton';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport MenuList from '@material-ui/core/MenuList';\nimport Popover from '@material-ui/core/Popover';\nimport CreateComponentIcon from '@material-ui/icons/AddCircleOutline';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Description from '@material-ui/icons/Description';\nimport Edit from '@material-ui/icons/Edit';\nimport List from '@material-ui/icons/List';\nimport MoreVert from '@material-ui/icons/MoreVert';\nimport React, { useState } from 'react';\n\nconst useStyles = makeStyles(theme => ({\n button: {\n color: theme.page.fontColor,\n },\n}));\n\n/**\n * @alpha\n */\nexport type ScaffolderPageContextMenuProps = {\n onEditorClicked?: () => void;\n onActionsClicked?: () => void;\n onTasksClicked?: () => void;\n onCreateClicked?: () => void;\n};\n\n/**\n * @alpha\n */\nexport function ScaffolderPageContextMenu(\n props: ScaffolderPageContextMenuProps,\n) {\n const { onEditorClicked, onActionsClicked, onTasksClicked, onCreateClicked } =\n props;\n const classes = useStyles();\n const [anchorEl, setAnchorEl] = useState<HTMLButtonElement>();\n\n if (!onEditorClicked && !onActionsClicked) {\n return null;\n }\n\n const onOpen = (event: React.SyntheticEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const onClose = () => {\n setAnchorEl(undefined);\n };\n\n return (\n <>\n <IconButton\n id=\"long-menu\"\n aria-label=\"more\"\n aria-controls=\"long-menu\"\n aria-expanded={!!anchorEl}\n aria-haspopup=\"true\"\n role=\"button\"\n onClick={onOpen}\n data-testid=\"menu-button\"\n color=\"inherit\"\n className={classes.button}\n >\n <MoreVert />\n </IconButton>\n <Popover\n aria-labelledby=\"long-menu\"\n open={Boolean(anchorEl)}\n onClose={onClose}\n anchorEl={anchorEl}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n >\n <MenuList>\n {onCreateClicked && (\n <MenuItem onClick={onCreateClicked}>\n <ListItemIcon>\n <CreateComponentIcon fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText primary=\"Create\" />\n </MenuItem>\n )}\n {onEditorClicked && (\n <MenuItem onClick={onEditorClicked}>\n <ListItemIcon>\n <Edit fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText primary=\"Template Editor\" />\n </MenuItem>\n )}\n {onActionsClicked && (\n <MenuItem onClick={onActionsClicked}>\n <ListItemIcon>\n <Description fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText primary=\"Installed Actions\" />\n </MenuItem>\n )}\n {onTasksClicked && (\n <MenuItem onClick={onTasksClicked}>\n <ListItemIcon>\n <List fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText primary=\"Task List\" />\n </MenuItem>\n )}\n </MenuList>\n </Popover>\n </>\n );\n}\n"],"names":["isObject","JSONSchema","_a","_b","useStyles","MuiTheme","validation","MuiStepper","MuiStep","MuiStepLabel","MuiStepButton","makeStyles","ListIt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,CACzB,CACA,kBAAA,KAAA,CAAA,aAAA,CAACF,kBAAa,OAAQ,EAAA,WAAA,EAAY,CACpC,CAEJ,CAAA;AAAA,GAEJ,CAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/next/lib/schema.ts","../src/next/components/Stepper/utils.ts","../src/next/components/Stepper/createAsyncValidators.ts","../src/next/components/ReviewState/ReviewState.tsx","../src/next/hooks/useTemplateSchema.ts","../src/next/hooks/useFormDataFromQuery.ts","../src/next/hooks/useTemplateParameterSchema.ts","../src/next/hooks/useFilteredSchemaProperties.ts","../src/next/hooks/useTransformSchemaToProps.ts","../src/next/components/Stepper/FieldOverrides/DescriptionField.tsx","../src/next/components/ScaffolderField/ScaffolderField.tsx","../src/next/components/Form/FieldTemplate.tsx","../src/next/components/Form/DescriptionFieldTemplate.tsx","../src/next/components/Form/Form.tsx","../src/next/components/Stepper/ErrorListTemplate/errorListTemplate.tsx","../src/next/components/Stepper/Stepper.tsx","../src/next/components/TemplateCard/CardHeader.tsx","../src/next/components/TemplateCard/CardLink.tsx","../src/next/components/TemplateCard/TemplateCard.tsx","../src/next/components/TemplateGroup/TemplateGroup.tsx","../src/next/components/TemplateGroups/TemplateGroups.tsx","../src/next/components/Workflow/Workflow.tsx","../src/next/components/TemplateOutputs/LinkOutputs.tsx","../src/next/components/TemplateOutputs/TextOutputs.tsx","../src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx","../src/next/components/TaskSteps/StepIcon.tsx","../src/next/components/TaskSteps/StepTime.tsx","../src/next/components/TaskSteps/TaskBorder.tsx","../src/next/components/TaskSteps/TaskSteps.tsx","../src/next/components/TaskLogStream/TaskLogStream.tsx","../src/next/components/TemplateCategoryPicker/TemplateCategoryPicker.tsx","../src/next/components/ScaffolderPageContextMenu/ScaffolderPageContextMenu.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { JsonObject } from '@backstage/types';\nimport { stringify, parse } from 'flatted';\nimport { FieldValidation, UiSchema } from '@rjsf/utils';\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 {\n properties,\n items,\n anyOf,\n oneOf,\n allOf,\n dependencies,\n then,\n else: _else,\n } = 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\n if (!isObject(uiSchema[propName])) {\n const innerUiSchema = {};\n uiSchema[propName] = innerUiSchema;\n }\n\n extractUiSchema(schemaNode, uiSchema[propName] as JsonObject);\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 if (isObject(then)) {\n extractUiSchema(then, uiSchema);\n }\n\n if (isObject(_else)) {\n extractUiSchema(_else, uiSchema);\n }\n}\n\n/**\n * Takes a step from a Backstage Template Manifest and converts it to a JSON Schema and UI Schema for rjsf\n * @alpha\n */\nexport const extractSchemaFromStep = (\n inputStep: JsonObject,\n): { uiSchema: UiSchema; schema: JsonObject } => {\n const uiSchema: UiSchema = {};\n const returnSchema: JsonObject = parse(stringify(inputStep));\n extractUiSchema(returnSchema, uiSchema);\n return { uiSchema, schema: returnSchema };\n};\n\n/**\n * Creates a field validation object for use in react jsonschema form\n * @alpha\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 2023 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 type { JsonObject, JsonValue } from '@backstage/types';\nimport type { FieldValidation } from '@rjsf/utils';\nimport { FormValidation } from './createAsyncValidators';\n\nfunction isFieldValidation(error: any): error is FieldValidation {\n return !!error && '__errors' in error;\n}\n\nexport function hasErrors(errors?: FormValidation): boolean {\n if (!errors) {\n return false;\n }\n\n for (const error of Object.values(errors)) {\n if (isFieldValidation(error)) {\n if ((error.__errors ?? []).length > 0) {\n return true;\n }\n\n continue;\n }\n\n if (hasErrors(error)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function isObject(value: JsonValue | undefined): value is JsonObject {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\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/utils';\nimport type { JsonObject, JsonValue } from '@backstage/types';\nimport { ApiHolder } from '@backstage/core-plugin-api';\nimport { Draft07 as JSONSchema } from 'json-schema-library';\nimport { createFieldValidation, extractSchemaFromStep } from '../../lib';\nimport {\n CustomFieldValidator,\n FieldExtensionUiSchema,\n} from '@backstage/plugin-scaffolder-react';\nimport { isObject } from './utils';\n\n/** @alpha */\nexport type FormValidation = {\n [name: string]: FieldValidation | FormValidation;\n};\n\n/** @alpha */\nexport const createAsyncValidators = (\n rootSchema: JsonObject,\n validators: Record<\n string,\n undefined | CustomFieldValidator<unknown, unknown>\n >,\n context: {\n apiHolder: ApiHolder;\n },\n) => {\n async function validate(\n formData: JsonObject,\n pathPrefix: string = '#',\n current: JsonObject = formData,\n ): Promise<FormValidation> {\n const parsedSchema = new JSONSchema(rootSchema);\n const formValidation: FormValidation = {};\n\n const validateForm = async (\n validatorName: string,\n key: string,\n value: JsonValue | undefined,\n schema: JsonObject,\n uiSchema: FieldExtensionUiSchema<unknown, unknown>,\n ) => {\n const validator = validators[validatorName];\n if (validator) {\n const fieldValidation = createFieldValidation();\n try {\n await validator(value, fieldValidation, {\n ...context,\n formData,\n schema,\n uiSchema,\n });\n } catch (ex) {\n fieldValidation.addError(ex.message);\n }\n formValidation[key] = fieldValidation;\n }\n };\n\n for (const [key, value] of Object.entries(current)) {\n const path = `${pathPrefix}/${key}`;\n const definitionInSchema = parsedSchema.getSchema(path, formData);\n const { schema, uiSchema } = extractSchemaFromStep(definitionInSchema);\n\n const hasItems = definitionInSchema && definitionInSchema.items;\n\n const doValidateItem = async (\n propValue: JsonObject,\n itemSchema: JsonObject,\n itemUiSchema: FieldExtensionUiSchema<unknown, unknown>,\n ) => {\n await validateForm(\n propValue['ui:field'] as string,\n key,\n value,\n itemSchema,\n itemUiSchema,\n );\n };\n\n const doValidate = async (propValue: JsonObject) => {\n if ('ui:field' in propValue) {\n const { schema: itemsSchema, uiSchema: itemsUiSchema } =\n extractSchemaFromStep(definitionInSchema.items);\n await doValidateItem(propValue, itemsSchema, itemsUiSchema);\n }\n };\n\n if (definitionInSchema && 'ui:field' in definitionInSchema) {\n await doValidateItem(definitionInSchema, schema, uiSchema);\n } else if (hasItems && 'ui:field' in definitionInSchema.items) {\n await doValidate(definitionInSchema.items);\n } else if (hasItems && definitionInSchema.items.type === 'object') {\n const properties = (definitionInSchema.items?.properties ??\n []) as JsonObject[];\n for (const [, propValue] of Object.entries(properties)) {\n await doValidate(propValue);\n }\n } else if (isObject(value)) {\n formValidation[key] = await validate(formData, path, value);\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 React from 'react';\nimport { StructuredMetadataTable } from '@backstage/core-components';\nimport { JsonObject } from '@backstage/types';\nimport { Draft07 as JSONSchema } from 'json-schema-library';\nimport { ParsedTemplateSchema } from '../../hooks/useTemplateSchema';\n\n/**\n * The props for the {@link ReviewState} component.\n * @alpha\n */\nexport type ReviewStateProps = {\n schemas: ParsedTemplateSchema[];\n formState: JsonObject;\n};\n\n/**\n * The component used by the {@link Stepper} to render the review step.\n * @alpha\n */\nexport const ReviewState = (props: ReviewStateProps) => {\n const reviewData = Object.fromEntries(\n Object.entries(props.formState)\n .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 if (definitionInSchema.enum && definitionInSchema.enumNames) {\n return [\n key,\n definitionInSchema.enumNames[\n definitionInSchema.enum.indexOf(value)\n ] || value,\n ];\n }\n }\n }\n return [key, value];\n })\n .filter(prop => prop.length > 0),\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 { featureFlagsApiRef, useApi } from '@backstage/core-plugin-api';\nimport { TemplatePresentationV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { JsonObject } from '@backstage/types';\nimport { UiSchema } from '@rjsf/utils';\nimport { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';\nimport { extractSchemaFromStep } from '../lib';\n\n/**\n * This is the parsed template schema that is returned from the {@link useTemplateSchema} hook.\n * @alpha\n */\nexport interface ParsedTemplateSchema {\n uiSchema: UiSchema;\n mergedSchema: JsonObject;\n schema: JsonObject;\n title: string;\n description?: string;\n}\n\n/**\n * This hook will parse the template schema and return the steps with the\n * parsed schema and uiSchema. Filtering out any steps or properties that\n * are not enabled with feature flags.\n * @alpha\n */\nexport const useTemplateSchema = (\n manifest: TemplateParameterSchema,\n): {\n steps: ParsedTemplateSchema[];\n presentation?: TemplatePresentationV1beta3;\n} => {\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 const strippedSchema = {\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 },\n } as ParsedTemplateSchema;\n\n if (step.schema?.properties || !step.schema?.dependencies) {\n strippedSchema.schema.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 return strippedSchema;\n });\n\n return {\n presentation: manifest.presentation,\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 */\n\nimport { JsonValue } from '@backstage/types';\nimport qs from 'qs';\nimport { useState } from 'react';\n\n/**\n * This hook is used to get the formData from the query string.\n * @alpha\n */\nexport const useFormDataFromQuery = (\n initialState?: Record<string, JsonValue>,\n) => {\n return useState<Record<string, any>>(() => {\n if (initialState) {\n return initialState;\n }\n\n const query = qs.parse(window.location.search, {\n ignoreQueryPrefix: true,\n });\n\n try {\n return JSON.parse(query.formData as string);\n } catch (e) {\n return {};\n }\n });\n};\n","/*\n * Copyright 2023 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 useAsync from 'react-use/lib/useAsync';\nimport { scaffolderApiRef } from '../../api/ref';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';\n\n/**\n * @alpha\n */\nexport const 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 {\n manifest: value as TemplateParameterSchema | undefined,\n loading,\n error,\n };\n};\n","/*\n * Copyright 2023 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 cloneDeep from 'lodash/cloneDeep';\nimport { useApi, featureFlagsApiRef } from '@backstage/core-plugin-api';\nimport { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';\n\n/**\n * Returns manifest of software templates with steps without a featureFlag tag.\n * @alpha\n */\n\nexport const useFilteredSchemaProperties = (\n manifest: TemplateParameterSchema | undefined,\n): TemplateParameterSchema | undefined => {\n const featureFlagKey = 'backstage:featureFlag';\n const featureFlagApi = useApi(featureFlagsApiRef);\n\n if (!manifest) {\n return undefined;\n }\n\n const filteredSteps = manifest?.steps\n .filter(step => {\n const featureFlag = step.schema[featureFlagKey];\n return (\n typeof featureFlag !== 'string' || featureFlagApi.isActive(featureFlag)\n );\n })\n .map(step => {\n const filteredStep = cloneDeep(step);\n const removedPropertyKeys: Array<string> = [];\n if (filteredStep.schema.properties) {\n filteredStep.schema.properties = Object.fromEntries(\n Object.entries(filteredStep.schema.properties).filter(\n ([key, value]) => {\n if (value[featureFlagKey]) {\n if (featureFlagApi.isActive(value[featureFlagKey])) {\n return true;\n }\n\n removedPropertyKeys.push(key);\n return false;\n }\n return true;\n },\n ),\n );\n\n // remove the feature flag property key from required if they are not active\n filteredStep.schema.required = Array.isArray(\n filteredStep.schema.required,\n )\n ? filteredStep.schema.required?.filter(\n r => !removedPropertyKeys.includes(r as string),\n )\n : filteredStep.schema.required;\n }\n\n return filteredStep;\n });\n\n return { ...manifest, steps: filteredSteps };\n};\n","/*\n * Copyright 2023 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 { LayoutOptions } from '../../layouts';\nimport { type ParsedTemplateSchema } from './useTemplateSchema';\n\ninterface Options {\n layouts?: LayoutOptions[];\n}\n\nexport const useTransformSchemaToProps = (\n step: ParsedTemplateSchema,\n options: Options = {},\n): ParsedTemplateSchema => {\n const { layouts = [] } = options;\n const objectFieldTemplate = step?.uiSchema['ui:ObjectFieldTemplate'] as\n | string\n | undefined;\n\n if (typeof objectFieldTemplate !== 'string') {\n return step;\n }\n\n const Layout = layouts.find(\n layout => layout.name === objectFieldTemplate,\n )?.component;\n\n if (!Layout) {\n return step;\n }\n\n return {\n ...step,\n uiSchema: {\n ...step.uiSchema,\n ['ui:ObjectFieldTemplate']: Layout,\n },\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 React from 'react';\nimport { MarkdownContent } from '@backstage/core-components';\nimport { FieldProps } from '@rjsf/utils';\n\nexport const DescriptionField = ({ description }: FieldProps) =>\n description && <MarkdownContent content={description} linkTarget=\"_blank\" />;\n","/*\n * Copyright 2023 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, ReactElement } from 'react';\n\nimport { MarkdownContent } from '@backstage/core-components';\nimport { FormControl, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n markdownDescription: {\n fontSize: theme.typography.caption.fontSize,\n margin: 0,\n color: theme.palette.text.secondary,\n '& :first-child': {\n margin: 0,\n marginTop: '3px', // to keep the standard browser padding\n },\n },\n}));\n\n/**\n * Props for the {@link ScaffolderField} component\n * @alpha\n */\nexport interface ScaffolderFieldProps {\n rawDescription?: string;\n errors?: ReactElement;\n rawErrors?: string[];\n help?: ReactElement;\n rawHelp?: string;\n required?: boolean;\n disabled?: boolean;\n displayLabel?: boolean;\n}\n\n/**\n * A component to wrap up a input field which helps with formatting and supporting markdown\n * on the field types\n * @alpha\n */\nexport const ScaffolderField = (\n props: PropsWithChildren<ScaffolderFieldProps>,\n) => {\n const {\n children,\n displayLabel = true,\n rawErrors = [],\n errors,\n help,\n rawDescription,\n required,\n disabled,\n } = props;\n const classes = useStyles();\n return (\n <FormControl\n fullWidth\n error={rawErrors.length ? true : false}\n required={required}\n disabled={disabled}\n >\n {children}\n {displayLabel && rawDescription ? (\n <MarkdownContent\n content={rawDescription}\n className={classes.markdownDescription}\n />\n ) : null}\n {errors}\n {help}\n </FormControl>\n );\n};\n","/*\n * Copyright 2023 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';\n\nimport {\n FieldTemplateProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n getTemplate,\n getUiOptions,\n} from '@rjsf/utils';\n\nimport { ScaffolderField } from '../ScaffolderField';\n\n/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field\n * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.\n * @alpha\n * @param props - The `FieldTemplateProps` for this component\n */\nexport const FieldTemplate = <\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(\n props: FieldTemplateProps<T, S, F>,\n) => {\n const {\n id,\n children,\n classNames,\n style,\n disabled,\n displayLabel,\n hidden,\n label,\n onDropPropertyClick,\n onKeyChange,\n readonly,\n required,\n rawErrors = [],\n errors,\n help,\n rawDescription,\n schema,\n uiSchema,\n registry,\n } = props;\n\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const WrapIfAdditionalTemplate = getTemplate<\n 'WrapIfAdditionalTemplate',\n T,\n S,\n F\n >('WrapIfAdditionalTemplate', registry, uiOptions);\n\n if (hidden) {\n return <div style={{ display: 'none' }}>{children}</div>;\n }\n return (\n <WrapIfAdditionalTemplate\n classNames={classNames}\n style={style}\n disabled={disabled}\n id={id}\n label={label}\n onDropPropertyClick={onDropPropertyClick}\n onKeyChange={onKeyChange}\n readonly={readonly}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n >\n <ScaffolderField\n displayLabel={displayLabel}\n rawErrors={rawErrors}\n help={help}\n disabled={disabled}\n rawDescription={rawDescription}\n errors={errors}\n required={required}\n >\n {children}\n </ScaffolderField>\n </WrapIfAdditionalTemplate>\n );\n};\n","/*\n * Copyright 2023 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';\n\nimport { MarkdownContent } from '@backstage/core-components';\nimport { makeStyles, Typography } from '@material-ui/core';\nimport {\n DescriptionFieldProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\nconst useStyles = makeStyles(theme => ({\n markdownDescription: {\n fontSize: theme.typography.caption.fontSize,\n margin: 0,\n color: theme.palette.text.secondary,\n '& :first-child': {\n margin: 0,\n marginTop: '3px', // to keep the standard browser padding\n },\n },\n}));\n\n/** The `DescriptionField` is the template to use to render the description of a field\n * @alpha\n * @param props - The `DescriptionFieldProps` for this component\n */\nexport const DescriptionFieldTemplate = <\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(\n props: DescriptionFieldProps<T, S, F>,\n) => {\n const { id, description } = props;\n const classes = useStyles();\n\n if (description) {\n if (typeof description === 'string') {\n return (\n <MarkdownContent\n content={description}\n className={classes.markdownDescription}\n />\n );\n }\n\n return (\n <Typography id={id} variant=\"subtitle2\" style={{ marginTop: '5px' }}>\n {description}\n </Typography>\n );\n }\n\n return null;\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { withTheme } from '@rjsf/core';\nimport React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { FieldTemplate } from './FieldTemplate';\nimport { DescriptionFieldTemplate } from './DescriptionFieldTemplate';\nimport { FieldProps } from '@rjsf/utils';\nimport { ScaffolderRJSFFormProps } from '@backstage/plugin-scaffolder-react';\nimport { Theme as MuiTheme } from '@rjsf/material-ui';\n\nconst WrappedForm = withTheme(MuiTheme);\n\n/**\n * The Form component\n * @alpha\n */\nexport const Form = (props: PropsWithChildren<ScaffolderRJSFFormProps>) => {\n // This is where we unbreak the changes from RJSF, and make it work with our custom fields so we don't pass on this\n // breaking change to our users. We will look more into a better API for this in scaffolderv2.\n const wrappedFields = React.useMemo(\n () =>\n Object.fromEntries(\n Object.entries(props.fields ?? {}).map(([key, Component]) => [\n key,\n (wrapperProps: FieldProps) => {\n return (\n <Component\n {...wrapperProps}\n uiSchema={wrapperProps.uiSchema ?? {}}\n formData={wrapperProps.formData}\n rawErrors={wrapperProps.rawErrors ?? []}\n />\n );\n },\n ]),\n ),\n [props.fields],\n );\n\n const templates = React.useMemo(\n () => ({\n FieldTemplate,\n DescriptionFieldTemplate,\n ...props.templates,\n }),\n [props.templates],\n );\n\n return (\n <WrappedForm {...props} templates={templates} fields={wrappedFields} />\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 { ErrorListProps } from '@rjsf/utils';\nimport {\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Paper,\n Theme,\n createStyles,\n makeStyles,\n} from '@material-ui/core';\nimport ErrorIcon from '@material-ui/icons/Error';\n\nconst useStyles = makeStyles((_theme: Theme) =>\n createStyles({\n list: {\n width: '100%',\n },\n text: {\n textWrap: 'wrap',\n },\n }),\n);\n\n/**\n * Shows a list of errors found in the form\n *\n * @public\n */\nexport const ErrorListTemplate = ({ errors }: ErrorListProps) => {\n const classes = useStyles();\n\n return (\n <Paper>\n <List dense className={classes.list}>\n {errors.map((error, index) => (\n <ListItem key={index}>\n <ListItemIcon>\n <ErrorIcon color=\"error\" />\n </ListItemIcon>\n <ListItemText\n classes={{ primary: classes.text }}\n primary={error.stack}\n />\n </ListItem>\n ))}\n </List>\n </Paper>\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 { useAnalytics, useApiHolder } from '@backstage/core-plugin-api';\nimport { JsonValue } from '@backstage/types';\nimport {\n Stepper as MuiStepper,\n Step as MuiStep,\n StepLabel as MuiStepLabel,\n Button,\n makeStyles,\n LinearProgress,\n} from '@material-ui/core';\nimport { type IChangeEvent } from '@rjsf/core';\nimport { ErrorSchema } from '@rjsf/utils';\nimport React, {\n useCallback,\n useMemo,\n useState,\n type ReactNode,\n ComponentType,\n} from 'react';\nimport {\n createAsyncValidators,\n type FormValidation,\n} from './createAsyncValidators';\nimport { ReviewState, type ReviewStateProps } from '../ReviewState';\nimport { useTemplateSchema } from '../../hooks/useTemplateSchema';\nimport validator from '@rjsf/validator-ajv8';\nimport { useFormDataFromQuery } from '../../hooks';\nimport { useTransformSchemaToProps } from '../../hooks/useTransformSchemaToProps';\nimport { hasErrors } from './utils';\nimport * as FieldOverrides from './FieldOverrides';\nimport { Form } from '../Form';\nimport {\n TemplateParameterSchema,\n LayoutOptions,\n FieldExtensionOptions,\n FormProps,\n} from '@backstage/plugin-scaffolder-react';\nimport { ReviewStepProps } from '@backstage/plugin-scaffolder-react';\nimport { ErrorListTemplate } from './ErrorListTemplate';\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 marginTop: theme.spacing(2),\n },\n formWrapper: {\n padding: theme.spacing(2),\n },\n}));\n\n/**\n * The Props for {@link Stepper} component\n * @alpha\n */\nexport type StepperProps = {\n manifest: TemplateParameterSchema;\n extensions: FieldExtensionOptions<any, any>[];\n templateName?: string;\n formProps?: FormProps;\n initialState?: Record<string, JsonValue>;\n onCreate: (values: Record<string, JsonValue>) => Promise<void>;\n components?: {\n ReviewStepComponent?: ComponentType<ReviewStepProps>;\n ReviewStateComponent?: (props: ReviewStateProps) => JSX.Element;\n backButtonText?: ReactNode;\n createButtonText?: ReactNode;\n reviewButtonText?: ReactNode;\n };\n layouts?: LayoutOptions[];\n};\n\n/**\n * The `Stepper` component is the Wizard that is rendered when a user selects a template\n * @alpha\n */\nexport const Stepper = (stepperProps: StepperProps) => {\n const { layouts = [], components = {}, ...props } = stepperProps;\n const {\n ReviewStateComponent = ReviewState,\n ReviewStepComponent,\n backButtonText = 'Back',\n createButtonText = 'Create',\n reviewButtonText = 'Review',\n } = components;\n const analytics = useAnalytics();\n const { presentation, steps } = useTemplateSchema(props.manifest);\n const apiHolder = useApiHolder();\n const [activeStep, setActiveStep] = useState(0);\n const [isValidating, setIsValidating] = useState(false);\n const [formState, setFormState] = useFormDataFromQuery(props.initialState);\n\n const [errors, setErrors] = useState<undefined | FormValidation>();\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 fields = useMemo(\n () => ({ ...FieldOverrides, ...extensions }),\n [extensions],\n );\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 handleChange = useCallback(\n (e: IChangeEvent) =>\n setFormState(current => ({ ...current, ...e.formData })),\n [setFormState],\n );\n\n const handleCreate = useCallback(() => {\n props.onCreate(formState);\n const name =\n typeof formState.name === 'string' ? formState.name : undefined;\n analytics.captureEvent('create', name ?? props.templateName ?? 'unknown');\n }, [props, formState, analytics]);\n\n const currentStep = useTransformSchemaToProps(steps[activeStep], { layouts });\n\n const handleNext = async ({\n formData = {},\n }: {\n formData?: Record<string, JsonValue>;\n }) => {\n // The validation should never throw, as the validators are wrapped in a try/catch.\n // This makes it fine to set and unset state without try/catch.\n setErrors(undefined);\n setIsValidating(true);\n\n const returnedValidation = await validation(formData);\n\n setIsValidating(false);\n\n if (hasErrors(returnedValidation)) {\n setErrors(returnedValidation);\n } else {\n setErrors(undefined);\n setActiveStep(prevActiveStep => {\n const stepNum = prevActiveStep + 1;\n analytics.captureEvent('click', `Next Step (${stepNum})`);\n return stepNum;\n });\n }\n setFormState(current => ({ ...current, ...formData }));\n };\n\n const backLabel =\n presentation?.buttonLabels?.backButtonText ?? backButtonText;\n const createLabel =\n presentation?.buttonLabels?.createButtonText ?? createButtonText;\n const reviewLabel =\n presentation?.buttonLabels?.reviewButtonText ?? reviewButtonText;\n\n return (\n <>\n {isValidating && <LinearProgress variant=\"indeterminate\" />}\n <MuiStepper\n activeStep={activeStep}\n alternativeLabel\n variant=\"elevation\"\n style={{ overflowX: 'auto' }}\n >\n {steps.map((step, index) => {\n const isAllowedLabelClick = activeStep > index;\n return (\n <MuiStep key={index}>\n <MuiStepLabel\n aria-label={`Step ${index + 1}`}\n style={{ cursor: isAllowedLabelClick ? 'pointer' : 'default' }}\n onClick={() => {\n if (isAllowedLabelClick) setActiveStep(index);\n }}\n >\n {step.title}\n </MuiStepLabel>\n </MuiStep>\n );\n })}\n <MuiStep>\n <MuiStepLabel>Review</MuiStepLabel>\n </MuiStep>\n </MuiStepper>\n <div className={styles.formWrapper}>\n {/* eslint-disable-next-line no-nested-ternary */}\n {activeStep < steps.length ? (\n <Form\n validator={validator}\n extraErrors={errors as unknown as ErrorSchema}\n formData={formState}\n formContext={{ formData: formState }}\n schema={currentStep.schema}\n uiSchema={currentStep.uiSchema}\n onSubmit={handleNext}\n fields={fields}\n showErrorList=\"top\"\n templates={{ ErrorListTemplate }}\n onChange={handleChange}\n experimental_defaultFormStateBehavior={{\n allOf: 'populateDefaults',\n }}\n {...(props.formProps ?? {})}\n >\n <div className={styles.footer}>\n <Button\n onClick={handleBack}\n className={styles.backButton}\n disabled={activeStep < 1 || isValidating}\n >\n {backLabel}\n </Button>\n <Button\n variant=\"contained\"\n color=\"primary\"\n type=\"submit\"\n disabled={isValidating}\n >\n {activeStep === steps.length - 1 ? reviewLabel : 'Next'}\n </Button>\n </div>\n </Form>\n ) : // TODO: potentially move away from this pattern, deprecate?\n ReviewStepComponent ? (\n <ReviewStepComponent\n disableButtons={isValidating}\n formData={formState}\n handleBack={handleBack}\n handleReset={() => {}}\n steps={steps}\n handleCreate={handleCreate}\n />\n ) : (\n <>\n <ReviewStateComponent 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\n variant=\"contained\"\n color=\"primary\"\n onClick={handleCreate}\n >\n {createLabel}\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 */\n\nimport React from 'react';\nimport { Theme, makeStyles, useTheme } from '@material-ui/core';\nimport { ItemCardHeader } from '@backstage/core-components';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { FavoriteEntity } from '@backstage/plugin-catalog-react';\n\nconst useStyles = makeStyles<\n Theme,\n {\n cardFontColor: string;\n cardBackgroundImage: string;\n }\n>(() => ({\n header: {\n backgroundImage: ({ cardBackgroundImage }) => cardBackgroundImage,\n color: ({ cardFontColor }) => cardFontColor,\n },\n subtitleWrapper: {\n display: 'flex',\n justifyContent: 'space-between',\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();\n const themeForType = getPageTheme({ themeId: type });\n\n const styles = useStyles({\n cardFontColor: themeForType.fontColor,\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 */\n\nimport { IconComponent } from '@backstage/core-plugin-api';\nimport { Link } from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core';\nimport React from 'react';\n\ninterface CardLinkProps {\n icon: IconComponent;\n text: string;\n url: string;\n}\n\nconst useStyles = makeStyles(() => ({\n linkText: {\n display: 'inline-flex',\n alignItems: 'center',\n },\n}));\n\nexport const CardLink = ({ icon: Icon, text, url }: CardLinkProps) => {\n const styles = useStyles();\n\n return (\n <div className={styles.linkText}>\n <Icon fontSize=\"small\" />\n <Link style={{ marginLeft: '8px' }} to={url}>\n {text || url}\n </Link>\n </div>\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 { RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport { MarkdownContent, UserIcon } from '@backstage/core-components';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport {\n EntityRefLinks,\n getEntityRelations,\n} from '@backstage/plugin-catalog-react';\nimport { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport {\n Box,\n Card,\n CardActions,\n CardContent,\n Chip,\n Divider,\n Button,\n Grid,\n makeStyles,\n Theme,\n} from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { CardHeader } from './CardHeader';\nimport { CardLink } from './CardLink';\n\nconst useStyles = makeStyles<Theme>(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 margin: 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 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 {@link TemplateCard} component\n * @alpha\n */\nexport interface TemplateCardProps {\n template: TemplateEntityV1beta3;\n additionalLinks?: {\n icon: IconComponent;\n text: string;\n url: string;\n }[];\n\n onSelected?: (template: TemplateEntityV1beta3) => void;\n}\n\n/**\n * The `TemplateCard` 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 app = useApp();\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n const hasTags = !!template.metadata.tags?.length;\n const hasLinks =\n !!props.additionalLinks?.length || !!template.metadata.links?.length;\n const displayDefaultDivider = !hasTags && !hasLinks;\n\n return (\n <Card>\n <CardHeader template={template} />\n <CardContent>\n <Grid container spacing={2}>\n <Grid item xs={12}>\n <Box className={styles.box}>\n <MarkdownContent\n className={styles.markdown}\n content={template.metadata.description ?? 'No description'}\n />\n </Box>\n </Grid>\n {displayDefaultDivider && (\n <Grid item xs={12}>\n <Divider data-testid=\"template-card-separator\" />\n </Grid>\n )}\n {hasTags && (\n <>\n <Grid item xs={12}>\n <Divider data-testid=\"template-card-separator--tags\" />\n </Grid>\n <Grid item xs={12}>\n <Grid container spacing={2}>\n {template.metadata.tags?.map(tag => (\n <Grid key={`grid-${tag}`} item>\n <Chip\n style={{ margin: 0 }}\n size=\"small\"\n label={tag}\n key={tag}\n />\n </Grid>\n ))}\n </Grid>\n </Grid>\n </>\n )}\n {hasLinks && (\n <>\n <Grid item xs={12}>\n <Divider data-testid=\"template-card-separator--links\" />\n </Grid>\n <Grid item xs={12}>\n <Grid container spacing={2}>\n {props.additionalLinks?.map(({ icon, text, url }, index) => (\n <Grid className={styles.linkText} item xs={6} key={index}>\n <CardLink icon={icon} text={text} url={url} />\n </Grid>\n ))}\n {template.metadata.links?.map(\n ({ url, icon, title }, index) => (\n <Grid className={styles.linkText} item xs={6} key={index}>\n <CardLink\n icon={iconResolver(icon)}\n text={title || url}\n url={url}\n />\n </Grid>\n ),\n )}\n </Grid>\n </Grid>\n </>\n )}\n </Grid>\n </CardContent>\n <CardActions style={{ padding: '16px', flex: 1, alignItems: 'flex-end' }}>\n <div className={styles.footer}>\n <div className={styles.ownedBy}>\n {ownedByRelations.length > 0 && (\n <>\n <UserIcon fontSize=\"small\" />\n <EntityRefLinks\n style={{ marginLeft: '8px' }}\n entityRefs={ownedByRelations}\n defaultKind=\"Group\"\n hideIcons\n />\n </>\n )}\n </div>\n <Button\n size=\"small\"\n variant=\"outlined\"\n color=\"primary\"\n onClick={() => props.onSelected?.(template)}\n >\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} from '@backstage/core-components';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { TemplateCardProps, TemplateCard } from '../TemplateCard';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\n/**\n * The props for the {@link TemplateGroup} component.\n * @alpha\n */\nexport interface TemplateGroupProps {\n templates: {\n template: TemplateEntityV1beta3;\n additionalLinks?: {\n icon: IconComponent;\n text: string;\n url: string;\n }[];\n }[];\n onSelected: (template: TemplateEntityV1beta3) => void;\n title: React.ReactNode;\n components?: {\n CardComponent?: React.ComponentType<TemplateCardProps>;\n };\n}\n\n/**\n * The `TemplateGroup` component is used to display a group of templates with a title.\n * @alpha\n */\nexport const TemplateGroup = (props: TemplateGroupProps) => {\n const {\n templates,\n title,\n components: { CardComponent } = {},\n onSelected,\n } = props;\n const titleComponent =\n typeof title === 'string' ? <ContentHeader title={title} /> : title;\n\n if (templates.length === 0) {\n return null;\n }\n\n const Card = CardComponent || TemplateCard;\n\n return (\n <Content>\n {titleComponent}\n <ItemCardGrid>\n {templates.map(({ template, additionalLinks }) => (\n <Card\n key={stringifyEntityRef(template)}\n additionalLinks={additionalLinks}\n template={template}\n onSelected={onSelected}\n />\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, { useCallback } from 'react';\n\nimport { useEntityList } from '@backstage/plugin-catalog-react';\nimport {\n isTemplateEntityV1beta3,\n TemplateEntityV1beta3,\n} from '@backstage/plugin-scaffolder-common';\nimport { Progress, Link } from '@backstage/core-components';\nimport { Typography } from '@material-ui/core';\nimport { errorApiRef, IconComponent, useApi } from '@backstage/core-plugin-api';\nimport { TemplateGroupFilter } from '@backstage/plugin-scaffolder-react';\nimport { TemplateGroup } from '../TemplateGroup/TemplateGroup';\n\n/**\n * @alpha\n */\nexport interface TemplateGroupsProps {\n groups: TemplateGroupFilter[];\n templateFilter?: (entity: TemplateEntityV1beta3) => boolean;\n TemplateCardComponent?: React.ComponentType<{\n template: TemplateEntityV1beta3;\n }>;\n onTemplateSelected?: (template: TemplateEntityV1beta3) => void;\n additionalLinksForEntity?: (template: TemplateEntityV1beta3) => {\n icon: IconComponent;\n text: string;\n url: string;\n }[];\n}\n\n/**\n * @alpha\n */\nexport const TemplateGroups = (props: TemplateGroupsProps) => {\n const { loading, error, entities } = useEntityList();\n const { groups, templateFilter, TemplateCardComponent, onTemplateSelected } =\n props;\n const errorApi = useApi(errorApiRef);\n const onSelected = useCallback(\n (template: TemplateEntityV1beta3) => {\n onTemplateSelected?.(template);\n },\n [onTemplateSelected],\n );\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n errorApi.post(error);\n return null;\n }\n\n if (!entities || !entities.length) {\n return (\n <Typography variant=\"body2\">\n No templates found that match your filter. Learn more about{' '}\n <Link to=\"https://backstage.io/docs/features/software-templates/adding-templates\">\n adding templates\n </Link>\n .\n </Typography>\n );\n }\n\n return (\n <>\n {groups.map(({ title, filter }, index) => {\n const templates = entities\n .filter(isTemplateEntityV1beta3)\n .filter(e => (templateFilter ? templateFilter(e) : true))\n .filter(filter)\n .map(template => {\n const additionalLinks =\n props.additionalLinksForEntity?.(template) ?? [];\n\n return {\n template,\n additionalLinks,\n };\n });\n\n return (\n <TemplateGroup\n key={index}\n templates={templates}\n title={title}\n components={{ CardComponent: TemplateCardComponent }}\n onSelected={onSelected}\n />\n );\n })}\n </>\n );\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useEffect } from 'react';\nimport {\n Content,\n InfoCard,\n MarkdownContent,\n Progress,\n} from '@backstage/core-components';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { makeStyles } from '@material-ui/core';\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useTemplateParameterSchema } from '../../hooks/useTemplateParameterSchema';\nimport { Stepper, type StepperProps } from '../Stepper/Stepper';\nimport { SecretsContextProvider } from '../../../secrets/SecretsContext';\nimport { useFilteredSchemaProperties } from '../../hooks/useFilteredSchemaProperties';\nimport { ReviewStepProps } from '@backstage/plugin-scaffolder-react';\n\nconst useStyles = makeStyles({\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\n/**\n * @alpha\n */\nexport type WorkflowProps = {\n title?: string;\n description?: string;\n namespace: string;\n templateName: string;\n components?: {\n ReviewStepComponent?: React.ComponentType<ReviewStepProps>;\n };\n onError(error: Error | undefined): JSX.Element | null;\n} & Pick<\n StepperProps,\n | 'extensions'\n | 'formProps'\n | 'components'\n | 'onCreate'\n | 'initialState'\n | 'layouts'\n>;\n\n/**\n * @alpha\n */\nexport const Workflow = (workflowProps: WorkflowProps): JSX.Element | null => {\n const { title, description, namespace, templateName, ...props } =\n workflowProps;\n\n const styles = useStyles();\n const templateRef = stringifyEntityRef({\n kind: 'Template',\n namespace: namespace,\n name: templateName,\n });\n\n const errorApi = useApi(errorApiRef);\n\n const { loading, manifest, error } = useTemplateParameterSchema(templateRef);\n\n const sortedManifest = useFilteredSchemaProperties(manifest);\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 props.onError(error);\n }\n\n return (\n <Content>\n {loading && <Progress />}\n {sortedManifest && (\n <InfoCard\n title={title ?? sortedManifest.title}\n subheader={\n <MarkdownContent\n className={styles.markdown}\n content={\n description ?? sortedManifest.description ?? 'No description'\n }\n />\n }\n noPadding\n titleTypographyProps={{ component: 'h2' }}\n >\n <Stepper\n manifest={sortedManifest}\n templateName={templateName}\n {...props}\n />\n </InfoCard>\n )}\n </Content>\n );\n};\n\n/**\n * @alpha\n */\nexport const EmbeddableWorkflow = (props: WorkflowProps) => (\n <SecretsContextProvider>\n <Workflow {...props} />\n </SecretsContextProvider>\n);\n","/*\n * Copyright 2023 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 { IconComponent, useApp, useRouteRef } from '@backstage/core-plugin-api';\nimport { entityRouteRef } from '@backstage/plugin-catalog-react';\nimport { Button, makeStyles } from '@material-ui/core';\nimport React from 'react';\nimport LinkIcon from '@material-ui/icons/Link';\nimport { parseEntityRef } from '@backstage/catalog-model';\nimport { Link } from '@backstage/core-components';\nimport { ScaffolderTaskOutput } from '../../../api';\n\nconst useStyles = makeStyles({\n root: {\n '&:hover': {\n textDecoration: 'none',\n },\n },\n});\n\nexport const LinkOutputs = (props: { output: ScaffolderTaskOutput }) => {\n const { links = [] } = props.output;\n const classes = useStyles();\n const app = useApp();\n const entityRoute = useRouteRef(entityRouteRef);\n\n const iconResolver = (key?: string): IconComponent =>\n app.getSystemIcon(key!) ?? LinkIcon;\n\n return (\n <>\n {links\n .filter(({ url, entityRef }) => url || entityRef)\n .map(({ url, entityRef, title, icon }) => {\n if (entityRef) {\n const entityName = parseEntityRef(entityRef);\n const target = entityRoute(entityName);\n return { title, icon, url: target };\n }\n return { title, icon, url: url! };\n })\n .map(({ url, title, icon }, i) => {\n const Icon = iconResolver(icon);\n return (\n <Link to={url} key={i} classes={{ root: classes.root }}>\n <Button startIcon={<Icon />} component=\"div\" color=\"primary\">\n {title}\n </Button>\n </Link>\n );\n })}\n </>\n );\n};\n","/*\n * Copyright 2023 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 { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { Button } from '@material-ui/core';\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport React from 'react';\nimport { ScaffolderTaskOutput } from '../../../api';\n\nexport const TextOutputs = (props: {\n output: ScaffolderTaskOutput;\n index?: number;\n setIndex?: (index: number | undefined) => void;\n}) => {\n const {\n output: { text = [] },\n index,\n setIndex,\n } = props;\n\n const app = useApp();\n\n const iconResolver = (key?: string): IconComponent =>\n app.getSystemIcon(key!) ?? DescriptionIcon;\n\n return (\n <>\n {text\n .filter(({ content }) => content !== undefined)\n .map(({ title, icon }, i) => {\n const Icon = iconResolver(icon);\n return (\n <Button\n key={i}\n startIcon={<Icon />}\n component=\"div\"\n color=\"primary\"\n onClick={() => {\n if (index !== i) {\n setIndex?.(i);\n }\n }}\n variant={index === i ? 'outlined' : undefined}\n >\n {title}\n </Button>\n );\n })}\n </>\n );\n};\n","/*\n * Copyright 2023 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 { InfoCard, MarkdownContent } from '@backstage/core-components';\nimport {\n ScaffolderOutputText,\n ScaffolderTaskOutput,\n} from '@backstage/plugin-scaffolder-react';\nimport { Box, Paper } from '@material-ui/core';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { LinkOutputs } from './LinkOutputs';\nimport { TextOutputs } from './TextOutputs';\n\n/**\n * The DefaultOutputs renderer for the scaffolder task output\n *\n * @alpha\n */\nexport const DefaultTemplateOutputs = (props: {\n output?: ScaffolderTaskOutput;\n}) => {\n const { output } = props;\n const [textOutputIndex, setTextOutputIndex] = useState<number | undefined>(\n undefined,\n );\n\n useEffect(() => {\n if (textOutputIndex === undefined && output?.text) {\n const defaultIndex = output.text.findIndex(\n (t: ScaffolderOutputText) => t.default,\n );\n setTextOutputIndex(defaultIndex >= 0 ? defaultIndex : 0);\n }\n }, [textOutputIndex, output]);\n\n const textOutput = useMemo(\n () =>\n textOutputIndex !== undefined ? output?.text?.[textOutputIndex] : null,\n [output, textOutputIndex],\n );\n\n if (!output) {\n return null;\n }\n\n return (\n <>\n <Box paddingBottom={2}>\n <Paper>\n <Box padding={2} justifyContent=\"center\" display=\"flex\" gridGap={16}>\n <TextOutputs\n output={output}\n index={textOutputIndex}\n setIndex={setTextOutputIndex}\n />\n <LinkOutputs output={output} />\n </Box>\n </Paper>\n </Box>\n {textOutput ? (\n <Box paddingBottom={2}>\n <InfoCard\n title={textOutput.title ?? 'Text Output'}\n noPadding\n titleTypographyProps={{ component: 'h2' }}\n >\n <Box padding={2} height=\"100%\">\n <MarkdownContent content={textOutput.content ?? ''} />\n </Box>\n </InfoCard>\n </Box>\n ) : null}\n </>\n );\n};\n","/*\n * Copyright 2023 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 { CircularProgress, makeStyles, StepIconProps } from '@material-ui/core';\nimport RemoveCircleOutline from '@material-ui/icons/RemoveCircleOutline';\nimport PanoramaFishEyeIcon from '@material-ui/icons/PanoramaFishEye';\nimport classNames from 'classnames';\nimport CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';\nimport ErrorOutline from '@material-ui/icons/ErrorOutline';\n\nconst useStepIconStyles = makeStyles(theme => ({\n root: {\n color: theme.palette.text.disabled,\n },\n completed: {\n color: theme.palette.status.ok,\n },\n error: {\n color: theme.palette.status.error,\n },\n}));\n\nexport const StepIcon = (props: StepIconProps & { skipped: boolean }) => {\n const classes = useStepIconStyles();\n const { active, completed, error, skipped } = props;\n\n const getMiddle = () => {\n if (active) {\n return <CircularProgress size=\"20px\" />;\n }\n if (completed) {\n return <CheckCircleOutline />;\n }\n\n if (error) {\n return <ErrorOutline />;\n }\n\n if (skipped) {\n return <RemoveCircleOutline />;\n }\n\n return <PanoramaFishEyeIcon />;\n };\n\n return (\n <div\n className={classNames(classes.root, {\n [classes.completed]: completed,\n [classes.error]: error,\n })}\n >\n {getMiddle()}\n </div>\n );\n};\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React, { useCallback, useState } from 'react';\nimport useInterval from 'react-use/lib/useInterval';\nimport { DateTime, Interval } from 'luxon';\nimport humanizeDuration from 'humanize-duration';\nimport { Typography } from '@material-ui/core';\nimport { useMountEffect } from '@react-hookz/web';\n\nexport const StepTime = (props: {\n step: {\n id: string;\n name: string;\n startedAt?: string;\n endedAt?: string;\n };\n}) => {\n const [time, setTime] = useState('');\n const { step } = props;\n\n const getDelay = () => {\n if (step.startedAt && step.endedAt && time) {\n return null;\n }\n if (step.startedAt && step.endedAt) {\n return 1;\n }\n return 1000;\n };\n\n const calculate = useCallback(() => {\n if (!step.startedAt) {\n setTime('');\n return;\n }\n\n const end = step.endedAt\n ? DateTime.fromISO(step.endedAt)\n : DateTime.local();\n\n const startedAt = DateTime.fromISO(step.startedAt);\n const formatted = Interval.fromDateTimes(startedAt, end)\n .toDuration()\n .valueOf();\n\n setTime(humanizeDuration(formatted, { round: true }));\n }, [step.endedAt, step.startedAt]);\n\n useMountEffect(calculate);\n useInterval(calculate, getDelay());\n\n return <Typography variant=\"caption\">{time}</Typography>;\n};\n","/*\n * Copyright 2023 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 { LinearProgress, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n failed: {\n backgroundColor: theme.palette.error.main,\n },\n success: {\n backgroundColor: theme.palette.success.main,\n },\n}));\n\n/**\n * The visual progress of the task event stream\n */\nexport const TaskBorder = (props: {\n isComplete: boolean;\n isError: boolean;\n}) => {\n const styles = useStyles();\n\n if (!props.isComplete) {\n return <LinearProgress variant=\"indeterminate\" />;\n }\n\n return (\n <LinearProgress\n variant=\"determinate\"\n classes={{ bar: props.isError ? styles.failed : styles.success }}\n value={100}\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 {\n Stepper as MuiStepper,\n Step as MuiStep,\n StepButton as MuiStepButton,\n StepLabel as MuiStepLabel,\n StepIconProps,\n Box,\n Paper,\n} from '@material-ui/core';\nimport { TaskStep } from '@backstage/plugin-scaffolder-common';\nimport { StepIcon } from './StepIcon';\nimport { StepTime } from './StepTime';\nimport { TaskBorder } from './TaskBorder';\nimport { ScaffolderStep } from '@backstage/plugin-scaffolder-react';\n\n/**\n * Props for the TaskSteps component\n *\n * @alpha\n */\nexport interface TaskStepsProps {\n steps: (TaskStep & ScaffolderStep)[];\n activeStep?: number;\n isComplete?: boolean;\n isError?: boolean;\n}\n\n/**\n * The visual stepper of the task event stream\n *\n * @alpha\n */\nexport const TaskSteps = (props: TaskStepsProps) => {\n return (\n <Paper style={{ position: 'relative', overflow: 'hidden' }}>\n <TaskBorder\n isComplete={props.isComplete ?? false}\n isError={props.isError ?? false}\n />\n <Box padding={2}>\n <MuiStepper\n activeStep={props.activeStep}\n alternativeLabel\n variant=\"elevation\"\n style={{ overflowX: 'auto' }}\n >\n {props.steps.map(step => {\n const isCompleted = step.status === 'completed';\n const isFailed = step.status === 'failed';\n const isActive = step.status === 'processing';\n const isSkipped = step.status === 'skipped';\n const stepIconProps: Partial<StepIconProps & { skipped: boolean }> =\n {\n completed: isCompleted,\n error: isFailed,\n active: isActive,\n skipped: isSkipped,\n };\n\n return (\n <MuiStep key={step.id}>\n <MuiStepButton>\n <MuiStepLabel\n StepIconProps={stepIconProps}\n StepIconComponent={StepIcon}\n data-testid=\"step-label\"\n >\n <Box>{step.name}</Box>\n {!isSkipped && <StepTime step={step} />}\n </MuiStepLabel>\n </MuiStepButton>\n </MuiStep>\n );\n })}\n </MuiStepper>\n </Box>\n </Paper>\n );\n};\n","/*\n * Copyright 2023 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 { LogViewer } from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n position: 'relative',\n },\n});\n\n/**\n * The text of the event stream\n *\n * @alpha\n */\nexport const TaskLogStream = (props: { logs: { [k: string]: string[] } }) => {\n const styles = useStyles();\n return (\n <div className={styles.root}>\n <LogViewer\n text={Object.values(props.logs)\n .map(l => l.join('\\n'))\n .filter(Boolean)\n .join('\\n')}\n />\n </div>\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 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 makeStyles,\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/** @alpha */\nexport type ScaffolderReactTemplateCategoryPickerClassKey = 'root' | 'label';\n\nconst useStyles = makeStyles(\n {\n root: {},\n label: {},\n },\n { name: 'ScaffolderReactTemplateCategoryPicker' },\n);\n\n/**\n * The Category Picker that is rendered on the left side for picking\n * categories and filtering the template list.\n * @alpha\n */\nexport const TemplateCategoryPicker = () => {\n const classes = useStyles();\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 className={classes.root} pb={1} pt={1}>\n <Typography\n className={classes.label}\n variant=\"button\"\n component=\"label\"\n htmlFor=\"categories-picker\"\n >\n Categories\n </Typography>\n <Autocomplete<string, true>\n multiple\n id=\"categories-picker\"\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 2020 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 IconButton from '@material-ui/core/IconButton';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport MenuItem from '@material-ui/core/MenuItem';\nimport MenuList from '@material-ui/core/MenuList';\nimport Popover from '@material-ui/core/Popover';\nimport CreateComponentIcon from '@material-ui/icons/AddCircleOutline';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Description from '@material-ui/icons/Description';\nimport Edit from '@material-ui/icons/Edit';\nimport List from '@material-ui/icons/List';\nimport MoreVert from '@material-ui/icons/MoreVert';\nimport React, { useState } from 'react';\n\nconst useStyles = makeStyles(theme => ({\n button: {\n color: theme.page.fontColor,\n },\n}));\n\n/**\n * @alpha\n */\nexport type ScaffolderPageContextMenuProps = {\n onEditorClicked?: () => void;\n onActionsClicked?: () => void;\n onTasksClicked?: () => void;\n onCreateClicked?: () => void;\n};\n\n/**\n * @alpha\n */\nexport function ScaffolderPageContextMenu(\n props: ScaffolderPageContextMenuProps,\n) {\n const { onEditorClicked, onActionsClicked, onTasksClicked, onCreateClicked } =\n props;\n const classes = useStyles();\n const [anchorEl, setAnchorEl] = useState<HTMLButtonElement>();\n\n if (!onEditorClicked && !onActionsClicked) {\n return null;\n }\n\n const onOpen = (event: React.SyntheticEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const onClose = () => {\n setAnchorEl(undefined);\n };\n\n return (\n <>\n <IconButton\n id=\"long-menu\"\n aria-label=\"more\"\n aria-controls=\"long-menu\"\n aria-expanded={!!anchorEl}\n aria-haspopup=\"true\"\n role=\"button\"\n onClick={onOpen}\n data-testid=\"menu-button\"\n color=\"inherit\"\n className={classes.button}\n >\n <MoreVert />\n </IconButton>\n <Popover\n aria-labelledby=\"long-menu\"\n open={Boolean(anchorEl)}\n onClose={onClose}\n anchorEl={anchorEl}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n >\n <MenuList>\n {onCreateClicked && (\n <MenuItem onClick={onCreateClicked}>\n <ListItemIcon>\n <CreateComponentIcon fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText primary=\"Create\" />\n </MenuItem>\n )}\n {onEditorClicked && (\n <MenuItem onClick={onEditorClicked}>\n <ListItemIcon>\n <Edit fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText primary=\"Template Editor\" />\n </MenuItem>\n )}\n {onActionsClicked && (\n <MenuItem onClick={onActionsClicked}>\n <ListItemIcon>\n <Description fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText primary=\"Installed Actions\" />\n </MenuItem>\n )}\n {onTasksClicked && (\n <MenuItem onClick={onTasksClicked}>\n <ListItemIcon>\n <List fontSize=\"small\" />\n </ListItemIcon>\n <ListItemText primary=\"Task List\" />\n </MenuItem>\n )}\n </MenuList>\n </Popover>\n </>\n );\n}\n"],"names":["isObject","JSONSchema","_a","_b","useStyles","MuiTheme","validation","MuiStepper","MuiStep","MuiStepLabel","MuiStepButton","makeStyles","ListItemIcon","ListItemText","Description","List"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,SAASA,WAAS,KAAqC,EAAA;AACrD,EAAO,OAAA,OAAO,UAAU,QAAY,IAAA,KAAA,KAAU,QAAQ,CAAC,KAAA,CAAM,QAAQ,KAAK,CAAA,CAAA;AAC5E,CAAA;AAEA,SAAS,eAAA,CAAgB,QAAoB,QAAsB,EAAA;AACjE,EAAI,IAAA,CAACA,UAAS,CAAA,MAAM,CAAG,EAAA;AACrB,IAAA,OAAA;AAAA,GACF;AAEA,EAAM,MAAA;AAAA,IACJ,UAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACJ,GAAA,MAAA,CAAA;AAEJ,EAAA,KAAA,MAAW,YAAY,MAAQ,EAAA;AAC7B,IAAA,IAAI,CAAC,MAAA,CAAO,cAAe,CAAA,QAAQ,CAAG,EAAA;AACpC,MAAA,SAAA;AAAA,KACF;AAEA,IAAI,IAAA,QAAA,CAAS,UAAW,CAAA,KAAK,CAAG,EAAA;AAC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,EAAA,CACjC,GAED,eACC,oBAAA,KAAA,CAAA,aAAA,CAAC,QAAS,EAAA,EAAA,OAAA,EAAS,mCAChB,KAAA,CAAA,aAAA,CAAAD,cAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,UAAS,OAAQ,EAAA,CACzB,CACA,kBAAA,KAAA,CAAA,aAAA,CAACC,kBAAa,OAAQ,EAAA,iBAAA,EAAkB,CAC1C,CAAA,EAED,oCACE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,OAAS,EAAA,gBAAA,EAAA,sCAChBD,cACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAACE,eAAY,EAAA,EAAA,QAAA,EAAS,SAAQ,CAChC,CAAA,kBACC,KAAA,CAAA,aAAA,CAAAD,cAAA,EAAA,EAAa,SAAQ,mBAAoB,EAAA,CAC5C,CAED,EAAA,cAAA,wCACE,QAAS,EAAA,EAAA,OAAA,EAAS,cACjB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAACD,sCACE,KAAA,CAAA,aAAA,CAAAG,MAAA,EAAA,EAAK,QAAS,EAAA,OAAA,EAAQ,CACzB,CACA,kBAAA,KAAA,CAAA,aAAA,CAACF,kBAAa,OAAQ,EAAA,WAAA,EAAY,CACpC,CAEJ,CAAA;AAAA,GAEJ,CAAA,CAAA;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-react",
|
|
3
3
|
"description": "A frontend library that helps other Backstage plugins interact with the Scaffolder",
|
|
4
|
-
"version": "1.8.0",
|
|
4
|
+
"version": "1.8.1-next.0",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -44,27 +44,27 @@
|
|
|
44
44
|
"start": "backstage-cli package start"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@backstage/catalog-client": "^1.6.0",
|
|
48
|
-
"@backstage/catalog-model": "^1.4.
|
|
49
|
-
"@backstage/core-components": "^0.14.0",
|
|
50
|
-
"@backstage/core-plugin-api": "^1.9.0",
|
|
51
|
-
"@backstage/plugin-catalog-react": "^1.10.0",
|
|
52
|
-
"@backstage/plugin-scaffolder-common": "^1.5.0",
|
|
53
|
-
"@backstage/theme": "^0.5.
|
|
47
|
+
"@backstage/catalog-client": "^1.6.1-next.0",
|
|
48
|
+
"@backstage/catalog-model": "^1.4.5-next.0",
|
|
49
|
+
"@backstage/core-components": "^0.14.1-next.0",
|
|
50
|
+
"@backstage/core-plugin-api": "^1.9.1-next.0",
|
|
51
|
+
"@backstage/plugin-catalog-react": "^1.10.1-next.0",
|
|
52
|
+
"@backstage/plugin-scaffolder-common": "^1.5.1-next.0",
|
|
53
|
+
"@backstage/theme": "^0.5.2-next.0",
|
|
54
54
|
"@backstage/types": "^1.1.1",
|
|
55
55
|
"@backstage/version-bridge": "^1.0.7",
|
|
56
56
|
"@material-ui/core": "^4.12.2",
|
|
57
57
|
"@material-ui/icons": "^4.9.1",
|
|
58
58
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
59
59
|
"@react-hookz/web": "^24.0.0",
|
|
60
|
-
"@rjsf/core": "5.17.
|
|
61
|
-
"@rjsf/material-ui": "5.17.
|
|
62
|
-
"@rjsf/utils": "5.17.
|
|
63
|
-
"@rjsf/validator-ajv8": "5.17.
|
|
60
|
+
"@rjsf/core": "5.17.1",
|
|
61
|
+
"@rjsf/material-ui": "5.17.1",
|
|
62
|
+
"@rjsf/utils": "5.17.1",
|
|
63
|
+
"@rjsf/validator-ajv8": "5.17.1",
|
|
64
64
|
"@types/json-schema": "^7.0.9",
|
|
65
65
|
"@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
66
66
|
"classnames": "^2.2.6",
|
|
67
|
-
"flatted": "3.
|
|
67
|
+
"flatted": "3.3.1",
|
|
68
68
|
"humanize-duration": "^3.25.1",
|
|
69
69
|
"json-schema": "^0.4.0",
|
|
70
70
|
"json-schema-library": "^7.3.9",
|
|
@@ -83,11 +83,11 @@
|
|
|
83
83
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@backstage/cli": "^0.25.
|
|
87
|
-
"@backstage/core-app-api": "^1.12.0",
|
|
88
|
-
"@backstage/plugin-catalog": "^1.17.0",
|
|
89
|
-
"@backstage/plugin-catalog-common": "^1.0.
|
|
90
|
-
"@backstage/test-utils": "^1.5.0",
|
|
86
|
+
"@backstage/cli": "^0.25.3-next.0",
|
|
87
|
+
"@backstage/core-app-api": "^1.12.1-next.0",
|
|
88
|
+
"@backstage/plugin-catalog": "^1.17.1-next.0",
|
|
89
|
+
"@backstage/plugin-catalog-common": "^1.0.22-next.0",
|
|
90
|
+
"@backstage/test-utils": "^1.5.1-next.0",
|
|
91
91
|
"@testing-library/dom": "^9.0.0",
|
|
92
92
|
"@testing-library/jest-dom": "^6.0.0",
|
|
93
93
|
"@testing-library/react": "^14.0.0",
|