@univerjssheetsindexclassesRangeprotectionrulemodel

@univerjs/sheets v0.5.4


Class: RangeProtectionRuleModel

Defined in: submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:58

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

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
ruleIRangeProtectionRule

Returns

void


changeRuleInitState()

changeRuleInitState(state): void

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

Parameters

ParameterType
stateboolean

Returns

void


createRuleId()

createRuleId(unitId, subUnitId): string

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

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

string


deleteRule()

deleteRule(
   unitId, 
   subUnitId, 
   id): void

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

void


deleteUnitModel()

deleteUnitModel(unitId): void

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

Parameters

ParameterType
unitIdstring

Returns

void


fromObject()

fromObject(obj): void

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

Parameters

ParameterType
objIObjectModel

Returns

void


getRangeRuleInitState()

getRangeRuleInitState(): boolean

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

Returns

boolean


getRule()

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

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring

Returns

| undefined | IRangeProtectionRule


getSubunitRuleList()

getSubunitRuleList(unitId, subUnitId): IRangeProtectionRule[]

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

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

IRangeProtectionRule[]


getSubunitRuleListLength()

getSubunitRuleListLength(unitId, subUnitId): number

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

Parameters

ParameterType
unitIdstring
subUnitIdstring

Returns

number


getTargetByPermissionId()

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

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

Parameters

ParameterType
unitIdstring
permissionIdstring

Returns

null | string[]


ruleRefresh()

ruleRefresh(id): void

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

Parameters

ParameterType
idstring

Returns

void


setRule()

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

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

Parameters

ParameterType
unitIdstring
subUnitIdstring
idstring
ruleIRangeProtectionRule

Returns

void


toObject()

toObject(): IObjectModel

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

Returns

IObjectModel