@univerjssheetsindexclassesRangeprotectioncache

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


Class: RangeProtectionCache

Extends

Constructors

new RangeProtectionCache()

new RangeProtectionCache(
   _ruleModel, 
   _permissionService, 
   _univerInstanceService): RangeProtectionCache

Parameters

ParameterType
_ruleModelRangeProtectionRuleModel
_permissionServiceIPermissionService
_univerInstanceServiceIUniverInstanceService

Returns

RangeProtectionCache

Overrides

Disposable.constructor

Defined in

submodules/univer/packages/sheets/src/model/range-protection.cache.ts:36

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93

Methods

deleteUnit()

deleteUnit(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

submodules/univer/packages/sheets/src/model/range-protection.cache.ts:375


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

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


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

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


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

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


getCellInfo()

getCellInfo(
   unitId, 
   subUnitId, 
   row, 
   col): undefined | Partial<Record<UnitAction, boolean>> & {
  ranges: IRange[];
  ruleId: string;
 } | {
  0: view;
  1: edit;
  2: manageProtection;
  42: deleteProtection;
  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; 2: manageProtection; 42: deleteProtection; ranges: rule.ranges; ruleId: string; }

Defined in

submodules/univer/packages/sheets/src/model/range-protection.cache.ts:351


getColPermissionInfo()

getColPermissionInfo(
   unitId, 
   subUnitId, 
   col, 
   types): boolean

Parameters

ParameterType
unitIdstring
subUnitIdstring
colnumber
typesUnitAction[]

Returns

boolean

Defined in

submodules/univer/packages/sheets/src/model/range-protection.cache.ts:268


getRowPermissionInfo()

getRowPermissionInfo(
   unitId, 
   subUnitId, 
   row, 
   types): boolean

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
typesUnitAction[]

Returns

boolean

Defined in

submodules/univer/packages/sheets/src/model/range-protection.cache.ts:249


reBuildCache()

reBuildCache(unitId, subUnitId): void

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

void

Defined in

submodules/univer/packages/sheets/src/model/range-protection.cache.ts:205