@univerjs/sheets v0.4.2 • Docs
Class: RangeProtectionCache
Extends
Constructors
new RangeProtectionCache()
new RangeProtectionCache(
_ruleModel,
_permissionService,
_univerInstanceService): RangeProtectionCache
Parameters
Parameter | Type |
---|---|
_ruleModel | RangeProtectionRuleModel |
_permissionService | IPermissionService |
_univerInstanceService | IUniverInstanceService |
Returns
Overrides
Defined in
packages/sheets/src/model/range-protection.cache.ts:36 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
Methods
deleteUnit()
deleteUnit(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
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
Defined in
packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
row | number |
col | number |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
col | number |
types | UnitAction [] |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
row | number |
types | UnitAction [] |
Returns
boolean
Defined in
packages/sheets/src/model/range-protection.cache.ts:249 (opens in a new tab)
reBuildCache()
reBuildCache(unitId, subUnitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
void
Defined in
packages/sheets/src/model/range-protection.cache.ts:205 (opens in a new tab)