@univerjssheetsindexReadme

@univerjs/sheets v0.5.0-beta.1Docs


index

Index

Enumerations

EnumerationDescription
EditStateEnum-
InterceptCellContentPriority-
OperatorType-
SelectionMoveType-
UnitAction-
UnitObject-
ViewStateEnum-

Classes

ClassDescription
BorderStyleManagerServiceThis service is for managing settings border style status.
DefinedNameDataController-
ExclusiveRangeService-
MergeCellController-
NumfmtService-
RangeMergeUtil-
RangeProtectionCache-
RangeProtectionPermissionDeleteProtectionPoint-
RangeProtectionPermissionEditPoint-
RangeProtectionPermissionManageCollaPoint-
RangeProtectionPermissionViewPoint-
RangeProtectionRefRangeService-
RangeProtectionRenderModel-
RangeProtectionRuleModel-
RangeProtectionService-
RefRangeServiceCollect side effects caused by ref range change
RefSelectionsServiceRefSelectionsService treats selectionMoveStart$ selectionMoving$ and selectionMoveEnd$ differently than SheetsSelectionsService. Because ref selections can be in different workbooks.
SheetInterceptorServiceThis class expose methods for sheet features to inject code to sheet underlying logic.
SheetsSelectionsService-
UniverSheetsPluginPlug-in base class, all plug-ins must inherit from this base class. Provide basic methods.
WorkbookCommentPermission-
WorkbookCopyPermission-
WorkbookCopySheetPermission-
WorkbookCreateProtectPermission-
WorkbookCreateSheetPermission-
WorkbookDeleteSheetPermission-
WorkbookDuplicatePermission-
WorkbookEditablePermission-
WorkbookExportPermission-
WorkbookHideSheetPermission-
WorkbookHistoryPermission-
WorkbookManageCollaboratorPermission-
WorkbookMoveSheetPermission-
WorkbookPermissionService-
WorkbookPrintPermission-
WorkbookRecoverHistoryPermission-
WorkbookRenameSheetPermission-
WorkbookSelectionModelOrigin name: WorkbookSelections NOT Same as @univerjs/sheets-ui.SelectionRenderModel, that’s data for SelectionControl in rendering.
WorkbookSharePermission-
WorkbookViewHistoryPermission-
WorkbookViewPermission-
WorksheetCopyPermission-
WorksheetDeleteColumnPermission-
WorksheetDeleteProtectionPermission-
WorksheetDeleteRowPermission-
WorksheetEditExtraObjectPermission-
WorksheetEditPermission-
WorksheetFilterPermission-
WorksheetInsertColumnPermission-
WorksheetInsertHyperlinkPermission-
WorksheetInsertRowPermission-
WorksheetManageCollaboratorPermission-
WorksheetPermissionService-
WorksheetPivotTablePermission-
WorksheetProtectionPointModel-
WorksheetProtectionRuleModel-
WorksheetSelectProtectedCellsPermission-
WorksheetSelectUnProtectedCellsPermission-
WorksheetSetCellStylePermission-
WorksheetSetCellValuePermission-
WorksheetSetColumnStylePermission-
WorksheetSetRowStylePermission-
WorksheetSortPermission-
WorksheetViewPermission-

Interfaces

