diff --git a/packages/frontend-plugin-api/api-report.md b/packages/frontend-plugin-api/api-report.md index 3c082a7694..d6a91c0c99 100644 --- a/packages/frontend-plugin-api/api-report.md +++ b/packages/frontend-plugin-api/api-report.md @@ -931,36 +931,40 @@ export interface ExtensionBlueprint< > { // (undocumented) dataRefs: TDataRefs; - // (undocumented) - make(args: { - namespace?: string; - name?: string; - attachTo?: { - id: string; - input: string; - }; - disabled?: boolean; - inputs?: TInputs; - output?: TOutput; - configSchema?: PortableSchema; - params: TParams; - factory?( - params: TParams, - context: { - node: AppNode; - config: TConfig; - inputs: Expand>; - orignalFactory( - params?: TParams, - context?: { - node?: AppNode; - config?: TConfig; - inputs?: Expand>; - }, - ): Expand>; - }, - ): Expand>; - }): ExtensionDefinition; + make( + args: { + namespace?: string; + name?: string; + attachTo?: { + id: string; + input: string; + }; + disabled?: boolean; + inputs?: TInputs; + output?: TOutput; + configSchema?: PortableSchema; + } & ( + | { + factory( + originalFactory: ( + params: TParams, + context?: { + config?: TConfig; + inputs?: Expand>; + }, + ) => Expand>, + context: { + node: AppNode; + config: TConfig; + inputs: Expand>; + }, + ): Expand>; + } + | { + params: TParams; + } + ), + ): ExtensionDefinition; } // @public (undocumented) diff --git a/plugins/catalog-react/src/alpha.tsx b/plugins/catalog-react/src/alpha.tsx index 7f276b8ea6..e81b8e5ebf 100644 --- a/plugins/catalog-react/src/alpha.tsx +++ b/plugins/catalog-react/src/alpha.tsx @@ -22,7 +22,6 @@ import { RouteRef, coreExtensionData, createExtension, - createExtensionBlueprint, createExtensionDataRef, createSchemaFromZod, } from '@backstage/frontend-plugin-api'; @@ -48,44 +47,6 @@ export const catalogExtensionData = { }), }; -/** @alpha */ -export const EntityCardBlueprint = createExtensionBlueprint({ - kind: 'entity-card', - attachTo: { id: 'entity-content:catalog/overview', input: 'cards' }, - configSchema: createSchemaFromZod(z => - z.object({ - filter: z.string().optional(), - }), - ), - output: { - element: coreExtensionData.reactElement, - filterFunction: catalogExtensionData.entityFilterFunction.optional(), - filterExpression: catalogExtensionData.entityFilterExpression.optional(), - }, - factory( - params: { - filter?: - | typeof catalogExtensionData.entityFilterFunction.T - | typeof catalogExtensionData.entityFilterExpression.T; - loader: () => Promise; - }, - { node, config }, - ) { - const ExtensionComponent = lazy(() => - params.loader().then(element => ({ default: () => element })), - ); - - return { - element: ( - - - - ), - ...mergeFilters({ config, options: params }), - }; - }, -}); - // TODO: Figure out how to merge with provided config schema /** @alpha */ export function createEntityCardExtension<