@backstage/plugin-search 0.6.1-next.0 → 0.7.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-751c725b.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- export { D as DefaultResultListItem } from './index-19c51c5a.esm.js';
1
+ export { D as DefaultResultListItem } from './index-639fbe30.esm.js';
2
2
  import '@backstage/core-plugin-api';
3
3
  import '@backstage/errors';
4
4
  import 'qs';
@@ -15,6 +15,7 @@ import 'react-use/lib/useAsyncFn';
15
15
  import '@material-ui/icons/Launch';
16
16
  import '@material-ui/core/styles';
17
17
  import '@backstage/core-components';
18
+ import 'react-text-truncate';
18
19
  import '@material-ui/icons/ArrowBackIos';
19
20
  import '@material-ui/icons/ArrowForwardIos';
20
21
  import 'react-router';
@@ -26,4 +27,4 @@ import 'react-use/lib/useEffectOnce';
26
27
  import '@material-ui/icons/ExpandMore';
27
28
  import '@material-ui/icons/FontDownload';
28
29
  import 'react-router-dom';
29
- //# sourceMappingURL=index-b4cc532f.esm.js.map
30
+ //# sourceMappingURL=index-84f5d657.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-84f5d657.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
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-19c51c5a.esm.js';
3
+ import { r as rootRouteRef, b as SearchBarBase } from './index-639fbe30.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';
@@ -16,6 +16,7 @@ import '@material-ui/lab';
16
16
  import 'react-use/lib/useAsyncFn';
17
17
  import '@material-ui/icons/Launch';
18
18
  import '@backstage/core-components';
19
+ import 'react-text-truncate';
19
20
  import '@material-ui/icons/ArrowBackIos';
20
21
  import '@material-ui/icons/ArrowForwardIos';
21
22
  import 'react-router';
@@ -63,4 +64,4 @@ const HomePageSearchBar = ({ ...props }) => {
63
64
  };
64
65
 
65
66
  export { HomePageSearchBar };
66
- //# sourceMappingURL=index-792f3072.esm.js.map
67
+ //# sourceMappingURL=index-95ea23b7.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-792f3072.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';\n\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsBa,qBAAqB,MAAM;AACtC,QAAM,cAAc,YAAY;AAChC,QAAM,WAAW;AACjB,SAAO,YACL,CAAC,EAAE,YAAqC;AACtC,UAAM,cAAc,GAAG,UAAU,EAAE,SAAS,EAAE,gBAAgB;AAE9D,aAAS,GAAG,gBAAgB;AAAA,KAE9B,CAAC,UAAU;AAAA;;ACTf,MAAM,YAAY,WAAW;AAAA,EAC3B,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,UAAU;AAAA;AAAA;MAkBD,oBAAoB,CAAC,KAAK,YAAoC;AACzE,QAAM,UAAU,UAAU;AAC1B,QAAM,CAAC,OAAO,YAAY,SAAS;AACnC,QAAM,eAAe;AAErB,QAAM,eAAe,MAAM;AACzB,iBAAa,EAAE;AAAA;AAGjB,QAAM,eAAe,YACnB,WAAS;AACP,aAAS;AAAA,KAEX,CAAC;AAGH,6CACG,eAAD;AAAA,IACE,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,OAAO;AAAA,IACP,UAAU;AAAA,IACV,UAAU;AAAA,OACN;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index-95ea23b7.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';\n\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsBa,qBAAqB,MAAM;AACtC,QAAM,cAAc,YAAY;AAChC,QAAM,WAAW;AACjB,SAAO,YACL,CAAC,EAAE,YAAqC;AACtC,UAAM,cAAc,GAAG,UAAU,EAAE,SAAS,EAAE,gBAAgB;AAE9D,aAAS,GAAG,gBAAgB;AAAA,KAE9B,CAAC,UAAU;AAAA;;ACTf,MAAM,YAAY,WAAW;AAAA,EAC3B,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,UAAU;AAAA;AAAA;MAkBD,oBAAoB,CAAC,KAAK,YAAoC;AACzE,QAAM,UAAU,UAAU;AAC1B,QAAM,CAAC,OAAO,YAAY,SAAS;AACnC,QAAM,eAAe;AAErB,QAAM,eAAe,MAAM;AACzB,iBAAa,EAAE;AAAA;AAGjB,QAAM,eAAe,YACnB,WAAS;AACP,aAAS;AAAA,KAEX,CAAC;AAGH,6CACG,eAAD;AAAA,IACE,SAAS,EAAE,MAAM,QAAQ;AAAA,IACzB,OAAO;AAAA,IACP,UAAU;AAAA,IACV,UAAU;AAAA,OACN;AAAA;AAAA;;;;"}
@@ -1,4 +1,4 @@
1
- export { S as SearchPage } from './index-19c51c5a.esm.js';
1
+ export { S as SearchPage } from './index-639fbe30.esm.js';
2
2
  import '@backstage/core-plugin-api';
