@univerjssheetsindexclassesWorksheetprotectionrulemodel

@univerjs/sheets v0.5.0-beta.1Docs


Class: WorksheetProtectionRuleModel

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

Parameters

ParameterType
unitIdstring
ruleIWorksheetProtectionRule

Returns

void

Defined in

submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:57


changeRuleInitState()

changeRuleInitState(state): void

Parameters

ParameterType
stateboolean

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

ParameterType
unitIdstring
subUnitIdstring

Returns

void

Defined in

submodules/univer/packages/sheets/src/services/permission/worksheet-permission/worksheet-permission-rule.model.ts:63


deleteUnitModel()

deleteUnitModel(unitId): void

Parameters

ParameterType
unitIdstring

Returns

void

Defined in

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


fromObject()

fromObject(obj): void

Parameters

ParameterType
objIObjectModel

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

ParameterType
unitIdstring
subUnitIdstring

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

ParameterType
unitIdstring
permissionIdstring

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

ParameterType
permissionIdstring

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

ParameterType
unitIdstring
subUnitIdstring
ruleIWorksheetProtectionRule

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