Class: WorksheetProtectionRuleModel
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:22
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
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:57
Parameters
Parameter | Type |
---|---|
unitId | string |
rule | IWorksheetProtectionRule |
Returns
void
changeRuleInitState()
changeRuleInitState(state): void
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:49
Parameters
Parameter | Type |
---|---|
state | boolean |
Returns
void
deleteRule()
deleteRule(unitId, subUnitId): void
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:63
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
void
deleteUnitModel()
deleteUnitModel(unitId): void
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:117
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
fromObject()
fromObject(obj): void
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:102
Parameters
Parameter | Type |
---|---|
obj | IObjectModel |
Returns
void
getRule()
getRule(unitId, subUnitId):
| undefined
| IWorksheetProtectionRule
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:79
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
Returns
| undefined
| IWorksheetProtectionRule
getSheetRuleInitState()
getSheetRuleInitState(): boolean
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:53
Returns
boolean
getTargetByPermissionId()
getTargetByPermissionId(unitId, permissionId): undefined | null | string[]
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:138
Parameters
Parameter | Type |
---|---|
unitId | string |
permissionId | string |
Returns
undefined
| null
| string
[]
resetOrder()
resetOrder(): void
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:134
Returns
void
ruleRefresh()
ruleRefresh(permissionId): void
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:130
Parameters
Parameter | Type |
---|---|
permissionId | string |
Returns
void
setRule()
setRule(
unitId,
subUnitId,
rule): void
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:71
Parameters
Parameter | Type |
---|---|
unitId | string |
subUnitId | string |
rule | IWorksheetProtectionRule |
Returns
void
toObject()
toObject(): IObjectModel
Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:83
Returns
IObjectModel