InterfaceDescription
IAddRangeProtectionCommandParams-
IAddRangeProtectionMutationParams-
IAddWorksheetMergeMutationParamsParams of AddWorksheetMergeMutation
IAddWorksheetProtectionParams-
IBorderInfo-
ICancelFrozenCommandParams-
ICopySheetCommandParams-
IDeleteRangeMoveLeftCommandParams-
IDeleteRangeMoveUpCommandParams-
IDeleteRangeMutationParamsParams of DeleteRange
IDeleteRangeProtectionCommandParams-
IDeleteRangeProtectionMutationParams-
IDeleteWorksheetProtectionParams-
IDeltaColumnWidthCommandParams-
IDeltaRowHeightCommand-
IExclusiveRangeService-
IInsertColCommandParams-
IInsertColMutationParamsParams of InsertColMutation
IInsertRangeMutationParamsParams of InsertRange
IInsertRowCommandParams-
IInsertRowMutationParamsParams of InsertRowMutation
IInsertSheetCommandParams-
IInsertSheetMutationParamsParams of InsertSheetMutation
IMoveColsCommandParams-
IMoveColumnsMutationParams-
IMoveRangeCommandParams-
IMoveRangeMutationParams-
IMoveRowsCommandParams-
IMoveRowsMutationParams-
InsertRangeMoveDownCommandParams-
InsertRangeMoveRightCommandParams-
INumfmtItemWithCache-
INumfmtService-
IRangeProtectionRule-
IRemoveColMutationParamsParams of InsertColMutation
IRemoveNumfmtMutationParams-
IRemoveRowColCommandInterceptParams-
IRemoveRowColCommandParams-
IRemoveRowsMutationParamsParams of InsertRowMutation
IRemoveSheetCommandParams-
IRemoveSheetMutationParamsParams of RemoveSheetMutation
IRemoveWorksheetMergeMutationParamsParams of RemoveWorksheetMergeMutation
IReorderRangeCommandParamsCopyright 2023-present DreamNum Inc.
IReorderRangeMutationParamsCopyright 2023-present DreamNum Inc.
ISelectionStylehttps://support.microsoft.com/en-us/office/select-cell-contents-in-excel-23f64223-2b6b-453a-8688-248355f10fa9
ISelectionWidgetConfigWhether to display the controller that modifies the selection, distributed in 8 locations tl top_left_corner tc top_center_corner tr top_right_corner ml middle_left_corner mr middle_right_corner bl bottom_left_corner bc bottom_center_corner br bottom_right_corner
ISelectionWithCoordSelection range Info, contains selection range & primary range primary range is the range of the highlighted cell.
ISelectionWithStylerange: IRange; primary: Nullable; style: Nullable;
ISetBorderBasicCommandParams-
ISetBorderColorCommandParams-
ISetBorderCommandParams-
ISetBorderPositionCommandParams-
ISetBorderStyleCommandParams-
ISetColDataCommandParams-
ISetColDataMutationParams-
ISetColHiddenMutationParams-
ISetColorCommandParams-
ISetColVisibleMutationParams-
ISetFontFamilyCommandParams-
ISetFontSizeCommandParams-
ISetFrozenCommandParams-
ISetFrozenMutationParams-
ISetHorizontalTextAlignCommandParams-
ISetNumfmtMutationParams-
ISetRangeProtectionMutationParams-
ISetRangeValuesCommandParams-
ISetRangeValuesMutationParamsParams of SetRangeValuesMutation
ISetRangeValuesRangeMutationParamsParams of SetRangeValuesMutation
ISetRowDataCommandParams-
ISetRowDataMutationParams-
ISetRowHiddenMutationParams-
ISetRowVisibleMutationParams-
ISetSelectionsOperationParams-
ISetSpecificColsVisibleCommandParams-
ISetSpecificRowsVisibleCommandParams-
ISetStyleCommandParams-
ISetTabColorMutationParams-
ISetTextRotationCommandParams-
ISetTextWrapCommandParams-
ISetVerticalTextAlignCommandParams-
ISetWorkbookNameCommandParams-
ISetWorkbookNameMutationParams-
ISetWorksheetActivateCommandParams-
ISetWorksheetActiveOperationParams-
ISetWorksheetColWidthMutationParams-
ISetWorksheetDefaultStyleMutationParams-
ISetWorksheetHideMutationParams-
ISetWorksheetNameCommandParams-
ISetWorksheetNameMutationParams-
ISetWorksheetOrderMutationParams-
ISetWorksheetPermissionPointsMutationParams-
ISetWorksheetProtectionParams-
ISetWorksheetRowAutoHeightMutationParams-
ISetWorksheetRowHeightMutationParams-
ISetWorksheetRowIsAutoHeightCommandParams-
ISetWorksheetRowIsAutoHeightMutationParams-
ISetWorksheetShowCommandParams-
ISheetCommandSharedParamsCopyright 2023-present DreamNum Inc.
ISheetLocation-
ISheetLocationBase-
ISheetRangeLocation-
ISheetRowLocation-
IStyleTypeValue-
IToggleCellCheckboxCommandParams-
IToggleGridlinesCommandParams-
IToggleGridlinesMutationParams-
IUniverSheetsConfig-
IWorksheetProtectionRule-

