FUnitComparison
A prepared semantic comparison that can be filtered and paged without rerunning product algorithms.
Access
Access through:
Setup
If your preset includes @univerjs-pro/edit-history, its Facade API is available when the editor starts. For individual plugin registration, import @univerjs-pro/edit-history/facade. Additional methods below require their listed plugin packages. See Facade setup.
@univerjs-pro/edit-history
FUnitComparison.query
Filters and pages this prepared comparison.
Product views can be discovered from query().scopes, then passed back through query.scope to request
only the selected worksheet, slide, Base table, or Board page without rerunning the comparison algorithm.
query(query?: IUnitComparisonQuery): IUnitComparisonResultParameters
query— Optional. Optional scope, filters, result detail, and independent item/context pagination.
Returns
A versioned, serializable comparison result.
Examples
const comparison = univerAPI.prepareUnitComparison(input)const overview = comparison.query({ detail: UnitComparisonDetailLevel.SUMMARY })const firstScope = overview.scopes[0]const items = firstScope === undefined ? overview.items : comparison.query({ scope: firstScope, limit: 1000 }).itemsTypes: IUnitComparisonResult · IUnitComparisonQuery
Package: @univerjs-pro/edit-history · Type definitions
How is this guide?