@backstage/plugin-search 0.5.0 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/dist/esm/{index-1f69649c.esm.js → index-05b04684.esm.js} +10 -5
- package/dist/esm/index-05b04684.esm.js.map +1 -0
- package/dist/esm/{index-49a2f5d1.esm.js → index-53fbff6a.esm.js} +10 -5
- package/dist/esm/index-53fbff6a.esm.js.map +1 -0
- package/dist/esm/{index-09bfa46d.esm.js → index-5842ad6f.esm.js} +10 -5
- package/dist/esm/index-5842ad6f.esm.js.map +1 -0
- package/dist/esm/{index-859ff534.esm.js → index-82c9eaed.esm.js} +13 -7
- package/dist/esm/index-82c9eaed.esm.js.map +1 -0
- package/dist/esm/{index-8e7d7ce9.esm.js → index-9ed6d72a.esm.js} +333 -164
- package/dist/esm/index-9ed6d72a.esm.js.map +1 -0
- package/dist/esm/{index-58cc0fcf.esm.js → index-b090f4cf.esm.js} +25 -16
- package/dist/esm/index-b090f4cf.esm.js.map +1 -0
- package/dist/esm/{index-b647c19e.esm.js → index-da49c2d7.esm.js} +10 -5
- package/dist/esm/index-da49c2d7.esm.js.map +1 -0
- package/dist/index.d.ts +92 -19
- package/dist/index.esm.js +11 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -12
- package/dist/esm/index-09bfa46d.esm.js.map +0 -1
- package/dist/esm/index-1f69649c.esm.js.map +0 -1
- package/dist/esm/index-49a2f5d1.esm.js.map +0 -1
- package/dist/esm/index-58cc0fcf.esm.js.map +0 -1
- package/dist/esm/index-859ff534.esm.js.map +0 -1
- package/dist/esm/index-8e7d7ce9.esm.js.map +0 -1
- package/dist/esm/index-b647c19e.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# @backstage/plugin-search
|
|
2
2
|
|
|
3
|
+
## 0.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e05b9115aa: Fix missing search context issue with `HomePageSearchBar`
|
|
8
|
+
- 4ce51ab0f1: Internal refactor of the `react-use` imports to use `react-use/lib/*` instead.
|
|
9
|
+
- 54ef743aa4: Introduce a `<SearchType.Tabs />` variant to display tabs for selecting search result types.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- @backstage/core-plugin-api@0.4.1
|
|
12
|
+
- @backstage/plugin-catalog-react@0.6.10
|
|
13
|
+
- @backstage/core-components@0.8.3
|
|
14
|
+
|
|
15
|
+
## 0.5.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 6d8e3a9651: Internal cleanup of the exports structure
|
|
20
|
+
- 8b532a6c02: Introduces a `<SearchType.Accordion />` variant, which operates on the same part of a search query as the existing `<SearchType />`, but in a more opinionated way (as a single-select control surface suitable for faceted search UIs).
|
|
21
|
+
|
|
22
|
+
Check the [search plugin storybook](https://backstage.io/storybook/?path=/story/plugins-search-searchtype--accordion) to see how it can be used.
|
|
23
|
+
|
|
24
|
+
- af4980fb5d: Captures the search term entered in the SearchBarBase as a `search` event.
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
- @backstage/plugin-catalog-react@0.6.9
|
|
27
|
+
|
|
28
|
+
## 0.5.2
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 3d98955c8a: Add Optional Props to Override Icon for SidebarSearch and SidebarSearchModal Component
|
|
33
|
+
- 49a696d720: Standardizes the component used as a search box in the search modal and in the composable home page.
|
|
34
|
+
|
|
35
|
+
After these changes, all search boxes exported by the search plugin are based on the `<SearchBarBase />` component, and this one is based on the `<InputBase />` component of the Material UI. This means that when you use SearchBarBase or one of its derived components (like `SearchBar` and `HomePageSearchBar`) you can pass all properties accepted by InputBase that have not been replaced by the props type of those components.
|
|
36
|
+
|
|
37
|
+
For example:
|
|
38
|
+
|
|
39
|
+
```jsx
|
|
40
|
+
<SearchInputBase color="secondary" debouceTime={500} />
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The `color` property is inherited from `InputBaseProps` type and `debouceTime` defined by `SearchBarBaseProps`.
|
|
44
|
+
|
|
45
|
+
- 7a4bd2ceac: Prefer using `Link` from `@backstage/core-components` rather than material-UI.
|
|
46
|
+
- Updated dependencies
|
|
47
|
+
- @backstage/core-plugin-api@0.4.0
|
|
48
|
+
- @backstage/plugin-catalog-react@0.6.8
|
|
49
|
+
- @backstage/core-components@0.8.2
|
|
50
|
+
|
|
51
|
+
## 0.5.1
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- cd450844f6: Moved React dependencies to `peerDependencies` and allow both React v16 and v17 to be used.
|
|
56
|
+
- 382e3a94b3: Export SearchApi interface from plugin
|
|
57
|
+
- Updated dependencies
|
|
58
|
+
- @backstage/core-components@0.8.0
|
|
59
|
+
- @backstage/core-plugin-api@0.3.0
|
|
60
|
+
- @backstage/plugin-catalog-react@0.6.5
|
|
61
|
+
|
|
3
62
|
## 0.5.0
|
|
4
63
|
|
|
5
64
|
### Minor Changes
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export { a as SearchBar, b as SearchBarBase } from './index-
|
|
1
|
+
export { a as SearchBar, b as SearchBarBase } from './index-9ed6d72a.esm.js';
|
|
2
2
|
import '@backstage/core-plugin-api';
|
|
3
3
|
import '@backstage/errors';
|
|
4
4
|
import 'qs';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '@material-ui/core';
|
|
7
|
-
import '@backstage/core-components';
|
|
8
6
|
import '@material-ui/icons/FilterList';
|
|
9
|
-
import '
|
|
7
|
+
import '@material-ui/core';
|
|
8
|
+
import 'react-use/lib/useDebounce';
|
|
10
9
|
import '@material-ui/icons/Search';
|
|
11
10
|
import '@material-ui/icons/Clear';
|
|
11
|
+
import 'react-use/lib/useAsync';
|
|
12
|
+
import 'react-use/lib/usePrevious';
|
|
12
13
|
import '@material-ui/core/styles';
|
|
14
|
+
import '@backstage/core-components';
|
|
13
15
|
import '@material-ui/icons/ArrowBackIos';
|
|
14
16
|
import '@material-ui/icons/ArrowForwardIos';
|
|
15
17
|
import '@material-ui/core/utils';
|
|
@@ -19,5 +21,8 @@ import '@material-ui/core/IconButton';
|
|
|
19
21
|
import '@material-ui/lab';
|
|
20
22
|
import '@backstage/plugin-catalog-react';
|
|
21
23
|
import '@backstage/catalog-model';
|
|
24
|
+
import 'react-use/lib/useEffectOnce';
|
|
25
|
+
import '@material-ui/icons/ExpandMore';
|
|
26
|
+
import '@material-ui/icons/FontDownload';
|
|
22
27
|
import 'react-router-dom';
|
|
23
|
-
//# sourceMappingURL=index-
|
|
28
|
+
//# sourceMappingURL=index-05b04684.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-05b04684.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export { c as SearchResult } from './index-
|
|
1
|
+
export { c as SearchResult } from './index-9ed6d72a.esm.js';
|
|
2
2
|
import '@backstage/core-plugin-api';
|
|
3
3
|
import '@backstage/errors';
|
|
4
4
|
import 'qs';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '@material-ui/core';
|
|
7
|
-
import '@backstage/core-components';
|
|
8
6
|
import '@material-ui/icons/FilterList';
|
|
9
|
-
import '
|
|
7
|
+
import '@material-ui/core';
|
|
8
|
+
import 'react-use/lib/useDebounce';
|
|
10
9
|
import '@material-ui/icons/Search';
|
|
11
10
|
import '@material-ui/icons/Clear';
|
|
11
|
+
import 'react-use/lib/useAsync';
|
|
12
|
+
import 'react-use/lib/usePrevious';
|
|
12
13
|
import '@material-ui/core/styles';
|
|
14
|
+
import '@backstage/core-components';
|
|
13
15
|
import '@material-ui/icons/ArrowBackIos';
|
|
14
16
|
import '@material-ui/icons/ArrowForwardIos';
|
|
15
17
|
import '@material-ui/core/utils';
|
|
@@ -19,5 +21,8 @@ import '@material-ui/core/IconButton';
|
|
|
19
21
|
import '@material-ui/lab';
|
|
20
22
|
import '@backstage/plugin-catalog-react';
|
|
21
23
|
import '@backstage/catalog-model';
|
|
24
|
+
import 'react-use/lib/useEffectOnce';
|
|
25
|
+
import '@material-ui/icons/ExpandMore';
|
|
26
|
+
import '@material-ui/icons/FontDownload';
|
|
22
27
|
import 'react-router-dom';
|
|
23
|
-
//# sourceMappingURL=index-
|
|
28
|
+
//# sourceMappingURL=index-53fbff6a.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-53fbff6a.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export { S as SearchPage } from './index-
|
|
1
|
+
export { S as SearchPage } from './index-9ed6d72a.esm.js';
|
|
2
2
|
import '@backstage/core-plugin-api';
|
|
3
3
|
import '@backstage/errors';
|
|
4
4
|
import 'qs';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '@material-ui/core';
|
|
7
|
-
import '@backstage/core-components';
|
|
8
6
|
import '@material-ui/icons/FilterList';
|
|
9
|
-
import '
|
|
7
|
+
import '@material-ui/core';
|
|
8
|
+
import 'react-use/lib/useDebounce';
|
|
10
9
|
import '@material-ui/icons/Search';
|
|
11
10
|
import '@material-ui/icons/Clear';
|
|
11
|
+
import 'react-use/lib/useAsync';
|
|
12
|
+
import 'react-use/lib/usePrevious';
|
|
12
13
|
import '@material-ui/core/styles';
|
|
14
|
+
import '@backstage/core-components';
|
|
13
15
|
import '@material-ui/icons/ArrowBackIos';
|
|
14
16
|
import '@material-ui/icons/ArrowForwardIos';
|
|
15
17
|
import '@material-ui/core/utils';
|
|
@@ -19,5 +21,8 @@ import '@material-ui/core/IconButton';
|
|
|
19
21
|
import '@material-ui/lab';
|
|
20
22
|
import '@backstage/plugin-catalog-react';
|
|
21
23
|
import '@backstage/catalog-model';
|
|
24
|
+
import 'react-use/lib/useEffectOnce';
|
|
25
|
+
import '@material-ui/icons/ExpandMore';
|
|
26
|
+
import '@material-ui/icons/FontDownload';
|
|
22
27
|
import 'react-router-dom';
|
|
23
|
-
//# sourceMappingURL=index-
|
|
28
|
+
//# sourceMappingURL=index-5842ad6f.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-5842ad6f.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import SearchIcon from '@material-ui/icons/Search';
|
|
3
3
|
import { SidebarItem } from '@backstage/core-components';
|
|
4
|
-
import { u as useSearch, d as SearchModal } from './index-
|
|
4
|
+
import { u as useSearch, d as SearchModal } from './index-9ed6d72a.esm.js';
|
|
5
5
|
import '@backstage/core-plugin-api';
|
|
6
6
|
import '@backstage/errors';
|
|
7
7
|
import 'qs';
|
|
8
|
-
import '@material-ui/core';
|
|
9
8
|
import '@material-ui/icons/FilterList';
|
|
10
|
-
import '
|
|
9
|
+
import '@material-ui/core';
|
|
10
|
+
import 'react-use/lib/useDebounce';
|
|
11
11
|
import '@material-ui/icons/Clear';
|
|
12
|
+
import 'react-use/lib/useAsync';
|
|
13
|
+
import 'react-use/lib/usePrevious';
|
|
12
14
|
import '@material-ui/core/styles';
|
|
13
15
|
import '@material-ui/icons/ArrowBackIos';
|
|
14
16
|
import '@material-ui/icons/ArrowForwardIos';
|
|
@@ -19,13 +21,17 @@ import '@material-ui/core/IconButton';
|
|
|
19
21
|
import '@material-ui/lab';
|
|
20
22
|
import '@backstage/plugin-catalog-react';
|
|
21
23
|
import '@backstage/catalog-model';
|
|
24
|
+
import 'react-use/lib/useEffectOnce';
|
|
25
|
+
import '@material-ui/icons/ExpandMore';
|
|
26
|
+
import '@material-ui/icons/FontDownload';
|
|
22
27
|
import 'react-router-dom';
|
|
23
28
|
|
|
24
|
-
const SidebarSearchModal = () => {
|
|
25
|
-
const {open, toggleModal} = useSearch();
|
|
29
|
+
const SidebarSearchModal = (props) => {
|
|
30
|
+
const { open, toggleModal } = useSearch();
|
|
31
|
+
const Icon = props.icon ? props.icon : SearchIcon;
|
|
26
32
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(SidebarItem, {
|
|
27
33
|
className: "search-icon",
|
|
28
|
-
icon:
|
|
34
|
+
icon: Icon,
|
|
29
35
|
text: "Search",
|
|
30
36
|
onClick: toggleModal
|
|
31
37
|
}), /* @__PURE__ */ React__default.createElement(SearchModal, {
|
|
@@ -35,4 +41,4 @@ const SidebarSearchModal = () => {
|
|
|
35
41
|
};
|
|
36
42
|
|
|
37
43
|
export { SidebarSearchModal };
|
|
38
|
-
//# sourceMappingURL=index-
|
|
44
|
+
//# sourceMappingURL=index-82c9eaed.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-82c9eaed.esm.js","sources":["../../src/components/SidebarSearchModal/SidebarSearchModal.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport SearchIcon from '@material-ui/icons/Search';\nimport { SidebarItem } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\nimport { SearchModal } from '../SearchModal';\nimport { useSearch } from '../SearchContext';\n\nexport type SidebarSearchModalProps = {\n icon?: IconComponent;\n};\n\nexport const SidebarSearchModal = (props: SidebarSearchModalProps) => {\n const { open, toggleModal } = useSearch();\n const Icon = props.icon ? props.icon : SearchIcon;\n\n return (\n <>\n <SidebarItem\n className=\"search-icon\"\n icon={Icon}\n text=\"Search\"\n onClick={toggleModal}\n />\n <SearchModal open={open} toggleModal={toggleModal} />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0Ba,qBAAqB,CAAC,UAAmC;AACpE,QAAM,EAAE,MAAM,gBAAgB;AAC9B,QAAM,OAAO,MAAM,OAAO,MAAM,OAAO;AAEvC,kIAEK,aAAD;AAAA,IACE,WAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAS;AAAA,mDAEV,aAAD;AAAA,IAAa;AAAA,IAAY;AAAA;AAAA;;;;"}
|