@univerjssheetsindexclassesSheetsselectionsservice

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


Class: SheetsSelectionsService

Extends

Extended by

Constructors

new SheetsSelectionsService()

new SheetsSelectionsService(_instanceSrv): SheetsSelectionsService

Parameters

ParameterType
_instanceSrvIUniverInstanceService

Returns

SheetsSelectionsService

Overrides

RxDisposable.constructor

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:44

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseRxDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93
_instanceSrvreadonlyIUniverInstanceServiceundefined-submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:45
_workbookSelectionsprotectedMap<string, WorkbookSelectionModel>undefined-submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:176
dispose$protectedSubject<void>undefinedRxDisposable.dispose$submodules/univer/packages/core/src/shared/lifecycle.ts:117
selectionMoveEnd$publicObservable<ISelectionWithStyle[]>undefined-submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:42
selectionMoveStart$publicObservable<Nullable<ISelectionWithStyle[]>>undefined-submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:40
selectionMoving$publicObservable<Nullable<ISelectionWithStyle[]>>undefined-submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:41

Accessors

currentSelectionParam

Get Signature

get currentSelectionParam(): Nullable<ISelectionManagerSearchParam>
Returns

Nullable<ISelectionManagerSearchParam>

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:36

Methods

_ensureWorkbookSelection()

protected _ensureWorkbookSelection(unitId): WorkbookSelectionModel

Parameters

ParameterType
unitIdstring

Returns

WorkbookSelectionModel

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:177


_getCurrentSelections()

protected _getCurrentSelections(): ISelectionWithStyle[]

Returns

ISelectionWithStyle[]

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:162


_init()

protected _init(): void

Returns

void

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:51


_removeWorkbookSelection()

protected _removeWorkbookSelection(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:192


addSelections()

addSelections(selectionsData)

addSelections(selectionsData): void
Parameters
ParameterType
selectionsDataISelectionWithStyle[]
Returns

void

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:80

addSelections(unitId, worksheetId, selectionDatas)

addSelections(
   unitId, 
   worksheetId, 
   selectionDatas): void
Parameters
ParameterType
unitIdstring
worksheetIdstring
selectionDatasISelectionWithStyle[]
Returns

void

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:81


clear()

clear(): void

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

Returns

void

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:67


clearCurrentSelections()

clearCurrentSelections(): void

Returns

void

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:131


dispose()

dispose(): void

Returns

void

Inherited from

RxDisposable.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:119


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

RxDisposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

RxDisposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


getCurrentLastSelection()

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

Returns

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

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:75


getCurrentSelections()

getCurrentSelections(): readonly ISelectionWithStyle[]

Returns

readonly ISelectionWithStyle[]

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:71


getWorkbookSelections()

getWorkbookSelections(unitId): WorkbookSelectionModel

Parameters

ParameterType
unitIdstring

Returns

WorkbookSelectionModel

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:172


isOverlapping()

isOverlapping(): boolean

Determine whether multiple current selections overlap

Returns

boolean

Deprecated

this should be extracted to an pure function

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:141


setSelections()

setSelections(selectionDatas, type)

setSelections(selectionDatas, type?): void

Set selection data to WorkbookSelectionModel. If type is not specified, this method would clear all existing selections.

Parameters
ParameterType
selectionDatasISelectionWithStyle[]
type?SelectionMoveType
Returns

void

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:105

setSelections(unitId, worksheetId, selectionDatas, type)

setSelections(
   unitId, 
   worksheetId, 
   selectionDatas, 
   type?): void
Parameters
ParameterType
unitIdstring
worksheetIdstring
selectionDatasISelectionWithStyle[]
type?SelectionMoveType
Returns

void

Defined in

submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:106