@backstage/plugin-search-common 0.3.3 → 0.3.5-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 +23 -0
- package/dist/index.d.ts +26 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @backstage/plugin-search-common
|
|
2
2
|
|
|
3
|
+
## 0.3.5-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/plugin-permission-common@0.6.2-next.0
|
|
9
|
+
|
|
10
|
+
## 0.3.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 3a74e203a8: Support generating highlighted matched terms in search result data
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @backstage/plugin-permission-common@0.6.1
|
|
17
|
+
|
|
18
|
+
## 0.3.4-next.0
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 3a74e203a8: Support generating highlighted matched terms in search result data
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @backstage/plugin-permission-common@0.6.1-next.0
|
|
25
|
+
|
|
3
26
|
## 0.3.3
|
|
4
27
|
|
|
5
28
|
### 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
|
|
@@ -83,7 +107,7 @@ declare type IndexableDocument = SearchDocument & {
|
|
|
83
107
|
};
|
|
84
108
|
/**
|
|
85
109
|
* Information about a specific document type. Intended to be used in the
|
|
86
|
-
* {@link @backstage/search-backend-node#IndexBuilder} to collect information
|
|
110
|
+
* {@link @backstage/plugin-search-backend-node#IndexBuilder} to collect information
|
|
87
111
|
* about the types stored in the index.
|
|
88
112
|
* @beta
|
|
89
113
|
*/
|
|
@@ -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.5-next.0",
|
|
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.0",
|
|
42
|
+
"@backstage/plugin-permission-common": "^0.6.2-next.0",
|
|
43
43
|
"@backstage/types": "^1.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@backstage/cli": "^0.17.
|
|
46
|
+
"@backstage/cli": "^0.17.2-next.1"
|
|
47
47
|
},
|
|
48
48
|
"jest": {
|
|
49
49
|
"roots": [
|
|
50
50
|
".."
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "e15c24ddb5d14034629ced8a5a5d8f12b8f1a7dd"
|
|
54
54
|
}
|