@univerjs/sheets v0.4.2 • Docs
Class: RefSelectionsService
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
Parameters
Parameter | Type |
---|---|
_instanceSrv | IUniverInstanceService |
Returns
Overrides
SheetsSelectionsService
.constructor
Defined in
packages/sheets/src/services/selections/ref-selections.service.ts:37 (opens in a new tab)
Properties
Accessors
currentSelectionParam
get currentSelectionParam(): Nullable<ISelectionManagerSearchParam>
Returns
Nullable
<ISelectionManagerSearchParam
>
Inherited from
SheetsSelectionsService
.currentSelectionParam
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:48 (opens in a new tab)
Methods
_ensureWorkbookSelection()
protected _ensureWorkbookSelection(unitId): WorkbookSelections
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Inherited from
SheetsSelectionsService
._ensureWorkbookSelection
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:185 (opens in a new tab)
_getCurrentSelections()
protected _getCurrentSelections(): ISelectionWithStyle[]
Returns
Inherited from
SheetsSelectionsService
._getCurrentSelections
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:170 (opens in a new tab)
_init()
protected _init(): void
Returns
void
Overrides
Defined in
packages/sheets/src/services/selections/ref-selections.service.ts:43 (opens in a new tab)
_removeWorkbookSelection()
protected _removeWorkbookSelection(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Inherited from
SheetsSelectionsService
._removeWorkbookSelection
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:200 (opens in a new tab)
addSelections()
addSelections(selectionsData)
addSelections(selectionsData): void
Parameters
Parameter | Type |
---|---|
selectionsData | ISelectionWithStyle [] |
Returns
void
Inherited from
SheetsSelectionsService
.addSelections
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:92 (opens in a new tab)
addSelections(unitId, worksheetId, selectionDatas)
addSelections(
unitId,
worksheetId,
selectionDatas): void
Parameters
Parameter | Type |
---|---|
unitId | string |
worksheetId | string |
selectionDatas | ISelectionWithStyle [] |
Returns
void
Inherited from
SheetsSelectionsService
.addSelections
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:93 (opens in a new tab)
clear()
clear(): void
Clear all selections in all workbooks. invoked by prompt.controller
Returns
void
Inherited from
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:79 (opens in a new tab)
clearCurrentSelections()
clearCurrentSelections(): void
Returns
void
Inherited from
SheetsSelectionsService
.clearCurrentSelections
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:139 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Inherited from
SheetsSelectionsService
.dispose
Defined in
packages/core/src/shared/lifecycle.ts:119 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
SheetsSelectionsService
.disposeWithMe
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
SheetsSelectionsService
.ensureNotDisposed
Defined in
packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getCurrentLastSelection()
getCurrentLastSelection(): DeepReadonly<Nullable<ISelectionWithStyle & {
primary: ISelectionCell;
}>>
Returns
DeepReadonly
<Nullable
<ISelectionWithStyle
& {
primary
: ISelectionCell
;
}>>
Inherited from
SheetsSelectionsService
.getCurrentLastSelection
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:87 (opens in a new tab)
getCurrentSelections()
getCurrentSelections(): readonly ISelectionWithStyle[]
Returns
readonly ISelectionWithStyle
[]
Inherited from
SheetsSelectionsService
.getCurrentSelections
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:83 (opens in a new tab)
getWorkbookSelections()
getWorkbookSelections(unitId): WorkbookSelections
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Inherited from
SheetsSelectionsService
.getWorkbookSelections
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:180 (opens in a new tab)
isOverlapping()
isOverlapping(): boolean
Determine whether multiple current selections overlap
Returns
boolean
Deprecated
this should be extracted to an pure function
Inherited from
SheetsSelectionsService
.isOverlapping
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:149 (opens in a new tab)
setSelections()
Set selection data to WorkbookSelections. If type is not specified, this method would clear all existing selections.
Param
Param
Param
Param
setSelections(selectionDatas, type)
setSelections(selectionDatas, type?): void
Set selection data to WorkbookSelections. If type is not specified, this method would clear all existing selections.
Parameters
Parameter | Type |
---|---|
selectionDatas | ISelectionWithStyle [] |
type ? | SelectionMoveType |
Returns
void
Param
Param
Param
Param
Inherited from
SheetsSelectionsService
.setSelections
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:109 (opens in a new tab)
setSelections(unitId, worksheetId, selectionDatas, type)
setSelections(
unitId,
worksheetId,
selectionDatas,
type?): void
Set selection data to WorkbookSelections. If type is not specified, this method would clear all existing selections.
Parameters
Parameter | Type |
---|---|
unitId | string |
worksheetId | string |
selectionDatas | ISelectionWithStyle [] |
type ? | SelectionMoveType |
Returns
void
Param
Param
Param
Param
Inherited from
SheetsSelectionsService
.setSelections
Defined in
packages/sheets/src/services/selections/selection-manager.service.ts:110 (opens in a new tab)