@backstage/plugin-search-common
Advanced tools
Comparing version 0.0.0-nightly-20220419024359 to 0.0.0-nightly-20220510022953
# @backstage/plugin-search-common | ||
## 0.0.0-nightly-20220419024359 | ||
## 0.0.0-nightly-20220510022953 | ||
### Patch Changes | ||
- 3a74e203a8: Support generating highlighted matched terms in search result data | ||
## 0.3.3 | ||
### Patch Changes | ||
- 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. | ||
@@ -11,3 +17,3 @@ - `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. | ||
- Updated dependencies | ||
- @backstage/plugin-permission-common@0.0.0-nightly-20220419024359 | ||
- @backstage/plugin-permission-common@0.6.0 | ||
@@ -14,0 +20,0 @@ ## 0.3.3-next.1 |
@@ -17,6 +17,30 @@ /// <reference types="node" /> | ||
* @beta | ||
* Metadata for result relevant document fields with matched terms highlighted | ||
* via wrapping in associated pre/post tags. The UI is expected to parse these | ||
* field excerpts by replacing wrapping tags with applicable UI elements for rendering. | ||
*/ | ||
interface ResultHighlight { | ||
/** | ||
* Prefix tag for wrapping terms to be highlighted. | ||
*/ | ||
preTag: string; | ||
/** | ||
* Postfix tag for wrapping terms to be highlighted. | ||
*/ | ||
postTag: string; | ||
fields: { | ||
/** | ||
* Matched document fields and associated excerpts containing highlighted | ||
* terms wrapped in preTag and postTag to be parsed and rendered in the UI. | ||
*/ | ||
[field: string]: string; | ||
}; | ||
} | ||
/** | ||
* @beta | ||
*/ | ||
interface Result<TDocument extends SearchDocument> { | ||
type: string; | ||
document: TDocument; | ||
highlight?: ResultHighlight; | ||
} | ||
@@ -174,2 +198,2 @@ /** | ||
export { DocumentCollatorFactory, DocumentDecoratorFactory, DocumentTypeInfo, IndexableDocument, IndexableResult, IndexableResultSet, QueryRequestOptions, QueryTranslator, Result, ResultSet, SearchDocument, SearchEngine, SearchQuery, SearchResult, SearchResultSet }; | ||
export { DocumentCollatorFactory, DocumentDecoratorFactory, DocumentTypeInfo, IndexableDocument, IndexableResult, IndexableResultSet, QueryRequestOptions, QueryTranslator, Result, ResultHighlight, ResultSet, SearchDocument, SearchEngine, SearchQuery, SearchResult, SearchResultSet }; |
{ | ||
"name": "@backstage/plugin-search-common", | ||
"description": "Common functionalities for Search, to be shared between various search-enabled plugins", | ||
"version": "0.0.0-nightly-20220419024359", | ||
"version": "0.0.0-nightly-20220510022953", | ||
"main": "dist/index.cjs.js", | ||
@@ -43,6 +43,6 @@ "types": "dist/index.d.ts", | ||
"@backstage/types": "^1.0.0", | ||
"@backstage/plugin-permission-common": "^0.0.0-nightly-20220419024359" | ||
"@backstage/plugin-permission-common": "^0.6.0" | ||
}, | ||
"devDependencies": { | ||
"@backstage/cli": "^0.0.0-nightly-20220419024359" | ||
"@backstage/cli": "^0.0.0-nightly-20220510022953" | ||
}, | ||
@@ -49,0 +49,0 @@ "jest": { |
14837
199
+ Added@backstage/config@1.3.2(transitive)
+ Added@backstage/errors@1.2.7(transitive)
+ Added@backstage/plugin-permission-common@0.6.4(transitive)
+ Addedcross-fetch@3.2.0(transitive)
+ Addeduuid@8.3.2(transitive)
- Removed@backstage/config@0.0.0-nightly-20250114022708(transitive)
- Removed@backstage/errors@0.0.0-nightly-20250114022708(transitive)
- Removed@backstage/plugin-permission-common@0.0.0-nightly-20250114022708(transitive)
- Removed@backstage/types@0.0.0-nightly-20250114022708(transitive)
- Removedcross-fetch@4.1.0(transitive)
- Removeduuid@11.0.5(transitive)
- Removedzod-to-json-schema@3.24.1(transitive)