@univerjs/sheets 0.2.14 → 0.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/lib/cjs/index.js +3 -3
  2. package/lib/es/index.js +1560 -1325
  3. package/lib/types/basics/rangeMerge.d.ts +1 -1
  4. package/lib/types/basics/selection.d.ts +1 -0
  5. package/lib/types/commands/commands/__tests__/add-merge-command.spec.d.ts +16 -0
  6. package/lib/types/commands/commands/set-border-command.d.ts +9 -9
  7. package/lib/types/commands/commands/utils/selection-utils.d.ts +1 -1
  8. package/lib/types/commands/commands/utils/target-util.d.ts +1 -2
  9. package/lib/types/commands/operations/selection.operation.d.ts +2 -0
  10. package/lib/types/controllers/merge-cell.controller.d.ts +3 -3
  11. package/lib/types/index.d.ts +66 -63
  12. package/lib/types/model/range-protection-rule.model.d.ts +9 -7
  13. package/lib/types/model/range-protection.cache.d.ts +30 -0
  14. package/lib/types/services/border-style-manager.service.d.ts +1 -1
  15. package/lib/types/services/permission/permission-point/index.d.ts +32 -32
  16. package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +9 -6
  17. package/lib/types/services/permission/range-permission/range-protection.service.d.ts +3 -1
  18. package/lib/types/services/permission/worksheet-permission/index.d.ts +1 -1
  19. package/lib/types/services/permission/worksheet-permission/utils.d.ts +2 -2
  20. package/lib/types/services/ref-range/util.d.ts +5 -5
  21. package/lib/types/services/sheet-interceptor/interceptor-const.d.ts +4 -2
  22. package/lib/types/services/sheet-interceptor/sheet-interceptor.service.d.ts +2 -2
  23. package/lib/types/sheets-plugin.d.ts +2 -2
  24. package/lib/umd/index.js +2 -2
  25. package/package.json +13 -13
  26. package/lib/types/commands/commands/utils/merged-cell-util.d.ts +0 -6
@@ -1,4 +1,4 @@
1
- import { IRange, ObjectMatrix } from '@univerjs/core';
1
+ import { ObjectMatrix, IRange } from '@univerjs/core';
2
2
  export declare const createTopMatrixFromRanges: (ranges: IRange[]) => ObjectMatrix<number>;
3
3
  export declare const createTopMatrixFromMatrix: (matrix: ObjectMatrix<1>) => ObjectMatrix<number>;
4
4
  export declare const findAllRectangle: (topMatrix: ObjectMatrix<number>) => IRange[];
@@ -136,6 +136,7 @@ export declare function convertPrimaryWithCoordToPrimary(primaryWithCoord: ISele
136
136
  endColumn: number;
137
137
  };
138
138
  /**
139
+ * @deprecated Use worksheet.getCellInfoInMergeData or SpreadsheetSkeleton.getCellByIndex instead
139
140
  * Convert the coordinates of a single cell into a selection data.
140
141
  * @param row Specified Row Coordinate
141
142
  * @param column Specified Column Coordinate
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -1,28 +1,28 @@
1
- import { BorderStyleTypes, ICommand, BorderType } from '@univerjs/core';
1
+ import { BorderType, BorderStyleTypes, ICommand } from '@univerjs/core';
2
2
  import { IBorderInfo } from '../../services/border-style-manager.service';
3
3
  export interface ISetBorderBasicCommandParams {
4
4
  unitId?: string;
5
5
  subUnitId?: string;
6
6
  value: IBorderInfo;
7
7
  }
8
- export declare const SetBorderBasicCommand: ICommand<ISetBorderBasicCommandParams>;
9
8
  export interface ISetBorderPositionCommandParams {
10
9
  value: BorderType;
11
10
  }
12
- export declare const SetBorderPositionCommand: ICommand<ISetBorderPositionCommandParams>;
13
11
  export interface ISetBorderStyleCommandParams {
14
12
  value: BorderStyleTypes;
15
13
  }
16
- export declare const SetBorderStyleCommand: ICommand;
17
- export interface ISetBorderColorCommandParams {
18
- value: string;
19
- }
20
- export declare const SetBorderColorCommand: ICommand<ISetBorderColorCommandParams>;
21
14
  export interface ISetBorderCommandParams {
22
15
  unitId?: string;
23
16
  subUnitId?: string;
24
17
  }
18
+ export interface ISetBorderColorCommandParams {
19
+ value: string;
20
+ }
25
21
  /**
26
- * The command to clear content in current selected ranges.
22
+ * Set border info for range, including clear border (type = NONE)
27
23
  */
28
24
  export declare const SetBorderCommand: ICommand;
25
+ export declare const SetBorderPositionCommand: ICommand<ISetBorderPositionCommandParams>;
26
+ export declare const SetBorderStyleCommand: ICommand;
27
+ export declare const SetBorderColorCommand: ICommand<ISetBorderColorCommandParams>;
28
+ export declare const SetBorderBasicCommand: ICommand<ISetBorderBasicCommandParams>;
@@ -1,6 +1,6 @@
1
1
  import { ICellData, IObjectMatrixPrimitiveType, IRange, ISelectionCell, Nullable, Workbook, Worksheet } from '@univerjs/core';
2
- import { ISetSelectionsOperationParams } from '../../operations/selection.operation';
3
2
  import { ISelectionWithStyle } from '../../../basics/selection';
