API Reference
@univerjs
@univerjs/sheets
classes
Rangeprotectioncache

@univerjs/sheets v0.3.0Docs


Class: RangeProtectionCache

Extends

Constructors

new RangeProtectionCache()

new RangeProtectionCache(
   _ruleModel, 
   _permissionService, 
   _univerInstanceService): RangeProtectionCache

Parameters

ParameterType
_ruleModelRangeProtectionRuleModel
_permissionServiceIPermissionService
_univerInstanceServiceIUniverInstanceService

Returns

RangeProtectionCache

Overrides

Disposable.constructor

Defined in

packages/sheets/src/model/range-protection.cache.ts:31 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)

Methods

deleteUnit()

deleteUnit(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

packages/sheets/src/model/range-protection.cache.ts:226 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)


disposeWithMe()

protected disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


getCellInfo()

getCellInfo(
   unitId, 
   subUnitId, 
   row, 
   col): undefined | Partial<Record<UnitAction, boolean>> & {
  ranges: IRange[];
  ruleId: string;
 } | {
  0: view;
  1: edit;
  ranges: rule.ranges;
  ruleId: string;
}

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
colnumber

Returns

undefined | Partial<Record<UnitAction, boolean>> & { ranges: IRange[]; ruleId: string; } | { 0: view; 1: edit; ranges: rule.ranges; ruleId: string; }

Defined in

packages/sheets/src/model/range-protection.cache.ts:197 (opens in a new tab)


reBuildCache()

reBuildCache(unitId, subUnitId): void

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

void

Defined in

packages/sheets/src/model/range-protection.cache.ts:170 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.