From 1d10e74080124cd5c63d03d7feed57b4bb3bcc5f Mon Sep 17 00:00:00 2001 From: Dede Hamzah Date: Tue, 28 Dec 2021 09:25:19 +0700 Subject: [PATCH] Resolve code review Signed-off-by: Dede Hamzah --- plugins/catalog-react/api-report.md | 16 +++------------- .../EntityLifecyclePicker.tsx | 1 + .../EntityOwnerPicker/EntityOwnerPicker.tsx | 1 + .../EntitySearchBar/EntitySearchBar.tsx | 1 + .../EntityTagPicker/EntityTagPicker.tsx | 1 + .../components/UserListPicker/UserListPicker.tsx | 1 + .../catalog-react/src/overridableComponents.ts | 6 +++--- 7 files changed, 11 insertions(+), 16 deletions(-) diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 4a6969fe6f..72e64ea1c3 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -54,12 +54,12 @@ export interface AsyncEntityProviderProps { refresh?: VoidFunction; } -// Warning: (ae-forgotten-export) The symbol "BackstageComponentsNameToClassKey" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "CatalogReactComponentsNameToClassKey" needs to be exported by the entry point index.d.ts // // @public (undocumented) export type BackstageOverrides = Overrides & { - [Name in keyof BackstageComponentsNameToClassKey]?: Partial< - StyleRules + [Name in keyof CatalogReactComponentsNameToClassKey]?: Partial< + StyleRules >; }; @@ -72,28 +72,18 @@ export { CatalogApi }; // @public (undocumented) export const catalogApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "CatalogReactEntityLifecyclePickerClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CatalogReactEntityLifecyclePickerClassKey = 'input'; -// Warning: (ae-missing-release-tag) "CatalogReactEntityOwnerPickerClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CatalogReactEntityOwnerPickerClassKey = 'input'; -// Warning: (ae-missing-release-tag) "CatalogReactEntitySearchBarClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input'; -// Warning: (ae-missing-release-tag) "CatalogReactEntityTagPickerClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CatalogReactEntityTagPickerClassKey = 'input'; -// Warning: (ae-missing-release-tag) "CatalogReactUserListPickerClassKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CatalogReactUserListPickerClassKey = | 'root' diff --git a/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx b/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx index 4bdd148d15..630b1700a0 100644 --- a/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx +++ b/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.tsx @@ -31,6 +31,7 @@ import React, { useEffect, useMemo, useState } from 'react'; import { useEntityListProvider } from '../../hooks/useEntityListProvider'; import { EntityLifecycleFilter } from '../../filters'; +/** @public */ export type CatalogReactEntityLifecyclePickerClassKey = 'input'; const useStyles = makeStyles( diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx index 7db9ee6b42..ae88858666 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx @@ -33,6 +33,7 @@ import { EntityOwnerFilter } from '../../filters'; import { getEntityRelations } from '../../utils'; import { formatEntityRefTitle } from '../EntityRefLink'; +/** @public */ export type CatalogReactEntityOwnerPickerClassKey = 'input'; const useStyles = makeStyles( diff --git a/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx b/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx index 2036659cf7..57c7f58413 100644 --- a/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx +++ b/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx @@ -29,6 +29,7 @@ import { useDebounce } from 'react-use'; import { useEntityListProvider } from '../../hooks/useEntityListProvider'; import { EntityTextFilter } from '../../filters'; +/** @public */ export type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input'; const useStyles = makeStyles( diff --git a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx index dd97fbc515..a25c50c0a9 100644 --- a/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx +++ b/plugins/catalog-react/src/components/EntityTagPicker/EntityTagPicker.tsx @@ -31,6 +31,7 @@ import React, { useEffect, useMemo, useState } from 'react'; import { useEntityListProvider } from '../../hooks/useEntityListProvider'; import { EntityTagFilter } from '../../filters'; +/** @public */ export type CatalogReactEntityTagPickerClassKey = 'input'; const useStyles = makeStyles( diff --git a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx index 55cee0547d..16458a80a7 100644 --- a/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx +++ b/plugins/catalog-react/src/components/UserListPicker/UserListPicker.tsx @@ -43,6 +43,7 @@ import { import { UserListFilterKind } from '../../types'; import { reduceEntityFilters } from '../../utils'; +/** @public */ export type CatalogReactUserListPickerClassKey = | 'root' | 'title' diff --git a/plugins/catalog-react/src/overridableComponents.ts b/plugins/catalog-react/src/overridableComponents.ts index 33a6ef2481..ef47e35865 100644 --- a/plugins/catalog-react/src/overridableComponents.ts +++ b/plugins/catalog-react/src/overridableComponents.ts @@ -24,7 +24,7 @@ import { CatalogReactEntityOwnerPickerClassKey, } from './components'; -type BackstageComponentsNameToClassKey = { +type CatalogReactComponentsNameToClassKey = { CatalogReactUserListPicker: CatalogReactUserListPickerClassKey; CatalogReactEntityLifecyclePicker: CatalogReactEntityLifecyclePickerClassKey; CatalogReactEntitySearchBar: CatalogReactEntitySearchBarClassKey; @@ -34,7 +34,7 @@ type BackstageComponentsNameToClassKey = { /** @public */ export type BackstageOverrides = Overrides & { - [Name in keyof BackstageComponentsNameToClassKey]?: Partial< - StyleRules + [Name in keyof CatalogReactComponentsNameToClassKey]?: Partial< + StyleRules >; };