diff --git a/plugins/catalog/src/alpha/filter/FilterWrapper.tsx b/plugins/catalog-react/src/alpha/filter/FilterWrapper.tsx similarity index 94% rename from plugins/catalog/src/alpha/filter/FilterWrapper.tsx rename to plugins/catalog-react/src/alpha/filter/FilterWrapper.tsx index 33af9c2c3f..76ee69b087 100644 --- a/plugins/catalog/src/alpha/filter/FilterWrapper.tsx +++ b/plugins/catalog-react/src/alpha/filter/FilterWrapper.tsx @@ -24,9 +24,13 @@ import { parseFilterExpression } from './parseFilterExpression'; const seenParseErrorExpressionStrings = new Set(); const seenDuplicateExpressionStrings = new Set(); -// 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, diff --git a/plugins/catalog/src/alpha/filter/matchers/createHasMatcher.test.ts b/plugins/catalog-react/src/alpha/filter/matchers/createHasMatcher.test.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/matchers/createHasMatcher.test.ts rename to plugins/catalog-react/src/alpha/filter/matchers/createHasMatcher.test.ts diff --git a/plugins/catalog/src/alpha/filter/matchers/createHasMatcher.ts b/plugins/catalog-react/src/alpha/filter/matchers/createHasMatcher.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/matchers/createHasMatcher.ts rename to plugins/catalog-react/src/alpha/filter/matchers/createHasMatcher.ts diff --git a/plugins/catalog/src/alpha/filter/matchers/createIsMatcher.test.ts b/plugins/catalog-react/src/alpha/filter/matchers/createIsMatcher.test.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/matchers/createIsMatcher.test.ts rename to plugins/catalog-react/src/alpha/filter/matchers/createIsMatcher.test.ts diff --git a/plugins/catalog/src/alpha/filter/matchers/createIsMatcher.ts b/plugins/catalog-react/src/alpha/filter/matchers/createIsMatcher.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/matchers/createIsMatcher.ts rename to plugins/catalog-react/src/alpha/filter/matchers/createIsMatcher.ts diff --git a/plugins/catalog/src/alpha/filter/matchers/createKindMatcher.test.ts b/plugins/catalog-react/src/alpha/filter/matchers/createKindMatcher.test.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/matchers/createKindMatcher.test.ts rename to plugins/catalog-react/src/alpha/filter/matchers/createKindMatcher.test.ts diff --git a/plugins/catalog/src/alpha/filter/matchers/createKindMatcher.ts b/plugins/catalog-react/src/alpha/filter/matchers/createKindMatcher.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/matchers/createKindMatcher.ts rename to plugins/catalog-react/src/alpha/filter/matchers/createKindMatcher.ts diff --git a/plugins/catalog/src/alpha/filter/matchers/createTypeMatcher.test.ts b/plugins/catalog-react/src/alpha/filter/matchers/createTypeMatcher.test.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/matchers/createTypeMatcher.test.ts rename to plugins/catalog-react/src/alpha/filter/matchers/createTypeMatcher.test.ts diff --git a/plugins/catalog/src/alpha/filter/matchers/createTypeMatcher.ts b/plugins/catalog-react/src/alpha/filter/matchers/createTypeMatcher.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/matchers/createTypeMatcher.ts rename to plugins/catalog-react/src/alpha/filter/matchers/createTypeMatcher.ts diff --git a/plugins/catalog/src/alpha/filter/matchers/types.ts b/plugins/catalog-react/src/alpha/filter/matchers/types.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/matchers/types.ts rename to plugins/catalog-react/src/alpha/filter/matchers/types.ts diff --git a/plugins/catalog/src/alpha/filter/parseFilterExpression.test.ts b/plugins/catalog-react/src/alpha/filter/parseFilterExpression.test.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/parseFilterExpression.test.ts rename to plugins/catalog-react/src/alpha/filter/parseFilterExpression.test.ts diff --git a/plugins/catalog/src/alpha/filter/parseFilterExpression.ts b/plugins/catalog-react/src/alpha/filter/parseFilterExpression.ts similarity index 100% rename from plugins/catalog/src/alpha/filter/parseFilterExpression.ts rename to plugins/catalog-react/src/alpha/filter/parseFilterExpression.ts diff --git a/plugins/catalog-react/src/alpha/index.ts b/plugins/catalog-react/src/alpha/index.ts index 4ff4dbf0dd..f1b8b05c62 100644 --- a/plugins/catalog-react/src/alpha/index.ts +++ b/plugins/catalog-react/src/alpha/index.ts @@ -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'; diff --git a/plugins/catalog/src/alpha/entityContents.tsx b/plugins/catalog/src/alpha/entityContents.tsx index 165ed33e04..224557519e 100644 --- a/plugins/catalog/src/alpha/entityContents.tsx +++ b/plugins/catalog/src/alpha/entityContents.tsx @@ -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 = diff --git a/plugins/catalog/src/alpha/pages.tsx b/plugins/catalog/src/alpha/pages.tsx index b39fe510e6..f822cb0fed 100644 --- a/plugins/catalog/src/alpha/pages.tsx +++ b/plugins/catalog/src/alpha/pages.tsx @@ -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({