@univerjssheetsindexclassesWorksheetprotectionrulemodel

@univerjs/sheets v0.5.4


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

WorksheetProtectionRuleModel

Properties

PropertyTypeDefined 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

ParameterType
unitIdstring
ruleIWorksheetProtectionRule

Returns

void


changeRuleInitState()

changeRuleInitState(state): void

Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:49

Parameters

ParameterType
stateboolean

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

ParameterType
unitIdstring
subUnitIdstring

Returns

void


deleteUnitModel()

deleteUnitModel(unitId): void

Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:117

Parameters

ParameterType
unitIdstring

Returns

void


fromObject()

fromObject(obj): void

Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:102

Parameters

ParameterType
objIObjectModel

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

ParameterType
unitIdstring
subUnitIdstring

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

ParameterType
unitIdstring
permissionIdstring

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

ParameterType
permissionIdstring

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

ParameterType
unitIdstring
subUnitIdstring
ruleIWorksheetProtectionRule

Returns

void


toObject()

toObject(): IObjectModel

Defined in: submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:83

Returns

IObjectModel