@univerjssheetsindexclassesRefselectionsservice

@univerjs/sheets v0.5.4


Class: RefSelectionsService

Defined in: submodules/univer/packages/sheets/src/services/selections/ref-selections.service.ts:36

RefSelectionsService treats selectionMoveStart$ selectionMoving$ and selectionMoveEnd$ differently than SheetsSelectionsService. Because ref selections can be in different workbooks.

Extends

Constructors

new RefSelectionsService()

new RefSelectionsService(_instanceSrv): RefSelectionsService

Defined in: submodules/univer/packages/sheets/src/services/selections/ref-selections.service.ts:37

Parameters

ParameterType
_instanceSrvIUniverInstanceService

Returns

RefSelectionsService

Overrides

SheetsSelectionsService.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-SheetsSelectionsService._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
_instanceSrvreadonlyIUniverInstanceServiceundefined-SheetsSelectionsService._instanceSrvsubmodules/univer/packages/sheets/src/services/selections/selection.service.ts:61
_workbookSelectionsprotectedMap<string, WorkbookSelectionModel>undefined-SheetsSelectionsService._workbookSelectionssubmodules/univer/packages/sheets/src/services/selections/selection.service.ts:197
dispose$protectedSubject<void>undefined-SheetsSelectionsService.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:120
selectionMoveEnd$publicObservable<ISelectionWithStyle[]>undefinedSelection Events, usually triggered when pointerup in spreadsheet by selection render service after selectionModel has updated.SheetsSelectionsService.selectionMoveEnd$submodules/univer/packages/sheets/src/services/selections/selection.service.ts:53
selectionMoveStart$publicObservable<Nullable<ISelectionWithStyle[]>>undefinedSelection Events, usually triggered when pointerdown in spreadsheet by selection render service after selectionModel has updated.SheetsSelectionsService.selectionMoveStart$submodules/univer/packages/sheets/src/services/selections/selection.service.ts:43
selectionMoving$publicObservable<Nullable<ISelectionWithStyle[]>>undefinedSelection Events, usually triggered when pointermove in spreadsheet by selection render service after selectionModel has updated.SheetsSelectionsService.selectionMoving$submodules/univer/packages/sheets/src/services/selections/selection.service.ts:48
selectionSet$publicObservable<Nullable<ISelectionWithStyle[]>>undefinedSelection Events, usually triggered when changing unit.(focus in formula editor)SheetsSelectionsService.selectionSet$submodules/univer/packages/sheets/src/services/selections/selection.service.ts:58

Accessors

currentSelectionParam

Get Signature

get currentSelectionParam(): Nullable<ISelectionManagerSearchParam>

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:36

Returns

Nullable<ISelectionManagerSearchParam>

Inherited from

SheetsSelectionsService.currentSelectionParam

Methods

_ensureWorkbookSelection()

protected _ensureWorkbookSelection(unitId): WorkbookSelectionModel

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:198

Parameters

ParameterType
unitIdstring

Returns

WorkbookSelectionModel

Inherited from

SheetsSelectionsService._ensureWorkbookSelection


_getCurrentSelections()

protected _getCurrentSelections(): ISelectionWithStyle[]

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:183

Returns

ISelectionWithStyle[]

Inherited from

SheetsSelectionsService._getCurrentSelections


_init()

protected _init(): void

Defined in: submodules/univer/packages/sheets/src/services/selections/ref-selections.service.ts:43

Returns

void

Overrides

SheetsSelectionsService._init


_removeWorkbookSelection()

protected _removeWorkbookSelection(unitId): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:213

Parameters

ParameterType
unitIdstring

Returns

void

Inherited from

SheetsSelectionsService._removeWorkbookSelection


addSelections()

Call Signature

addSelections(selectionsData): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:97

Parameters
ParameterType
selectionsDataISelectionWithStyle[]
Returns

void

Inherited from

SheetsSelectionsService.addSelections

Call Signature

addSelections(
   unitId, 
   worksheetId, 
   selectionDatas): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:98

Parameters
ParameterType
unitIdstring
worksheetIdstring
selectionDatasISelectionWithStyle[]
Returns

void

Inherited from

SheetsSelectionsService.addSelections


clear()

clear(): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:84

Clear all selections in all workbooks. invoked by prompt.controller

Returns

void

Inherited from

SheetsSelectionsService.clear


clearCurrentSelections()

clearCurrentSelections(): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:152

Returns

void

Inherited from

SheetsSelectionsService.clearCurrentSelections


dispose()

dispose(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:122

Returns

void

Inherited from

SheetsSelectionsService.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

SheetsSelectionsService.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

SheetsSelectionsService.ensureNotDisposed


getCurrentLastSelection()

getCurrentLastSelection(): DeepReadonly<Nullable<ISelectionWithStyle & {
  primary: ISelectionCell;
}>>

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:92

Returns

DeepReadonly<Nullable<ISelectionWithStyle & { primary: ISelectionCell; }>>

Inherited from

SheetsSelectionsService.getCurrentLastSelection


getCurrentSelections()

getCurrentSelections(): readonly ISelectionWithStyle[]

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:88

Returns

readonly ISelectionWithStyle[]

Inherited from

SheetsSelectionsService.getCurrentSelections


getWorkbookSelections()

getWorkbookSelections(unitId): WorkbookSelectionModel

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:193

Parameters

ParameterType
unitIdstring

Returns

WorkbookSelectionModel

Inherited from

SheetsSelectionsService.getWorkbookSelections


isOverlapping()

isOverlapping(): boolean

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:162

Determine whether multiple current selections overlap

Returns

boolean

Deprecated

this should be extracted to an pure function

Inherited from

SheetsSelectionsService.isOverlapping


setSelections()

Call Signature

setSelections(selectionDatas, type?): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:121

Set selection data to WorkbookSelectionModel.

Parameters
ParameterType
selectionDatasISelectionWithStyle[]
type?SelectionMoveType
Returns

void

Inherited from

SheetsSelectionsService.setSelections

Call Signature

setSelections(
   unitId, 
   worksheetId, 
   selectionDatas, 
   type?): void

Defined in: submodules/univer/packages/sheets/src/services/selections/selection.service.ts:122

Set selection data to WorkbookSelectionModel.

Parameters
ParameterType
unitIdstring
worksheetIdstring
selectionDatasISelectionWithStyle[]
type?SelectionMoveType
Returns

void

Inherited from

SheetsSelectionsService.setSelections