/** * Copyright 2023-present DreamNum Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { IPermissionTypes, IRange } from '@univerjs/core'; import { Disposable, DisposableCollection, ICommandService, 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 _definedNamesService; disposableCollection: DisposableCollection; private _triggerPermissionUIEvent$; triggerPermissionUIEvent$: import("rxjs").Observable; constructor(_commandService: ICommandService, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _selectionManagerService: SheetsSelectionsService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _worksheetProtectionRuleModel: WorksheetProtectionRuleModel, _localeService: LocaleService, _lexerTreeBuilder: LexerTreeBuilder, _definedNamesService: IDefinedNamesService); private _initialize; private _commandExecutedListener; blockExecuteWithoutPermission(errorMsg: string): void; private _getPermissionCheck; permissionCheckWithRanges(permissionTypes: IPermissionTypes, selectionRanges?: IRange[], unitId?: string, subUnitId?: string): boolean; permissionCheckWithoutRange(permissionTypes: IPermissionTypes, unitId?: string, subUnitId?: string): boolean; private _permissionCheckWithFormula; private _permissionCheckBySetRangeValue; private _permissionCheckByMoveRowsColsCommand; private _permissionCheckByMoveRangeCommand; private _permissionCheckByInsertRowColCommand; private _permissionCheckByWorksheetCommand; private _permissionCheckWithInsertOrDeleteMoveRange; }