docs(search): update api reports
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
@@ -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;
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user