@@ -6,6 +6,7 @@
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ComponentType } from 'react';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { DialogApiDialog } from '@backstage/frontend-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { ExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
@@ -325,6 +326,28 @@ export interface EntityContentLayoutProps {
|
||||
}>;
|
||||
}
|
||||
|
||||
// @alpha (undocumented)
|
||||
export const EntityContextMenuItemBlueprint: ExtensionBlueprint<{
|
||||
kind: 'entity-context-menu-item';
|
||||
name: undefined;
|
||||
params: EntityContextMenuItemParams;
|
||||
output: ConfigurableExtensionDataRef<
|
||||
React_2.JSX.Element,
|
||||
'core.reactElement',
|
||||
{}
|
||||
>;
|
||||
inputs: {};
|
||||
config: {};
|
||||
configInput: {};
|
||||
dataRefs: never;
|
||||
}>;
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type EntityContextMenuItemParams =
|
||||
| FactoryLoaderParams
|
||||
| FactoryHrefParams
|
||||
| FactoryDialogParams;
|
||||
|
||||
// @alpha (undocumented)
|
||||
export const EntityHeaderBlueprint: ExtensionBlueprint<{
|
||||
kind: 'entity-header';
|
||||
@@ -393,6 +416,33 @@ export type EntityPredicateValue =
|
||||
$contains: EntityPredicateExpression;
|
||||
};
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type FactoryDialogParams = {
|
||||
dialogLoader: () => Promise<
|
||||
({ dialog }: { dialog: DialogApiDialog }) => JSX.Element
|
||||
>;
|
||||
title: string;
|
||||
icon: JSX.Element;
|
||||
};
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type FactoryHrefParams =
|
||||
| {
|
||||
title: string;
|
||||
icon: JSX.Element;
|
||||
useHref: () => string;
|
||||
}
|
||||
| {
|
||||
title: string;
|
||||
icon: JSX.Element;
|
||||
href: string;
|
||||
};
|
||||
|
||||
// @alpha (undocumented)
|
||||
export type FactoryLoaderParams = {
|
||||
loader: () => Promise<JSX.Element>;
|
||||
};
|
||||
|
||||
// @alpha
|
||||
export function isOwnerOf(owner: Entity, entity: Entity): boolean;
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ export type FactoryDialogParams = {
|
||||
icon: JSX.Element;
|
||||
};
|
||||
|
||||
/** @alpha */
|
||||
export type EntityContextMenuItemParams =
|
||||
| FactoryLoaderParams
|
||||
| FactoryHrefParams
|
||||
|
||||
@@ -27,4 +27,6 @@ export {
|
||||
EntityContextMenuItemBlueprint,
|
||||
type FactoryHrefParams,
|
||||
type FactoryLoaderParams,
|
||||
type FactoryDialogParams,
|
||||
type EntityContextMenuItemParams,
|
||||
} from './EntityContextMenuItemBlueprint';
|
||||
|
||||
@@ -1004,6 +1004,13 @@ const _default: FrontendPlugin<
|
||||
optional: false;
|
||||
}
|
||||
>;
|
||||
extraContextMenuItems: ExtensionInput<
|
||||
ConfigurableExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>,
|
||||
{
|
||||
singleton: false;
|
||||
optional: false;
|
||||
}
|
||||
>;
|
||||
};
|
||||
kind: 'page';
|
||||
name: 'entity';
|
||||
|
||||
@@ -404,6 +404,8 @@ export interface EntityLayoutProps {
|
||||
children?: ReactNode;
|
||||
// (undocumented)
|
||||
NotFoundComponent?: ReactNode;
|
||||
// (undocumented)
|
||||
extraMenuItems?: JSX.Element[];
|
||||
parentEntityRelations?: string[];
|
||||
// Warning: (ae-forgotten-export) The symbol "EntityContextMenuOptions" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user