diff --git a/plugins/catalog/src/alpha/entityCards.tsx b/plugins/catalog/src/alpha/entityCards.tsx index 9faf0b9517..cc30928fcf 100644 --- a/plugins/catalog/src/alpha/entityCards.tsx +++ b/plugins/catalog/src/alpha/entityCards.tsx @@ -16,147 +16,76 @@ import React from 'react'; import { createEntityCardExtension } from '@backstage/plugin-catalog-react/alpha'; -import { createSchemaFromZod } from '@backstage/frontend-plugin-api'; export const EntityAboutCard = createEntityCardExtension({ id: 'about', - configSchema: createSchemaFromZod(z => - z.object({ - variant: z.enum(['gridItem', 'flex', 'fullHeight']).default('gridItem'), - }), - ), - loader: async ({ config }) => + loader: async () => import('../components/AboutCard').then(m => ( - + )), }); export const EntityLinksCard = createEntityCardExtension({ id: 'links', - configSchema: createSchemaFromZod(z => - z.object({ - variant: z.enum(['gridItem', 'flex', 'fullHeight']).optional(), - cols: z - .union([ - z.number(), - z.object({ - xs: z.number(), - sm: z.number(), - md: z.number(), - lg: z.number(), - xl: z.number(), - }), - ]) - .optional(), - }), - ), - loader: async ({ config }) => + loader: async () => import('../components/EntityLinksCard').then(m => { - return ; + return ; }), }); export const EntityLabelsCard = createEntityCardExtension({ id: 'labels', - configSchema: createSchemaFromZod(z => - z.object({ - variant: z.enum(['gridItem', 'flex', 'fullHeight']).optional(), - title: z.string().optional(), - }), - ), - loader: async ({ config }) => + loader: async () => import('../components/EntityLabelsCard').then(m => ( - + )), }); export const EntityDependsOnComponentsCard = createEntityCardExtension({ id: 'dependsOn.components', - configSchema: createSchemaFromZod(z => - z.object({ - variant: z.enum(['gridItem', 'flex', 'fullHeight']).default('gridItem'), - title: z.string().optional(), - // TODO: columns, tableOptions - }), - ), - loader: async ({ config }) => + loader: async () => import('../components/DependsOnComponentsCard').then(m => ( - + )), }); export const EntityDependsOnResourcesCard = createEntityCardExtension({ id: 'dependsOn.resources', - configSchema: createSchemaFromZod(z => - z.object({ - variant: z.enum(['gridItem', 'flex', 'fullHeight']).default('gridItem'), - title: z.string().optional(), - // TODO: columns, tableOptions - }), - ), - loader: async ({ config }) => + loader: async () => import('../components/DependsOnResourcesCard').then(m => ( - + )), }); export const EntityHasComponentsCard = createEntityCardExtension({ id: 'has.components', - configSchema: createSchemaFromZod(z => - z.object({ - variant: z.enum(['gridItem', 'flex', 'fullHeight']).default('gridItem'), - title: z.string().optional(), - }), - ), - loader: async ({ config }) => + loader: async () => import('../components/HasComponentsCard').then(m => ( - + )), }); export const EntityHasResourcesCard = createEntityCardExtension({ id: 'has.resources', - configSchema: createSchemaFromZod(z => - z.object({ - variant: z.enum(['gridItem', 'flex', 'fullHeight']).default('gridItem'), - title: z.string().optional(), - }), - ), - loader: async ({ config }) => + loader: async () => import('../components/HasResourcesCard').then(m => ( - + )), }); export const EntityHasSubcomponentsCard = createEntityCardExtension({ id: 'has.subcomponents', - configSchema: createSchemaFromZod(z => - z.object({ - variant: z.enum(['gridItem', 'flex', 'fullHeight']).default('gridItem'), - title: z.string().optional(), - // TODO: tableOptions - }), - ), - loader: async ({ config }) => + loader: async () => import('../components/HasSubcomponentsCard').then(m => ( - + )), }); export const EntityHasSystemsCard = createEntityCardExtension({ id: 'has.systems', - configSchema: createSchemaFromZod(z => - z.object({ - variant: z.enum(['gridItem', 'flex', 'fullHeight']).default('gridItem'), - title: z.string().optional(), - }), - ), - loader: async ({ config }) => + loader: async () => import('../components/HasSystemsCard').then(m => ( - + )), });