@univerjs/sheets
Version:
UniverSheet normal base-sheets
34 lines (33 loc) • 2.25 kB
TypeScript
import { IPermissionTypes, IRange, Disposable, DisposableCollection, ICommandService, IContextService, IPermissionService, IUniverInstanceService, LocaleService } from '@univerjs/core';
import { IDefinedNamesService, LexerTreeBuilder } from '@univerjs/engine-formula';
import { RangeProtectionRuleModel } from '../../model/range-protection-rule.model';
import { WorksheetProtectionRuleModel } from '../../services/permission/worksheet-permission';
import { SheetsSelectionsService } from '../../services/selections';
export declare class SheetPermissionCheckController extends Disposable {
private readonly _commandService;
private readonly _univerInstanceService;
private readonly _permissionService;
private readonly _selectionManagerService;
private _rangeProtectionRuleModel;
private _worksheetProtectionRuleModel;
private readonly _localeService;
private readonly _lexerTreeBuilder;
private readonly _contextService;
private readonly _definedNamesService;
disposableCollection: DisposableCollection;
private _triggerPermissionUIEvent$;
triggerPermissionUIEvent$: import('rxjs').Observable<string>;
constructor(_commandService: ICommandService, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _selectionManagerService: SheetsSelectionsService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _worksheetProtectionRuleModel: WorksheetProtectionRuleModel, _localeService: LocaleService, _lexerTreeBuilder: LexerTreeBuilder, _contextService: IContextService, _definedNamesService: IDefinedNamesService);
blockExecuteWithoutPermission(errorMsg: string): void;
private _getPermissionCheck;
private _initialize;
private _commandExecutedListener;
private _permissionCheckWithInsertRangeMove;
private _permissionCheckByWorksheetCommand;
permissionCheckWithoutRange(permissionTypes: IPermissionTypes): boolean;
permissionCheckWithRanges(permissionTypes: IPermissionTypes, selectionRanges?: IRange[], unitId?: string, subUnitId?: string): boolean;
private _permissionCheckByMoveCommand;
private _permissionCheckByMoveRangeCommand;
private _permissionCheckBySetRangeValue;
private _permissionCheckWithFormula;
}