3
3
  import '@backstage/errors';
4
4
  import 'qs';
@@ -15,6 +15,7 @@ import 'react-use/lib/useAsyncFn';
15
15
  import '@material-ui/icons/Launch';
16
16
  import '@material-ui/core/styles';
17
17
  import '@backstage/core-components';
18
+ import 'react-text-truncate';
18
19
  import '@material-ui/icons/ArrowBackIos';
19
20
  import '@material-ui/icons/ArrowForwardIos';
20
21
  import 'react-router';
@@ -26,4 +27,4 @@ import 'react-use/lib/useEffectOnce';
26
27
  import '@material-ui/icons/ExpandMore';
27
28
  import '@material-ui/icons/FontDownload';
28
29
  import 'react-router-dom';
29
- //# sourceMappingURL=index-0cc5ccb8.esm.js.map
30
+ //# sourceMappingURL=index-a18fab16.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-a18fab16.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
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 useSearch, d as SearchModal } from './index-19c51c5a.esm.js';
4
+ import { u as useSearchModal, d as SearchModal } from './index-639fbe30.esm.js';
5
5
  import '@backstage/core-plugin-api';
6
6
  import '@backstage/errors';
7
7
  import 'qs';
@@ -15,6 +15,7 @@ import '@material-ui/lab';
15
15
  import 'react-use/lib/useAsyncFn';
16
16
  import '@material-ui/icons/Launch';
17
17
  import '@material-ui/core/styles';
18
+ import 'react-text-truncate';
18
19
  import '@material-ui/icons/ArrowBackIos';
19
20
  import '@material-ui/icons/ArrowForwardIos';
20
21
  import 'react-router';
@@ -28,7 +29,7 @@ import '@material-ui/icons/FontDownload';
28
29
  import 'react-router-dom';
29
30
 
30
31
  const SidebarSearchModal = (props) => {
31
- const { open, toggleModal } = useSearch();
32
+ const { state, toggleModal } = useSearchModal();
32
33
  const Icon = props.icon ? props.icon : SearchIcon;
33
34
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SidebarItem, {
34
35
  className: "search-icon",
@@ -36,10 +37,10 @@ const SidebarSearchModal = (props) => {
36
37
  text: "Search",
37
38
  onClick: toggleModal
38
39
  }), /* @__PURE__ */ React.createElement(SearchModal, {
39
- open,
40
+ ...state,
40
41
  toggleModal
41
42
  }));
42
43
  };
43
44
 
44
45
  export { SidebarSearchModal };
45
- //# sourceMappingURL=index-968bef26.esm.js.map
46
+ //# sourceMappingURL=index-c5f8a88e.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-c5f8a88e.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, useSearchModal } from '../SearchModal';\n\nexport type SidebarSearchModalProps = {\n icon?: IconComponent;\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 {...state} toggleModal={toggleModal} />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBa,qBAAqB,CAAC,UAAmC;AACpE,QAAM,EAAE,OAAO,gBAAgB;AAC/B,QAAM,OAAO,MAAM,OAAO,MAAM,OAAO;AAEvC,uGAEK,aAAD;AAAA,IACE,WAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAK;AAAA,IACL,SAAS;AAAA,0CAEV,aAAD;AAAA,OAAiB;AAAA,IAAO;AAAA;AAAA;;;;"}
package/dist/index.d.ts CHANGED
@@ -79,22 +79,26 @@ declare type HomePageSearchBarProps = Partial<Omit<SearchBarBaseProps, 'onChange
79
79
 
