@backstage/plugin-search 1.3.6 → 1.4.0-next.1

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 CHANGED
@@ -1,38 +1,50 @@
1
1
  # @backstage/plugin-search
2
2
 
3
- ## 1.3.6
3
+ ## 1.4.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - b78f570f44d3: The SearchPage component can now be configured via app-config.yaml with default query parameters to define how it behaves when it is first loaded or reset. Check out the following example:
8
+
9
+ ```yaml
10
+ search:
11
+ query:
12
+ pageLimit: 50
13
+ ```
14
+
15
+ Acceptable values for `pageLimit` are `10`, `25`, `50` or `100`.
4
16
 
5
17
  ### Patch Changes
6
18
 
7
19
  - Updated dependencies
8
- - @backstage/plugin-catalog-react@1.8.3
9
- - @backstage/catalog-model@1.4.1
10
- - @backstage/config@1.0.8
11
- - @backstage/core-components@0.13.4
12
- - @backstage/core-plugin-api@1.5.3
20
+ - @backstage/plugin-catalog-react@1.8.4-next.1
21
+ - @backstage/core-components@0.13.5-next.1
22
+ - @backstage/config@1.1.0-next.0
23
+ - @backstage/plugin-search-react@1.7.0-next.1
24
+ - @backstage/catalog-model@1.4.2-next.0
25
+ - @backstage/core-plugin-api@1.6.0-next.1
13
26
  - @backstage/errors@1.2.1
14
27
  - @backstage/theme@0.4.1
15
28
  - @backstage/types@1.1.0
16
29
  - @backstage/version-bridge@1.0.4
17
- - @backstage/plugin-search-common@1.2.5
18
- - @backstage/plugin-search-react@1.6.4
30
+ - @backstage/plugin-search-common@1.2.6-next.0
19
31
 
20
- ## 1.3.5
32
+ ## 1.3.6-next.0
21
33
 
22
34
  ### Patch Changes
23
35
 
24
36
  - Updated dependencies
25
- - @backstage/plugin-catalog-react@1.8.2
37
+ - @backstage/core-plugin-api@1.6.0-next.0
38
+ - @backstage/core-components@0.13.5-next.0
26
39
  - @backstage/catalog-model@1.4.1
27
40
  - @backstage/config@1.0.8
28
- - @backstage/core-components@0.13.4
29
- - @backstage/core-plugin-api@1.5.3
30
41
  - @backstage/errors@1.2.1
31
42
  - @backstage/theme@0.4.1
32
43
  - @backstage/types@1.1.0
33
44
  - @backstage/version-bridge@1.0.4
45
+ - @backstage/plugin-catalog-react@1.8.3-next.0
34
46
  - @backstage/plugin-search-common@1.2.5
35
- - @backstage/plugin-search-react@1.6.4
47
+ - @backstage/plugin-search-react@1.6.5-next.0
36
48
 
37
49
  ## 1.3.4
38
50
 
package/README.md CHANGED
@@ -8,6 +8,22 @@ Development is ongoing. You can follow the progress and contribute at the Backst
8
8
 
