relocate buildFilterFn and FilterWrapper to catalog-react from catalog
Signed-off-by: Mark Dunphy <markd@spotify.com>
This commit is contained in:
+7
-3
@@ -24,9 +24,13 @@ import { parseFilterExpression } from './parseFilterExpression';
|
||||
const seenParseErrorExpressionStrings = new Set<string>();
|
||||
const seenDuplicateExpressionStrings = new Set<string>();
|
||||
|
||||
// Given an optional filter function and an optional filter expression, make
|
||||
// sure that at most one of them was given, and return a filter function that
|
||||
// does the right thing.
|
||||
/**
|
||||
* Given an optional filter function and an optional filter expression, make
|
||||
* sure that at most one of them was given, and return a filter function that
|
||||
* does the right thing.
|
||||
*
|
||||
* @alpha
|
||||
*/
|
||||
export function buildFilterFn(
|
||||
filterFunction?: (entity: Entity) => boolean,
|
||||
filterExpression?: string,
|
||||
@@ -20,3 +20,4 @@ export * from './predicates';
|
||||
export { catalogReactTranslationRef } from '../translation';
|
||||
export { isOwnerOf } from '../utils/isOwnerOf';
|
||||
export { useEntityPermission } from '../hooks/useEntityPermission';
|
||||
export { buildFilterFn } from './filter/FilterWrapper';
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
EntityContentLayoutBlueprint,
|
||||
EntityContentLayoutProps,
|
||||
} from '@backstage/plugin-catalog-react/alpha';
|
||||
import { buildFilterFn } from './filter/FilterWrapper';
|
||||
import { buildFilterFn } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { useEntity } from '@backstage/plugin-catalog-react';
|
||||
|
||||
export const catalogOverviewEntityContent =
|
||||
|
||||
@@ -31,10 +31,10 @@ import {
|
||||
EntityHeaderBlueprint,
|
||||
EntityContentBlueprint,
|
||||
defaultEntityContentGroups,
|
||||
buildFilterFn,
|
||||
} from '@backstage/plugin-catalog-react/alpha';
|
||||
import { rootRouteRef } from '../routes';
|
||||
import { useEntityFromUrl } from '../components/CatalogEntityPage/useEntityFromUrl';
|
||||
import { buildFilterFn } from './filter/FilterWrapper';
|
||||
import { EntityHeader } from './components/EntityHeader';
|
||||
|
||||
export const catalogPage = PageBlueprint.makeWithOverrides({
|
||||
|
||||
Reference in New Issue
Block a user