80
80
  declare type SearchContextValue = {
81
81
  result: AsyncState<SearchResultSet>;
82
- term: string;
83
82
  setTerm: React__default.Dispatch<React__default.SetStateAction<string>>;
84
- types: string[];
85
83
  setTypes: React__default.Dispatch<React__default.SetStateAction<string[]>>;
86
- filters: JsonObject;
87
84
  setFilters: React__default.Dispatch<React__default.SetStateAction<JsonObject>>;
88
- open?: boolean;
89
- toggleModal: () => void;
90
- pageCursor?: string;
91
85
  setPageCursor: React__default.Dispatch<React__default.SetStateAction<string | undefined>>;
92
86
  fetchNextPage?: React__default.DispatchWithoutAction;
93
87
  fetchPreviousPage?: React__default.DispatchWithoutAction;
88
+ } & SearchContextState;
89
+ /**
90
+ * The initial state of `SearchContextProvider`.
91
+ *
92
+ * @public
93
+ */
94
+ declare type SearchContextState = {
95
+ term: string;
96
+ types: string[];
97
+ filters: JsonObject;
98
+ pageCursor?: string;
94
99
  };
95
- declare type SettableSearchContext = Omit<SearchContextValue, 'result' | 'setTerm' | 'setTypes' | 'setFilters' | 'toggleModal' | 'setPageCursor' | 'fetchNextPage' | 'fetchPreviousPage'>;
96
100
  declare const SearchContextProvider: ({ initialState, children, }: React__default.PropsWithChildren<{
97
- initialState?: SettableSearchContext | undefined;
101
+ initialState?: SearchContextState | undefined;
98
102
  }>) => JSX.Element;
99
103
  declare const useSearch: () => SearchContextValue;
100
104
 
@@ -167,10 +171,43 @@ declare const SearchFilterNext: {
167
171
  };
168
172
 
169
173
  interface SearchModalProps {
174
+ /**
175
+ * If true, it renders the modal.
176
+ */
170
177
  open?: boolean;
178
+ /**
179
+ * This is supposed to be used together with the open prop.
180
+ * If `hidden` is true, it hides the modal.
181
+ * If `open` is false, the value of `hidden` has no effect on the modal.
182
+ * Use `open` for controlling whether the modal should be rendered or not.
183
+ */
184
+ hidden?: boolean;
185
+ /**
186
+ * a function invoked when a search item is pressed or when the dialog
187
+ * should be closed.
188
+ */
171
189
  toggleModal: () => void;
172
190
  }
173
- declare const SearchModal: ({ open, toggleModal }: SearchModalProps) => JSX.Element;
191
+ declare const SearchModal: ({ open, hidden, toggleModal, }: SearchModalProps) => JSX.Element;
192
+
193
+ /**
194
+ * Use this hook to manage the state of {@link SearchModal}
195
+ * and change its visibility.
196
+ *
197
+ * @public
198
+ *
199
+ * @param initialState - pass `true` to make the modal initially visible
200
+ * @returns an object containing the state of the modal together with
201
+ * functions for changing the visibility of the modal.
202
+ */
203
+ declare function useSearchModal(initialState?: boolean): {
204
+ state: {
205
+ hidden: boolean;
206
+ open: boolean;
207
+ };
208
+ toggleModal: () => void;
209
+ setOpen: (open: boolean) => void;
210
+ };
174
211
 
175
212
  declare const SearchPage$1: () => JSX.Element;
176
213
 
@@ -259,11 +296,12 @@ declare const SearchResult: ({ children }: {
259
296
  }) => JSX.Element;
260
297
  }) => JSX.Element;
261
298
  declare const SidebarSearchModal: (props: SidebarSearchModalProps) => JSX.Element;
