@univerjs/sheets v0.4.2 • Docs
Class: RangeProtectionRuleModel
Constructors
new RangeProtectionRuleModel()
new RangeProtectionRuleModel(): RangeProtectionRuleModel
Returns
Properties
Property | Type | Defined 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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IRangeProtectionRule |
Returns
void
Defined in
packages/sheets/src/model/range-protection-rule.model.ts:76 (opens in a new tab)
changeRuleInitState()
changeRuleInitState(state): void
Parameters
Parameter | Type |
---|---|
state | boolean |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
id | string |
Returns
void
Defined in
packages/sheets/src/model/range-protection-rule.model.ts:82 (opens in a new tab)
deleteUnitModel()
deleteUnitModel(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
packages/sheets/src/model/range-protection-rule.model.ts:159 (opens in a new tab)
fromObject()
fromObject(obj): void
Parameters
Parameter | Type |
---|---|
obj | IObjectModel |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
id | string |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
Defined in
packages/sheets/src/model/range-protection-rule.model.ts:102 (opens in a new tab)
getSubunitRuleListLength()
getSubunitRuleListLength(unitId, subUnitId): number
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
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
Parameter | Type |
---|---|
unitId | string |
permissionId | string |
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
Parameter | Type |
---|---|
id | string |
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
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
id | string |
rule | IRangeProtectionRule |
Returns
void
Defined in
packages/sheets/src/model/range-protection-rule.model.ts:90 (opens in a new tab)
toObject()
toObject(): IObjectModel
Returns
Defined in
packages/sheets/src/model/range-protection-rule.model.ts:127 (opens in a new tab)