3
+ import { ISetSelectionsOperationParams } from '../../operations/selection.operation';
4
4
  export interface IExpandParams {
5
5
  left?: boolean;
6
6
  right?: boolean;
@@ -5,7 +5,7 @@ export declare function getSheetCommandTargetWorkbook(univerInstanceService: IUn
5
5
  workbook: Workbook;
6
6
  unitId: string;
7
7
  }>;
8
- interface IResult {
8
+ export interface IResult {
9
9
  workbook: Workbook;
10
10
  worksheet: Worksheet;
11
11
  unitId: string;
@@ -29,4 +29,3 @@ export declare function getSheetMutationTarget(univerInstanceService: IUniverIns
29
29
  unitId: string;
30
30
  subUnitId: string;
31
31
  }): Nullable<Pick<IResult, 'workbook' | 'worksheet'>>;
32
- export {};
@@ -6,5 +6,7 @@ export interface ISetSelectionsOperationParams {
6
6
  subUnitId: string;
7
7
  selections: ISelectionWithStyle[];
8
8
  type?: SelectionMoveType;
9
+ /** If should scroll to the selected range. */
10
+ reveal?: boolean;
9
11
  }
10
12
  export declare const SetSelectionsOperation: IOperation<ISetSelectionsOperationParams>;
@@ -1,9 +1,9 @@
1
- import { IRange, Dimension, Disposable, DisposableCollection, ICommandService, Injector, InterceptorManager, IUniverInstanceService } from '@univerjs/core';
2
- import { IRemoveWorksheetMergeMutationParams } from '../basics/interfaces/mutation-interface';
1
+ import { Dimension, Disposable, DisposableCollection, ICommandService, Injector, InterceptorManager, IUniverInstanceService, IRange } from '@univerjs/core';
3
2
  import { RefRangeService } from '../services/ref-range/ref-range.service';
4
- import { EffectRefRangeParams } from '../services/ref-range/type';
5
3
  import { SheetsSelectionsService } from '../services/selections/selection-manager.service';
6
4
  import { SheetInterceptorService } from '../services/sheet-interceptor/sheet-interceptor.service';
5
+ import { IRemoveWorksheetMergeMutationParams } from '../basics/interfaces/mutation-interface';
6
+ import { EffectRefRangeParams } from '../services/ref-range/type';
7
7
  /**
8
8
  * calculates the selection based on the merged cell type
9
9
  * @param {IRange[]} selection
@@ -17,21 +17,13 @@ export { UniverSheetsPlugin } from './sheets-plugin';
17
17
  export { COMMAND_LISTENER_SKELETON_CHANGE, COMMAND_LISTENER_VALUE_CHANGE } from './basics/const/command-listener-const';
18
18
  export { type IAddWorksheetMergeMutationParams, type IDeleteRangeMutationParams, type IInsertColMutationParams, type IInsertRangeMutationParams, type IInsertRowMutationParams, type IInsertSheetMutationParams, type IRemoveColMutationParams, type IRemoveRowsMutationParams, type IRemoveSheetMutationParams, type IRemoveWorksheetMergeMutationParams, } from './basics/interfaces/mutation-interface';
19
19
  export { convertPrimaryWithCoordToPrimary, convertSelectionDataToRange, getNormalSelectionStyle, type ISelectionStyle, type ISelectionWidgetConfig, type ISelectionWithCoordAndStyle, type ISelectionWithStyle, type ISheetRangeLocation, SELECTION_CONTROL_BORDER_BUFFER_COLOR, SELECTION_CONTROL_BORDER_BUFFER_WIDTH, transformCellDataToSelectionData, } from './basics/selection';
20
- export { rangeMerge, createTopMatrixFromRanges, createTopMatrixFromMatrix, findAllRectangle, RangeMergeUtil } from './basics/rangeMerge';
21
- export { getSheetCommandTarget, getSheetCommandTargetWorkbook, getSheetMutationTarget } from './commands/commands/utils/target-util';
22
- export { alignToMergedCellsBorders, getCellAtRowCol, setEndForRange, isSingleCellSelection } from './commands/commands/utils/selection-utils';
23
- export { getSelectionsService } from './commands/utils/selection-command-util';
24
- export { followSelectionOperation, getPrimaryForRange } from './commands/commands/utils/selection-utils';
25
- export { handleDeleteRangeMutation } from './commands/utils/handle-range-mutation';
26
- export { getInsertRangeMutations, getRemoveRangeMutations } from './commands/utils/handle-range-mutation';
27
- export { handleInsertRangeMutation } from './commands/utils/handle-range-mutation';
28
- export { type ISheetCommandSharedParams } from './commands/utils/interface';
20
+ export { createTopMatrixFromMatrix, createTopMatrixFromRanges, findAllRectangle, rangeMerge, RangeMergeUtil } from './basics/rangeMerge';
29
21
  export { MAX_CELL_PER_SHEET_KEY } from './controllers/config/config';
30
22
  export { BorderStyleManagerService, type IBorderInfo } from './services/border-style-manager.service';
31
23
  export * from './services/permission/permission-point';
32
24
  export { WorksheetPermissionService } from './services/permission/worksheet-permission/worksheet-permission.service';
33
25
  export { WorkbookPermissionService } from './services/permission/workbook-permission/workbook-permission.service';
34
- export { SheetsSelectionsService, WorkbookSelections, SelectionMoveType, DISABLE_NORMAL_SELECTIONS, } from './services/selections/selection-manager.service';
26
+ export { DISABLE_NORMAL_SELECTIONS, SelectionMoveType, SheetsSelectionsService, WorkbookSelections, } from './services/selections/selection-manager.service';
35
27
  export { IRefSelectionsService, RefSelectionsService } from './services/selections/ref-selections.service';
36
28
  export { getAddMergeMutationRangeByType } from './controllers/merge-cell.controller';
37
29
  export { NumfmtService } from './services/numfmt/numfmt.service';
@@ -41,106 +33,117 @@ export { RefRangeService } from './services/ref-range/ref-range.service';
41
33
  export type { EffectRefRangeParams, IOperator } from './services/ref-range/type';
42
34
  export { EffectRefRangId, OperatorType } from './services/ref-range/type';
43
35
  export { DefinedNameDataController } from './controllers/defined-name-data.controller';
44
- export { handleBaseInsertRange, handleBaseMoveRowsCols, handleBaseRemoveRange, handleDeleteRangeMoveLeft, handleDeleteRangeMoveUp, handleInsertCol, handleInsertRangeMoveDown, handleInsertRangeMoveRight, handleInsertRow, handleIRemoveCol, handleIRemoveRow, handleMoveCols, handleMoveRange, handleMoveRows, rotateRange, runRefRangeMutations, handleCommonDefaultRangeChangeWithEffectRefCommands, handleDefaultRangeChangeWithEffectRefCommands, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests, handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests, } from './services/ref-range/util';
45
- export { INTERCEPTOR_POINT, InterceptCellContentPriority } from './services/sheet-interceptor/interceptor-const';
36
+ export { handleBaseInsertRange, handleBaseMoveRowsCols, handleBaseRemoveRange, handleCommonDefaultRangeChangeWithEffectRefCommands, handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests, handleDefaultRangeChangeWithEffectRefCommands, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests, handleDeleteRangeMoveLeft, handleDeleteRangeMoveUp, handleInsertCol, handleInsertRangeMoveDown, handleInsertRangeMoveRight, handleInsertRow, handleIRemoveCol, handleIRemoveRow, handleMoveCols, handleMoveRange, handleMoveRows, rotateRange, runRefRangeMutations, } from './services/ref-range/util';
37
+ export { InterceptCellContentPriority, INTERCEPTOR_POINT } from './services/sheet-interceptor/interceptor-const';
46
38
  export { SheetInterceptorService } from './services/sheet-interceptor/sheet-interceptor.service';
47
39
  export type { ISheetLocation, ISheetLocationBase, ISheetRowLocation } from './services/sheet-interceptor/utils/interceptor';
48
- export { MergeCellController, MERGE_CELL_INTERCEPTOR_CHECK } from './controllers/merge-cell.controller';
40
+ export { MERGE_CELL_INTERCEPTOR_CHECK, MergeCellController } from './controllers/merge-cell.controller';
49
41
  export { AddMergeRedoSelectionsOperationFactory, AddMergeUndoSelectionsOperationFactory } from './commands/utils/handle-merge-operation';
50
42
  export type { FormatType } from './services/numfmt/type';
51
43
  export { expandToContinuousRange } from './basics/expand-range';
52
44
  export { ExclusiveRangeService, IExclusiveRangeService } from './services/exclusive-range/exclusive-range-service';
53
45
  export { defaultWorksheetPermissionPoint, getAllWorksheetPermissionPoint, getAllWorksheetPermissionPointByPointPanel } from './services/permission';
54
46
  export type { IWorksheetProtectionRule } from './services/permission/type';
55
- export { WorksheetProtectionRuleModel, WorksheetProtectionPointModel } from './services/permission/worksheet-permission';
56
- export { getAllWorkbookPermissionPoint, defaultWorkbookPermissionPoints } from './services/permission/workbook-permission';
57
- export { WorksheetCopyPermission, WorksheetSelectProtectedCellsPermission, WorksheetSelectUnProtectedCellsPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetViewPermission, WorksheetSetRowStylePermission, WorksheetSetColumnStylePermission, WorksheetInsertRowPermission, WorksheetInsertColumnPermission, WorksheetInsertHyperlinkPermission, WorksheetDeleteRowPermission, WorksheetDeleteColumnPermission, WorksheetSortPermission, WorksheetFilterPermission, WorksheetPivotTablePermission, WorksheetEditExtraObjectPermission, WorksheetManageCollaboratorPermission, WorksheetEditPermission, WorkbookCommentPermission, WorkbookEditablePermission, WorkbookDuplicatePermission, WorkbookPrintPermission, WorkbookExportPermission, WorkbookMoveSheetPermission, WorkbookDeleteSheetPermission, WorkbookHideSheetPermission, WorkbookRenameSheetPermission, WorkbookCreateSheetPermission, WorkbookHistoryPermission, WorkbookViewPermission, WorkbookSharePermission, WorkbookCopyPermission, WorkbookManageCollaboratorPermission, WorkbookViewHistoryPermission, WorkbookRecoverHistoryPermission, } from './services/permission/permission-point';
58
- export { UnitObject } from '@univerjs/protocol';
47
+ export { WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from './services/permission/worksheet-permission';
48
+ export { defaultWorkbookPermissionPoints, getAllWorkbookPermissionPoint } from './services/permission/workbook-permission';
49
+ export { WorkbookCommentPermission, WorkbookCopyPermission, WorkbookCreateSheetPermission, WorkbookDeleteSheetPermission, WorkbookDuplicatePermission, WorkbookEditablePermission, WorkbookExportPermission, WorkbookHideSheetPermission, WorkbookHistoryPermission, WorkbookManageCollaboratorPermission, WorkbookMoveSheetPermission, WorkbookPrintPermission, WorkbookRecoverHistoryPermission, WorkbookRenameSheetPermission, WorkbookSharePermission, WorkbookViewHistoryPermission, WorkbookViewPermission, WorksheetCopyPermission, WorksheetDeleteColumnPermission, WorksheetDeleteRowPermission, WorksheetEditExtraObjectPermission, WorksheetEditPermission, WorksheetFilterPermission, WorksheetInsertColumnPermission, WorksheetInsertHyperlinkPermission, WorksheetInsertRowPermission, WorksheetManageCollaboratorPermission, WorksheetPivotTablePermission, WorksheetSelectProtectedCellsPermission, WorksheetSelectUnProtectedCellsPermission, WorksheetSetCellStylePermission, WorksheetSetCellValuePermission, WorksheetSetColumnStylePermission, WorksheetSetRowStylePermission, WorksheetSortPermission, WorksheetViewPermission, } from './services/permission/permission-point';
50
+ export { UnitAction, UnitObject } from '@univerjs/protocol';
59
51
  export { checkRangesEditablePermission } from './services/permission/util';
60
- export { RangeProtectionRenderModel, type ICellPermission } from './model/range-protection-render.model';
61
- export { RangeProtectionRuleModel, type IObjectModel, type IRangeProtectionRule, type IModel } from './model/range-protection-rule.model';
52
+ export { type ICellPermission, RangeProtectionRenderModel } from './model/range-protection-render.model';
53
+ export { type IModel, type IObjectModel, type IRangeProtectionRule, RangeProtectionRuleModel } from './model/range-protection-rule.model';
54
+ export { RangeProtectionCache } from './model/range-protection.cache';
62
55
  export type { IWorksheetProtectionRenderCellData } from './services/permission/worksheet-permission/type';
63
56
  export { RangeProtectionRefRangeService } from './services/permission/range-permission/range-protection.ref-range';
64
57
  export { RangeProtectionService } from './services/permission/range-permission/range-protection.service';
65
- export { type IRangePermissionPoint, getAllRangePermissionPoint, getDefaultRangePermission, } from './services/permission/range-permission/util';
58
+ export { getAllRangePermissionPoint, getDefaultRangePermission, type IRangePermissionPoint, } from './services/permission/range-permission/util';
66
59
  export { RangeProtectionPermissionEditPoint } from './services/permission/permission-point/range/edit';
67
60
  export { RangeProtectionPermissionViewPoint } from './services/permission/permission-point/range/view';
68
- export { generateNullCellValue, generateNullCell } from './basics/utils';
61
+ export { generateNullCell, generateNullCellValue } from './basics/utils';
62
+ export { getSheetCommandTarget, getSheetCommandTargetWorkbook, getSheetMutationTarget } from './commands/commands/utils/target-util';
63
+ export { alignToMergedCellsBorders, getCellAtRowCol, isSingleCellSelection, setEndForRange } from './commands/commands/utils/selection-utils';
64
+ export { getSelectionsService } from './commands/utils/selection-command-util';
65
+ export { followSelectionOperation, getPrimaryForRange } from './commands/commands/utils/selection-utils';
66
+ export { handleDeleteRangeMutation } from './commands/utils/handle-range-mutation';
67
+ export { getInsertRangeMutations, getRemoveRangeMutations } from './commands/utils/handle-range-mutation';
68
+ export { handleInsertRangeMutation } from './commands/utils/handle-range-mutation';
69
+ export { type ISheetCommandSharedParams } from './commands/utils/interface';
69
70
  export { copyRangeStyles } from './commands/commands/utils/selection-utils';
70
71
  export { AddRangeProtectionCommand, type IAddRangeProtectionCommandParams } from './commands/commands/add-range-protection.command';
71
- export { AddWorksheetMergeCommand, AddWorksheetMergeAllCommand, AddWorksheetMergeVerticalCommand, AddWorksheetMergeHorizontalCommand, addMergeCellsUtil, } from './commands/commands/add-worksheet-merge.command';
72
+ export { addMergeCellsUtil, AddWorksheetMergeAllCommand, AddWorksheetMergeCommand, AddWorksheetMergeHorizontalCommand, AddWorksheetMergeVerticalCommand, } from './commands/commands/add-worksheet-merge.command';
72
73
  export { ClearSelectionAllCommand } from './commands/commands/clear-selection-all.command';
73
74
  export { ClearSelectionContentCommand } from './commands/commands/clear-selection-content.command';
74
75
  export { ClearSelectionFormatCommand } from './commands/commands/clear-selection-format.command';
75
76
  export { CopySheetCommand } from './commands/commands/copy-worksheet.command';
77
+ export type { ICopySheetCommandParams } from './commands/commands/copy-worksheet.command';
76
78
  export { DeleteRangeMoveLeftCommand, type IDeleteRangeMoveLeftCommandParams } from './commands/commands/delete-range-move-left.command';
77
79
  export { DeleteRangeMoveUpCommand, type IDeleteRangeMoveUpCommandParams } from './commands/commands/delete-range-move-up.command';
78
80
  export { DeleteRangeProtectionCommand, type IDeleteRangeProtectionCommandParams } from './commands/commands/delete-range-protection.command';
79
81
  export { InsertDefinedNameCommand } from './commands/commands/insert-defined-name.command';
80
82
  export { InsertRangeMoveDownCommand, type InsertRangeMoveDownCommandParams } from './commands/commands/insert-range-move-down.command';
81
83
  export { InsertRangeMoveRightCommand, type InsertRangeMoveRightCommandParams } from './commands/commands/insert-range-move-right.command';
82
- export { InsertRowCommand, InsertRowBeforeCommand, InsertRowAfterCommand, InsertColCommand, InsertColBeforeCommand, InsertColAfterCommand, type IInsertRowCommandParams, type IInsertColCommandParams, } from './commands/commands/insert-row-col.command';
83
- export { InsertSheetCommand, type IInsertSheetCommandParams } from './commands/commands/insert-sheet.command';
84
- export { MoveRangeCommand, getMoveRangeUndoRedoMutations, type IMoveRangeCommandParams } from './commands/commands/move-range.command';
85
- export { MoveRowsCommand, MoveColsCommand, type IMoveRowsCommandParams, type IMoveColsCommandParams, } from './commands/commands/move-rows-cols.command';
84
+ export { type IInsertColCommandParams, type IInsertRowCommandParams, InsertColAfterCommand, InsertColBeforeCommand, InsertColCommand, InsertRowAfterCommand, InsertRowBeforeCommand, InsertRowCommand, } from './commands/commands/insert-row-col.command';
85
+ export { type IInsertSheetCommandParams, InsertSheetCommand } from './commands/commands/insert-sheet.command';
86
+ export { getMoveRangeUndoRedoMutations, type IMoveRangeCommandParams, MoveRangeCommand } from './commands/commands/move-range.command';
87
+ export { type IMoveColsCommandParams, type IMoveRowsCommandParams, MoveColsCommand, MoveRowsCommand, } from './commands/commands/move-rows-cols.command';
86
88
  export { RemoveDefinedNameCommand } from './commands/commands/remove-defined-name.command';
87
- export { RemoveRowCommand, RemoveColCommand, type IRemoveRowColCommandParams, type IRemoveRowColCommandInterceptParams } from './commands/commands/remove-row-col.command';
88
- export { RemoveSheetCommand, type IRemoveSheetCommandParams } from './commands/commands/remove-sheet.command';
89
+ export { type IRemoveRowColCommandInterceptParams, type IRemoveRowColCommandParams, RemoveColCommand, RemoveRowCommand } from './commands/commands/remove-row-col.command';
90
+ export { type IRemoveSheetCommandParams, RemoveSheetCommand } from './commands/commands/remove-sheet.command';
89
91
  export { RemoveWorksheetMergeCommand } from './commands/commands/remove-worksheet-merge.command';
90
- export { ReorderRangeCommand, type IReorderRangeCommandParams } from './commands/commands/reorder-range.command';
91
- export { SetBorderBasicCommand, SetBorderPositionCommand, SetBorderStyleCommand, SetBorderColorCommand, SetBorderCommand, type ISetBorderBasicCommandParams, type ISetBorderPositionCommandParams, type ISetBorderStyleCommandParams, type ISetBorderColorCommandParams, type ISetBorderCommandParams, } from './commands/commands/set-border-command';
92
- export { SetSpecificColsVisibleCommand, SetSelectedColsVisibleCommand, SetColHiddenCommand, type ISetSpecificColsVisibleCommandParams, } from './commands/commands/set-col-visible.command';
93
- export { SetDefinedNameCommand, type ISetDefinedNameCommandParams } from './commands/commands/set-defined-name.command';
92
+ export { type IReorderRangeCommandParams, ReorderRangeCommand } from './commands/commands/reorder-range.command';
93
+ export { type ISetBorderBasicCommandParams, type ISetBorderColorCommandParams, type ISetBorderCommandParams, type ISetBorderPositionCommandParams, type ISetBorderStyleCommandParams, SetBorderBasicCommand, SetBorderColorCommand, SetBorderCommand, SetBorderPositionCommand, SetBorderStyleCommand, } from './commands/commands/set-border-command';
94
+ export { type ISetSpecificColsVisibleCommandParams, SetColHiddenCommand, SetSelectedColsVisibleCommand, SetSpecificColsVisibleCommand, } from './commands/commands/set-col-visible.command';
95
+ export { type ISetDefinedNameCommandParams, SetDefinedNameCommand } from './commands/commands/set-defined-name.command';
94
96
  export { SetFrozenCancelCommand } from './commands/commands/set-frozen-cancel.command';
95
97
  export { SetFrozenCommand } from './commands/commands/set-frozen.command';
96
98
  export { SetHideGridlinesCommand } from './commands/commands/set-hide-gridlines.command';
97
- export { SetRangeProtectionCommand, type ISetRangeProtectionCommandParams } from './commands/commands/set-range-protection.command';
98
- export { SetRangeValuesCommand, type ISetRangeValuesCommandParams } from './commands/commands/set-range-values.command';
99
- export { SetSpecificRowsVisibleCommand, SetSelectedRowsVisibleCommand, SetRowHiddenCommand, type ISetSpecificRowsVisibleCommandParams, } from './commands/commands/set-row-visible.command';
100
- export { SetStyleCommand, SetBoldCommand, SetItalicCommand, SetUnderlineCommand, SetStrikeThroughCommand, SetOverlineCommand, SetFontFamilyCommand, SetFontSizeCommand, SetTextColorCommand, ResetTextColorCommand, SetBackgroundColorCommand, ResetBackgroundColorCommand, SetVerticalTextAlignCommand, SetHorizontalTextAlignCommand, SetTextWrapCommand, SetTextRotationCommand, type ISetColorCommandParams, type ISetFontFamilyCommandParams, type ISetFontSizeCommandParams, type ISetHorizontalTextAlignCommandParams, type ISetStyleCommandParams, type ISetTextRotationCommandParams, type ISetTextWrapCommandParams, type ISetVerticalTextAlignCommandParams, type IStyleTypeValue, } from './commands/commands/set-style.command';
99
+ export { type ISetRangeProtectionCommandParams, SetRangeProtectionCommand } from './commands/commands/set-range-protection.command';
100
+ export { type ISetRangeValuesCommandParams, SetRangeValuesCommand } from './commands/commands/set-range-values.command';
101
+ export { type ISetSpecificRowsVisibleCommandParams, SetRowHiddenCommand, SetSelectedRowsVisibleCommand, SetSpecificRowsVisibleCommand, } from './commands/commands/set-row-visible.command';
102
+ export { type ISetColorCommandParams, type ISetFontFamilyCommandParams, type ISetFontSizeCommandParams, type ISetHorizontalTextAlignCommandParams, type ISetStyleCommandParams, type ISetTextRotationCommandParams, type ISetTextWrapCommandParams, type ISetVerticalTextAlignCommandParams, type IStyleTypeValue, ResetBackgroundColorCommand, ResetTextColorCommand, SetBackgroundColorCommand, SetBoldCommand, SetFontFamilyCommand, SetFontSizeCommand, SetHorizontalTextAlignCommand, SetItalicCommand, SetOverlineCommand, SetStrikeThroughCommand, SetStyleCommand, SetTextColorCommand, SetTextRotationCommand, SetTextWrapCommand, SetUnderlineCommand, SetVerticalTextAlignCommand, } from './commands/commands/set-style.command';
101
103
  export { SetTabColorCommand } from './commands/commands/set-tab-color.command';
102
- export { SetWorkbookNameCommand, type ISetWorkbookNameCommandParams } from './commands/commands/set-workbook-name.command';
103
- export { SetWorksheetActivateCommand, type ISetWorksheetActivateCommandParams, } from './commands/commands/set-worksheet-activate.command';
104
- export { DeltaColumnWidthCommand, SetColWidthCommand, type IDeltaColumnWidthCommandParams, } from './commands/commands/set-worksheet-col-width.command';
104
+ export { type ISetWorkbookNameCommandParams, SetWorkbookNameCommand } from './commands/commands/set-workbook-name.command';
105
+ export { type ISetWorksheetActivateCommandParams, SetWorksheetActivateCommand, } from './commands/commands/set-worksheet-activate.command';
106
+ export { DeltaColumnWidthCommand, type IDeltaColumnWidthCommandParams, SetColWidthCommand, } from './commands/commands/set-worksheet-col-width.command';
105
107
  export { SetWorksheetHideCommand } from './commands/commands/set-worksheet-hide.command';
106
- export { SetWorksheetNameCommand, type ISetWorksheetNameCommandParams, } from './commands/commands/set-worksheet-name.command';
108
+ export { type ISetWorksheetNameCommandParams, SetWorksheetNameCommand, } from './commands/commands/set-worksheet-name.command';
107
109
  export { SetWorksheetOrderCommand } from './commands/commands/set-worksheet-order.command';
108
110
  export { SetWorksheetPermissionPointsCommand } from './commands/commands/set-worksheet-permission-points.command';
109
111
  export { SetWorksheetRightToLeftCommand } from './commands/commands/set-worksheet-right-to-left.command';
110
- export { DeltaRowHeightCommand, SetRowHeightCommand, SetWorksheetRowIsAutoHeightCommand, type IDeltaRowHeightCommand, type ISetWorksheetRowIsAutoHeightCommandParams, } from './commands/commands/set-worksheet-row-height.command';
112
+ export { DeltaRowHeightCommand, type IDeltaRowHeightCommand, type ISetWorksheetRowIsAutoHeightCommandParams, SetRowHeightCommand, SetWorksheetRowIsAutoHeightCommand, } from './commands/commands/set-worksheet-row-height.command';
111
113
  export { SetWorksheetShowCommand } from './commands/commands/set-worksheet-show.command';
114
+ export type { ISetWorksheetShowCommandParams } from './commands/commands/set-worksheet-show.command';
112
115
  export { AddRangeProtectionMutation, FactoryAddRangeProtectionMutation, type IAddRangeProtectionMutationParams } from './commands/mutations/add-range-protection.mutation';
113
- export { AddWorksheetMergeMutation, AddMergeUndoMutationFactory } from './commands/mutations/add-worksheet-merge.mutation';
116
+ export { AddMergeUndoMutationFactory, AddWorksheetMergeMutation } from './commands/mutations/add-worksheet-merge.mutation';
114
117
  export { AddWorksheetProtectionMutation, type IAddWorksheetProtectionParams } from './commands/mutations/add-worksheet-protection.mutation';
115
118
  export { DeleteRangeProtectionMutation, FactoryDeleteRangeProtectionMutation, type IDeleteSelectionProtectionMutationParams } from './commands/mutations/delete-range-protection.mutation';
116
119
  export { DeleteWorksheetProtectionMutation } from './commands/mutations/delete-worksheet-protection.mutation';
117
120
  export { EmptyMutation } from './commands/mutations/empty.mutation';
118
- export { InsertRowMutation, InsertColMutation, InsertRowMutationUndoFactory, InsertColMutationUndoFactory, } from './commands/mutations/insert-row-col.mutation';
121
+ export { InsertColMutation, InsertColMutationUndoFactory, InsertRowMutation, InsertRowMutationUndoFactory, } from './commands/mutations/insert-row-col.mutation';
119
122
  export { InsertSheetMutation, InsertSheetUndoMutationFactory } from './commands/mutations/insert-sheet.mutation';
120
- export { MoveRangeMutation, type IMoveRangeMutationParams } from './commands/mutations/move-range.mutation';
121
- export { MoveRowsMutation, MoveColsMutation, MoveRowsMutationUndoFactory, MoveColsMutationUndoFactory, type IMoveRowsMutationParams, type IMoveColumnsMutationParams, } from './commands/mutations/move-rows-cols.mutation';
122
- export { SetNumfmtMutation, RemoveNumfmtMutation, factorySetNumfmtUndoMutation, factoryRemoveNumfmtUndoMutation, transformCellsToRange, type ISetNumfmtMutationParams, type IRemoveNumfmtMutationParams, type ISetCellsNumfmt, } from './commands/mutations/numfmt-mutation';
123
- export { RemoveRowMutation, RemoveColMutation } from './commands/mutations/remove-row-col.mutation';
123
+ export { type IMoveRangeMutationParams, MoveRangeMutation } from './commands/mutations/move-range.mutation';
124
+ export { type IMoveColumnsMutationParams, type IMoveRowsMutationParams, MoveColsMutation, MoveColsMutationUndoFactory, MoveRowsMutation, MoveRowsMutationUndoFactory, } from './commands/mutations/move-rows-cols.mutation';
125
+ export { factoryRemoveNumfmtUndoMutation, factorySetNumfmtUndoMutation, type IRemoveNumfmtMutationParams, type ISetCellsNumfmt, type ISetNumfmtMutationParams, RemoveNumfmtMutation, SetNumfmtMutation, transformCellsToRange, } from './commands/mutations/numfmt-mutation';
126
+ export { RemoveColMutation, RemoveRowMutation } from './commands/mutations/remove-row-col.mutation';
124
127
  export { RemoveSheetMutation, RemoveSheetUndoMutationFactory } from './commands/mutations/remove-sheet.mutation';
125
- export { RemoveWorksheetMergeMutation, RemoveMergeUndoMutationFactory } from './commands/mutations/remove-worksheet-merge.mutation';
126
- export { ReorderRangeMutation, ReorderRangeUndoMutationFactory, type IReorderRangeMutationParams } from './commands/mutations/reorder-range.mutation';
127
- export { SetColHiddenMutation, SetColVisibleMutation, type ISetColHiddenMutationParams, type ISetColVisibleMutationParams, } from './commands/mutations/set-col-visible.mutation';
128
- export { SetFrozenMutation, SetFrozenMutationFactory, type ISetFrozenMutationParams, } from './commands/mutations/set-frozen.mutation';
128
+ export { RemoveMergeUndoMutationFactory, RemoveWorksheetMergeMutation } from './commands/mutations/remove-worksheet-merge.mutation';
129
+ export { type IReorderRangeMutationParams, ReorderRangeMutation, ReorderRangeUndoMutationFactory } from './commands/mutations/reorder-range.mutation';
130
+ export { type ISetColHiddenMutationParams, type ISetColVisibleMutationParams, SetColHiddenMutation, SetColVisibleMutation, } from './commands/mutations/set-col-visible.mutation';
131
+ export { type ISetFrozenMutationParams, SetFrozenMutation, SetFrozenMutationFactory, } from './commands/mutations/set-frozen.mutation';
129
132
  export { SetHideGridlinesMutation } from './commands/mutations/set-hide-gridlines.mutatiom';
130
- export { SetRangeProtectionMutation, FactorySetRangeProtectionMutation, type ISetRangeProtectionMutationParams } from './commands/mutations/set-range-protection.mutation';
131
- export { SetRangeValuesMutation, SetRangeValuesUndoMutationFactory, type ISetRangeValuesMutationParams, type ISetRangeValuesRangeMutationParams, } from './commands/mutations/set-range-values.mutation';
132
- export { SetRowVisibleMutation, SetRowHiddenMutation, type ISetRowVisibleMutationParams, type ISetRowHiddenMutationParams, } from './commands/mutations/set-row-visible.mutation';
133
- export { SetTabColorMutation, type ISetTabColorMutationParams } from './commands/mutations/set-tab-color.mutation';
134
- export { SetWorkbookNameMutation, type ISetWorkbookNameMutationParams } from './commands/mutations/set-workbook-name.mutation';
135
- export { SetWorksheetColWidthMutation, SetWorksheetColWidthMutationFactory, type ISetWorksheetColWidthMutationParams, } from './commands/mutations/set-worksheet-col-width.mutation';
136
- export { SetWorksheetHideMutation, type ISetWorksheetHideMutationParams } from './commands/mutations/set-worksheet-hide.mutation';
137
- export { SetWorksheetNameMutation, type ISetWorksheetNameMutationParams } from './commands/mutations/set-worksheet-name.mutation';
138
- export { SetWorksheetOrderMutation, type ISetWorksheetOrderMutationParams } from './commands/mutations/set-worksheet-order.mutation';
133
+ export { FactorySetRangeProtectionMutation, type ISetRangeProtectionMutationParams, SetRangeProtectionMutation } from './commands/mutations/set-range-protection.mutation';
134
+ export { type ISetRangeValuesMutationParams, type ISetRangeValuesRangeMutationParams, SetRangeValuesMutation, SetRangeValuesUndoMutationFactory, } from './commands/mutations/set-range-values.mutation';
135
+ export { type ISetRowHiddenMutationParams, type ISetRowVisibleMutationParams, SetRowHiddenMutation, SetRowVisibleMutation, } from './commands/mutations/set-row-visible.mutation';
136
+ export { type ISetTabColorMutationParams, SetTabColorMutation } from './commands/mutations/set-tab-color.mutation';
137
+ export { type ISetWorkbookNameMutationParams, SetWorkbookNameMutation } from './commands/mutations/set-workbook-name.mutation';
138
+ export { type ISetWorksheetColWidthMutationParams, SetWorksheetColWidthMutation, SetWorksheetColWidthMutationFactory, } from './commands/mutations/set-worksheet-col-width.mutation';
139
+ export { type ISetWorksheetHideMutationParams, SetWorksheetHideMutation } from './commands/mutations/set-worksheet-hide.mutation';
140
+ export { type ISetWorksheetNameMutationParams, SetWorksheetNameMutation } from './commands/mutations/set-worksheet-name.mutation';
141
+ export { type ISetWorksheetOrderMutationParams, SetWorksheetOrderMutation } from './commands/mutations/set-worksheet-order.mutation';
139
142
  export { SetWorksheetPermissionPointsMutation } from './commands/mutations/set-worksheet-permission-points.mutation';
140
143
  export type { ISetWorksheetPermissionPointsMutationParams } from './commands/mutations/set-worksheet-permission-points.mutation';
141
144
  export { SetWorksheetProtectionMutation } from './commands/mutations/set-worksheet-protection.mutation';
142
145
  export { SetWorksheetRightToLeftMutation } from './commands/mutations/set-worksheet-right-to-left.mutation';
143
- export { SetWorksheetRowHeightMutation, SetWorksheetRowIsAutoHeightMutation, SetWorksheetRowAutoHeightMutation, SetWorksheetRowAutoHeightMutationFactory, type ISetWorksheetRowHeightMutationParams, type ISetWorksheetRowIsAutoHeightMutationParams, type ISetWorksheetRowAutoHeightMutationParams, } from './commands/mutations/set-worksheet-row-height.mutation';
146
+ export { type ISetWorksheetRowAutoHeightMutationParams, type ISetWorksheetRowHeightMutationParams, type ISetWorksheetRowIsAutoHeightMutationParams, SetWorksheetRowAutoHeightMutation, SetWorksheetRowAutoHeightMutationFactory, SetWorksheetRowHeightMutation, SetWorksheetRowIsAutoHeightMutation, } from './commands/mutations/set-worksheet-row-height.mutation';
144
147
  export { ScrollToCellOperation } from './commands/operations/scroll-to-cell.operation';
145
- export { SetSelectionsOperation, type ISetSelectionsOperationParams } from './commands/operations/selection.operation';
146
- export { SetWorksheetActiveOperation, type ISetWorksheetActiveOperationParams } from './commands/operations/set-worksheet-active.operation';
148
+ export { type ISetSelectionsOperationParams, SetSelectionsOperation } from './commands/operations/selection.operation';
149
+ export { type ISetWorksheetActiveOperationParams, SetWorksheetActiveOperation } from './commands/operations/set-worksheet-active.operation';
@@ -12,6 +12,13 @@ export interface IRangeProtectionRule {
12
12
  }
13
13
  export type IObjectModel = Record<string, Record<string, IRangeProtectionRule[]>>;
14
14
  export type IModel = Map<string, Map<string, Map<string, IRangeProtectionRule>>>;
15
+ export interface IRuleChange {
16
+ unitId: string;
17
+ subUnitId: string;
18
+ rule: IRangeProtectionRule;
19
+ oldRule?: IRangeProtectionRule;
20
+ type: IRuleChangeType;
21
+ }
15
22
  type IRuleChangeType = 'add' | 'set' | 'delete';
16
23
  export declare class RangeProtectionRuleModel {
17
24
  /**
@@ -20,13 +27,7 @@ export declare class RangeProtectionRuleModel {
20
27
  */
21
28
  private _model;
22
29
  private _ruleChange;
23
- ruleChange$: import('rxjs').Observable<{
24
- unitId: string;
25
- subUnitId: string;
26
- rule: IRangeProtectionRule;
27
- oldRule?: IRangeProtectionRule;
28
- type: IRuleChangeType;
29
- }>;
30
+ ruleChange$: import('rxjs').Observable<IRuleChange>;
30
31
  private _ruleRefresh;
31
32
  ruleRefresh$: import('rxjs').Observable<unknown>;
32
33
  ruleRefresh(id: string): void;
@@ -39,6 +40,7 @@ export declare class RangeProtectionRuleModel {
39
40
  setRule(unitId: string, subUnitId: string, id: string, rule: IRangeProtectionRule): void;
40
41
  getRule(unitId: string, subUnitId: string, id: string): IRangeProtectionRule | undefined;
41
42
  getSubunitRuleList(unitId: string, subUnitId: string): IRangeProtectionRule[];
43
+ getSubunitRuleListLength(unitId: string, subUnitId: string): number;
42
44
  private _ensureRuleMap;
43
45
  toObject(): IObjectModel;
44
46
  fromObject(obj: IObjectModel): void;
@@ -0,0 +1,30 @@
1
+ import { IRange, Disposable, IPermissionService, IUniverInstanceService } from '@univerjs/core';
2
+ import { UnitAction } from '@univerjs/protocol';
3
+ import { RangeProtectionRuleModel } from './range-protection-rule.model';
4
+ export declare class RangeProtectionCache extends Disposable {
5
+ private readonly _ruleModel;
6
+ private readonly _permissionService;
7
+ private readonly _univerInstanceService;
8
+ private readonly _cellRuleCache;
9
+ private readonly _permissionIdCache;
10
+ private readonly _cellInfoCache;
11
+ constructor(_ruleModel: RangeProtectionRuleModel, _permissionService: IPermissionService, _univerInstanceService: IUniverInstanceService);
12
+ private _initCache;
13
+ private _initUpdateCellInfoCache;
14
+ private _initUpdateCellRuleCache;
15
+ private _ensureRuleMap;
16
+ private _ensureCellInfoMap;
17
+ private _addCellRuleCache;
18
+ private _deleteCellRuleCache;
19
+ reBuildCache(unitId: string, subUnitId: string): void;
20
+ getCellInfo(unitId: string, subUnitId: string, row: number, col: number): (Partial<Record<UnitAction, boolean>> & {
21
+ ruleId?: string;
22
+ ranges?: IRange[];
23
+ }) | {
24
+ 1: boolean;
25
+ 0: boolean;
26
+ ruleId: string;
27
+ ranges: IRange[];
28
+ } | undefined;
29
+ deleteUnit(unitId: string): void;
30
+ }
@@ -1,7 +1,7 @@
1
1
  import { BorderStyleTypes, BorderType, IDisposable } from '@univerjs/core';
2
2
  export interface IBorderInfo {
3
3
  type: BorderType;
4
- color: string;
4
+ color: string | undefined;
5
5
  style: BorderStyleTypes;
6
6
  activeBorderType: boolean;
7
7
  }
@@ -13,42 +13,42 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export { WorksheetCopyPermission } from './worksheet/copy';
17
- export { WorksheetSelectProtectedCellsPermission } from './worksheet/select-protected-cells';
18
- export { WorksheetSelectUnProtectedCellsPermission } from './worksheet/select-un-protected-cells';
19
- export { WorksheetSetCellStylePermission } from './worksheet/set-cell-style';
20
- export { WorksheetSetCellValuePermission } from './worksheet/set-cell-value';
21
- export { WorksheetViewPermission } from './worksheet/view';
22
- export { WorksheetSetRowStylePermission } from './worksheet/set-row-style';
23
- export { WorksheetSetColumnStylePermission } from './worksheet/set-column-style';
24
- export { WorksheetInsertRowPermission } from './worksheet/insert-row';
25
- export { WorksheetInsertColumnPermission } from './worksheet/insert-column';
26
- export { WorksheetInsertHyperlinkPermission } from './worksheet/insert-hyperlink';
27
- export { WorksheetDeleteRowPermission } from './worksheet/delete-row';
28
- export { WorksheetDeleteColumnPermission } from './worksheet/delete-column';
29
- export { WorksheetSortPermission } from './worksheet/sort';
30
- export { WorksheetFilterPermission } from './worksheet/filter';
31
- export { WorksheetPivotTablePermission } from './worksheet/pivot-table';
32
- export { WorksheetEditExtraObjectPermission } from './worksheet/edit-extra-object';
33
- export { WorksheetManageCollaboratorPermission } from './worksheet/manage-collaborator';
34
- export { WorksheetEditPermission } from './worksheet/edit';
16
+ export { RangeProtectionPermissionEditPoint } from './range/edit';
17
+ export { RangeProtectionPermissionViewPoint } from './range/view';
35
18
  export { WorkbookCommentPermission } from './workbook/comment';
36
- export { WorkbookEditablePermission } from './workbook/editable';
19
+ export { WorkbookCopyPermission } from './workbook/copy';
20
+ export { WorkbookCopySheetPermission } from './workbook/copy-sheet';
21
+ export { WorkbookCreateSheetPermission } from './workbook/create-sheet';
22
+ export { WorkbookDeleteSheetPermission } from './workbook/delete-sheet';
37
23
  export { WorkbookDuplicatePermission } from './workbook/duplicate';
38
- export { WorkbookPrintPermission } from './workbook/print';
24
+ export { WorkbookEditablePermission } from './workbook/editable';
39
25
  export { WorkbookExportPermission } from './workbook/export';
40
- export { WorkbookMoveSheetPermission } from './workbook/move-sheet';
41
- export { WorkbookDeleteSheetPermission } from './workbook/delete-sheet';
42
26
  export { WorkbookHideSheetPermission } from './workbook/hide-sheet';
43
- export { WorkbookRenameSheetPermission } from './workbook/rename-sheet';
44
- export { WorkbookCreateSheetPermission } from './workbook/create-sheet';
45
27
  export { WorkbookHistoryPermission } from './workbook/history';
46
- export { WorkbookViewPermission } from './workbook/view';
47
- export { WorkbookSharePermission } from './workbook/share';
48
- export { WorkbookCopyPermission } from './workbook/copy';
49
- export { WorkbookCopySheetPermission } from './workbook/copy-sheet';
50
28
  export { WorkbookManageCollaboratorPermission } from './workbook/manage-collaborator';
51
- export { WorkbookViewHistoryPermission } from './workbook/view-history';
29
+ export { WorkbookMoveSheetPermission } from './workbook/move-sheet';
30
+ export { WorkbookPrintPermission } from './workbook/print';
52
31
  export { WorkbookRecoverHistoryPermission } from './workbook/recover-history';
53
- export { RangeProtectionPermissionEditPoint } from './range/edit';
54
- export { RangeProtectionPermissionViewPoint } from './range/view';
32
+ export { WorkbookRenameSheetPermission } from './workbook/rename-sheet';
33
+ export { WorkbookSharePermission } from './workbook/share';
34
+ export { WorkbookViewPermission } from './workbook/view';
35
+ export { WorkbookViewHistoryPermission } from './workbook/view-history';
36
+ export { WorksheetCopyPermission } from './worksheet/copy';
37
+ export { WorksheetDeleteColumnPermission } from './worksheet/delete-column';
38
+ export { WorksheetDeleteRowPermission } from './worksheet/delete-row';
39
+ export { WorksheetEditPermission } from './worksheet/edit';
40
+ export { WorksheetEditExtraObjectPermission } from './worksheet/edit-extra-object';
41
+ export { WorksheetFilterPermission } from './worksheet/filter';
42
+ export { WorksheetInsertColumnPermission } from './worksheet/insert-column';
43
+ export { WorksheetInsertHyperlinkPermission } from './worksheet/insert-hyperlink';
44
+ export { WorksheetInsertRowPermission } from './worksheet/insert-row';
45
+ export { WorksheetManageCollaboratorPermission } from './worksheet/manage-collaborator';
46
+ export { WorksheetPivotTablePermission } from './worksheet/pivot-table';
47
+ export { WorksheetSelectProtectedCellsPermission } from './worksheet/select-protected-cells';
48
+ export { WorksheetSelectUnProtectedCellsPermission } from './worksheet/select-un-protected-cells';
49
+ export { WorksheetSetCellStylePermission } from './worksheet/set-cell-style';
50
+ export { WorksheetSetCellValuePermission } from './worksheet/set-cell-value';
51
+ export { WorksheetSetColumnStylePermission } from './worksheet/set-column-style';
52
+ export { WorksheetSetRowStylePermission } from './worksheet/set-row-style';
53
+ export { WorksheetSortPermission } from './worksheet/sort';
54
+ export { WorksheetViewPermission } from './worksheet/view';
@@ -1,19 +1,21 @@
1
- import { Disposable, DisposableCollection, ICommandService, IUniverInstanceService, IMutationInfo } from '@univerjs/core';
2
- import { RangeProtectionRuleModel } from '../../../model/range-protection-rule.model';
3
- import { RangeProtectionRenderModel } from '../../../model/range-protection-render.model';
1
+ import { IMutationInfo, Disposable, DisposableCollection, ICommandService, IUniverInstanceService } from '@univerjs/core';
2
+ import { IAddRangeProtectionMutationParams } from '../../../commands/mutations/add-range-protection.mutation';
3
+ import { IDeleteSelectionProtectionMutationParams } from '../../../commands/mutations/delete-range-protection.mutation';
4
4
  import { ISetRangeProtectionMutationParams } from '../../../commands/mutations/set-range-protection.mutation';
5
5
  import { EffectRefRangeParams } from '../../../services/ref-range/type';
6
+ import { RangeProtectionCache } from '../../../model/range-protection.cache';
7
+ import { RangeProtectionRenderModel } from '../../../model/range-protection-render.model';
8
+ import { RangeProtectionRuleModel } from '../../../model/range-protection-rule.model';
6
9
  import { RefRangeService } from '../../../services/ref-range/ref-range.service';
7
- import { IDeleteSelectionProtectionMutationParams } from '../../../commands/mutations/delete-range-protection.mutation';
8
- import { IAddRangeProtectionMutationParams } from '../../../commands/mutations/add-range-protection.mutation';
9
10
  export declare class RangeProtectionRefRangeService extends Disposable {
10
11
  private _selectionProtectionRuleModel;
11
12
  private _univerInstanceService;
12
13
  private readonly _commandService;
13
14
  private readonly _refRangeService;
14
15
  private readonly _selectionProtectionRenderModel;
16
+ private readonly _rangeProtectionCache;
15
17
  disposableCollection: DisposableCollection;
16
- constructor(_selectionProtectionRuleModel: RangeProtectionRuleModel, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _refRangeService: RefRangeService, _selectionProtectionRenderModel: RangeProtectionRenderModel);
18
+ constructor(_selectionProtectionRuleModel: RangeProtectionRuleModel, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _refRangeService: RefRangeService, _selectionProtectionRenderModel: RangeProtectionRenderModel, _rangeProtectionCache: RangeProtectionCache);
17
19
  private _onRefRangeChange;
18
20
  refRangeHandle(config: EffectRefRangeParams, unitId: string, subUnitId: string): {
19
21
  redos: {
@@ -36,4 +38,5 @@ export declare class RangeProtectionRefRangeService extends Disposable {
36
38
  private _getRefRangeMutationsByMoveCols;
37
39
  private _correctPermissionRange;
38
40
  private _checkIsRightRange;
41
+ private _initReBuildCache;
39
42
  }
@@ -1,10 +1,12 @@
1
1
  import { Disposable, IPermissionService, IResourceManagerService } from '@univerjs/core';
2
+ import { RangeProtectionCache } from '../../../model/range-protection.cache';
2
3
  import { RangeProtectionRuleModel } from '../../../model/range-protection-rule.model';
3
4
  export declare class RangeProtectionService extends Disposable {
4
5
  private _selectionProtectionRuleModel;
5
6
  private _permissionService;
6
7
  private _resourceManagerService;
7
- constructor(_selectionProtectionRuleModel: RangeProtectionRuleModel, _permissionService: IPermissionService, _resourceManagerService: IResourceManagerService);
8
+ private _selectionProtectionCache;
9
+ constructor(_selectionProtectionRuleModel: RangeProtectionRuleModel, _permissionService: IPermissionService, _resourceManagerService: IResourceManagerService, _selectionProtectionCache: RangeProtectionCache);
8
10
  private _initRuleChange;
9
11
  private _initSnapshot;
10
12
  }
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export { WorksheetPermissionService } from './worksheet-permission.service';
17
- export { WorksheetProtectionRuleModel } from './worksheet-permission-rule.model';
18
17
  export { WorksheetProtectionPointModel } from './worksheet-permission-point.model';
18
+ export { WorksheetProtectionRuleModel } from './worksheet-permission-rule.model';
@@ -1,5 +1,5 @@
1
1
  import { UnitAction } from '@univerjs/protocol';
2
- import { WorksheetCopyPermission, WorksheetViewPermission } from '../permission-point';
3
- export declare const getAllWorksheetPermissionPoint: () => (typeof WorksheetViewPermission)[];
2
+ import { WorksheetCopyPermission, WorksheetEditPermission } from '../permission-point';
3
+ export declare const getAllWorksheetPermissionPoint: () => (typeof WorksheetEditPermission)[];
4
4
  export declare const getAllWorksheetPermissionPointByPointPanel: () => (typeof WorksheetCopyPermission)[];
5
5
  export declare const defaultWorksheetPermissionPoint: UnitAction[];