262
- declare const DefaultResultListItem: ({ result, icon, secondaryAction, }: {
299
+ declare const DefaultResultListItem: ({ result, icon, secondaryAction, lineClamp, }: {
263
300
  icon?: React.ReactNode;
264
301
  secondaryAction?: React.ReactNode;
265
302
  result: _backstage_search_common.IndexableDocument;
303
+ lineClamp?: number | undefined;
266
304
  }) => JSX.Element;
267
305
  declare const HomePageSearchBar: ({ ...props }: Partial<Omit<SearchBarBaseProps, "onChange" | "onSubmit">>) => JSX.Element;
268
306
 
269
- export { DefaultResultListItem, Filters, FiltersButton, FiltersState, HomePageSearchBar, HomePageSearchBarProps, SearchPage$1 as Router, SearchApi, SearchAutocompleteFilterProps, SearchBar, SearchBarBase, SearchBarBaseProps, SearchBarNext, SearchBarProps, SearchContextProvider, SearchFilter, SearchFilterComponentProps, SearchFilterNext, SearchFilterWrapperProps, SearchModal, SearchModalProps, SearchPage, SearchPageNext, SearchResult, SearchResultPager, SearchType, SearchTypeAccordionProps, SearchTypeProps, SearchTypeTabsProps, SidebarSearch, SidebarSearchModal, SidebarSearchModalProps, SidebarSearchProps, searchPlugin as plugin, searchApiRef, searchPlugin, useSearch };
307
+ export { DefaultResultListItem, Filters, FiltersButton, FiltersState, HomePageSearchBar, HomePageSearchBarProps, SearchPage$1 as Router, SearchApi, SearchAutocompleteFilterProps, SearchBar, SearchBarBase, SearchBarBaseProps, SearchBarNext, SearchBarProps, SearchContextProvider, SearchContextState, SearchFilter, SearchFilterComponentProps, SearchFilterNext, SearchFilterWrapperProps, SearchModal, SearchModalProps, SearchPage, SearchPageNext, SearchResult, SearchResultPager, SearchType, SearchTypeAccordionProps, SearchTypeProps, SearchTypeTabsProps, SidebarSearch, SidebarSearchModal, SidebarSearchModalProps, SidebarSearchProps, searchPlugin as plugin, searchApiRef, searchPlugin, useSearch, useSearchModal };
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- export { l as DefaultResultListItem, F as Filters, e as FiltersButton, H as HomePageSearchBar, S as Router, a as SearchBar, b as SearchBarBase, m as SearchBarNext, f as SearchContextProvider, g as SearchFilter, h as SearchFilterNext, d as SearchModal, n as SearchPage, o as SearchPageNext, q as SearchResult, i as SearchResultPager, j as SearchType, k as SidebarSearch, t as SidebarSearchModal, p as plugin, s as searchApiRef, p as searchPlugin, u as useSearch } from './esm/index-19c51c5a.esm.js';
1
+ export { m as DefaultResultListItem, F as Filters, e as FiltersButton, H as HomePageSearchBar, S as Router, a as SearchBar, b as SearchBarBase, n as SearchBarNext, f as SearchContextProvider, h as SearchFilter, i as SearchFilterNext, d as SearchModal, o as SearchPage, p as SearchPageNext, t as SearchResult, j as SearchResultPager, k as SearchType, l as SidebarSearch, v as SidebarSearchModal, q as plugin, s as searchApiRef, q as searchPlugin, g as useSearch, u as useSearchModal } from './esm/index-639fbe30.esm.js';
2
2
  import '@backstage/core-plugin-api';
3
3
  import '@backstage/errors';
4
4
  import 'qs';
@@ -15,6 +15,7 @@ import 'react-use/lib/useAsyncFn';
15
15
  import '@material-ui/icons/Launch';
16
16
  import '@material-ui/core/styles';
17
17
  import '@backstage/core-components';
18
+ import 'react-text-truncate';
18
19
  import '@material-ui/icons/ArrowBackIos';
19
20
  import '@material-ui/icons/ArrowForwardIos';
20
21
  import 'react-router';
@@ -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.6.1-next.0",
4
+ "version": "0.7.0",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -10,6 +10,9 @@
10
10
  "main": "dist/index.esm.js",
11
11
  "types": "dist/index.d.ts"
12
12
  },
13
+ "backstage": {
14
+ "role": "frontend-plugin"
15
+ },
13
16
  "homepage": "https://backstage.io",
14
17
  "repository": {
15
18
  "type": "git",
@@ -20,31 +23,32 @@
20
23
  "backstage"
21
24
  ],
22
25
  "scripts": {
23
- "build": "backstage-cli plugin:build",
24
- "start": "backstage-cli plugin:serve",
25
- "lint": "backstage-cli lint",
26
- "test": "backstage-cli test",
26
+ "build": "backstage-cli package build",
27
+ "start": "backstage-cli package start",
28
+ "lint": "backstage-cli package lint",
29
+ "test": "backstage-cli package test",
27
30
  "diff": "backstage-cli plugin:diff",
28
- "prepack": "backstage-cli prepack",
29
- "postpack": "backstage-cli postpack",
30
- "clean": "backstage-cli clean"
31
+ "prepack": "backstage-cli package prepack",
32
+ "postpack": "backstage-cli package postpack",
33
+ "clean": "backstage-cli package clean"
31
34
  },
32
35
  "dependencies": {
33
- "@backstage/catalog-model": "^0.9.10",
34
- "@backstage/config": "^0.1.13",
35
- "@backstage/core-components": "^0.8.7-next.0",
36
- "@backstage/core-plugin-api": "^0.6.0",
37
- "@backstage/errors": "^0.2.0",
38
- "@backstage/plugin-catalog-react": "^0.6.13-next.0",
39
- "@backstage/search-common": "^0.2.2",
40
- "@backstage/theme": "^0.2.14",
41
- "@backstage/types": "^0.1.1",
36
+ "@backstage/catalog-model": "^0.10.0",
37
+ "@backstage/config": "^0.1.14",
38
+ "@backstage/core-components": "^0.8.9",
39
+ "@backstage/core-plugin-api": "^0.6.1",
40
+ "@backstage/errors": "^0.2.1",
41
+ "@backstage/plugin-catalog-react": "^0.6.15",
42
+ "@backstage/search-common": "^0.2.3",
43
+ "@backstage/theme": "^0.2.15",
44
+ "@backstage/types": "^0.1.2",
42
45
  "@material-ui/core": "^4.12.2",
43
46
  "@material-ui/icons": "^4.9.1",
44
47
  "@material-ui/lab": "4.0.0-alpha.57",
45
48
  "qs": "^6.9.4",
46
49
  "react-router": "6.0.0-beta.0",
47
50
  "react-router-dom": "6.0.0-beta.0",
51
+ "react-text-truncate": "^0.17.0",
48
52
  "react-use": "^17.2.4"
49
53
  },
50
54
  "peerDependencies": {
@@ -52,21 +56,21 @@
52
56
  "react": "^16.13.1 || ^17.0.0"
53
57
  },
54
58
  "devDependencies": {
55
- "@backstage/cli": "^0.13.1-next.0",
56
- "@backstage/core-app-api": "^0.5.1",
57
- "@backstage/dev-utils": "^0.2.20-next.0",
58
- "@backstage/test-utils": "^0.2.3",
59
+ "@backstage/cli": "^0.14.0",
60
+ "@backstage/core-app-api": "^0.5.3",
61
+ "@backstage/dev-utils": "^0.2.22",
62
+ "@backstage/test-utils": "^0.2.5",
59
63
  "@testing-library/jest-dom": "^5.10.1",
60
64
  "@testing-library/react": "^11.2.5",
61
65
  "@testing-library/react-hooks": "^7.0.2",
62
66
  "@testing-library/user-event": "^13.1.8",
63
67
  "@types/jest": "^26.0.7",
64
68
  "@types/node": "^14.14.32",
65
- "cross-fetch": "^3.0.6",
69
+ "cross-fetch": "^3.1.5",
66
70
  "msw": "^0.35.0"
67
71
  },
68
72
  "files": [
69
73
  "dist"
70
74
  ],
71
- "gitHead": "a28838ac5c80c7332caa6ca0569d2ec85151784f"
75
+ "gitHead": "4805c3d13ce9bfc369e53c271b1b95e722b3b4dc"
72
76
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-0cc5ccb8.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}