From eb2b9db729952cf0b6c29a601800b25e238cb13d Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 22 Nov 2022 10:44:29 +0100 Subject: [PATCH] chore: fixing types for `uiSchema` Signed-off-by: blam --- .../components/MultistepJsonForm/MultistepJsonForm.tsx | 9 +++------ plugins/scaffolder/src/components/types.ts | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.tsx b/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.tsx index 790d0691b5..1fc63b2b61 100644 --- a/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.tsx +++ b/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.tsx @@ -29,7 +29,8 @@ import { useRouteRefParams, useApi, } from '@backstage/core-plugin-api'; -import { FormProps, IChangeEvent, UiSchema, withTheme } from '@rjsf/core'; +import { FormProps, IChangeEvent, withTheme } from '@rjsf/core'; +import { UiSchema } from '@rjsf/utils'; import { Theme as MuiTheme } from '@rjsf/material-ui'; import React, { ComponentType, useState } from 'react'; import { transformSchemaToProps } from './schema'; @@ -75,11 +76,7 @@ export function getSchemasFromSteps(steps: Step[]): { return steps.map(({ schema }) => ({ mergedSchema: schema, ...extractSchemaFromStep(schema), - })) as unknown as { - uiSchema: UiSchema; - mergedSchema: JsonObject; - schema: JsonObject; - }[]; + })); } /** diff --git a/plugins/scaffolder/src/components/types.ts b/plugins/scaffolder/src/components/types.ts index 3a0866a139..f5989a2ae1 100644 --- a/plugins/scaffolder/src/components/types.ts +++ b/plugins/scaffolder/src/components/types.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { UiSchema } from '@rjsf/core'; +import { UiSchema } from '@rjsf/utils'; import { JsonObject } from '@backstage/types'; /**