@univerjs/sheets v0.5.0-beta.1 • Docs
Class: WorksheetProtectionRuleModel
Constructors
new WorksheetProtectionRuleModel()
new WorksheetProtectionRuleModel(): WorksheetProtectionRuleModel
Returns
Properties
Property | Type | Defined in |
---|---|---|
resetOrder$ | Observable <unknown > | submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:44 |
ruleChange$ | Observable <{ oldRule : IWorksheetProtectionRule ; rule : IWorksheetProtectionRule ; subUnitId : string ; type : IRuleChangeType ; unitId : string ; }> | submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:40 |
ruleRefresh$ | Observable <unknown > | submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:42 |
worksheetRuleInitStateChange$ | Observable <boolean > | submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:47 |
Methods
addRule()
addRule(unitId, rule): void
Parameters
Parameter | Type |
---|---|
unitId | string |
rule | IWorksheetProtectionRule |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:57
changeRuleInitState()
changeRuleInitState(state): void
Parameters
Parameter | Type |
---|---|
state | boolean |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:49
deleteRule()
deleteRule(unitId, subUnitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:63
deleteUnitModel()
deleteUnitModel(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:117
fromObject()
fromObject(obj): void
Parameters
Parameter | Type |
---|---|
obj | IObjectModel |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:102
getRule()
getRule(unitId, subUnitId): undefined | IWorksheetProtectionRule
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
undefined
| IWorksheetProtectionRule
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:79
getSheetRuleInitState()
getSheetRuleInitState(): boolean
Returns
boolean
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:53
getTargetByPermissionId()
getTargetByPermissionId(unitId, permissionId): undefined | null | string[]
Parameters
Parameter | Type |
---|---|
unitId | string |
permissionId | string |
Returns
undefined
| null
| string
[]
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:138
resetOrder()
resetOrder(): void
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:134
ruleRefresh()
ruleRefresh(permissionId): void
Parameters
Parameter | Type |
---|---|
permissionId | string |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:130
setRule()
setRule(
unitId,
subUnitId,
rule): void
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IWorksheetProtectionRule |
Returns
void
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:71
toObject()
toObject(): IObjectModel
Returns
IObjectModel
Defined in
submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:83