@searsuite/sear-plugin-sort
Sheet range sorting commands and stable sparse row permutation helpers.
Sort a range
- classSheetSortError
-
class SheetSortError extends SearErrorBase class for errors intentionally exposed by SearSuite packages.
Packages may throw this generic form while they do not need a more specific public error type. Domain-specific subclasses override
code.constructor SheetSortError(message: string, details: Record<string, unknown>): SheetSortErrorproperty readonly code: "SHEET_SORT_INVALID_INPUT"Stable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classSheetSortPlugin
-
class SheetSortPlugin extends Plugin<unknown, CellProperties, Record<string, never>>Stateless command owner for stable range sorting.
constructor SheetSortPlugin(dependencies: SheetSortDependencies): SheetSortPluginproperty readonly warnOnDuplicateDepth: falseWhether PluginManager should warn when another ordered plugin shares this depth.
property readonly pluginKey: PluginKeystaticproperty readonly symbol: typeof symbolstaticmethod apply(state: Record<string, never>, _transaction: Transaction): Record<string, never>Applies a transaction to plugin-owned state and returns the next state.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method registerCommands(commands: SheetCommandBus): voidmethod registerState(): { dataEngine: { enabled: boolean }; key: PluginKey; state: Record<string, never> }Registers one or more plugin-owned state records with the host manager.
method render(): []Produces scene nodes owned by this plugin for the current core state.
Inherited members 28
Inherited from Plugin.
- depth
- documentState
- interestedIn
- transactionHistory
- transactionOT
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceSheetSortDependencies
-
property readonly compareText: (left: string, right: string): numberproperty readonly platform: Pick<Platform, "toLowerCase">property readonly readMatrix: (): CSRMatrix<CellMatrixElement>property readonly readValue: (row: number, column: number): SheetSortValueproperty readonly reorders: SheetRangeReorderRegistry - interfaceSheetSortRangeInput
-
property readonly firstRowIsHeader?: booleanproperty readonly keys: readonly SheetSortKey[]property readonly range: SheetMoveRange - variableSortSheetRangeCommand
-
SortSheetRangeCommand: SheetCommandDefinition<SheetSortRangeInput, SheetCommandResult>
Keys and row order
- enumSheetSortDirection
-
enum member Ascending: "ascending"enum member Descending: "descending" - interfaceSheetSortKey
-
property readonly column: numberproperty readonly direction: SheetSortDirection - interfaceSheetSortPermutation
-
property readonly changed: booleanproperty readonly destinationOf: (row: number): numberproperty readonly range: SheetMoveRange - typeSheetSortValue
-
type SheetSortValue = number | string | boolean | null - functioncreateSheetSortPermutation
-
createSheetSortPermutation(input: SheetSortRangeInput, matrix: CSRMatrix<CellMatrixElement>, readValue: (row: number, column: number): SheetSortValue, platform: Pick<Platform, "toLowerCase">, compareText: (left: string, right: string): number): SheetSortPermutationSorts occupied key rows; rows with empty keys remain stable at the end without being materialized.
No matching API entries.