Type Aliases

Type aliasDescription
EffectRefRangeParams-
FormatType-
ICellPermission-
IModel-
INumfmtItem-
IObjectModel-
IOperator-
IRangePermissionPoint-
ISetCellsNumfmt-
IWorksheetProtectionRenderCellData-

Variables

VariableDescription
AddRangeProtectionCommand-
AddRangeProtectionMutation-
AddWorksheetMergeAllCommand-
AddWorksheetMergeCommand-
AddWorksheetMergeHorizontalCommand-
AddWorksheetMergeMutation-
AddWorksheetMergeVerticalCommand-
AddWorksheetProtectionCommand-
AddWorksheetProtectionMutation-
AFTER_CELL_EDIT-
AFTER_CELL_EDIT_ASYNC-
baseProtectionActions-
BEFORE_CELL_EDIT-
CancelFrozenCommand-
ClearSelectionAllCommandThe command to clear all in current selected ranges.
ClearSelectionContentCommandThe command to clear content in current selected ranges.
ClearSelectionFormatCommandThe command to clear content in current selected ranges.
COMMAND_LISTENER_SKELETON_CHANGEMutations those will trigger the skeleton change.
COMMAND_LISTENER_VALUE_CHANGE-
CopySheetCommand-
defaultWorkbookPermissionPoints-
defaultWorksheetPermissionPoint-
DeleteRangeMoveLeftCommandThe command to delete range.
DeleteRangeMoveUpCommandThe command to delete range.
DeleteRangeProtectionCommand-
DeleteRangeProtectionMutation-
DeleteWorksheetProtectionCommand-
DeleteWorksheetProtectionMutation-
DeltaColumnWidthCommand-
DeltaRowHeightCommand-
DISABLE_NORMAL_SELECTIONSAn context key to disable normal selections if its value is set to true.
EffectRefRangId-
EmptyMutation-
InsertColAfterCommand-
InsertColBeforeCommand-
InsertColCommand-
InsertColMutation-
InsertDefinedNameCommandThe command to insert new defined name
InsertRangeMoveDownCommandThe command to insert range.
InsertRangeMoveRightCommandThe command to insert range.
InsertRowAfterCommand-
InsertRowBeforeCommand-
InsertRowCommandthis command and its interface should not be exported from index.ts
InsertRowMutation-
InsertSheetCommandThe command to insert new worksheet
InsertSheetMutation-
INTERCEPTOR_POINT-
MAX_CELL_PER_SHEET_KEYCopyright 2023-present DreamNum Inc.
MERGE_CELL_INTERCEPTOR_CHECK-
MoveColsCommand-
MoveColsMutation-
MoveRangeCommand-
MoveRangeMutation-
MoveRowsCommandCommand to move the selected rows (must currently selected) to the specified row.
MoveRowsMutation-
RemoveColCommandThis command would remove the selected columns. These selected rows can be non-continuous.
RemoveColMutation-
RemoveDefinedNameCommandThe command to remove new defined name
RemoveNumfmtMutation-
RemoveRowCommandThis command would remove the selected rows. These selected rows can be non-continuous.
RemoveRowMutation-
RemoveSheetCommandThe command to insert new worksheet
RemoveSheetMutation-
RemoveWorksheetMergeCommand-
RemoveWorksheetMergeMutation-
ReorderRangeCommand-
ReorderRangeMutation-
ResetBackgroundColorCommand-
ResetTextColorCommand-
ScrollToCellOperation-
SELECTION_CONTROL_BORDER_BUFFER_COLOR-
SELECTION_CONTROL_BORDER_BUFFER_WIDTH-
SetBackgroundColorCommand-
SetBoldCommandSet bold font style to currently selected ranges. If the cell is already bold then it will cancel the bold style.
SetBorderBasicCommand-
SetBorderColorCommand-
SetBorderCommandSet border info for range, including clear border (type = NONE)
SetBorderPositionCommand-
SetBorderStyleCommand-
SetColDataCommand-
SetColDataMutation-
SetColHiddenCommand-
SetColHiddenMutation-
SetColVisibleMutation-
SetColWidthCommand-
SetDefinedNameCommandThe command to update defined name
SetFontFamilyCommand-
SetFontSizeCommand-
SetFrozenCommand-
SetFrozenMutation-
SetHorizontalTextAlignCommand-
SetItalicCommandSet italic font style to currently selected ranges. If the cell is already italic then it will cancel the italic style.
SetNumfmtMutation-
SetOverlineCommandSet overline font style to currently selected ranges. If the cell is already overline then it will cancel the overline style.
SetProtectionCommand-
SetRangeProtectionMutation-
SetRangeValuesCommandThe command to set values for ranges.
SetRangeValuesMutation-
SetRowDataCommand-
SetRowDataMutation-
SetRowHeightCommand-
SetRowHiddenCommand-
SetRowHiddenMutation-
SetRowVisibleMutation-
SetSelectedColsVisibleCommand-
SetSelectedRowsVisibleCommand-
SetSelectionsOperationSet selections to SelectionModel(WorkbookSelectionModel) by selectionManagerService.
SetSpecificColsVisibleCommand-
SetSpecificRowsVisibleCommand-
SetStrikeThroughCommandSet strike through font style to currently selected ranges. If the cell is already stroke then it will cancel the stroke style.
SetStyleCommandThe command to set cell style. Set style to a bunch of ranges.
SetTabColorCommand-
SetTabColorMutation-
SetTextColorCommand-
SetTextRotationCommand-
SetTextWrapCommand-
SetUnderlineCommandSet underline font style to currently selected ranges. If the cell is already underline then it will cancel the underline style.
SetVerticalTextAlignCommand-
SetWorkbookNameCommandThe command to set the workbook name. It does not support undo redo.
SetWorkbookNameMutation-
SetWorksheetActivateCommand-
SetWorksheetActiveOperation-
SetWorksheetColWidthMutationSet width of column manually
SetWorksheetDefaultStyleCommand-
SetWorksheetDefaultStyleMutation-
SetWorksheetHideCommand-
SetWorksheetHideMutation-
SetWorksheetNameCommandThe command to set the sheet name.
SetWorksheetNameMutation-
SetWorksheetOrderCommand-
SetWorksheetOrderMutation-
SetWorksheetPermissionPointsCommand-
SetWorksheetPermissionPointsMutation-
SetWorksheetProtectionCommand-
SetWorksheetProtectionMutation-
SetWorksheetRightToLeftCommand-
SetWorksheetRightToLeftMutation-
SetWorksheetRowAutoHeightMutation-
SetWorksheetRowHeightMutation-
SetWorksheetRowIsAutoHeightCommand-
SetWorksheetRowIsAutoHeightMutation-
SetWorksheetShowCommand-
ToggleCellCheckboxCommand-
ToggleGridlinesCommand-
ToggleGridlinesMutation-

