@@ -1 +1,3 @@
|
||||
# search react
|
||||
# Backstage Search
|
||||
|
||||
A search plugin library which holds functionality the [search plugin](/plugins/search/README.md) itself and other frontend plugins (e.g. [techdocs](/plugins/techdocs/README.md), [home](/plugins/home/README.md)) depend on.
|
||||
|
||||
@@ -29,11 +29,6 @@ export function SearchApiProviderForStorybook(
|
||||
// @public (undocumented)
|
||||
export const searchApiRef: ApiRef<SearchApi>;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "SearchContextValue" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const SearchContext: React_2.Context<SearchContextValue | undefined>;
|
||||
|
||||
// @public (undocumented)
|
||||
export const SearchContextProvider: ({
|
||||
initialState,
|
||||
@@ -49,7 +44,7 @@ export const SearchContextProviderForStorybook: (
|
||||
props: ComponentProps<typeof SearchContextProvider> & QueryResultProps,
|
||||
) => JSX.Element;
|
||||
|
||||
// @public
|
||||
// @public (undocumented)
|
||||
export type SearchContextState = {
|
||||
term: string;
|
||||
types: string[];
|
||||
@@ -57,6 +52,8 @@ export type SearchContextState = {
|
||||
pageCursor?: string;
|
||||
};
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "SearchContextValue" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const useSearch: () => SearchContextValue;
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.0.1-next.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/react-hooks": "^8.0.0",
|
||||
"@testing-library/jest-dom": "^5.16.4"
|
||||
"@testing-library/react-hooks": "^7.0.2",
|
||||
"@testing-library/jest-dom": "^5.10.1"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
||||
@@ -40,7 +40,6 @@ type SearchContextValue = {
|
||||
} & SearchContextState;
|
||||
|
||||
/**
|
||||
* The initial state of `SearchContextProvider`.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
@@ -58,6 +57,10 @@ export const SearchContext = createContext<SearchContextValue | undefined>(
|
||||
undefined,
|
||||
);
|
||||
|
||||
/**
|
||||
* The initial state of `SearchContextProvider`.
|
||||
*
|
||||
*/
|
||||
const searchInitialState: SearchContextState = {
|
||||
term: '',
|
||||
pageCursor: undefined,
|
||||
|
||||
@@ -14,5 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './api';
|
||||
export * from './context';
|
||||
export { searchApiRef } from './api';
|
||||
export type { SearchApi } from './api';
|
||||
export {
|
||||
SearchContextProvider,
|
||||
useSearch,
|
||||
SearchContextProviderForStorybook,
|
||||
SearchApiProviderForStorybook,
|
||||
} from './context';
|
||||
export type { SearchContextState } from './context';
|
||||
|
||||
Reference in New Issue
Block a user