API Reference
@univerjs
@univerjs/sheets
classes
Rangeprotectioncache

@univerjs/sheets v0.4.2Docs


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:36 (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:375 (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()

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;
  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

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


getColPermissionInfo()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
colnumber
typesUnitAction[]

Returns

boolean

Defined in

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


getRowPermissionInfo()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
rownumber
typesUnitAction[]

Returns

boolean

Defined in

packages/sheets/src/model/range-protection.cache.ts:249 (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:205 (opens in a new tab)


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