@backstage/plugin-search-react
Advanced tools
Comparing version 0.1.0 to 0.1.1-next.0
# @backstage/plugin-search-react | ||
## 0.1.1-next.0 | ||
### Patch Changes | ||
- 11a46863de: Export `useSearchContextCheck` hook to check if the search context is available | ||
- a307a14be0: Removed dependency on `@backstage/core-app-api`. | ||
## 0.1.0 | ||
@@ -4,0 +11,0 @@ |
@@ -48,2 +48,8 @@ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api'; | ||
/** | ||
* @public | ||
* | ||
* React hook which checks for an existing search context | ||
*/ | ||
declare const useSearchContextCheck: () => boolean; | ||
/** | ||
* Props for {@link SearchContextProvider} | ||
@@ -93,2 +99,2 @@ * | ||
export { SearchApi, SearchApiProviderForStorybook, SearchApiProviderForStorybookProps, SearchContextProvider, SearchContextProviderForStorybook, SearchContextProviderForStorybookProps, SearchContextProviderProps, SearchContextState, SearchContextValue, searchApiRef, useSearch }; | ||
export { SearchApi, SearchApiProviderForStorybook, SearchApiProviderForStorybookProps, SearchContextProvider, SearchContextProviderForStorybook, SearchContextProviderForStorybookProps, SearchContextProviderProps, SearchContextState, SearchContextValue, searchApiRef, useSearch, useSearchContextCheck }; |
@@ -25,2 +25,6 @@ import { createApiRef, useApi, AnalyticsContext } from '@backstage/core-plugin-api'; | ||
}; | ||
const useSearchContextCheck = () => { | ||
const context = useContext(SearchContext); | ||
return context !== void 0; | ||
}; | ||
const searchInitialState = { | ||
@@ -101,3 +105,3 @@ term: "", | ||
export { SearchApiProviderForStorybook, SearchContextProvider, SearchContextProviderForStorybook, searchApiRef, useSearch }; | ||
export { SearchApiProviderForStorybook, SearchContextProvider, SearchContextProviderForStorybook, searchApiRef, useSearch, useSearchContextCheck }; | ||
//# sourceMappingURL=index.esm.js.map |
{ | ||
"name": "@backstage/plugin-search-react", | ||
"version": "0.1.0", | ||
"version": "0.1.1-next.0", | ||
"main": "dist/index.esm.js", | ||
@@ -34,3 +34,2 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@backstage/core-app-api": "^1.0.1", | ||
"@backstage/core-plugin-api": "^1.0.1", | ||
@@ -47,3 +46,4 @@ "@backstage/plugin-search-common": "^0.3.3", | ||
"devDependencies": { | ||
"@backstage/test-utils": "^1.0.1", | ||
"@backstage/core-app-api": "^1.0.1", | ||
"@backstage/test-utils": "^1.0.2-next.0", | ||
"@testing-library/jest-dom": "^5.10.1", | ||
@@ -56,3 +56,3 @@ "@testing-library/react": "^12.1.3", | ||
], | ||
"gitHead": "e0e44c433319711c2fb8b175db411a621f7aaec2" | ||
"gitHead": "88ee375f5ee44b7a7917297785ddf88691fe3381" | ||
} |
Sorry, the diff of this file is not supported yet
33362
7
196
5
- Removed@backstage/core-app-api@^1.0.1
- Removed@backstage/core-app-api@1.15.4(transitive)
- Removedi18next@22.5.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact-is@16.13.1(transitive)
- Removedzen-observable@0.10.0(transitive)