API reference
@searsuite/sear-plugin-filter
Sheet range filtering with independent rules and row visibility.
30 exportsderived from source
- classSheetFilterMatrixsource ↗
-
class SheetFilterMatrix extends CSRMatrix<SheetFilterDefinition | null>One sparse anchor holds the current range and its column rules.
constructorconstructor SheetFilterMatrix(data?: { data: SheetFilterDefinition | null[]; indices: number[]; indptr: number[] }): SheetFilterMatrixdata: { data: SheetFilterDefinition | null[]; indices: number[]; indptr: number[] }
methodaddItem addItem(row: number, column: number, value: SheetFilterDefinition | null): thisAdds an item to the matrix at the specified row and column.
ReturnsThe current instance for chaining.
row: numberThe row index.
column: numbervalue: SheetFilterDefinition | nullThe value to add.
methodclone clone(): thisCreates an independent copy of this value and its mutable data.
methodgetItem getItem(row: number, column: number): SheetFilterDefinition | 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
Inherited members 32
Inherited from CSRMatrix.
- name
- ndim
- nnz
- shape
- addColumn
- addListener
- addRow
- cloneCommittedView
- cloneDetached
- cloneForStaging
- deleteColumns
- deleteRows
- dispatch
- dot
- forEach
- forEachStored
- forEachStoredInRange
- forEachStoredInRow
- fromDense
- getCol
- getDefaultValue
- getRow
- lockMutations
- multiply
- removeItem
- removeListener
- setDefaultValue
- sum
- swapColumn
- swapRow
- toArray
- transpose
- classSheetFilterPluginsource ↗
-
class SheetFilterPlugin extends Plugin<unknown, CellProperties, SheetFilterPluginState>, SheetRowVisibilityOwns persisted filter rules and a derived, editor-local row visibility view.
constructorconstructor SheetFilterPlugin(state: SheetFilterPluginState, dependencies: SheetFilterDependencies): SheetFilterPluginstate: SheetFilterPluginStatedependencies: SheetFilterDependencies
propertydocumentState readonly documentState: PluginDocumentStateContribution<SheetFilterPluginState, SheetFilterPluginState>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<SheetFilterPluginState, SheetFilterPluginState>propertypluginKeystatic readonly pluginKey: PluginKeypropertysymbolstatic readonly symbol: typeof symbolmemberactive active: unknownmemberversion version: unknownmethodapply apply(state: SheetFilterPluginState, transaction: Transaction): SheetFilterPluginState | nullApplies a transaction to plugin-owned state and returns the next state.
state: SheetFilterPluginStatetransaction: Transaction
methoddispose dispose(): voidmethodgetPluginConfig getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
methodisRowFiltered isRowFiltered(row: number): booleanrow: number
methodonTransactionCommitted onTransactionCommitted(transaction: Transaction): voidRuns only after every step in the enclosing pipeline has succeeded and all staged plugin state has been committed. Use it for derived caches, notifications, persistence, and transport; never perform those effects in apply, because a later pipeline step may still fail.
transaction: TransactionA committed transaction from the completed pipeline.
methodregisterCommands registerCommands(commands: SheetCommandBus): voidcommands: SheetCommandBus
methodregisterQueries registerQueries(queries: SheetQueryRegistry): voidqueries: SheetQueryRegistry
methodregisterSessionState registerSessionState(registry: SessionStateRegistry): voidregistry: SessionStateRegistry
methodregisterState registerState(): { dataEngine: { dataView: { fieldKey: string; select: (): SheetRowVisibility; viewKey: string }[] }; key: PluginKey; state: SheetFilterPluginState }Registers one or more plugin-owned state records with the host manager.
methodrender render(): []Produces scene nodes owned by this plugin for the current core state.
Inherited members 25
Inherited from Plugin.
- depth
- pluginKey
- transactionHistory
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceCreateSheetFilterInputsource ↗
-
interface CreateSheetFilterInputSheet range and header policy for a new filter or private view.
propertyfirstRowIsHeader readonly firstRowIsHeader?: booleanTreat the first row as a header when true.
propertyrange readonly range: { end: readonly [number, number]; start: readonly [number, number] }Inclusive range to filter.
- interfaceReadSheetFilterValuesInputsource ↗
-
interface ReadSheetFilterValuesInputParameters for a bounded distinct-value query.
- interfaceSetSheetColumnFilterInputsource ↗
-
interface SetSheetColumnFilterInputSets or clears a predicate for one column.
- interfaceSheetFilterColumnRulesource ↗
-
interface SheetFilterColumnRuleA rule attached to one column within a filter range.
- interfaceSheetFilterDefinitionsource ↗
-
interface SheetFilterDefinitionDocument or private-session filter configuration for one sheet range.
propertyfirstRowIsHeader readonly firstRowIsHeader: booleanWhether the first row is always visible as a header.
propertyprivateView readonly privateView: booleanWhether this definition belongs to the current editor session.
propertyrange readonly range: { end: readonly [number, number]; start: readonly [number, number] }Inclusive sheet coordinates covered by the filter.
propertyrules readonly rules: readonly SheetFilterColumnRule[]Active column predicates.
- interfaceSheetFilterDependenciessource ↗
-
interface SheetFilterDependencies extends Omit<SheetFilterCommandSource, "target" | "readMatrix" | "readActiveDefinition" | "readPrivateDefinition" | "setPrivateDefinition" | "normalizeSearch">Host-neutral dependencies supplied by a Sheet composition root.
propertydataTarget readonly dataTarget?: PluginKeypropertydisplayedValueChanges readonly displayedValueChanges?: Pick<SheetDisplayedValueChanges, "subscribe">propertyinvalidateVisibilityAggregates readonly invalidateVisibilityAggregates?: (): voidpropertyparseDate readonly parseDate?: (value: unknown): number | nullpropertyplatform readonly platform: Pick<Platform, "toLowerCase">propertyreadColor readonly readColor: (row: number, column: number, property: "fill" | "textColor"): string | nullpropertyrequestRenderAll readonly requestRenderAll?: (): voidInherited members 4
- renderKeys
- forEachStoredInRange
- readShape
- readValue
- interfaceSheetFilterPluginStatesource ↗
-
interface SheetFilterPluginStatePersisted state owned by the filter plugin.
propertyfilters readonly filters: SheetFilterMatrix - interfaceSheetFilterValueCountsource ↗
-
interface SheetFilterValueCountOne distinct displayed value and its occurrence count.
- interfaceSheetFilterValuePagesource ↗
-
interface SheetFilterValuePageBounded distinct-value query result for a filter column.
- typeSheetFilterCategorysource ↗
-
type SheetFilterCategory = typeof SheetFilterCategory[keyof typeof SheetFilterCategory]A condition filter's value category.
- typeSheetFilterColorPropertysource ↗
-
type SheetFilterColorProperty = typeof SheetFilterColorProperty[keyof typeof SheetFilterColorProperty]A cell visual property used by a color filter.
- typeSheetFilterKindsource ↗
-
type SheetFilterKind = typeof SheetFilterKind[keyof typeof SheetFilterKind]Supported filter rule kinds.
- typeSheetFilterOperatorsource ↗
-
type SheetFilterOperator = typeof SheetFilterOperator[keyof typeof SheetFilterOperator]A comparison operator supported by the filter plugin.
- typeSheetFilterPredicatesource ↗
-
type SheetFilterPredicate = { excluded?: boolean; kind: typeof SheetFilterKind.Values; values: readonly string[] } | { category: SheetFilterCategory; kind: typeof SheetFilterKind.Condition; operator: SheetFilterOperator; secondValue?: string; value: string } | { color: string | null; kind: typeof SheetFilterKind.Color; property: SheetFilterColorProperty }Serializable rule used to decide whether a row remains visible.
- variableClearSheetFilterCommandsource ↗
-
ClearSheetFilterCommand: SheetCommandDefinition<void, SheetCommandResult>Clears the active filter or private view.
- variableCreateSheetFilterCommandsource ↗
-
CreateSheetFilterCommand: SheetCommandDefinition<CreateSheetFilterInput, SheetCommandResult>Creates a document-owned filter range.
- variableCreateSheetFilterViewCommandsource ↗
-
CreateSheetFilterViewCommand: SheetCommandDefinition<CreateSheetFilterInput, SheetCommandResult>Creates a session-owned filter view.
- variableReadSheetFilterQuerysource ↗
-
ReadSheetFilterQuery: SheetQueryDefinition<void, SheetFilterDefinition | null>Reads the active filter definition.
- variableReadSheetFilterValuesQuerysource ↗
-
ReadSheetFilterValuesQuery: SheetQueryDefinition<ReadSheetFilterValuesInput, SheetFilterValuePage>Reads a bounded page of distinct displayed values in one column.
- variableReapplySheetFilterCommandsource ↗
-
ReapplySheetFilterCommand: SheetCommandDefinition<void, SheetCommandResult>Recomputes visibility for the active filter.
- variableSetSheetColumnFilterCommandsource ↗
-
SetSheetColumnFilterCommand: SheetCommandDefinition<SetSheetColumnFilterInput, SheetCommandResult>Replaces or clears one column predicate.
- variableSheetFilterCategorysource ↗
-
SheetFilterCategory: { Date: "date"; Number: "number"; Text: "text" }Value categories supported by condition filters.
- variableSheetFilterColorPropertysource ↗
-
SheetFilterColorProperty: { Fill: "fill"; Text: "textColor" }Cell visual properties available to color filters.
- variableSheetFilterKindsource ↗
-
SheetFilterKind: { Color: "color"; Condition: "condition"; Values: "values" }Persisted filter modes owned by this plugin.
- variableSheetFilterOperatorsource ↗
-
SheetFilterOperator: { Between: "between"; Contains: "contains"; EndsWith: "endsWith"; Equal: "equal"; Greater: "greater"; GreaterEqual: "greaterEqual"; Less: "less"; LessEqual: "lessEqual"; … }Operators available to condition filters.
- variableSheetFilterViewSessionStateDefinitionsource ↗
-
SheetFilterViewSessionStateDefinition: SessionStateDefinition<SheetFilterDefinition | null>Session-state contribution for a private filter view.
- variableSheetRowVisibilityFieldKeysource ↗
-
SheetRowVisibilityFieldKey: "sheet.filter.rowVisibility"Neutral field contract re-exported by the plugin that owns the contribution.
- functionsheetFilterValueKeysource ↗
-
sheetFilterValueKey(value: unknown): stringUses display values for distinct-value selection, including an explicit blank key.
value: unknown
No public exports match that search.