docs(search): update api reports
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import { default as React_2 } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { ResultHighlight } from '@backstage/plugin-search-common';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { SearchResultListItemExtensionComponent } from '@backstage/plugin-search-react';
|
||||
import { StarredEntitiesApi } from '@backstage/plugin-catalog-react';
|
||||
import { StorageApi } from '@backstage/core-plugin-api';
|
||||
import { StyleRules } from '@material-ui/core/styles/withStyles';
|
||||
@@ -107,9 +108,7 @@ export const catalogPlugin: BackstagePlugin<
|
||||
>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function CatalogSearchResultListItem(
|
||||
props: CatalogSearchResultListItemProps,
|
||||
): JSX.Element;
|
||||
export const CatalogSearchResultListItem: SearchResultListItemExtensionComponent<CatalogSearchResultListItemProps>;
|
||||
|
||||
// @public
|
||||
export interface CatalogSearchResultListItemProps {
|
||||
@@ -120,7 +119,7 @@ export interface CatalogSearchResultListItemProps {
|
||||
// (undocumented)
|
||||
rank?: number;
|
||||
// (undocumented)
|
||||
result: IndexableDocument;
|
||||
result?: IndexableDocument;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -19,6 +19,7 @@ import { IndexableDocument } from '@backstage/plugin-search-common';
|
||||
import { ReactNode } from 'react';
|
||||
import { ResultHighlight } from '@backstage/plugin-search-common';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { SearchResultListItemExtensionComponent } from '@backstage/plugin-search-react';
|
||||
import { TabProps } from '@material-ui/core';
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
@@ -125,9 +126,7 @@ export const ToolExplorerContent: (props: {
|
||||
}) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export function ToolSearchResultListItem(
|
||||
props: ToolSearchResultListItemProps,
|
||||
): JSX.Element;
|
||||
export const ToolSearchResultListItem: SearchResultListItemExtensionComponent<ToolSearchResultListItemProps>;
|
||||
|
||||
// @public
|
||||
export interface ToolSearchResultListItemProps {
|
||||
@@ -138,6 +137,6 @@ export interface ToolSearchResultListItemProps {
|
||||
// (undocumented)
|
||||
rank?: number;
|
||||
// (undocumented)
|
||||
result: IndexableDocument;
|
||||
result?: IndexableDocument;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
import { ApiRef } from '@backstage/core-plugin-api';
|
||||
import { AsyncState } from 'react-use/lib/useAsync';
|
||||
import { AutocompleteProps } from '@material-ui/lab';
|
||||
import { Extension } from '@backstage/core-plugin-api';
|
||||
import { ForwardRefExoticComponent } from 'react';
|
||||
import { InputBaseProps } from '@material-ui/core';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
@@ -34,6 +35,13 @@ export const AutocompleteFilter: (
|
||||
// @public (undocumented)
|
||||
export const CheckboxFilter: (props: SearchFilterComponentProps) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export const createSearchResultListItemExtension: <
|
||||
Props extends SearchResultListItemExtensionProps,
|
||||
>(
|
||||
options: SearchResultListItemExtensionOptions<Props>,
|
||||
) => Extension<SearchResultListItemExtensionComponent<Props>>;
|
||||
|
||||
// @public (undocumented)
|
||||
export const DefaultResultListItem: (
|
||||
props: DefaultResultListItemProps,
|
||||
@@ -43,7 +51,7 @@ export const DefaultResultListItem: (
|
||||
export type DefaultResultListItemProps = {
|
||||
icon?: ReactNode;
|
||||
secondaryAction?: ReactNode;
|
||||
result: SearchDocument;
|
||||
result?: SearchDocument;
|
||||
highlight?: ResultHighlight;
|
||||
rank?: number;
|
||||
lineClamp?: number;
|
||||
@@ -280,7 +288,10 @@ export const SearchResultContext: (
|
||||
|
||||
// @public
|
||||
export type SearchResultContextProps = {
|
||||
children: (state: AsyncState<SearchResultSet>) => JSX.Element | null;
|
||||
children: (
|
||||
state: AsyncState<SearchResultSet>,
|
||||
query: Partial<SearchQuery>,
|
||||
) => JSX.Element | null;
|
||||
};
|
||||
|
||||
// @public
|
||||
@@ -313,6 +324,8 @@ export function SearchResultGroupLayout<FilterOption>(
|
||||
|
||||
// @public
|
||||
export type SearchResultGroupLayoutProps<FilterOption> = ListProps & {
|
||||
error?: Error;
|
||||
loading?: boolean;
|
||||
icon: JSX.Element;
|
||||
title: ReactNode;
|
||||
titleProps?: Partial<TypographyProps>;
|
||||
@@ -332,19 +345,19 @@ export type SearchResultGroupLayoutProps<FilterOption> = ListProps & {
|
||||
index: number,
|
||||
array: SearchResult_2[],
|
||||
) => JSX.Element | null;
|
||||
error?: Error;
|
||||
loading?: boolean;
|
||||
noResultsComponent?: ReactNode;
|
||||
disableRenderingWithNoResults?: boolean;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type SearchResultGroupProps<FilterOption> = Omit<
|
||||
SearchResultGroupLayoutProps<FilterOption>,
|
||||
'loading' | 'error' | 'resultItems' | 'filterFields'
|
||||
> & {
|
||||
query: Partial<SearchQuery>;
|
||||
disableRenderingWithNoResults?: boolean;
|
||||
};
|
||||
export type SearchResultGroupProps<FilterOption> = Pick<
|
||||
SearchResultStateProps,
|
||||
'query'
|
||||
> &
|
||||
Omit<
|
||||
SearchResultGroupLayoutProps<FilterOption>,
|
||||
'loading' | 'error' | 'resultItems' | 'filterFields'
|
||||
>;
|
||||
|
||||
// @public
|
||||
export const SearchResultGroupSelectFilterField: (
|
||||
@@ -369,6 +382,30 @@ export type SearchResultGroupTextFilterFieldProps =
|
||||
// @public
|
||||
export const SearchResultList: (props: SearchResultListProps) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export type SearchResultListItemExtensionComponent<
|
||||
Props extends SearchResultListItemExtensionProps,
|
||||
> = (props: Props) => JSX.Element | null;
|
||||
|
||||
// @public
|
||||
export type SearchResultListItemExtensionOptions<
|
||||
Props extends SearchResultListItemExtensionProps = SearchResultListItemExtensionProps,
|
||||
> = {
|
||||
name: string;
|
||||
component: (props: Props) => JSX.Element | null;
|
||||
predicate?: (result: SearchResult_2) => boolean;
|
||||
};
|
||||
|
||||
// @public
|
||||
export const SearchResultListItemExtensions: (
|
||||
props: SearchResultListItemExtensionsProps,
|
||||
) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export type SearchResultListItemExtensionsProps = Omit<ListProps, 'results'> & {
|
||||
results: SearchResult_2[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export const SearchResultListLayout: (
|
||||
props: SearchResultListLayoutProps,
|
||||
@@ -376,34 +413,31 @@ export const SearchResultListLayout: (
|
||||
|
||||
// @public
|
||||
export type SearchResultListLayoutProps = ListProps & {
|
||||
error?: Error;
|
||||
loading?: boolean;
|
||||
resultItems?: SearchResult_2[];
|
||||
renderResultItem?: (
|
||||
value: SearchResult_2,
|
||||
index: number,
|
||||
array: SearchResult_2[],
|
||||
) => JSX.Element | null;
|
||||
error?: Error;
|
||||
loading?: boolean;
|
||||
noResultsComponent?: ReactNode;
|
||||
disableRenderingWithNoResults?: boolean;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type SearchResultListProps = Omit<
|
||||
SearchResultListLayoutProps,
|
||||
'loading' | 'error' | 'resultItems'
|
||||
> & {
|
||||
query: Partial<SearchQuery>;
|
||||
disableRenderingWithNoResults?: boolean;
|
||||
};
|
||||
export type SearchResultListProps = Pick<SearchResultStateProps, 'query'> &
|
||||
Omit<SearchResultListLayoutProps, 'loading' | 'error' | 'resultItems'>;
|
||||
|
||||
// @public (undocumented)
|
||||
export const SearchResultPager: () => JSX.Element;
|
||||
|
||||
// @public
|
||||
export type SearchResultProps = Pick<SearchResultStateProps, 'query'> & {
|
||||
children: (resultSet: SearchResultSet) => JSX.Element;
|
||||
noResultsComponent?: JSX.Element;
|
||||
};
|
||||
export type SearchResultProps = Pick<SearchResultStateProps, 'query'> &
|
||||
Omit<SearchResultListItemExtensionsProps, 'results' | 'children'> & {
|
||||
children?: ReactNode | ((resultSet: SearchResultSet) => JSX.Element);
|
||||
noResultsComponent?: JSX.Element;
|
||||
};
|
||||
|
||||
// @public
|
||||
export const SearchResultState: (props: SearchResultStateProps) => JSX.Element;
|
||||
@@ -420,4 +454,9 @@ export const useSearch: () => SearchContextValue;
|
||||
|
||||
// @public
|
||||
export const useSearchContextCheck: () => boolean;
|
||||
|
||||
// @public
|
||||
export const useSearchResultListItemExtensions: (
|
||||
children: ReactNode,
|
||||
) => (result: SearchResult_2, key?: number) => JSX.Element;
|
||||
```
|
||||
|
||||
@@ -6,10 +6,15 @@
|
||||
/// <reference types="react" />
|
||||
|
||||
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { DefaultResultListItemProps } from '@backstage/plugin-search-react';
|
||||
import { IconComponent } from '@backstage/core-plugin-api';
|
||||
import { ReactNode } from 'react';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { SearchBarBaseProps } from '@backstage/plugin-search-react';
|
||||
import { SearchResultListItemExtensionComponent } from '@backstage/plugin-search-react';
|
||||
|
||||
// @public (undocumented)
|
||||
export const DefaultSearchResultListItem: SearchResultListItemExtensionComponent<DefaultResultListItemProps>;
|
||||
|
||||
// @public (undocumented)
|
||||
export const HomePageSearchBar: ({
|
||||
|
||||
@@ -19,6 +19,7 @@ import { default as React_2 } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { ResultHighlight } from '@backstage/plugin-search-common';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { SearchResultListItemExtensionComponent } from '@backstage/plugin-search-react';
|
||||
import { TableColumn } from '@backstage/core-components';
|
||||
import { TableProps } from '@backstage/core-components';
|
||||
import { TechDocsEntityMetadata as TechDocsEntityMetadata_2 } from '@backstage/plugin-techdocs-react';
|
||||
@@ -396,14 +397,12 @@ export type TechDocsSearchProps = {
|
||||
};
|
||||
|
||||
// @public
|
||||
export const TechDocsSearchResultListItem: (
|
||||
props: TechDocsSearchResultListItemProps,
|
||||
) => JSX.Element;
|
||||
export const TechDocsSearchResultListItem: SearchResultListItemExtensionComponent<TechDocsSearchResultListItemProps>;
|
||||
|
||||
// @public
|
||||
export type TechDocsSearchResultListItemProps = {
|
||||
icon?: ReactNode;
|
||||
result: any;
|
||||
result?: any;
|
||||
highlight?: ResultHighlight;
|
||||
rank?: number;
|
||||
lineClamp?: number;
|
||||
|
||||
Reference in New Issue
Block a user