relocate buildFilterFn and FilterWrapper to catalog-react from catalog

Signed-off-by: Mark Dunphy <markd@spotify.com>
This commit is contained in:
Mark Dunphy
2025-05-02 10:32:24 -04:00
parent af9f453c5f
commit af0ab1cb78
15 changed files with 10 additions and 5 deletions
@@ -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,
+1
View File
@@ -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';
+1 -1
View File
@@ -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 =
+1 -1
View File
@@ -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({