API Reference
@univerjs
@univerjs/sheets
classes
Rangeprotectionrulemodel

@univerjs/sheets v0.4.2Docs


Class: RangeProtectionRuleModel

Constructors

new RangeProtectionRuleModel()

new RangeProtectionRuleModel(): RangeProtectionRuleModel

Returns

RangeProtectionRuleModel

Properties

PropertyTypeDefined in
rangeRuleInitStateChange$Observable<boolean>packages/sheets/src/model/range-protection-rule.model.ts:66 (opens in a new tab)
ruleChange$Observable<IRuleChange>packages/sheets/src/model/range-protection-rule.model.ts:56 (opens in a new tab)
ruleRefresh$Observable<unknown>packages/sheets/src/model/range-protection-rule.model.ts:59 (opens in a new tab)

Methods

addRule()

addRule(
   unitId, 
   subUnitId, 
   rule): void

Parameters

ParameterType
unitIdstring
subUnitIdstring
ruleIRangeProtectionRule

Returns

void

Defined in

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


changeRuleInitState()

changeRuleInitState(state): void

Parameters

ParameterType
stateboolean

Returns

void

Defined in

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


createRuleId()

createRuleId(unitId, subUnitId): string

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

string

Defined in

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


deleteRule()

deleteRule(
   unitId, 
   subUnitId, 
   id): void

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

void

Defined in

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


deleteUnitModel()

deleteUnitModel(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

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


fromObject()

fromObject(obj): void

Parameters

ParameterType
objIObjectModel

Returns

void

Defined in

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


getRangeRuleInitState()

getRangeRuleInitState(): boolean

Returns

boolean

Defined in

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


getRule()

getRule(
   unitId, 
   subUnitId, 
   id): undefined | IRangeProtectionRule

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

undefined | IRangeProtectionRule

Defined in

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


getSubunitRuleList()

getSubunitRuleList(unitId, subUnitId): IRangeProtectionRule[]

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

IRangeProtectionRule[]

Defined in

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


getSubunitRuleListLength()

getSubunitRuleListLength(unitId, subUnitId): number

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

number

Defined in

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


getTargetByPermissionId()

getTargetByPermissionId(unitId, permissionId): null | string[]

Parameters

ParameterType
unitIdstring
permissionIdstring

Returns

null | string[]

Defined in

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


ruleRefresh()

ruleRefresh(id): void

Parameters

ParameterType
idstring

Returns

void

Defined in

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


setRule()

setRule(
   unitId, 
   subUnitId, 
   id, 
   rule): void

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring
ruleIRangeProtectionRule

Returns

void

Defined in

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


toObject()

toObject(): IObjectModel

Returns

IObjectModel

Defined in

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


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