Expose props

Signed-off-by: Shubham <Shubhamjajoo1@gmail.com>
This commit is contained in:
Shubham
2023-03-31 20:55:28 +05:30
parent eecf5f100f
commit d446f8fb0a
3 changed files with 39 additions and 31 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-graph': patch
---
Expose all `EntityRelationsGraphProps` to Catalog Graph Page
+17 -16
View File
@@ -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<EntityRelationsGraphProps>,
) => JSX.Element;
// @public
export const catalogGraphPlugin: BackstagePlugin<
@@ -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<EntityRelationsGraphProps>,
) => {
const { relationPairs = ALL_RELATION_PAIRS, initialState } = props;
const navigate = useNavigate();
@@ -234,6 +235,7 @@ export const CatalogGraphPage = (props: {
navigate to entity.
</Typography>
<EntityRelationsGraph
{...props}
rootEntityNames={rootEntityNames}
maxDepth={maxDepth}
kinds={