@univerjs/sheets v0.4.2 • Docs
Class: WorksheetProtectionRuleModel
Constructors
new WorksheetProtectionRuleModel()
new WorksheetProtectionRuleModel(): WorksheetProtectionRuleModel
Returns
Properties
Property | Type | Defined in |
---|---|---|
resetOrder$ | Observable <unknown > | packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:44 (opens in a new tab) |
ruleChange$ | Observable <{ oldRule : IWorksheetProtectionRule ; rule : IWorksheetProtectionRule ; subUnitId : string ; type : IRuleChangeType ; unitId : string ; }> | packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:40 (opens in a new tab) |
ruleRefresh$ | Observable <unknown > | packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:42 (opens in a new tab) |
worksheetRuleInitStateChange$ | Observable <boolean > | packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:47 (opens in a new tab) |
Methods
addRule()
addRule(unitId, rule): void
Parameters
Parameter | Type |
---|---|
unitId | string |
rule | IWorksheetProtectionRule |
Returns
void
Defined in
changeRuleInitState()
changeRuleInitState(state): void
Parameters
Parameter | Type |
---|---|
state | boolean |
Returns
void
Defined in
deleteRule()
deleteRule(unitId, subUnitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
void
Defined in
deleteUnitModel()
deleteUnitModel(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
fromObject()
fromObject(obj): void
Parameters
Parameter | Type |
---|---|
obj | IObjectModel |
Returns
void
Defined in
getRule()
getRule(unitId, subUnitId): undefined | IWorksheetProtectionRule
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
undefined
| IWorksheetProtectionRule
Defined in
getSheetRuleInitState()
getSheetRuleInitState(): boolean
Returns
boolean
Defined in
getTargetByPermissionId()
getTargetByPermissionId(unitId, permissionId): undefined | null | string[]
Parameters
Parameter | Type |
---|---|
unitId | string |
permissionId | string |
Returns
undefined
| null
| string
[]
Defined in
resetOrder()
resetOrder(): void
Returns
void
Defined in
ruleRefresh()
ruleRefresh(permissionId): void
Parameters
Parameter | Type |
---|---|
permissionId | string |
Returns
void
Defined in
setRule()
setRule(
unitId,
subUnitId,
rule): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IWorksheetProtectionRule |
Returns
void
Defined in
toObject()
toObject(): IObjectModel
Returns
IObjectModel