diff --git a/.changeset/hungry-foxes-divide.md b/.changeset/hungry-foxes-divide.md new file mode 100644 index 0000000000..589c899443 --- /dev/null +++ b/.changeset/hungry-foxes-divide.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-graph': patch +--- + +Expose all `EntityRelationsGraphProps` to Catalog Graph Page diff --git a/plugins/catalog-graph/api-report.md b/plugins/catalog-graph/api-report.md index f7444c5f1b..645fc1162e 100644 --- a/plugins/catalog-graph/api-report.md +++ b/plugins/catalog-graph/api-report.md @@ -18,22 +18,23 @@ import { RouteRef } from '@backstage/core-plugin-api'; export const ALL_RELATION_PAIRS: RelationPairs; // @public -export const CatalogGraphPage: (props: { - relationPairs?: RelationPairs | undefined; - initialState?: - | { - selectedRelations?: string[] | undefined; - selectedKinds?: string[] | undefined; - rootEntityRefs?: string[] | undefined; - maxDepth?: number | undefined; - unidirectional?: boolean | undefined; - mergeRelations?: boolean | undefined; - direction?: Direction | undefined; - showFilters?: boolean | undefined; - curve?: 'curveStepBefore' | 'curveMonotoneX' | undefined; - } - | undefined; -}) => JSX.Element; +export const CatalogGraphPage: ( + props: { + initialState?: + | { + selectedRelations?: string[] | undefined; + selectedKinds?: string[] | undefined; + rootEntityRefs?: string[] | undefined; + maxDepth?: number | undefined; + unidirectional?: boolean | undefined; + mergeRelations?: boolean | undefined; + direction?: Direction | undefined; + showFilters?: boolean | undefined; + curve?: 'curveStepBefore' | 'curveMonotoneX' | undefined; + } + | undefined; + } & Partial, +) => JSX.Element; // @public export const catalogGraphPlugin: BackstagePlugin< diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.tsx index 0e766c2887..92da650359 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/CatalogGraphPage.tsx @@ -38,7 +38,7 @@ import { Direction, EntityNode, EntityRelationsGraph, - RelationPairs, + EntityRelationsGraphProps, } from '../EntityRelationsGraph'; import { CurveFilter } from './CurveFilter'; import { DirectionFilter } from './DirectionFilter'; @@ -103,20 +103,21 @@ const useStyles = makeStyles( { name: 'PluginCatalogGraphCatalogGraphPage' }, ); -export const CatalogGraphPage = (props: { - relationPairs?: RelationPairs; - initialState?: { - selectedRelations?: string[]; - selectedKinds?: string[]; - rootEntityRefs?: string[]; - maxDepth?: number; - unidirectional?: boolean; - mergeRelations?: boolean; - direction?: Direction; - showFilters?: boolean; - curve?: 'curveStepBefore' | 'curveMonotoneX'; - }; -}) => { +export const CatalogGraphPage = ( + props: { + initialState?: { + selectedRelations?: string[]; + selectedKinds?: string[]; + rootEntityRefs?: string[]; + maxDepth?: number; + unidirectional?: boolean; + mergeRelations?: boolean; + direction?: Direction; + showFilters?: boolean; + curve?: 'curveStepBefore' | 'curveMonotoneX'; + }; + } & Partial, +) => { const { relationPairs = ALL_RELATION_PAIRS, initialState } = props; const navigate = useNavigate(); @@ -234,6 +235,7 @@ export const CatalogGraphPage = (props: { navigate to entity.