Functions

FunctionDescription
addMergeCellsUtil-
AddMergeRedoSelectionsOperationFactory-
AddMergeUndoMutationFactory-
AddMergeUndoSelectionsOperationFactory-
alignToMergedCellsBordersAdjust the range to align merged cell’s borders.
checkRangesEditablePermission-
convertPrimaryWithCoordToPrimary-
convertSelectionDataToRangeProcess a selection with coordinates and style, and extract the coordinate information, because the render needs coordinates when drawing. Since the selection.manager.service is unrelated to the coordinates, it only accepts data of type ISelectionWithStyle, so a conversion is necessary.
copyRangeStylesCopy the styles of a range of cells to another range. Used for insert row and insert column.
createTopMatrixFromMatrix-
createTopMatrixFromRanges-
expandToContinuousRangeExpand the range to a continuous range, it uses when Ctrl + A , or only one cell selected to add a pivot table adn so on.
FactoryAddRangeProtectionMutation-
FactoryDeleteRangeProtectionMutation-
factoryRemoveNumfmtUndoMutation-
factorySetNumfmtUndoMutation-
FactorySetRangeProtectionMutation-
findAllRectangle-
followSelectionOperation-
generateNullCellGenerate cellValue from range and set null
generateNullCellValueGenerate cellValue from range and set v/p/f/si/custom to null
getAddMergeMutationRangeByTypecalculates the selection based on the merged cell type
getAllRangePermissionPoint-
getAllWorkbookPermissionPoint-
getAllWorksheetPermissionPoint-
getAllWorksheetPermissionPointByPointPanel-
getCellAtRowCol-
getDefaultRangePermission-
getInsertRangeMutationsInsertRange is not a mutation but combination of SetRangeValuesMutation and MoveRangeMutation.
getMoveRangeUndoRedoMutations-
getPrimaryForRangeGet the default primary cell (the most top-left cell) of a range.
getRemoveRangeMutations-
getSelectionsService-
getSeparateEffectedRangesOnCommand-
getSheetCommandTargetGet targeted Workbook & Worksheet of a command. If unitId and subUnitId are given, the function would try to get these instances. If not, it would try to get the current active instances.
getSheetCommandTargetWorkbook-
getSheetMutationTarget-
handleBaseInsertRange-
handleBaseMoveRowsColssee docs/tldr/ref-range/move-rows-cols.tldr
handleBaseRemoveRange-
handleCommonDefaultRangeChangeWithEffectRefCommands-
handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests-
handleDefaultRangeChangeWithEffectRefCommands-
handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests-
handleDeleteRangeMoveLeft-
handleDeleteRangeMoveUp-
handleDeleteRangeMutation-
handleInsertCol-
handleInsertRangeMoveDown-
handleInsertRangeMoveRight-
handleInsertRangeMutation-
handleInsertRow-
handleIRemoveCol-
handleIRemoveRow-
handleMoveCols-
handleMoveRange-
handleMoveRows-
IExclusiveRangeService-
InsertColMutationUndoFactory-
InsertRowMutationUndoFactory-
InsertSheetUndoMutationFactoryGenerate undo mutation of a InsertSheetMutation
INumfmtService-
IRefSelectionsServiceRef selections service reuses code of SelectionManagerService. And it only contains ref selections when user is editing formula.
isSingleCellSelectionExamine if a selection only contains a single cell (a merged cell is considered as a single cell in this case).
MoveColsMutationUndoFactory-
MoveRowsMutationUndoFactoryGet an undo mutation for the move rows mutation.
rangeMergeSome operations generate sparse ranges such as paste/autofill/ref-range, and this function merge some small ranges into some large ranges to reduce transmission size. Time Complexity: O(mn) , where m and n are rows and columns. It takes O(mn) to compute the markMatrix and O(n) to apply the histogram algorithm to each column. ps. column sparse matrices have better performance
RemoveMergeUndoMutationFactory-
RemoveSheetUndoMutationFactoryGenerate undo mutation of a RemoveSheetMutation
ReorderRangeUndoMutationFactory-
rotateRange-
runRefRangeMutations-
SetColDataMutationFactory-
setEndForRange-
SetFrozenMutationFactory-
SetRangeValuesUndoMutationFactoryGenerate undo mutation of a SetRangeValuesMutation
SetRowDataMutationFactory-
SetWorksheetColWidthMutationFactoryThis factory is for generating undo mutations for command DeltaColumnWidthCommand.
SetWorksheetDefaultStyleMutationFactory-
SetWorksheetRowAutoHeightMutationFactory-
transformCellsToRange-