@backstage/plugin-search-common 0.3.3-next.1 → 0.3.4
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 +26 -0
- package/dist/index.d.ts +25 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @backstage/plugin-search-common
|
|
2
2
|
|
|
3
|
+
## 0.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3a74e203a8: Support generating highlighted matched terms in search result data
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/plugin-permission-common@0.6.1
|
|
10
|
+
|
|
11
|
+
## 0.3.4-next.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 3a74e203a8: Support generating highlighted matched terms in search result data
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @backstage/plugin-permission-common@0.6.1-next.0
|
|
18
|
+
|
|
19
|
+
## 0.3.3
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- c8b295f2fb: - Introduce `SearchDocument` type. This type contains the subset of `IndexableDocument` properties relevant to the frontend, and is intended to be used for documents returned to the frontend from the search API.
|
|
24
|
+
- `SearchResultSet` is now a wrapper for documents of type `SearchDocument`, and is intended to be used in the frontend. This isn't a breaking change, since `IndexableDocument`s are valid `SearchDocument`s, so the old and new types are compatible.
|
|
25
|
+
- Introduce `IndexableResultSet` type, which wraps `IndexableDocument` instances in the same way as `SearchResultSet`.
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
- @backstage/plugin-permission-common@0.6.0
|
|
28
|
+
|
|
3
29
|
## 0.3.3-next.1
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -12,12 +12,36 @@ interface SearchQuery {
|
|
|
12
12
|
types?: string[];
|
|
13
13
|
pageCursor?: string;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* @beta
|
|
17
|
+
* Metadata for result relevant document fields with matched terms highlighted
|
|
18
|
+
* via wrapping in associated pre/post tags. The UI is expected to parse these
|
|
19
|
+
* field excerpts by replacing wrapping tags with applicable UI elements for rendering.
|
|
20
|
+
*/
|
|
21
|
+
interface ResultHighlight {
|
|
22
|
+
/**
|
|
23
|
+
* Prefix tag for wrapping terms to be highlighted.
|
|
24
|
+
*/
|
|
25
|
+
preTag: string;
|
|
26
|
+
/**
|
|
27
|
+
* Postfix tag for wrapping terms to be highlighted.
|
|
28
|
+
*/
|
|
29
|
+
postTag: string;
|
|
30
|
+
fields: {
|
|
31
|
+
/**
|
|
32
|
+
* Matched document fields and associated excerpts containing highlighted
|
|
33
|
+
* terms wrapped in preTag and postTag to be parsed and rendered in the UI.
|
|
34
|
+
*/
|
|
35
|
+
[field: string]: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
15
38
|
/**
|
|
16
39
|
* @beta
|
|
17
40
|
*/
|
|
18
41
|
interface Result<TDocument extends SearchDocument> {
|
|
19
42
|
type: string;
|
|
20
43
|
document: TDocument;
|
|
44
|
+
highlight?: ResultHighlight;
|
|
21
45
|
}
|
|
22
46
|
/**
|
|
23
47
|
* @beta
|
|
@@ -170,4 +194,4 @@ interface SearchEngine {
|
|
|
170
194
|
query(query: SearchQuery, options?: QueryRequestOptions): Promise<IndexableResultSet>;
|
|
171
195
|
}
|
|
172
196
|
|
|
173
|
-
export { DocumentCollatorFactory, DocumentDecoratorFactory, DocumentTypeInfo, IndexableDocument, IndexableResult, IndexableResultSet, QueryRequestOptions, QueryTranslator, Result, ResultSet, SearchDocument, SearchEngine, SearchQuery, SearchResult, SearchResultSet };
|
|
197
|
+
export { DocumentCollatorFactory, DocumentDecoratorFactory, DocumentTypeInfo, IndexableDocument, IndexableResult, IndexableResultSet, QueryRequestOptions, QueryTranslator, Result, ResultHighlight, ResultSet, SearchDocument, SearchEngine, SearchQuery, SearchResult, SearchResultSet };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-search-common",
|
|
3
3
|
"description": "Common functionalities for Search, to be shared between various search-enabled plugins",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.4",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"private": false,
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"url": "https://github.com/backstage/backstage/issues"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@backstage/plugin-permission-common": "^0.6.
|
|
42
|
+
"@backstage/plugin-permission-common": "^0.6.1",
|
|
43
43
|
"@backstage/types": "^1.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@backstage/cli": "^0.17.
|
|
46
|
+
"@backstage/cli": "^0.17.1"
|
|
47
47
|
},
|
|
48
48
|
"jest": {
|
|
49
49
|
"roots": [
|
|
50
50
|
".."
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "96323f280ba32ee526c5b151cda42260aee927c9"
|
|
54
54
|
}
|