@univerjs/sheets v0.5.0-beta.1 • Docs
Class: RangeProtectionRuleModel
Constructors
new RangeProtectionRuleModel()
new RangeProtectionRuleModel(): RangeProtectionRuleModel
Returns
Properties
Property | Type | Defined 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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IRangeProtectionRule |
Returns
void
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:87
changeRuleInitState()
changeRuleInitState(state): void
Parameters
Parameter | Type |
---|---|
state | boolean |
Returns
void
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:83
createRuleId()
createRuleId(unitId, subUnitId): string
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
string
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:174
deleteRule()
deleteRule(
unitId,
subUnitId,
id): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
id | string |
Returns
void
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:93
deleteUnitModel()
deleteUnitModel(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:170
fromObject()
fromObject(obj): void
Parameters
Parameter | Type |
---|---|
obj | IObjectModel |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
id | string |
Returns
undefined
| IRangeProtectionRule
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:109
getSubunitRuleList()
getSubunitRuleList(unitId, subUnitId): IRangeProtectionRule[]
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:113
getSubunitRuleListLength()
getSubunitRuleListLength(unitId, subUnitId): number
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
number
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:118
getTargetByPermissionId()
getTargetByPermissionId(unitId, permissionId): null | string[]
Parameters
Parameter | Type |
---|---|
unitId | string |
permissionId | string |
Returns
null
| string
[]
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:183
ruleRefresh()
ruleRefresh(id): void
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:72
setRule()
setRule(
unitId,
subUnitId,
id,
rule): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
id | string |
rule | IRangeProtectionRule |
Returns
void
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:101
toObject()
toObject(): IObjectModel
Returns
Defined in
submodules/univer/packages/sheets/src/model/range-protection-rule.model.ts:138