@backstage/plugin-search-react 1.8.5-next.0 → 1.8.6-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 +27 -0
- package/dist/alpha/blueprints/SearchFilterBlueprint.esm.js +22 -0
- package/dist/alpha/blueprints/SearchFilterBlueprint.esm.js.map +1 -0
- package/dist/alpha/blueprints/SearchFilterResultTypeBlueprint.esm.js +24 -0
- package/dist/alpha/blueprints/SearchFilterResultTypeBlueprint.esm.js.map +1 -0
- package/dist/alpha/blueprints/types.esm.js +3 -1
- package/dist/alpha/blueprints/types.esm.js.map +1 -1
- package/dist/alpha.d.ts +70 -1
- package/dist/alpha.esm.js +2 -0
- package/dist/alpha.esm.js.map +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @backstage/plugin-search-react
|
|
2
2
|
|
|
3
|
+
## 1.8.6-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 63e1012: Added new extension points to extend search filters `SearchFilterBlueprint` and `SearchFilterResultTypeBlueprint`
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/frontend-plugin-api@0.9.5-next.0
|
|
10
|
+
- @backstage/core-components@0.16.3
|
|
11
|
+
- @backstage/core-plugin-api@1.10.3
|
|
12
|
+
- @backstage/theme@0.6.3
|
|
13
|
+
- @backstage/types@1.2.1
|
|
14
|
+
- @backstage/version-bridge@1.0.10
|
|
15
|
+
- @backstage/plugin-search-common@1.2.17
|
|
16
|
+
|
|
17
|
+
## 1.8.5
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @backstage/frontend-plugin-api@0.9.4
|
|
23
|
+
- @backstage/core-plugin-api@1.10.3
|
|
24
|
+
- @backstage/types@1.2.1
|
|
25
|
+
- @backstage/core-components@0.16.3
|
|
26
|
+
- @backstage/theme@0.6.3
|
|
27
|
+
- @backstage/version-bridge@1.0.10
|
|
28
|
+
- @backstage/plugin-search-common@1.2.17
|
|
29
|
+
|
|
3
30
|
## 1.8.5-next.0
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
|
2
|
+
import { searchFilterDataRef } from './types.esm.js';
|
|
3
|
+
|
|
4
|
+
const SearchFilterBlueprint = createExtensionBlueprint({
|
|
5
|
+
kind: "search-filter",
|
|
6
|
+
attachTo: {
|
|
7
|
+
id: "page:search",
|
|
8
|
+
input: "searchFilters"
|
|
9
|
+
},
|
|
10
|
+
output: [searchFilterDataRef],
|
|
11
|
+
dataRefs: {
|
|
12
|
+
searchFilters: searchFilterDataRef
|
|
13
|
+
},
|
|
14
|
+
*factory(params) {
|
|
15
|
+
yield searchFilterDataRef({
|
|
16
|
+
component: params.component
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export { SearchFilterBlueprint };
|
|
22
|
+
//# sourceMappingURL=SearchFilterBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchFilterBlueprint.esm.js","sources":["../../../src/alpha/blueprints/SearchFilterBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 { createExtensionBlueprint } from '@backstage/frontend-plugin-api';\nimport { searchFilterDataRef, SearchFilterExtensionComponent } from './types';\n\n/** @alpha */\nexport interface SearchFilterBlueprintParams {\n component: SearchFilterExtensionComponent;\n}\n\n/**\n * @alpha\n */\nexport const SearchFilterBlueprint = createExtensionBlueprint({\n kind: 'search-filter',\n attachTo: {\n id: 'page:search',\n input: 'searchFilters',\n },\n output: [searchFilterDataRef],\n dataRefs: {\n searchFilters: searchFilterDataRef,\n },\n *factory(params: SearchFilterBlueprintParams) {\n yield searchFilterDataRef({\n component: params.component,\n });\n },\n});\n"],"names":[],"mappings":";;;AA2BO,MAAM,wBAAwB,wBAAyB,CAAA;AAAA,EAC5D,IAAM,EAAA,eAAA;AAAA,EACN,QAAU,EAAA;AAAA,IACR,EAAI,EAAA,aAAA;AAAA,IACJ,KAAO,EAAA;AAAA,GACT;AAAA,EACA,MAAA,EAAQ,CAAC,mBAAmB,CAAA;AAAA,EAC5B,QAAU,EAAA;AAAA,IACR,aAAe,EAAA;AAAA,GACjB;AAAA,EACA,CAAC,QAAQ,MAAqC,EAAA;AAC5C,IAAA,MAAM,mBAAoB,CAAA;AAAA,MACxB,WAAW,MAAO,CAAA;AAAA,KACnB,CAAA;AAAA;AAEL,CAAC;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
|
2
|
+
import { searchResultTypeDataRef } from './types.esm.js';
|
|
3
|
+
|
|
4
|
+
const SearchFilterResultTypeBlueprint = createExtensionBlueprint({
|
|
5
|
+
kind: "search-filter-result-type",
|
|
6
|
+
attachTo: {
|
|
7
|
+
id: "page:search",
|
|
8
|
+
input: "resultTypes"
|
|
9
|
+
},
|
|
10
|
+
output: [searchResultTypeDataRef],
|
|
11
|
+
dataRefs: {
|
|
12
|
+
resultType: searchResultTypeDataRef
|
|
13
|
+
},
|
|
14
|
+
*factory(params) {
|
|
15
|
+
yield searchResultTypeDataRef({
|
|
16
|
+
value: params.value,
|
|
17
|
+
name: params.name,
|
|
18
|
+
icon: params.icon
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export { SearchFilterResultTypeBlueprint };
|
|
24
|
+
//# sourceMappingURL=SearchFilterResultTypeBlueprint.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchFilterResultTypeBlueprint.esm.js","sources":["../../../src/alpha/blueprints/SearchFilterResultTypeBlueprint.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 { createExtensionBlueprint } from '@backstage/frontend-plugin-api';\nimport { searchResultTypeDataRef } from './types';\n\n/** @alpha */\nexport interface SearchFilterResultTypeBlueprintParams {\n /**\n * The value of the result type.\n */\n value: string;\n /**\n * The name of the result type.\n */\n name: string;\n /**\n * The icon of the result type.\n */\n icon: JSX.Element;\n}\n\n/**\n * @alpha\n */\nexport const SearchFilterResultTypeBlueprint = createExtensionBlueprint({\n kind: 'search-filter-result-type',\n attachTo: {\n id: 'page:search',\n input: 'resultTypes',\n },\n output: [searchResultTypeDataRef],\n dataRefs: {\n resultType: searchResultTypeDataRef,\n },\n *factory(params: SearchFilterResultTypeBlueprintParams) {\n yield searchResultTypeDataRef({\n value: params.value,\n name: params.name,\n icon: params.icon,\n });\n },\n});\n"],"names":[],"mappings":";;;AAsCO,MAAM,kCAAkC,wBAAyB,CAAA;AAAA,EACtE,IAAM,EAAA,2BAAA;AAAA,EACN,QAAU,EAAA;AAAA,IACR,EAAI,EAAA,aAAA;AAAA,IACJ,KAAO,EAAA;AAAA,GACT;AAAA,EACA,MAAA,EAAQ,CAAC,uBAAuB,CAAA;AAAA,EAChC,QAAU,EAAA;AAAA,IACR,UAAY,EAAA;AAAA,GACd;AAAA,EACA,CAAC,QAAQ,MAA+C,EAAA;AACtD,IAAA,MAAM,uBAAwB,CAAA;AAAA,MAC5B,OAAO,MAAO,CAAA,KAAA;AAAA,MACd,MAAM,MAAO,CAAA,IAAA;AAAA,MACb,MAAM,MAAO,CAAA;AAAA,KACd,CAAA;AAAA;AAEL,CAAC;;;;"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { createExtensionDataRef } from '@backstage/frontend-plugin-api';
|
|
2
2
|
|
|
3
3
|
const searchResultListItemDataRef = createExtensionDataRef().with({ id: "search.search-result-list-item.item" });
|
|
4
|
+
const searchResultTypeDataRef = createExtensionDataRef().with({ id: "search.filters.result-types.type" });
|
|
5
|
+
const searchFilterDataRef = createExtensionDataRef().with({ id: "search.filters.filter" });
|
|
4
6
|
|
|
5
|
-
export { searchResultListItemDataRef };
|
|
7
|
+
export { searchFilterDataRef, searchResultListItemDataRef, searchResultTypeDataRef };
|
|
6
8
|
//# sourceMappingURL=types.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.esm.js","sources":["../../../src/alpha/blueprints/types.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { ListItemProps } from '@material-ui/core/ListItem';\nimport { SearchDocument, SearchResult } from '@backstage/plugin-search-common';\nimport { createExtensionDataRef } from '@backstage/frontend-plugin-api';\n\n/** @alpha */\nexport type BaseSearchResultListItemProps<T = {}> = T & {\n rank?: number;\n result?: SearchDocument;\n} & Omit<ListItemProps, 'button'>;\n\n/** @alpha */\nexport type SearchResultItemExtensionComponent = <\n P extends BaseSearchResultListItemProps,\n>(\n props: P,\n) => JSX.Element | null;\n\n/** @alpha */\nexport type SearchResultItemExtensionPredicate = (\n result: SearchResult,\n) => boolean;\n\nexport const searchResultListItemDataRef = createExtensionDataRef<{\n predicate?: SearchResultItemExtensionPredicate;\n component: SearchResultItemExtensionComponent;\n}>().with({ id: 'search.search-result-list-item.item' });\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.esm.js","sources":["../../../src/alpha/blueprints/types.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { ListItemProps } from '@material-ui/core/ListItem';\nimport { SearchDocument, SearchResult } from '@backstage/plugin-search-common';\nimport { createExtensionDataRef } from '@backstage/frontend-plugin-api';\n\n/** @alpha */\nexport type BaseSearchResultListItemProps<T = {}> = T & {\n rank?: number;\n result?: SearchDocument;\n} & Omit<ListItemProps, 'button'>;\n\n/** @alpha */\nexport type SearchResultItemExtensionComponent = <\n P extends BaseSearchResultListItemProps,\n>(\n props: P,\n) => JSX.Element | null;\n\n/** @alpha */\nexport type SearchResultItemExtensionPredicate = (\n result: SearchResult,\n) => boolean;\n\n/** @alpha */\nexport const searchResultListItemDataRef = createExtensionDataRef<{\n predicate?: SearchResultItemExtensionPredicate;\n component: SearchResultItemExtensionComponent;\n}>().with({ id: 'search.search-result-list-item.item' });\n\n/** @alpha */\nexport const searchResultTypeDataRef = createExtensionDataRef<{\n value: string;\n name: string;\n icon: JSX.Element;\n}>().with({ id: 'search.filters.result-types.type' });\n\n/** @alpha */\nexport type SearchFilterExtensionComponentProps = {\n className: string;\n};\n\n/** @alpha */\nexport type SearchFilterExtensionComponent = (\n props: SearchFilterExtensionComponentProps,\n) => JSX.Element;\n\n/** @alpha */\nexport const searchFilterDataRef = createExtensionDataRef<{\n component: SearchFilterExtensionComponent;\n}>().with({ id: 'search.filters.filter' });\n"],"names":[],"mappings":";;AAuCO,MAAM,8BAA8B,sBAGxC,EAAA,CAAE,KAAK,EAAE,EAAA,EAAI,uCAAuC;AAGhD,MAAM,0BAA0B,sBAIpC,EAAA,CAAE,KAAK,EAAE,EAAA,EAAI,oCAAoC;AAa7C,MAAM,sBAAsB,sBAEhC,EAAA,CAAE,KAAK,EAAE,EAAA,EAAI,yBAAyB;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -12,6 +12,12 @@ type BaseSearchResultListItemProps<T = {}> = T & {
|
|
|
12
12
|
type SearchResultItemExtensionComponent = <P extends BaseSearchResultListItemProps>(props: P) => JSX.Element | null;
|
|
13
13
|
/** @alpha */
|
|
14
14
|
type SearchResultItemExtensionPredicate = (result: SearchResult) => boolean;
|
|
15
|
+
/** @alpha */
|
|
16
|
+
type SearchFilterExtensionComponentProps = {
|
|
17
|
+
className: string;
|
|
18
|
+
};
|
|
19
|
+
/** @alpha */
|
|
20
|
+
type SearchFilterExtensionComponent = (props: SearchFilterExtensionComponentProps) => JSX.Element;
|
|
15
21
|
|
|
16
22
|
/** @alpha */
|
|
17
23
|
interface SearchResultListItemBlueprintParams {
|
|
@@ -56,4 +62,67 @@ declare const SearchResultListItemBlueprint: _backstage_frontend_plugin_api.Exte
|
|
|
56
62
|
};
|
|
57
63
|
}>;
|
|
58
64
|
|
|
59
|
-
|
|
65
|
+
/** @alpha */
|
|
66
|
+
interface SearchFilterResultTypeBlueprintParams {
|
|
67
|
+
/**
|
|
68
|
+
* The value of the result type.
|
|
69
|
+
*/
|
|
70
|
+
value: string;
|
|
71
|
+
/**
|
|
72
|
+
* The name of the result type.
|
|
73
|
+
*/
|
|
74
|
+
name: string;
|
|
75
|
+
/**
|
|
76
|
+
* The icon of the result type.
|
|
77
|
+
*/
|
|
78
|
+
icon: JSX.Element;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @alpha
|
|
82
|
+
*/
|
|
83
|
+
declare const SearchFilterResultTypeBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
84
|
+
kind: "search-filter-result-type";
|
|
85
|
+
name: undefined;
|
|
86
|
+
params: SearchFilterResultTypeBlueprintParams;
|
|
87
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
88
|
+
value: string;
|
|
89
|
+
name: string;
|
|
90
|
+
icon: JSX.Element;
|
|
91
|
+
}, "search.filters.result-types.type", {}>;
|
|
92
|
+
inputs: {};
|
|
93
|
+
config: {};
|
|
94
|
+
configInput: {};
|
|
95
|
+
dataRefs: {
|
|
96
|
+
resultType: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
97
|
+
value: string;
|
|
98
|
+
name: string;
|
|
99
|
+
icon: JSX.Element;
|
|
100
|
+
}, "search.filters.result-types.type", {}>;
|
|
101
|
+
};
|
|
102
|
+
}>;
|
|
103
|
+
|
|
104
|
+
/** @alpha */
|
|
105
|
+
interface SearchFilterBlueprintParams {
|
|
106
|
+
component: SearchFilterExtensionComponent;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @alpha
|
|
110
|
+
*/
|
|
111
|
+
declare const SearchFilterBlueprint: _backstage_frontend_plugin_api.ExtensionBlueprint<{
|
|
112
|
+
kind: "search-filter";
|
|
113
|
+
name: undefined;
|
|
114
|
+
params: SearchFilterBlueprintParams;
|
|
115
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
116
|
+
component: SearchFilterExtensionComponent;
|
|
117
|
+
}, "search.filters.filter", {}>;
|
|
118
|
+
inputs: {};
|
|
119
|
+
config: {};
|
|
120
|
+
configInput: {};
|
|
121
|
+
dataRefs: {
|
|
122
|
+
searchFilters: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<{
|
|
123
|
+
component: SearchFilterExtensionComponent;
|
|
124
|
+
}, "search.filters.filter", {}>;
|
|
125
|
+
};
|
|
126
|
+
}>;
|
|
127
|
+
|
|
128
|
+
export { type BaseSearchResultListItemProps, SearchFilterBlueprint, type SearchFilterBlueprintParams, type SearchFilterExtensionComponent, type SearchFilterExtensionComponentProps, SearchFilterResultTypeBlueprint, type SearchFilterResultTypeBlueprintParams, type SearchResultItemExtensionComponent, type SearchResultItemExtensionPredicate, SearchResultListItemBlueprint, type SearchResultListItemBlueprintParams };
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { SearchResultListItemBlueprint } from './alpha/blueprints/SearchResultListItemBlueprint.esm.js';
|
|
2
|
+
export { SearchFilterResultTypeBlueprint } from './alpha/blueprints/SearchFilterResultTypeBlueprint.esm.js';
|
|
3
|
+
export { SearchFilterBlueprint } from './alpha/blueprints/SearchFilterBlueprint.esm.js';
|
|
2
4
|
//# sourceMappingURL=alpha.esm.js.map
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-search-react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.6-next.0",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "web-library",
|
|
6
6
|
"pluginId": "search",
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"test": "backstage-cli package test"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@backstage/core-components": "0.16.3
|
|
68
|
-
"@backstage/core-plugin-api": "1.10.3
|
|
69
|
-
"@backstage/frontend-plugin-api": "0.9.
|
|
70
|
-
"@backstage/plugin-search-common": "1.2.17
|
|
67
|
+
"@backstage/core-components": "0.16.3",
|
|
68
|
+
"@backstage/core-plugin-api": "1.10.3",
|
|
69
|
+
"@backstage/frontend-plugin-api": "0.9.5-next.0",
|
|
70
|
+
"@backstage/plugin-search-common": "1.2.17",
|
|
71
71
|
"@backstage/theme": "0.6.3",
|
|
72
|
-
"@backstage/types": "1.2.1
|
|
72
|
+
"@backstage/types": "1.2.1",
|
|
73
73
|
"@backstage/version-bridge": "1.0.10",
|
|
74
74
|
"@material-ui/core": "^4.12.2",
|
|
75
75
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"uuid": "^11.0.2"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@backstage/cli": "0.
|
|
84
|
-
"@backstage/core-app-api": "1.15.4
|
|
85
|
-
"@backstage/frontend-app-api": "0.10.
|
|
86
|
-
"@backstage/frontend-test-utils": "0.2.
|
|
87
|
-
"@backstage/test-utils": "1.7.4
|
|
83
|
+
"@backstage/cli": "0.30.0-next.0",
|
|
84
|
+
"@backstage/core-app-api": "1.15.4",
|
|
85
|
+
"@backstage/frontend-app-api": "0.10.5-next.0",
|
|
86
|
+
"@backstage/frontend-test-utils": "0.2.6-next.0",
|
|
87
|
+
"@backstage/test-utils": "1.7.4",
|
|
88
88
|
"@testing-library/dom": "^10.0.0",
|
|
89
89
|
"@testing-library/jest-dom": "^6.0.0",
|
|
90
90
|
"@testing-library/react": "^16.0.0",
|