9
9
  Run `yarn dev` in the root directory, and then navigate to [/search](http://localhost:3000/search) to check out the plugin.
10
10
 
11
+ ### Optional Settings
12
+
13
+ Configure the search query values via `app-config.yaml` to define how it behaves by default.
14
+
15
+ ```yaml
16
+ # app-config.yaml
17
+ search:
18
+ query:
19
+ pageLimit: 50
20
+ ```
21
+
22
+ Acceptable values for `pageLimit` are `10`, `25`, `50` or `100`.
23
+
24
+ **NOTE**: Currently this configuration only reflects the initial state of the Search React components. This means that
25
+ it defines how it behaves when it is first loaded or reset.
26
+
11
27
  ### Areas of Responsibility
12
28
 
13
29
  This search plugin is primarily responsible for the following:
package/config.d.ts ADDED
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Copyright 2023 The Backstage Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export interface Config {
18
+ /** Configuration options for the search plugin */
19
+ search?: {
20
+ /**
21
+ * An object representing the default search query configuration.
22
+ * By configuring and modifying the values of this object,
23
+ * you can customize the default values of the search queries
24
+ * and define how it behaves by default.
25
+ */
26
+ query?: {
27
+ /**
28
+ * A number indicating the maximum number of results to be returned
29
+ * per page during pagination.
30
+ * @visibility frontend
31
+ */
32
+ pageLimit?: 10 | 25 | 50 | 100;
33
+ };
34
+ };
35
+ }
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import * as _backstage_plugin_search_react from '@backstage/plugin-search-react';
3
3
  import { SearchBarBaseProps } from '@backstage/plugin-search-react';
4
- import { ReactNode } from 'react';
4
+ import * as React from 'react';
5
+ import React__default, { ReactNode } from 'react';
5
6
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
6
7
  import { IconComponent } from '@backstage/core-plugin-api';
7
8
 
@@ -50,7 +51,7 @@ interface SearchModalProps {
50
51
  /**
51
52
  * @public
52
53
  */
53
- declare const SearchModal: (props: SearchModalProps) => JSX.Element;
54
+ declare const SearchModal: (props: SearchModalProps) => React__default.JSX.Element;
54
55
 
55
56
  /**
56
57
  * The state of the search modal, as well as functions for changing the modal's
@@ -109,7 +110,7 @@ type SearchModalProviderProps = {
109
110
  *
110
111
  * @public
111
112
  */
112
- declare const SearchModalProvider: (props: SearchModalProviderProps) => JSX.Element;
113
+ declare const SearchModalProvider: (props: SearchModalProviderProps) => React__default.JSX.Element;
113
114
  /**
114
115
  * Use this hook to manage the state of {@link SearchModal}
115
116
  * and change its visibility. Monitors route changes setting the hidden state
@@ -126,7 +127,7 @@ declare function useSearchModal(initialState?: boolean): SearchModalValue;
126
127
  /**
127
128
  * @public
128
129
  */
129
- declare const SearchPage$1: () => JSX.Element;
130
+ declare const SearchPage$1: () => React__default.JSX.Element;
130
131
 
131
132
  /**
132
133
  * @public
@@ -168,19 +169,19 @@ type SearchTypeProps = {
168
169
  * @public
169
170
  */
170
171
  declare const SearchType: {
171
- (props: SearchTypeProps): JSX.Element;
172
+ (props: SearchTypeProps): React__default.JSX.Element;
172
173
  /**
173
174
  * A control surface for the search query's "types" property, displayed as a
174
175
  * single-select collapsible accordion suitable for use in faceted search UIs.
175
176
  * @public
176
177
  */
177
- Accordion(props: SearchTypeAccordionProps): JSX.Element;
178
+ Accordion(props: SearchTypeAccordionProps): React__default.JSX.Element;
178
179
  /**
179
180
  * A control surface for the search query's "types" property, displayed as a
180
181
  * tabs suitable for use in faceted search UIs.
181
182
  * @public
182
183
  */
183
- Tabs(props: SearchTypeTabsProps): JSX.Element;
184
+ Tabs(props: SearchTypeTabsProps): React__default.JSX.Element;
184
185
  };
185
186
 
186
187
  /**
@@ -194,7 +195,7 @@ type SidebarSearchProps = {
194
195
  /**
195
196
  * @public
196
197
  */
197
- declare const SidebarSearch: (props: SidebarSearchProps) => JSX.Element;
198
+ declare const SidebarSearch: (props: SidebarSearchProps) => React__default.JSX.Element;
198
199
 
199
200
  /**
200
201
  * Props for {@link SidebarSearchModal}.
@@ -215,14 +216,14 @@ declare const searchPlugin: _backstage_core_plugin_api.BackstagePlugin<{
215
216
  /**
216
217
  * @public
217
218
  */
218
- declare const SearchPage: () => JSX.Element;
219
+ declare const SearchPage: () => React.JSX.Element;
219
220
  /**
220
221
  * @public
221
222
  */
222
- declare const SidebarSearchModal: (props: SidebarSearchModalProps) => JSX.Element;
223
+ declare const SidebarSearchModal: (props: SidebarSearchModalProps) => React.JSX.Element;
223
224
  /**
224
225
  * @public
225
226
  */
226
- declare const HomePageSearchBar: (props: Partial<Omit<_backstage_plugin_search_react.SearchBarBaseProps, "onChange" | "onSubmit">>) => JSX.Element;
227
+ declare const HomePageSearchBar: (props: Partial<Omit<_backstage_plugin_search_react.SearchBarBaseProps, "onChange" | "onSubmit">>) => React.JSX.Element;
227
228
 
228
229
  export { HomePageSearchBar, HomePageSearchBarProps, SearchPage$1 as Router, SearchModal, SearchModalChildrenProps, SearchModalProps, SearchModalProvider, SearchModalProviderProps, SearchModalValue, SearchPage, SearchType, SearchTypeAccordionProps, SearchTypeProps, SearchTypeTabsProps, SidebarSearch, SidebarSearchModal, SidebarSearchModalProps, SidebarSearchProps, searchPlugin as plugin, searchPlugin, useSearchModal };
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": "1.3.6",
4
+ "version": "1.4.0-next.1",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -32,14 +32,14 @@
32
32
  "clean": "backstage-cli package clean"
33
33
  },
34
34
  "dependencies": {
35
- "@backstage/catalog-model": "^1.4.1",
36
- "@backstage/config": "^1.0.8",
37
- "@backstage/core-components": "^0.13.4",
38
- "@backstage/core-plugin-api": "^1.5.3",
35
+ "@backstage/catalog-model": "^1.4.2-next.0",
36
+ "@backstage/config": "^1.1.0-next.0",
37
+ "@backstage/core-components": "^0.13.5-next.1",
38
+ "@backstage/core-plugin-api": "^1.6.0-next.1",
39
39
  "@backstage/errors": "^1.2.1",
40
- "@backstage/plugin-catalog-react": "^1.8.3",
41
- "@backstage/plugin-search-common": "^1.2.5",
42
- "@backstage/plugin-search-react": "^1.6.4",
40
+ "@backstage/plugin-catalog-react": "^1.8.4-next.1",
41
+ "@backstage/plugin-search-common": "^1.2.6-next.0",
42
+ "@backstage/plugin-search-react": "^1.7.0-next.1",
43
43
  "@backstage/theme": "^0.4.1",
44
44
  "@backstage/types": "^1.1.0",
45
45
  "@backstage/version-bridge": "^1.0.4",
@@ -56,10 +56,10 @@
56
56
  "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@backstage/cli": "^0.22.12",
60
- "@backstage/core-app-api": "^1.9.1",
61
- "@backstage/dev-utils": "^1.0.20",
62
- "@backstage/test-utils": "^1.4.2",
59
+ "@backstage/cli": "^0.22.13-next.1",
60
+ "@backstage/core-app-api": "^1.10.0-next.1",
61
+ "@backstage/dev-utils": "^1.0.21-next.1",
62
+ "@backstage/test-utils": "^1.4.3-next.1",
63
63
  "@testing-library/dom": "^8.0.0",
64
64
  "@testing-library/jest-dom": "^5.10.1",
65
65
  "@testing-library/react": "^12.1.3",
@@ -70,7 +70,9 @@
70
70
  "msw": "^1.0.0"
71
71
  },
72
72
  "files": [
73
- "dist"
73
+ "dist",
74
+ "config.d.ts"
74
75
  ],
76
+ "configSchema": "config.d.ts",
75
77
  "module": "./dist/index.esm.js"
76
78
  }