@backstage/plugin-search 0.7.5-next.1 → 0.8.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 +36 -0
- package/dist/esm/{index-927faa3d.esm.js → index-1c49a9c7.esm.js} +38 -111
- package/dist/esm/index-1c49a9c7.esm.js.map +1 -0
- package/dist/esm/{index-8fe3dbdd.esm.js → index-21e72471.esm.js} +8 -7
- package/dist/esm/index-21e72471.esm.js.map +1 -0
- package/dist/esm/{index-6ef71f25.esm.js → index-9b2b2a0c.esm.js} +8 -7
- package/dist/esm/{index-6ef71f25.esm.js.map → index-9b2b2a0c.esm.js.map} +1 -1
- package/dist/esm/{index-841ba24a.esm.js → index-ad938c17.esm.js} +8 -7
- package/dist/esm/index-ad938c17.esm.js.map +1 -0
- package/dist/esm/{index-9a79e9c2.esm.js → index-b51ef5f2.esm.js} +8 -7
- package/dist/esm/index-b51ef5f2.esm.js.map +1 -0
- package/dist/esm/{index-d0499309.esm.js → index-ca20fb56.esm.js} +6 -5
- package/dist/esm/index-ca20fb56.esm.js.map +1 -0
- package/dist/esm/{index-e7f638c9.esm.js → index-e04b2cd4.esm.js} +8 -7
- package/dist/esm/index-e04b2cd4.esm.js.map +1 -0
- package/dist/index.d.ts +6 -51
- package/dist/index.esm.js +7 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -13
- package/dist/esm/index-841ba24a.esm.js.map +0 -1
- package/dist/esm/index-8fe3dbdd.esm.js.map +0 -1
- package/dist/esm/index-927faa3d.esm.js.map +0 -1
- package/dist/esm/index-9a79e9c2.esm.js.map +0 -1
- package/dist/esm/index-d0499309.esm.js.map +0 -1
- package/dist/esm/index-e7f638c9.esm.js.map +0 -1
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '@backstage/core-plugin-api';
|
|
3
|
-
import '@backstage/errors';
|
|
4
|
-
import 'qs';
|
|
1
|
+
export { c as SearchResult } from './index-1c49a9c7.esm.js';
|
|
5
2
|
import 'react';
|
|
6
3
|
import '@material-ui/icons/FilterList';
|
|
7
4
|
import '@material-ui/core';
|
|
8
5
|
import 'react-use/lib/useDebounce';
|
|
6
|
+
import '@backstage/core-plugin-api';
|
|
9
7
|
import '@material-ui/icons/Search';
|
|
10
8
|
import '@material-ui/icons/Clear';
|
|
11
|
-
import 'react
|
|
12
|
-
import 'react-use/lib/usePrevious';
|
|
9
|
+
import '@backstage/plugin-search-react';
|
|
13
10
|
import '@material-ui/lab';
|
|
14
11
|
import 'react-use/lib/useAsyncFn';
|
|
15
12
|
import '@material-ui/icons/Launch';
|
|
@@ -18,13 +15,17 @@ import '@backstage/core-components';
|
|
|
18
15
|
import 'react-text-truncate';
|
|
19
16
|
import '@material-ui/icons/ArrowBackIos';
|
|
20
17
|
import '@material-ui/icons/ArrowForwardIos';
|
|
18
|
+
import '@backstage/errors';
|
|
19
|
+
import 'qs';
|
|
20
|
+
import 'react-use/lib/usePrevious';
|
|
21
21
|
import 'react-router';
|
|
22
22
|
import '@material-ui/core/InputBase';
|
|
23
23
|
import '@material-ui/core/IconButton';
|
|
24
|
+
import 'react-use/lib/useAsync';
|
|
24
25
|
import '@backstage/plugin-catalog-react';
|
|
25
26
|
import '@backstage/catalog-model';
|
|
26
27
|
import 'react-use/lib/useEffectOnce';
|
|
27
28
|
import '@material-ui/icons/ExpandMore';
|
|
28
29
|
import '@material-ui/icons/FontDownload';
|
|
29
30
|
import 'react-router-dom';
|
|
30
|
-
//# sourceMappingURL=index-
|
|
31
|
+
//# sourceMappingURL=index-21e72471.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-21e72471.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import SearchIcon from '@material-ui/icons/Search';
|
|
3
3
|
import { SidebarItem } from '@backstage/core-components';
|
|
4
|
-
import { u as useSearchModal, d as SearchModal } from './index-
|
|
5
|
-
import '@backstage/core-plugin-api';
|
|
6
|
-
import '@backstage/errors';
|
|
7
|
-
import 'qs';
|
|
4
|
+
import { u as useSearchModal, d as SearchModal } from './index-1c49a9c7.esm.js';
|
|
8
5
|
import '@material-ui/icons/FilterList';
|
|
9
6
|
import '@material-ui/core';
|
|
10
7
|
import 'react-use/lib/useDebounce';
|
|
8
|
+
import '@backstage/core-plugin-api';
|
|
11
9
|
import '@material-ui/icons/Clear';
|
|
12
|
-
import 'react
|
|
13
|
-
import 'react-use/lib/usePrevious';
|
|
10
|
+
import '@backstage/plugin-search-react';
|
|
14
11
|
import '@material-ui/lab';
|
|
15
12
|
import 'react-use/lib/useAsyncFn';
|
|
16
13
|
import '@material-ui/icons/Launch';
|
|
@@ -18,9 +15,13 @@ import '@material-ui/core/styles';
|
|
|
18
15
|
import 'react-text-truncate';
|
|
19
16
|
import '@material-ui/icons/ArrowBackIos';
|
|
20
17
|
import '@material-ui/icons/ArrowForwardIos';
|
|
18
|
+
import '@backstage/errors';
|
|
19
|
+
import 'qs';
|
|
20
|
+
import 'react-use/lib/usePrevious';
|
|
21
21
|
import 'react-router';
|
|
22
22
|
import '@material-ui/core/InputBase';
|
|
23
23
|
import '@material-ui/core/IconButton';
|
|
24
|
+
import 'react-use/lib/useAsync';
|
|
24
25
|
import '@backstage/plugin-catalog-react';
|
|
25
26
|
import '@backstage/catalog-model';
|
|
26
27
|
import 'react-use/lib/useEffectOnce';
|
|
@@ -44,4 +45,4 @@ const SidebarSearchModal = (props) => {
|
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
export { SidebarSearchModal };
|
|
47
|
-
//# sourceMappingURL=index-
|
|
48
|
+
//# sourceMappingURL=index-9b2b2a0c.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-9b2b2a0c.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 {\n SearchModal,\n SearchModalChildrenProps,\n useSearchModal,\n} from '../SearchModal';\n\nexport type SidebarSearchModalProps = {\n icon?: IconComponent;\n children?: (props: SearchModalChildrenProps) => JSX.Element;\n};\n\nexport const SidebarSearchModal = (props: SidebarSearchModalProps) => {\n const { state, toggleModal } = useSearchModal();\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\n {...state}\n toggleModal={toggleModal}\n children={props.children}\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOY,MAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK;AAC7C,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,cAAc,EAAE,CAAC;AAClD,EAAE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AACpD,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,kBAAkB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AACpH,IAAI,SAAS,EAAE,aAAa;AAC5B,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,OAAO,EAAE,WAAW;AACxB,GAAG,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AACvD,IAAI,GAAG,KAAK;AACZ,IAAI,WAAW;AACf,IAAI,QAAQ,EAAE,KAAK,CAAC,QAAQ;AAC5B,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
export { D as DefaultResultListItem } from './index-
|
|
2
|
-
import '@backstage/core-plugin-api';
|
|
3
|
-
import '@backstage/errors';
|
|
4
|
-
import 'qs';
|
|
1
|
+
export { D as DefaultResultListItem } from './index-1c49a9c7.esm.js';
|
|
5
2
|
import 'react';
|
|
6
3
|
import '@material-ui/icons/FilterList';
|
|
7
4
|
import '@material-ui/core';
|
|
8
5
|
import 'react-use/lib/useDebounce';
|
|
6
|
+
import '@backstage/core-plugin-api';
|
|
9
7
|
import '@material-ui/icons/Search';
|
|
10
8
|
import '@material-ui/icons/Clear';
|
|
11
|
-
import 'react
|
|
12
|
-
import 'react-use/lib/usePrevious';
|
|
9
|
+
import '@backstage/plugin-search-react';
|
|
13
10
|
import '@material-ui/lab';
|
|
14
11
|
import 'react-use/lib/useAsyncFn';
|
|
15
12
|
import '@material-ui/icons/Launch';
|
|
@@ -18,13 +15,17 @@ import '@backstage/core-components';
|
|
|
18
15
|
import 'react-text-truncate';
|
|
19
16
|
import '@material-ui/icons/ArrowBackIos';
|
|
20
17
|
import '@material-ui/icons/ArrowForwardIos';
|
|
18
|
+
import '@backstage/errors';
|
|
19
|
+
import 'qs';
|
|
20
|
+
import 'react-use/lib/usePrevious';
|
|
21
21
|
import 'react-router';
|
|
22
22
|
import '@material-ui/core/InputBase';
|
|
23
23
|
import '@material-ui/core/IconButton';
|
|
24
|
+
import 'react-use/lib/useAsync';
|
|
24
25
|
import '@backstage/plugin-catalog-react';
|
|
25
26
|
import '@backstage/catalog-model';
|
|
26
27
|
import 'react-use/lib/useEffectOnce';
|
|
27
28
|
import '@material-ui/icons/ExpandMore';
|
|
28
29
|
import '@material-ui/icons/FontDownload';
|
|
29
30
|
import 'react-router-dom';
|
|
30
|
-
//# sourceMappingURL=index-
|
|
31
|
+
//# sourceMappingURL=index-ad938c17.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-ad938c17.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '@backstage/core-plugin-api';
|
|
3
|
-
import '@backstage/errors';
|
|
4
|
-
import 'qs';
|
|
1
|
+
export { a as SearchBar, b as SearchBarBase } from './index-1c49a9c7.esm.js';
|
|
5
2
|
import 'react';
|
|
6
3
|
import '@material-ui/icons/FilterList';
|
|
7
4
|
import '@material-ui/core';
|
|
8
5
|
import 'react-use/lib/useDebounce';
|
|
6
|
+
import '@backstage/core-plugin-api';
|
|
9
7
|
import '@material-ui/icons/Search';
|
|
10
8
|
import '@material-ui/icons/Clear';
|
|
11
|
-
import 'react
|
|
12
|
-
import 'react-use/lib/usePrevious';
|
|
9
|
+
import '@backstage/plugin-search-react';
|
|
13
10
|
import '@material-ui/lab';
|
|
14
11
|
import 'react-use/lib/useAsyncFn';
|
|
15
12
|
import '@material-ui/icons/Launch';
|
|
@@ -18,13 +15,17 @@ import '@backstage/core-components';
|
|
|
18
15
|
import 'react-text-truncate';
|
|
19
16
|
import '@material-ui/icons/ArrowBackIos';
|
|
20
17
|
import '@material-ui/icons/ArrowForwardIos';
|
|
18
|
+
import '@backstage/errors';
|
|
19
|
+
import 'qs';
|
|
20
|
+
import 'react-use/lib/usePrevious';
|
|
21
21
|
import 'react-router';
|
|
22
22
|
import '@material-ui/core/InputBase';
|
|
23
23
|
import '@material-ui/core/IconButton';
|
|
24
|
+
import 'react-use/lib/useAsync';
|
|
24
25
|
import '@backstage/plugin-catalog-react';
|
|
25
26
|
import '@backstage/catalog-model';
|
|
26
27
|
import 'react-use/lib/useEffectOnce';
|
|
27
28
|
import '@material-ui/icons/ExpandMore';
|
|
28
29
|
import '@material-ui/icons/FontDownload';
|
|
29
30
|
import 'react-router-dom';
|
|
30
|
-
//# sourceMappingURL=index-
|
|
31
|
+
//# sourceMappingURL=index-b51ef5f2.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-b51ef5f2.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import { makeStyles } from '@material-ui/core/styles';
|
|
3
|
-
import { r as rootRouteRef, b as SearchBarBase } from './index-
|
|
3
|
+
import { r as rootRouteRef, b as SearchBarBase } from './index-1c49a9c7.esm.js';
|
|
4
4
|
import qs from 'qs';
|
|
5
5
|
import { useNavigate } from 'react-router-dom';
|
|
6
6
|
import { useRouteRef } from '@backstage/core-plugin-api';
|
|
7
|
-
import '@backstage/errors';
|
|
8
7
|
import '@material-ui/icons/FilterList';
|
|
9
8
|
import '@material-ui/core';
|
|
10
9
|
import 'react-use/lib/useDebounce';
|
|
11
10
|
import '@material-ui/icons/Search';
|
|
12
11
|
import '@material-ui/icons/Clear';
|
|
13
|
-
import 'react
|
|
14
|
-
import 'react-use/lib/usePrevious';
|
|
12
|
+
import '@backstage/plugin-search-react';
|
|
15
13
|
import '@material-ui/lab';
|
|
16
14
|
import 'react-use/lib/useAsyncFn';
|
|
17
15
|
import '@material-ui/icons/Launch';
|
|
@@ -19,9 +17,12 @@ import '@backstage/core-components';
|
|
|
19
17
|
import 'react-text-truncate';
|
|
20
18
|
import '@material-ui/icons/ArrowBackIos';
|
|
21
19
|
import '@material-ui/icons/ArrowForwardIos';
|
|
20
|
+
import '@backstage/errors';
|
|
21
|
+
import 'react-use/lib/usePrevious';
|
|
22
22
|
import 'react-router';
|
|
23
23
|
import '@material-ui/core/InputBase';
|
|
24
24
|
import '@material-ui/core/IconButton';
|
|
25
|
+
import 'react-use/lib/useAsync';
|
|
25
26
|
import '@backstage/plugin-catalog-react';
|
|
26
27
|
import '@backstage/catalog-model';
|
|
27
28
|
import 'react-use/lib/useEffectOnce';
|
|
@@ -64,4 +65,4 @@ const HomePageSearchBar = ({ ...props }) => {
|
|
|
64
65
|
};
|
|
65
66
|
|
|
66
67
|
export { HomePageSearchBar };
|
|
67
|
-
//# sourceMappingURL=index-
|
|
68
|
+
//# sourceMappingURL=index-ca20fb56.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-ca20fb56.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 { SearchBarBase, SearchBarBaseProps } from '../SearchBar';\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 *\n * @public\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;;ACRD,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,15 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '@backstage/core-plugin-api';
|
|
3
|
-
import '@backstage/errors';
|
|
4
|
-
import 'qs';
|
|
1
|
+
export { S as SearchPage } from './index-1c49a9c7.esm.js';
|
|
5
2
|
import 'react';
|
|
6
3
|
import '@material-ui/icons/FilterList';
|
|
7
4
|
import '@material-ui/core';
|
|
8
5
|
import 'react-use/lib/useDebounce';
|
|
6
|
+
import '@backstage/core-plugin-api';
|
|
9
7
|
import '@material-ui/icons/Search';
|
|
10
8
|
import '@material-ui/icons/Clear';
|
|
11
|
-
import 'react
|
|
12
|
-
import 'react-use/lib/usePrevious';
|
|
9
|
+
import '@backstage/plugin-search-react';
|
|
13
10
|
import '@material-ui/lab';
|
|
14
11
|
import 'react-use/lib/useAsyncFn';
|
|
15
12
|
import '@material-ui/icons/Launch';
|
|
@@ -18,13 +15,17 @@ import '@backstage/core-components';
|
|
|
18
15
|
import 'react-text-truncate';
|
|
19
16
|
import '@material-ui/icons/ArrowBackIos';
|
|
20
17
|
import '@material-ui/icons/ArrowForwardIos';
|
|
18
|
+
import '@backstage/errors';
|
|
19
|
+
import 'qs';
|
|
20
|
+
import 'react-use/lib/usePrevious';
|
|
21
21
|
import 'react-router';
|
|
22
22
|
import '@material-ui/core/InputBase';
|
|
23
23
|
import '@material-ui/core/IconButton';
|
|
24
|
+
import 'react-use/lib/useAsync';
|
|
24
25
|
import '@backstage/plugin-catalog-react';
|
|
25
26
|
import '@backstage/catalog-model';
|
|
26
27
|
import 'react-use/lib/useEffectOnce';
|
|
27
28
|
import '@material-ui/icons/ExpandMore';
|
|
28
29
|
import '@material-ui/icons/FontDownload';
|
|
29
30
|
import 'react-router-dom';
|
|
30
|
-
//# sourceMappingURL=index-
|
|
31
|
+
//# sourceMappingURL=index-e04b2cd4.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-e04b2cd4.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { InputBaseProps } from '@material-ui/core';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ReactElement } from 'react';
|
|
2
5
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
6
|
import { IconComponent } from '@backstage/core-plugin-api';
|
|
4
7
|
import * as _backstage_plugin_search_common from '@backstage/plugin-search-common';
|
|
5
|
-
import { SearchQuery, SearchResultSet } from '@backstage/plugin-search-common';
|
|
6
|
-
import { InputBaseProps } from '@material-ui/core';
|
|
7
|
-
import { JsonObject } from '@backstage/types';
|
|
8
|
-
import * as React from 'react';
|
|
9
|
-
import React__default, { ReactElement } from 'react';
|
|
10
|
-
import { AsyncState } from 'react-use/lib/useAsync';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated import from `@backstage/plugin-search-react` instead
|
|
14
|
-
*/
|
|
15
|
-
declare const searchApiRef: _backstage_core_plugin_api.ApiRef<SearchApi>;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated import from `@backstage/plugin-search-react` instead
|
|
18
|
-
*/
|
|
19
|
-
interface SearchApi {
|
|
20
|
-
query(query: SearchQuery): Promise<SearchResultSet>;
|
|
21
|
-
}
|
|
22
8
|
|
|
23
9
|
declare type FiltersButtonProps = {
|
|
24
10
|
numberOfSelectedFilters: number;
|
|
@@ -83,37 +69,6 @@ declare const SearchBar: ({ onChange, ...props }: SearchBarProps) => JSX.Element
|
|
|
83
69
|
*/
|
|
84
70
|
declare type HomePageSearchBarProps = Partial<Omit<SearchBarBaseProps, 'onChange' | 'onSubmit'>>;
|
|
85
71
|
|
|
86
|
-
declare type SearchContextValue = {
|
|
87
|
-
result: AsyncState<SearchResultSet>;
|
|
88
|
-
setTerm: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
89
|
-
setTypes: React__default.Dispatch<React__default.SetStateAction<string[]>>;
|
|
90
|
-
setFilters: React__default.Dispatch<React__default.SetStateAction<JsonObject>>;
|
|
91
|
-
setPageCursor: React__default.Dispatch<React__default.SetStateAction<string | undefined>>;
|
|
92
|
-
fetchNextPage?: React__default.DispatchWithoutAction;
|
|
93
|
-
fetchPreviousPage?: React__default.DispatchWithoutAction;
|
|
94
|
-
} & SearchContextState;
|
|
95
|
-
/**
|
|
96
|
-
* The initial state of `SearchContextProvider`.
|
|
97
|
-
*
|
|
98
|
-
* @public
|
|
99
|
-
*/
|
|
100
|
-
declare type SearchContextState = {
|
|
101
|
-
term: string;
|
|
102
|
-
types: string[];
|
|
103
|
-
filters: JsonObject;
|
|
104
|
-
pageCursor?: string;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* @deprecated import from `@backstage/plugin-search-react` instead
|
|
108
|
-
*/
|
|
109
|
-
declare const SearchContextProvider: ({ initialState, children, }: React__default.PropsWithChildren<{
|
|
110
|
-
initialState?: SearchContextState | undefined;
|
|
111
|
-
}>) => JSX.Element;
|
|
112
|
-
/**
|
|
113
|
-
* @deprecated import from "@backstage/plugin-search-react" instead
|
|
114
|
-
*/
|
|
115
|
-
declare const useSearch: () => SearchContextValue;
|
|
116
|
-
|
|
117
72
|
/**
|
|
118
73
|
* @public
|
|
119
74
|
*/
|
|
@@ -324,11 +279,11 @@ declare const SearchResult: ({ children }: {
|
|
|
324
279
|
}) => JSX.Element;
|
|
325
280
|
declare const SidebarSearchModal: (props: SidebarSearchModalProps) => JSX.Element;
|
|
326
281
|
declare const DefaultResultListItem: ({ result, icon, secondaryAction, lineClamp, }: {
|
|
327
|
-
icon?:
|
|
328
|
-
secondaryAction?:
|
|
282
|
+
icon?: react.ReactNode;
|
|
283
|
+
secondaryAction?: react.ReactNode;
|
|
329
284
|
result: _backstage_plugin_search_common.SearchDocument;
|
|
330
285
|
lineClamp?: number | undefined;
|
|
331
286
|
}) => JSX.Element;
|
|
332
287
|
declare const HomePageSearchBar: ({ ...props }: Partial<Omit<SearchBarBaseProps, "onChange" | "onSubmit">>) => JSX.Element;
|
|
333
288
|
|
|
334
|
-
export { DefaultResultListItem, Filters, FiltersButton, FiltersState, HomePageSearchBar, HomePageSearchBarProps, SearchPage$1 as Router,
|
|
289
|
+
export { DefaultResultListItem, Filters, FiltersButton, FiltersState, HomePageSearchBar, HomePageSearchBarProps, SearchPage$1 as Router, SearchAutocompleteFilterProps, SearchBar, SearchBarBase, SearchBarBaseProps, SearchBarNext, SearchBarProps, SearchFilter, SearchFilterComponentProps, SearchFilterNext, SearchFilterWrapperProps, SearchModal, SearchModalChildrenProps, SearchModalProps, SearchPage, SearchPageNext, SearchResult, SearchResultPager, SearchType, SearchTypeAccordionProps, SearchTypeProps, SearchTypeTabsProps, SidebarSearch, SidebarSearchModal, SidebarSearchModalProps, SidebarSearchProps, searchPlugin as plugin, searchPlugin, useSearchModal };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import '@backstage/core-plugin-api';
|
|
3
|
-
import '@backstage/errors';
|
|
4
|
-
import 'qs';
|
|
1
|
+
export { k as DefaultResultListItem, F as Filters, e as FiltersButton, H as HomePageSearchBar, S as Router, a as SearchBar, b as SearchBarBase, l as SearchBarNext, f as SearchFilter, g as SearchFilterNext, d as SearchModal, m as SearchPage, n as SearchPageNext, o as SearchResult, h as SearchResultPager, i as SearchType, j as SidebarSearch, p as SidebarSearchModal, s as plugin, s as searchPlugin, u as useSearchModal } from './esm/index-1c49a9c7.esm.js';
|
|
5
2
|
import 'react';
|
|
6
3
|
import '@material-ui/icons/FilterList';
|
|
7
4
|
import '@material-ui/core';
|
|
8
5
|
import 'react-use/lib/useDebounce';
|
|
6
|
+
import '@backstage/core-plugin-api';
|
|
9
7
|
import '@material-ui/icons/Search';
|
|
10
8
|
import '@material-ui/icons/Clear';
|
|
11
|
-
import 'react
|
|
12
|
-
import 'react-use/lib/usePrevious';
|
|
9
|
+
import '@backstage/plugin-search-react';
|
|
13
10
|
import '@material-ui/lab';
|
|
14
11
|
import 'react-use/lib/useAsyncFn';
|
|
15
12
|
import '@material-ui/icons/Launch';
|
|
@@ -18,9 +15,13 @@ import '@backstage/core-components';
|
|
|
18
15
|
import 'react-text-truncate';
|
|
19
16
|
import '@material-ui/icons/ArrowBackIos';
|
|
20
17
|
import '@material-ui/icons/ArrowForwardIos';
|
|
18
|
+
import '@backstage/errors';
|
|
19
|
+
import 'qs';
|
|
20
|
+
import 'react-use/lib/usePrevious';
|
|
21
21
|
import 'react-router';
|
|
22
22
|
import '@material-ui/core/InputBase';
|
|
23
23
|
import '@material-ui/core/IconButton';
|
|
24
|
+
import 'react-use/lib/useAsync';
|
|
24
25
|
import '@backstage/plugin-catalog-react';
|
|
25
26
|
import '@backstage/catalog-model';
|
|
26
27
|
import 'react-use/lib/useEffectOnce';
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-search",
|
|
3
3
|
"description": "The Backstage plugin that provides your backstage app with search",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"clean": "backstage-cli package clean"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@backstage/catalog-model": "^1.0.1
|
|
36
|
+
"@backstage/catalog-model": "^1.0.1",
|
|
37
37
|
"@backstage/config": "^1.0.0",
|
|
38
|
-
"@backstage/core-components": "^0.9.3
|
|
39
|
-
"@backstage/core-plugin-api": "^1.0.1
|
|
38
|
+
"@backstage/core-components": "^0.9.3",
|
|
39
|
+
"@backstage/core-plugin-api": "^1.0.1",
|
|
40
40
|
"@backstage/errors": "^1.0.0",
|
|
41
|
-
"@backstage/plugin-catalog-react": "^1.0.1
|
|
42
|
-
"@backstage/plugin-search-common": "^0.3.3
|
|
43
|
-
"@backstage/plugin-search-react": "^0.1.0
|
|
41
|
+
"@backstage/plugin-catalog-react": "^1.0.1",
|
|
42
|
+
"@backstage/plugin-search-common": "^0.3.3",
|
|
43
|
+
"@backstage/plugin-search-react": "^0.1.0",
|
|
44
44
|
"@backstage/theme": "^0.2.15",
|
|
45
45
|
"@backstage/types": "^1.0.0",
|
|
46
46
|
"@material-ui/core": "^4.12.2",
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"react": "^16.13.1 || ^17.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@backstage/cli": "^0.17.0
|
|
61
|
-
"@backstage/core-app-api": "^1.0.1
|
|
62
|
-
"@backstage/dev-utils": "^1.0.1
|
|
63
|
-
"@backstage/test-utils": "^1.0.1
|
|
60
|
+
"@backstage/cli": "^0.17.0",
|
|
61
|
+
"@backstage/core-app-api": "^1.0.1",
|
|
62
|
+
"@backstage/dev-utils": "^1.0.1",
|
|
63
|
+
"@backstage/test-utils": "^1.0.1",
|
|
64
64
|
"@testing-library/jest-dom": "^5.10.1",
|
|
65
65
|
"@testing-library/react": "^12.1.3",
|
|
66
|
-
"@testing-library/react-hooks": "^
|
|
66
|
+
"@testing-library/react-hooks": "^8.0.0",
|
|
67
67
|
"@testing-library/user-event": "^14.0.0",
|
|
68
68
|
"@types/jest": "^26.0.7",
|
|
69
69
|
"@types/node": "^16.11.26",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"files": [
|
|
74
74
|
"dist"
|
|
75
75
|
],
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "e0e44c433319711c2fb8b175db411a621f7aaec2"
|
|
77
77
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-841ba24a.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-8fe3dbdd.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|