API reference
@searsuite/sear-plugin-cell-highlight
Conditional cell highlight rules, sparse range state, commands, and rendering contributions.
24 exportsderived from source
- classCellHighlightMatrixsource ↗
-
class CellHighlightMatrix extends CSRMatrix<CellHighlightRule[] | null>Sparse rule anchors; the range index avoids scanning all rules for every visible cell.
constructorconstructor CellHighlightMatrix(data?: CellHighlightMatrixData, shape?: [number, number]): CellHighlightMatrixdata: CellHighlightMatrixDatashape: [number, number]
methodaddItem addItem(row: number, column: number, rules: CellHighlightRule[] | null): thisAdds an item to the matrix at the specified row and column.
ReturnsThe current instance for chaining.
row: numberThe row index.
column: numberrules: CellHighlightRule[] | null
methodclone clone(): thisCreates an independent copy of this value and its mutable data.
methodfindRules findRules(row: number, column: number): PositionedCellHighlightRule[]row: numbercolumn: number
methodforEachStored forEachStored(callback: (rules: CellHighlightRule[] | null, row: number, column: number): void): voidVisits only stored anchors even when the sheet has many empty rows.
callback: (rules: CellHighlightRule[] | null, row: number, column: number): void
methodgetItem getItem(row: number, column: number): CellHighlightRule[] | nullRetrieves an item from the matrix at the specified row and column.
ReturnsThe item at the specified position or null if not present.
row: numberThe row index.
column: number
methodgetRules getRules(): PositionedCellHighlightRule[]methodreplaceRules replaceRules(entries: readonly PositionedCellHighlightRule[]): voidentries: readonly PositionedCellHighlightRule[]
methodsetItem setItem(row: number, column: number, rules: CellHighlightRule[] | null): thisrow: numbercolumn: numberrules: CellHighlightRule[] | null
Inherited members 31
Inherited from CSRMatrix.
- name
- ndim
- nnz
- shape
- addColumn
- addListener
- addRow
- cloneCommittedView
- cloneDetached
- cloneForStaging
- deleteColumns
- deleteRows
- dispatch
- dot
- forEach
- forEachStoredInRange
- forEachStoredInRow
- fromDense
- getCol
- getDefaultValue
- getRow
- lockMutations
- multiply
- removeItem
- removeListener
- setDefaultValue
- sum
- swapColumn
- swapRow
- toArray
- transpose
- classSheetCellHighlightPluginsource ↗
-
class SheetCellHighlightPlugin extends Plugin<unknown, CellProperties, SheetCellHighlightPluginState>Base contract implemented by sheet and document plugins.
Plugins own their state, declare lifecycle hooks, transform transactions into state, and render scene nodes for their host core. Runtime packages should extend this contract rather than reaching into Core internals.
constructorconstructor SheetCellHighlightPlugin(state: SheetCellHighlightPluginState, dependencies: CellHighlightDependencies): SheetCellHighlightPluginstate: SheetCellHighlightPluginStatedependencies: CellHighlightDependencies
propertydocumentState readonly documentState: PluginDocumentStateContribution<SheetCellHighlightPluginState, SheetCellHighlightPluginState>Document-state export modules owned by this plugin state.
propertyinterestedIn interestedIn: MatrixOTActionName[]Declares which Sheet OT action names this plugin is interested in. The engine will only call
applywhen a transaction contains at least one operation matching these action names, unless the transaction is owned by this plugin.['uc', 'rr', 'rc']— only called for UpdateCell, ResizeRow, ResizeCol['*']— called for any transaction (wildcard)[]— only called for this plugin's own transactions
propertytransactionOT readonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }Shared transaction algebra used by history and collaboration.
propertywarnOnDuplicateDepth readonly warnOnDuplicateDepth: falseWhether PluginManager should warn when another ordered plugin shares this depth.
propertydocumentStatestatic readonly documentState: PluginDocumentStateContribution<SheetCellHighlightPluginState, SheetCellHighlightPluginState>propertypluginKeystatic readonly pluginKey: PluginKeypropertysymbolstatic readonly symbol: typeof symbolmethodapply apply(state: SheetCellHighlightPluginState, transaction: Transaction): SheetCellHighlightPluginState | nullApplies a transaction to plugin-owned state and returns the next state.
state: SheetCellHighlightPluginStatetransaction: Transaction
methoddispose dispose(): voidmethodgetPluginConfig getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
methodinvalidateRangeStatistics invalidateRangeStatistics(cells?: readonly SheetDisplayedValueCoordinate[]): voidInvalidates derived range statistics after displayed values change.
cells: readonly SheetDisplayedValueCoordinate[]
methodregisterCellVisualReaders registerCellVisualReaders(registry: SheetCellVisualReaderRegistry): voidregistry: SheetCellVisualReaderRegistry
methodregisterCommands registerCommands(commands: SheetCommandBus): voidcommands: SheetCommandBus
methodregisterQueries registerQueries(queries: SheetQueryRegistry): voidqueries: SheetQueryRegistry
methodregisterRangeMoves registerRangeMoves(registry: SheetRangeMoveRegistry): voidregistry: SheetRangeMoveRegistry
methodregisterState registerState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): CellHighlightMatrix; viewKey: string }[] }; key: PluginKey; state: SheetCellHighlightPluginState }Registers one or more plugin-owned state records with the host manager.
methodrender render(): Node<CellProperties>[]Produces scene nodes owned by this plugin for the current core state.
Inherited members 26
Inherited from Plugin.
- depth
- pluginKey
- transactionHistory
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceAddCellHighlightRuleInputsource ↗
-
interface AddCellHighlightRuleInput extends SheetRangeInputCommon range input accepted by explicit range commands.
- interfaceCellHighlightConditionsource ↗
-
interface CellHighlightConditionpropertycount readonly count?: numberpropertyincludeEqual readonly includeEqual?: booleanpropertykind readonly kind: CellHighlightKindpropertyoperator readonly operator?: CellHighlightValueOperator | CellHighlightTextOperatorpropertypercent readonly percent?: booleanpropertysecondValue readonly secondValue?: stringpropertyvalue readonly value?: string - interfaceCellHighlightRulesource ↗
-
interface CellHighlightRuleOne conditional rule stored at its range's top-left matrix cell.
- interfacePositionedCellHighlightRulesource ↗
-
interface PositionedCellHighlightRule - interfaceSheetCellHighlightPluginStatesource ↗
-
interface SheetCellHighlightPluginStatepropertycellHighlights readonly cellHighlights: CellHighlightMatrix - typeCellHighlightKindsource ↗
-
type CellHighlightKind = typeof CellHighlightKind[keyof typeof CellHighlightKind] - typeCellHighlightNumericRangeReadersource ↗
-
type CellHighlightNumericRangeReader = (startRow: number, startColumn: number, endRow: number, endColumn: number, visit: (value: number): void): void - typeCellHighlightStylesource ↗
-
type CellHighlightStyle = typeof CellHighlightStyle[keyof typeof CellHighlightStyle] - typeCellHighlightTextOperatorsource ↗
-
type CellHighlightTextOperator = typeof CellHighlightTextOperator[keyof typeof CellHighlightTextOperator] - typeCellHighlightValueOperatorsource ↗
-
type CellHighlightValueOperator = typeof CellHighlightValueOperator[keyof typeof CellHighlightValueOperator] - typeCellHighlightValueRangeReadersource ↗
-
type CellHighlightValueRangeReader = (startRow: number, startColumn: number, endRow: number, endColumn: number, visit: (value: unknown): void): void - typeCellHighlightValueReadersource ↗
-
type CellHighlightValueReader = (row: number, column: number): unknown - variableAddCellHighlightRuleCommandsource ↗
-
AddCellHighlightRuleCommand: SheetCommandDefinition<AddCellHighlightRuleInput, SheetCommandResult> - variableCellHighlightKindsource ↗
-
CellHighlightKind: { AboveAverage: "aboveAverage"; BelowAverage: "belowAverage"; Bottom: "bottom"; Duplicate: "duplicate"; Empty: "empty"; Error: "error"; NotEmpty: "notEmpty"; NotError: "notError"; … } - variableCellHighlightStylesource ↗
-
CellHighlightStyle: { GreenFill: "greenFill"; RedBorder: "redBorder"; RedFill: "redFill"; RedText: "redText"; YellowFill: "yellowFill" } - variableCellHighlightTextOperatorsource ↗
-
CellHighlightTextOperator: { Contains: "contains"; EndsWith: "endsWith"; NotContains: "notContains"; StartsWith: "startsWith" } - variableCellHighlightValueOperatorsource ↗
-
CellHighlightValueOperator: { Between: "between"; Equal: "equal"; Greater: "greater"; GreaterOrEqual: "greaterOrEqual"; Less: "less"; LessOrEqual: "lessOrEqual"; NotBetween: "notBetween"; NotEqual: "notEqual" } - variableClearCellHighlightRulesCommandsource ↗
-
ClearCellHighlightRulesCommand: SheetCommandDefinition<ClearCellHighlightRulesInput, SheetCommandResult> - variableReadCellHighlightRulesQuerysource ↗
-
ReadCellHighlightRulesQuery: SheetQueryDefinition<void, readonly PositionedCellHighlightRule[]> - variableRemoveCellHighlightRuleCommandsource ↗
-
RemoveCellHighlightRuleCommand: SheetCommandDefinition<RemoveCellHighlightRuleInput, SheetCommandResult> - variableSheetCellHighlightFieldKeysource ↗
-
SheetCellHighlightFieldKey: "sheet.cellHighlight" - functionreadSheetCellHighlightssource ↗
-
readSheetCellHighlights(dataEngine: DataEngine): CellHighlightMatrix | nulldataEngine: DataEngine
No public exports match that search.