@backstage/plugin-search 0.8.2-next.1 → 0.9.1-next.0
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 +39 -0
- package/README.md +8 -5
- package/dist/esm/{index-fdbbcb7c.esm.js → index-2180028e.esm.js} +9 -10
- package/dist/esm/index-2180028e.esm.js.map +1 -0
- package/dist/esm/{index-67b1c480.esm.js → index-5aaf3de8.esm.js} +9 -10
- package/dist/esm/index-5aaf3de8.esm.js.map +1 -0
- package/dist/esm/{index-489028c1.esm.js → index-8388a95e.esm.js} +71 -432
- package/dist/esm/index-8388a95e.esm.js.map +1 -0
- package/dist/esm/{index-5896ef53.esm.js → index-8a1f0d37.esm.js} +8 -9
- package/dist/esm/index-8a1f0d37.esm.js.map +1 -0
- package/dist/index.d.ts +120 -60
- package/dist/index.esm.js +8 -9
- package/dist/index.esm.js.map +1 -1
- package/package.json +12 -12
- package/dist/esm/index-39af2793.esm.js +0 -31
- package/dist/esm/index-39af2793.esm.js.map +0 -1
- package/dist/esm/index-489028c1.esm.js.map +0 -1
- package/dist/esm/index-5896ef53.esm.js.map +0 -1
- package/dist/esm/index-67b1c480.esm.js.map +0 -1
- package/dist/esm/index-8376e63d.esm.js +0 -31
- package/dist/esm/index-8376e63d.esm.js.map +0 -1
- package/dist/esm/index-f5d48e31.esm.js +0 -31
- package/dist/esm/index-f5d48e31.esm.js.map +0 -1
- package/dist/esm/index-fdbbcb7c.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @backstage/plugin-search
|
|
2
2
|
|
|
3
|
+
## 0.9.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/catalog-model@1.1.0-next.0
|
|
9
|
+
- @backstage/core-components@0.9.6-next.0
|
|
10
|
+
- @backstage/plugin-catalog-react@1.1.2-next.0
|
|
11
|
+
- @backstage/plugin-search-react@0.2.2-next.0
|
|
12
|
+
|
|
13
|
+
## 0.9.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 2dc4818541: The pre-alpha `<SearchPageNext>`, `<SearchBarNext>`, `etc...` components have been removed. In the unlikely event you were still using/referencing them, please update to using their non-`*Next` equivalents from either `@backstage/plugin-search-react` or `@backstage/plugin-search`.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 8809159148: Components `<DefaultResultListItem>`, `<SearchBar>` (including `<SearchBarBase>`), `<SearchFilter>` (including `.Checkbox`, `.Select`, and `.Autocomplete` static prop components), `<SearchResult>`, and `<SearchResultPager>` are now exported from `@backstage/plugin-search-react`. They are now deprecated in `@backstage/plugin-search` and will be removed in a future release.
|
|
22
|
+
- 8f7b1835df: Updated dependency `msw` to `^0.41.0`.
|
|
23
|
+
- 5388e6bdc5: Fixed a bug that could cause analytics events in other parts of Backstage to capture nonsensical values resembling search modal state under some circumstances.
|
|
24
|
+
- 915700f64f: In order to simplify analytics on top of the search experience in Backstage, the provided `<*ResultListItem />` component now captures a `discover` analytics event instead of a `click` event. This event includes the result rank as its `value` and, like a click, the URL/path clicked to as its `to` attribute.
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
- @backstage/plugin-catalog-react@1.1.1
|
|
27
|
+
- @backstage/plugin-search-common@0.3.5
|
|
28
|
+
- @backstage/plugin-search-react@0.2.1
|
|
29
|
+
- @backstage/core-components@0.9.5
|
|
30
|
+
- @backstage/core-plugin-api@1.0.3
|
|
31
|
+
- @backstage/catalog-model@1.0.3
|
|
32
|
+
|
|
33
|
+
## 0.8.2-next.2
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- 5388e6bdc5: Fixed a bug that could cause analytics events in other parts of Backstage to capture nonsensical values resembling search modal state under some circumstances.
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
- @backstage/plugin-search-common@0.3.5-next.1
|
|
40
|
+
- @backstage/core-components@0.9.5-next.2
|
|
41
|
+
|
|
3
42
|
## 0.8.2-next.1
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -13,14 +13,17 @@ Run `yarn dev` in the root directory, and then navigate to [/search](http://loca
|
|
|
13
13
|
This search plugin is primarily responsible for the following:
|
|
14
14
|
|
|
15
15
|
- Providing a `<SearchPage />` routable extension.
|
|
16
|
-
- Exposing various search-related components (like `<
|
|
17
|
-
`<
|
|
16
|
+
- Exposing various search-related components (like `<SearchModal />`,
|
|
17
|
+
`<SidebarSearch />`, etc), which can be composed by a Backstage App or by
|
|
18
18
|
other Backstage Plugins to power search experiences of all kinds.
|
|
19
|
-
- Exposing a `<SearchContextProvider />`, which manages search state and API
|
|
20
|
-
communication with the Backstage backend.
|
|
21
19
|
|
|
22
|
-
Don't forget, a lot of functionality is available in backend plugins:
|
|
20
|
+
Don't forget, a lot of functionality is available in web libraries and backend plugins:
|
|
23
21
|
|
|
22
|
+
- `@backstage/plugin-search-react`, which is responsible for:
|
|
23
|
+
- Exposing a `<SearchContextProvider />`, which manages search state and API
|
|
24
|
+
communication with the Backstage backend.
|
|
25
|
+
- Exposing the `SearchApi` and its corresponding ref.
|
|
26
|
+
- Exposing reusable components, such as `<SearchBar>` and `<SearchFilter>`, etc.
|
|
24
27
|
- `@backstage/plugin-search-backend-node`, which is responsible for the search
|
|
25
28
|
index management
|
|
26
29
|
- `@backstage/plugin-search-backend`, which is responsible for query processing
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import { makeStyles } from '@material-ui/core/styles';
|
|
3
|
-
import {
|
|
3
|
+
import { SearchBarBase } from '@backstage/plugin-search-react';
|
|
4
4
|
import qs from 'qs';
|
|
5
5
|
import { useNavigate } from 'react-router-dom';
|
|
6
|
+
import { r as rootRouteRef } from './index-8388a95e.esm.js';
|
|
6
7
|
import { useRouteRef } from '@backstage/core-plugin-api';
|
|
7
8
|
import '@material-ui/icons/FilterList';
|
|
8
9
|
import '@material-ui/core';
|
|
9
|
-
import 'react-use/lib/useDebounce';
|
|
10
|
-
import '@material-ui/icons/Search';
|
|
11
|
-
import '@material-ui/icons/Clear';
|
|
12
|
-
import '@backstage/plugin-search-react';
|
|
13
|
-
import '@material-ui/lab';
|
|
14
|
-
import 'react-use/lib/useAsyncFn';
|
|
15
10
|
import '@material-ui/icons/Launch';
|
|
16
11
|
import '@backstage/core-components';
|
|
17
|
-
import '@material-ui/icons/ArrowBackIos';
|
|
18
|
-
import '@material-ui/icons/ArrowForwardIos';
|
|
19
12
|
import '@backstage/errors';
|
|
20
13
|
import '@backstage/version-bridge';
|
|
21
14
|
import 'react-use/lib/usePrevious';
|
|
22
15
|
import 'react-router';
|
|
16
|
+
import 'react-use/lib/useDebounce';
|
|
23
17
|
import '@material-ui/core/InputBase';
|
|
24
18
|
import '@material-ui/core/IconButton';
|
|
19
|
+
import '@material-ui/icons/Search';
|
|
20
|
+
import '@material-ui/icons/Clear';
|
|
21
|
+
import '@material-ui/lab';
|
|
25
22
|
import 'react-use/lib/useAsync';
|
|
26
23
|
import '@backstage/plugin-catalog-react';
|
|
27
24
|
import '@backstage/catalog-model';
|
|
25
|
+
import '@material-ui/icons/ArrowBackIos';
|
|
26
|
+
import '@material-ui/icons/ArrowForwardIos';
|
|
28
27
|
import 'react-use/lib/useEffectOnce';
|
|
29
28
|
import '@material-ui/icons/ExpandMore';
|
|
30
29
|
import '@material-ui/icons/FontDownload';
|
|
@@ -65,4 +64,4 @@ const HomePageSearchBar = ({ ...props }) => {
|
|
|
65
64
|
};
|
|
66
65
|
|
|
67
66
|
export { HomePageSearchBar };
|
|
68
|
-
//# sourceMappingURL=index-
|
|
67
|
+
//# sourceMappingURL=index-2180028e.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-2180028e.esm.js","sources":["../../src/components/util.ts","../../src/components/HomePageComponent/HomePageSearchBar.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 qs from 'qs';\nimport { useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { rootRouteRef } from '../plugin';\n\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\nexport const useNavigateToQuery = () => {\n const searchRoute = useRouteRef(rootRouteRef);\n const navigate = useNavigate();\n return useCallback(\n ({ query }: { query: string }): void => {\n const queryString = qs.stringify({ query }, { addQueryPrefix: true });\n\n navigate(`${searchRoute()}${queryString}`);\n },\n [navigate, searchRoute],\n );\n};\n","/*\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 */\n\nimport React, { useCallback, useState } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport {\n SearchBarBase,\n SearchBarBaseProps,\n} from '@backstage/plugin-search-react';\nimport { useNavigateToQuery } from '../util';\n\nconst useStyles = makeStyles({\n root: {\n border: '1px solid #555',\n borderRadius: '6px',\n fontSize: '1.5em',\n },\n});\n\n/**\n * Props for {@link HomePageSearchBar}.\n *\n * @public\n */\nexport type HomePageSearchBarProps = Partial<\n Omit<SearchBarBaseProps, 'onChange' | 'onSubmit'>\n>;\n\n/**\n * The search bar created specifically for the composable home page.\n */\nexport const HomePageSearchBar = ({ ...props }: HomePageSearchBarProps) => {\n const classes = useStyles(props);\n const [query, setQuery] = useState('');\n const handleSearch = useNavigateToQuery();\n\n const handleSubmit = () => {\n handleSearch({ query });\n };\n\n const handleChange = useCallback(\n value => {\n setQuery(value);\n },\n [setQuery],\n );\n\n return (\n <SearchBarBase\n classes={{ root: classes.root }}\n value={query}\n onSubmit={handleSubmit}\n onChange={handleChange}\n {...props}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,kBAAkB,GAAG,MAAM;AACxC,EAAE,MAAM,WAAW,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;AAChD,EAAE,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;AACjC,EAAE,OAAO,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK;AACpC,IAAI,MAAM,WAAW,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1E,IAAI,QAAQ,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;AAC/C,GAAG,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AAC9B,CAAC;;ACND,MAAM,SAAS,GAAG,UAAU,CAAC;AAC7B,EAAE,IAAI,EAAE;AACR,IAAI,MAAM,EAAE,gBAAgB;AAC5B,IAAI,YAAY,EAAE,KAAK;AACvB,IAAI,QAAQ,EAAE,OAAO;AACrB,GAAG;AACH,CAAC,CAAC,CAAC;AACS,MAAC,iBAAiB,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,KAAK;AACnD,EAAE,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AACnC,EAAE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AACzC,EAAE,MAAM,YAAY,GAAG,kBAAkB,EAAE,CAAC;AAC5C,EAAE,MAAM,YAAY,GAAG,MAAM;AAC7B,IAAI,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5B,GAAG,CAAC;AACJ,EAAE,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,KAAK,KAAK;AAC9C,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpB,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACjB,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE;AAC5D,IAAI,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE;AACnC,IAAI,KAAK,EAAE,KAAK;AAChB,IAAI,QAAQ,EAAE,YAAY;AAC1B,IAAI,QAAQ,EAAE,YAAY;AAC1B,IAAI,GAAG,KAAK;AACZ,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
export { S as SearchPage } from './index-
|
|
1
|
+
export { S as SearchPage } from './index-8388a95e.esm.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@material-ui/icons/FilterList';
|
|
4
4
|
import '@material-ui/core';
|
|
5
|
-
import 'react-use/lib/useDebounce';
|
|
6
|
-
import '@backstage/core-plugin-api';
|
|
7
|
-
import '@material-ui/icons/Search';
|
|
8
|
-
import '@material-ui/icons/Clear';
|
|
9
5
|
import '@backstage/plugin-search-react';
|
|
10
|
-
import '@material-ui/lab';
|
|
11
|
-
import 'react-use/lib/useAsyncFn';
|
|
12
6
|
import '@material-ui/icons/Launch';
|
|
13
7
|
import '@material-ui/core/styles';
|
|
8
|
+
import '@backstage/core-plugin-api';
|
|
14
9
|
import '@backstage/core-components';
|
|
15
|
-
import '@material-ui/icons/ArrowBackIos';
|
|
16
|
-
import '@material-ui/icons/ArrowForwardIos';
|
|
17
10
|
import '@backstage/errors';
|
|
18
11
|
import 'qs';
|
|
19
12
|
import '@backstage/version-bridge';
|
|
20
13
|
import 'react-use/lib/usePrevious';
|
|
21
14
|
import 'react-router';
|
|
15
|
+
import 'react-use/lib/useDebounce';
|
|
22
16
|
import '@material-ui/core/InputBase';
|
|
23
17
|
import '@material-ui/core/IconButton';
|
|
18
|
+
import '@material-ui/icons/Search';
|
|
19
|
+
import '@material-ui/icons/Clear';
|
|
20
|
+
import '@material-ui/lab';
|
|
24
21
|
import 'react-use/lib/useAsync';
|
|
25
22
|
import '@backstage/plugin-catalog-react';
|
|
26
23
|
import '@backstage/catalog-model';
|
|
24
|
+
import '@material-ui/icons/ArrowBackIos';
|
|
25
|
+
import '@material-ui/icons/ArrowForwardIos';
|
|
27
26
|
import 'react-use/lib/useEffectOnce';
|
|
28
27
|
import '@material-ui/icons/ExpandMore';
|
|
29
28
|
import '@material-ui/icons/FontDownload';
|
|
30
29
|
import 'react-router-dom';
|
|
31
|
-
//# sourceMappingURL=index-
|
|
30
|
+
//# sourceMappingURL=index-5aaf3de8.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-5aaf3de8.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|