@univerjssheetsindexclassesRangeprotectionrulemodel

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


Class: RangeProtectionRuleModel

Constructors

new RangeProtectionRuleModel()

new RangeProtectionRuleModel(): RangeProtectionRuleModel

Returns

RangeProtectionRuleModel

Properties

PropertyTypeDefined in
rangeRuleInitStateChange$Observable<boolean>submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:77
ruleChange$Observable<IRuleChange>submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:67
ruleRefresh$Observable<unknown>submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:70

Methods

addRule()

addRule(
   unitId, 
   subUnitId, 
   rule): void

Parameters

ParameterType
unitIdstring
subUnitIdstring
ruleIRangeProtectionRule

Returns

void

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:87


changeRuleInitState()

changeRuleInitState(state): void

Parameters

ParameterType
stateboolean

Returns

void

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:83


createRuleId()

createRuleId(unitId, subUnitId): string

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

string

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:174


deleteRule()

deleteRule(
   unitId, 
   subUnitId, 
   id): void

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

void

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:93


deleteUnitModel()

deleteUnitModel(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:170


fromObject()

fromObject(obj): void

Parameters

ParameterType
objIObjectModel

Returns

void

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:153


getRangeRuleInitState()

getRangeRuleInitState(): boolean

Returns

boolean

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:79


getRule()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

undefined | IRangeProtectionRule

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:109


getSubunitRuleList()

getSubunitRuleList(unitId, subUnitId): IRangeProtectionRule[]

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

IRangeProtectionRule[]

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:113


getSubunitRuleListLength()

getSubunitRuleListLength(unitId, subUnitId): number

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

number

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:118


getTargetByPermissionId()

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

Parameters

ParameterType
unitIdstring
permissionIdstring

Returns

null | string[]

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:183


ruleRefresh()

ruleRefresh(id): void

Parameters

ParameterType
idstring

Returns

void

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:72


setRule()

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring
ruleIRangeProtectionRule

Returns

void

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:101


toObject()

toObject(): IObjectModel

Returns

IObjectModel

Defined in

submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:138