more api cleanup

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-08-18 14:11:45 +02:00
parent e195112c5c
commit 3f739be9d9
88 changed files with 358 additions and 594 deletions
+2 -12
View File
@@ -9,22 +9,14 @@ import { BackstagePlugin } from '@backstage/core-plugin-api';
import { InfoCardVariants } from '@backstage/core-components';
import { RouteRef } from '@backstage/core-plugin-api';
// Warning: (ae-missing-release-tag) "EntityFossaCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityFossaCard: ({
variant,
}: {
export const EntityFossaCard: (props: {
variant?: InfoCardVariants | undefined;
}) => JSX.Element;
// Warning: (ae-missing-release-tag) "FossaPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const FossaPage: ({ entitiesFilter }: FossaPageProps) => JSX.Element;
export const FossaPage: (props: FossaPageProps) => JSX.Element;
// Warning: (ae-missing-release-tag) "FossaPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type FossaPageProps = {
entitiesFilter?:
@@ -33,8 +25,6 @@ export type FossaPageProps = {
| undefined;
};
// Warning: (ae-missing-release-tag) "fossaPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const fossaPlugin: BackstagePlugin<
{
@@ -100,7 +100,9 @@ const Card = ({
</InfoCard>
);
};
export const FossaCard = ({ variant }: { variant?: InfoCardVariants }) => {
export const FossaCard = (props: { variant?: InfoCardVariants }) => {
const { variant } = props;
const { entity } = useEntity();
const fossaApi = useApi(fossaApiRef);
@@ -167,6 +167,7 @@ const filters: TableFilter[] = [
{ column: 'Branch', type: 'select' },
];
/** @public */
export type FossaPageProps = {
entitiesFilter?:
| Record<string, string | symbol | (string | symbol)[]>[]
@@ -174,9 +175,8 @@ export type FossaPageProps = {
| undefined;
};
export const FossaPage = ({
entitiesFilter = { kind: 'Component' },
}: FossaPageProps) => {
export const FossaPage = (props: FossaPageProps) => {
const { entitiesFilter = { kind: 'Component' } } = props;
const catalogApi = useApi(catalogApiRef);
const fossaApi = useApi(fossaApiRef);
const [filter, setFilter] = useState(entitiesFilter);
+2
View File
@@ -21,6 +21,7 @@ import {
createRoutableExtension,
} from '@backstage/core-plugin-api';
/** @public */
export const EntityFossaCard = fossaPlugin.provide(
createComponentExtension({
name: 'EntityFossaCard',
@@ -30,6 +31,7 @@ export const EntityFossaCard = fossaPlugin.provide(
}),
);
/** @public */
export const FossaPage = fossaPlugin.provide(
createRoutableExtension({
name: 'FossaPage',
+1
View File
@@ -24,6 +24,7 @@ import {
identityApiRef,
} from '@backstage/core-plugin-api';
/** @public */
export const fossaPlugin = createPlugin({
id: 'fossa',
apis: [