@@ -293,16 +293,7 @@ export interface TemplateGroupsProps {
|
||||
// @alpha
|
||||
export const useFilteredSchemaProperties: (
|
||||
manifest: TemplateParameterSchema | undefined,
|
||||
) => {
|
||||
steps: {
|
||||
title: string;
|
||||
description?: string | undefined;
|
||||
schema: JsonObject;
|
||||
}[];
|
||||
title: string;
|
||||
description?: string | undefined;
|
||||
presentation?: TemplatePresentationV1beta3 | undefined;
|
||||
} | null;
|
||||
) => TemplateParameterSchema | undefined;
|
||||
|
||||
// @alpha
|
||||
export const useFormDataFromQuery: (
|
||||
@@ -331,6 +322,9 @@ export type WorkflowProps = {
|
||||
description?: string;
|
||||
namespace: string;
|
||||
templateName: string;
|
||||
components?: {
|
||||
ReviewStepComponent?: React_2.ComponentType<ReviewStepProps>;
|
||||
};
|
||||
onError(error: Error | undefined): JSX.Element | null;
|
||||
} & Pick<
|
||||
StepperProps,
|
||||
|
||||
@@ -27,7 +27,9 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api';
|
||||
import { useTemplateParameterSchema } from '../../hooks/useTemplateParameterSchema';
|
||||
import { Stepper, type StepperProps } from '../Stepper/Stepper';
|
||||
import { SecretsContextProvider } from '../../../secrets/SecretsContext';
|
||||
|
||||
import { useFilteredSchemaProperties } from '../../hooks/useFilteredSchemaProperties';
|
||||
import { ReviewStepProps } from '@backstage/plugin-scaffolder-react';
|
||||
|
||||
const useStyles = makeStyles<BackstageTheme>(() => ({
|
||||
markdown: {
|
||||
@@ -49,6 +51,9 @@ export type WorkflowProps = {
|
||||
description?: string;
|
||||
namespace: string;
|
||||
templateName: string;
|
||||
components?: {
|
||||
ReviewStepComponent?: React.ComponentType<ReviewStepProps>;
|
||||
};
|
||||
onError(error: Error | undefined): JSX.Element | null;
|
||||
} & Pick<
|
||||
StepperProps,
|
||||
|
||||
@@ -24,12 +24,12 @@ import { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';
|
||||
|
||||
export const useFilteredSchemaProperties = (
|
||||
manifest: TemplateParameterSchema | undefined,
|
||||
) => {
|
||||
): TemplateParameterSchema | undefined => {
|
||||
const featureFlagKey = 'backstage:featureFlag';
|
||||
const featureFlagApi = useApi(featureFlagsApiRef);
|
||||
|
||||
if (!manifest) {
|
||||
return null;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const filteredSteps = manifest?.steps
|
||||
|
||||
Reference in New Issue
Block a user