Fixed act-issues and review comments
Signed-off-by: Gustaf Lundh <gustaf.lundh@axis.com>
This commit is contained in:
@@ -432,16 +432,6 @@ export type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
|
||||
entity: Entity;
|
||||
};
|
||||
|
||||
// Warning: (tsdoc-undefined-tag) The TSDoc tag "@private" is not defined in this configuration
|
||||
// Warning: (ae-missing-release-tag) "filterAndCapitalize" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public
|
||||
export function filterAndCapitalize(
|
||||
allKinds: string[],
|
||||
allowedKinds?: string[],
|
||||
forcedKinds?: string[],
|
||||
): Record<string, string>;
|
||||
|
||||
// @public
|
||||
export function getEntityRelations(
|
||||
entity: Entity | undefined,
|
||||
@@ -514,16 +504,6 @@ export type UnregisterEntityDialogProps = {
|
||||
entity: Entity;
|
||||
};
|
||||
|
||||
// Warning: (tsdoc-undefined-tag) The TSDoc tag "@private" is not defined in this configuration
|
||||
// Warning: (ae-missing-release-tag) "useAllKinds" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public
|
||||
export function useAllKinds(): {
|
||||
loading: boolean;
|
||||
error?: Error;
|
||||
allKinds: string[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export function useAsyncEntity<
|
||||
TEntity extends Entity = Entity,
|
||||
|
||||
@@ -166,7 +166,7 @@ describe('<EntityListProvider />', () => {
|
||||
location: `/catalog?${query}`,
|
||||
},
|
||||
});
|
||||
await waitFor(() => !!result.current.queryParameters);
|
||||
await act(() => waitFor(() => !!result.current.queryParameters));
|
||||
expect(result.current.queryParameters).toEqual({
|
||||
kind: 'component',
|
||||
type: 'service',
|
||||
|
||||
@@ -35,7 +35,5 @@ export {
|
||||
getEntityRelations,
|
||||
getEntitySourceLocation,
|
||||
isOwnerOf,
|
||||
useAllKinds,
|
||||
filterKinds,
|
||||
} from './utils';
|
||||
export type { EntitySourceLocation } from './utils';
|
||||
|
||||
@@ -20,7 +20,6 @@ import { catalogApiRef } from '../api';
|
||||
|
||||
/**
|
||||
* Fetch and return all availible kinds.
|
||||
* @internal
|
||||
*/
|
||||
export function useAllKinds(): {
|
||||
loading: boolean;
|
||||
@@ -45,8 +44,6 @@ export function useAllKinds(): {
|
||||
|
||||
/**
|
||||
* Filter and capitalize accessible kinds.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export function filterKinds(
|
||||
allKinds: string[],
|
||||
|
||||
@@ -25,10 +25,9 @@ import {
|
||||
} from '@material-ui/core';
|
||||
import {
|
||||
EntityKindFilter,
|
||||
filterKinds,
|
||||
useAllKinds,
|
||||
useEntityList,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
import { filterKinds, useAllKinds } from '@backstage/plugin-catalog-react/src/utils';
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) =>
|
||||
createStyles({
|
||||
|
||||
Reference in New Issue
Block a user