@univerjs/sheets v0.5.0-beta.1 • 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
submodules/univer/packages/sheets/src/services/selections/ref-selections.service.ts:37
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | SheetsSelectionsService ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
_instanceSrv | readonly | IUniverInstanceService | undefined | SheetsSelectionsService ._instanceSrv | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:45 |
_workbookSelections | protected | Map <string , WorkbookSelectionModel > | undefined | SheetsSelectionsService ._workbookSelections | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:176 |
dispose$ | protected | Subject <void > | undefined | SheetsSelectionsService .dispose$ | submodules/univer/packages/core/src/shared/lifecycle.ts:117 |
selectionMoveEnd$ | public | Observable <ISelectionWithStyle []> | undefined | SheetsSelectionsService .selectionMoveEnd$ | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:42 |
selectionMoveStart$ | public | Observable <Nullable <ISelectionWithStyle []>> | undefined | SheetsSelectionsService .selectionMoveStart$ | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:40 |
selectionMoving$ | public | Observable <Nullable <ISelectionWithStyle []>> | undefined | SheetsSelectionsService .selectionMoving$ | submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:41 |
Accessors
currentSelectionParam
Get Signature
get currentSelectionParam(): Nullable<ISelectionManagerSearchParam>
Returns
Nullable
<ISelectionManagerSearchParam
>
Inherited from
SheetsSelectionsService
.currentSelectionParam
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:36
Methods
_ensureWorkbookSelection()
protected _ensureWorkbookSelection(unitId): WorkbookSelectionModel
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Inherited from
SheetsSelectionsService
._ensureWorkbookSelection
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:177
_getCurrentSelections()
protected _getCurrentSelections(): ISelectionWithStyle[]
Returns
Inherited from
SheetsSelectionsService
._getCurrentSelections
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:162
_init()
protected _init(): void
Returns
void
Overrides
Defined in
submodules/univer/packages/sheets/src/services/selections/ref-selections.service.ts:43
_removeWorkbookSelection()
protected _removeWorkbookSelection(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Inherited from
SheetsSelectionsService
._removeWorkbookSelection
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:192
addSelections()
addSelections(selectionsData)
addSelections(selectionsData): void
Parameters
Parameter | Type |
---|---|
selectionsData | ISelectionWithStyle [] |
Returns
void
Inherited from
SheetsSelectionsService
.addSelections
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:80
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
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
Inherited from
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:67
clearCurrentSelections()
clearCurrentSelections(): void
Returns
void
Inherited from
SheetsSelectionsService
.clearCurrentSelections
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:131
dispose()
dispose(): void
Returns
void
Inherited from
SheetsSelectionsService
.dispose
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:119
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
SheetsSelectionsService
.disposeWithMe
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
SheetsSelectionsService
.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
;
}>>
Inherited from
SheetsSelectionsService
.getCurrentLastSelection
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:75
getCurrentSelections()
getCurrentSelections(): readonly ISelectionWithStyle[]
Returns
readonly ISelectionWithStyle
[]
Inherited from
SheetsSelectionsService
.getCurrentSelections
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:71
getWorkbookSelections()
getWorkbookSelections(unitId): WorkbookSelectionModel
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
Inherited from
SheetsSelectionsService
.getWorkbookSelections
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
Inherited from
SheetsSelectionsService
.isOverlapping
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
Parameter | Type |
---|---|
selectionDatas | ISelectionWithStyle [] |
type ? | SelectionMoveType |
Returns
void
Inherited from
SheetsSelectionsService
.setSelections
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
Parameter | Type |
---|---|
unitId | string |
worksheetId | string |
selectionDatas | ISelectionWithStyle [] |
type ? | SelectionMoveType |
Returns
void
Inherited from
SheetsSelectionsService
.setSelections
Defined in
submodules/univer/packages/sheets/src/services/selections/selection-manager.service.ts:106