@univerjs/sheets 0.2.15 → 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.
- package/lib/cjs/index.js +3 -3
- package/lib/es/index.js +1549 -1300
- package/lib/types/basics/rangeMerge.d.ts +1 -1
- package/lib/types/commands/commands/__tests__/add-merge-command.spec.d.ts +16 -0
- package/lib/types/commands/commands/set-border-command.d.ts +8 -8
- package/lib/types/commands/commands/utils/selection-utils.d.ts +1 -1
- package/lib/types/commands/commands/utils/target-util.d.ts +1 -2
- package/lib/types/index.d.ts +65 -63
- package/lib/types/model/range-protection-rule.model.d.ts +9 -7
- package/lib/types/model/range-protection.cache.d.ts +30 -0
- package/lib/types/services/border-style-manager.service.d.ts +1 -1
- package/lib/types/services/permission/permission-point/index.d.ts +32 -32
- package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +9 -6
- package/lib/types/services/permission/range-permission/range-protection.service.d.ts +3 -1
- package/lib/types/services/permission/worksheet-permission/index.d.ts +1 -1
- package/lib/types/services/permission/worksheet-permission/utils.d.ts +2 -2
- package/lib/types/services/ref-range/util.d.ts +5 -5
- package/lib/types/services/sheet-interceptor/interceptor-const.d.ts +4 -2
- package/lib/types/services/sheet-interceptor/sheet-interceptor.service.d.ts +2 -2
- package/lib/types/sheets-plugin.d.ts +2 -2
- package/lib/umd/index.js +2 -2
- package/package.json +13 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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[];
|
|
@@ -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 {};
|
|
@@ -5,24 +5,24 @@ export interface ISetBorderBasicCommandParams {
|
|
|
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
|
-
*
|
|
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 {};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -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 {
|
|
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 {
|
|
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,107 +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,
|
|
45
|
-
export {
|
|
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 {
|
|
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 {
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
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 {
|
|
61
|
-
export {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
83
|
-
export {
|
|
84
|
-
export {
|
|
85
|
-
export {
|
|
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 {
|
|
88
|
-
export {
|
|
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 {
|
|
91
|
-
export {
|
|
92
|
-
export {
|
|
93
|
-
export {
|
|
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 {
|
|
98
|
-
export {
|
|
99
|
-
export {
|
|
100
|
-
export {
|
|
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 {
|
|
103
|
-
export {
|
|
104
|
-
export { DeltaColumnWidthCommand,
|
|
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 {
|
|
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,
|
|
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';
|
|
112
114
|
export type { ISetWorksheetShowCommandParams } from './commands/commands/set-worksheet-show.command';
|
|
113
115
|
export { AddRangeProtectionMutation, FactoryAddRangeProtectionMutation, type IAddRangeProtectionMutationParams } from './commands/mutations/add-range-protection.mutation';
|
|
114
|
-
export {
|
|
116
|
+
export { AddMergeUndoMutationFactory, AddWorksheetMergeMutation } from './commands/mutations/add-worksheet-merge.mutation';
|
|
115
117
|
export { AddWorksheetProtectionMutation, type IAddWorksheetProtectionParams } from './commands/mutations/add-worksheet-protection.mutation';
|
|
116
118
|
export { DeleteRangeProtectionMutation, FactoryDeleteRangeProtectionMutation, type IDeleteSelectionProtectionMutationParams } from './commands/mutations/delete-range-protection.mutation';
|
|
117
119
|
export { DeleteWorksheetProtectionMutation } from './commands/mutations/delete-worksheet-protection.mutation';
|
|
118
120
|
export { EmptyMutation } from './commands/mutations/empty.mutation';
|
|
119
|
-
export {
|
|
121
|
+
export { InsertColMutation, InsertColMutationUndoFactory, InsertRowMutation, InsertRowMutationUndoFactory, } from './commands/mutations/insert-row-col.mutation';
|
|
120
122
|
export { InsertSheetMutation, InsertSheetUndoMutationFactory } from './commands/mutations/insert-sheet.mutation';
|
|
121
|
-
export {
|
|
122
|
-
export {
|
|
123
|
-
export {
|
|
124
|
-
export {
|
|
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';
|
|
125
127
|
export { RemoveSheetMutation, RemoveSheetUndoMutationFactory } from './commands/mutations/remove-sheet.mutation';
|
|
126
|
-
export {
|
|
127
|
-
export { ReorderRangeMutation, ReorderRangeUndoMutationFactory
|
|
128
|
-
export {
|
|
129
|
-
export { SetFrozenMutation, SetFrozenMutationFactory,
|
|
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';
|
|
130
132
|
export { SetHideGridlinesMutation } from './commands/mutations/set-hide-gridlines.mutatiom';
|
|
131
|
-
export {
|
|
132
|
-
export {
|
|
133
|
-
export {
|
|
134
|
-
export {
|
|
135
|
-
export {
|
|
136
|
-
export { SetWorksheetColWidthMutation, SetWorksheetColWidthMutationFactory,
|
|
137
|
-
export {
|
|
138
|
-
export {
|
|
139
|
-
export {
|
|
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';
|
|
140
142
|
export { SetWorksheetPermissionPointsMutation } from './commands/mutations/set-worksheet-permission-points.mutation';
|
|
141
143
|
export type { ISetWorksheetPermissionPointsMutationParams } from './commands/mutations/set-worksheet-permission-points.mutation';
|
|
142
144
|
export { SetWorksheetProtectionMutation } from './commands/mutations/set-worksheet-protection.mutation';
|
|
143
145
|
export { SetWorksheetRightToLeftMutation } from './commands/mutations/set-worksheet-right-to-left.mutation';
|
|
144
|
-
export {
|
|
146
|
+
export { type ISetWorksheetRowAutoHeightMutationParams, type ISetWorksheetRowHeightMutationParams, type ISetWorksheetRowIsAutoHeightMutationParams, SetWorksheetRowAutoHeightMutation, SetWorksheetRowAutoHeightMutationFactory, SetWorksheetRowHeightMutation, SetWorksheetRowIsAutoHeightMutation, } from './commands/mutations/set-worksheet-row-height.mutation';
|
|
145
147
|
export { ScrollToCellOperation } from './commands/operations/scroll-to-cell.operation';
|
|
146
|
-
export {
|
|
147
|
-
export {
|
|
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
|
+
}
|
|
@@ -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 {
|
|
17
|
-
export {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
29
|
+
export { WorkbookMoveSheetPermission } from './workbook/move-sheet';
|
|
30
|
+
export { WorkbookPrintPermission } from './workbook/print';
|
|
52
31
|
export { WorkbookRecoverHistoryPermission } from './workbook/recover-history';
|
|
53
|
-
export {
|
|
54
|
-
export {
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
-
|
|
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,
|
|
3
|
-
export declare const getAllWorksheetPermissionPoint: () => (typeof
|
|
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[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ICommandInfo, IMutationInfo, IRange, Nullable
|
|
1
|
+
import { RANGE_TYPE, ICommandInfo, IMutationInfo, IRange, Nullable } from '@univerjs/core';
|
|
2
|
+
import { IMoveRangeMutationParams } from '../../commands/mutations/move-range.mutation';
|
|
2
3
|
import { IMoveColumnsMutationParams, IMoveRowsMutationParams } from '../../commands/mutations/move-rows-cols.mutation';
|
|
3
4
|
import { IInsertColMutationParams, IInsertRowMutationParams, IRemoveColMutationParams, IRemoveRowsMutationParams, IRemoveSheetMutationParams } from '../../basics';
|
|
4
|
-
import {
|
|
5
|
+
import { IRemoveRowColCommandInterceptParams } from '../../commands/commands/remove-row-col.command';
|
|
5
6
|
import { ISheetCommandSharedParams } from '../../commands/utils/interface';
|
|
6
7
|
import { SheetsSelectionsService } from '../selections/selection-manager.service';
|
|
7
|
-
import { IRemoveRowColCommandInterceptParams } from '../../commands/commands/remove-row-col.command';
|
|
8
8
|
import { EffectRefRangeParams, IDeleteRangeMoveLeftCommand, IDeleteRangeMoveUpCommand, IInsertColCommand, IInsertRangeMoveDownCommand, IInsertRangeMoveRightCommand, IInsertRowCommand, IMoveColsCommand, IMoveRangeCommand, IMoveRowsCommand, IOperator, IRemoveRowColCommand, IReorderRangeCommand } from './type';
|
|
9
9
|
export declare const handleRangeTypeInput: (range: IRange) => {
|
|
10
10
|
rangeType?: RANGE_TYPE;
|
|
@@ -75,10 +75,10 @@ export declare const handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterest
|
|
|
75
75
|
selectionManagerService: SheetsSelectionsService;
|
|
76
76
|
}) => IRange | null;
|
|
77
77
|
type MutationsAffectRange = ISheetCommandSharedParams | IRemoveSheetMutationParams | IMoveRowsMutationParams | IMoveColumnsMutationParams | IRemoveRowsMutationParams | IRemoveColMutationParams | IInsertColMutationParams | IInsertRowMutationParams | IMoveRangeMutationParams;
|
|
78
|
-
export declare const handleCommonDefaultRangeChangeWithEffectRefCommands: (range: IRange, commandInfo: ICommandInfo) => IRange
|
|
78
|
+
export declare const handleCommonDefaultRangeChangeWithEffectRefCommands: (range: IRange, commandInfo: ICommandInfo) => IRange[];
|
|
79
79
|
export declare const handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests: (range: IRange, commandInfo: ICommandInfo, deps: {
|
|
80
80
|
selectionManagerService: SheetsSelectionsService;
|
|
81
|
-
}) => IRange | IRange[]
|
|
81
|
+
}) => IRange | IRange[];
|
|
82
82
|
/**
|
|
83
83
|
* This function should work as a pure function.
|
|
84
84
|
*
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ICellDataForSheetInterceptor } from '@univerjs/core';
|
|
1
|
+
import { ICellData, ICellDataForSheetInterceptor, ICellInterceptor, Nullable } from '@univerjs/core';
|
|
2
2
|
import { ISheetLocation, ISheetRowLocation } from './utils/interceptor';
|
|
3
3
|
export declare const INTERCEPTOR_POINT: {
|
|
4
|
-
CELL_CONTENT:
|
|
4
|
+
CELL_CONTENT: ICellInterceptor<ICellDataForSheetInterceptor, ISheetLocation & {
|
|
5
|
+
rawData: Nullable<ICellData>;
|
|
6
|
+
}>;
|
|
5
7
|
ROW_FILTERED: import('@univerjs/core').IInterceptor<boolean, ISheetRowLocation>;
|
|
6
8
|
};
|
|
7
9
|
export declare enum InterceptCellContentPriority {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICommandInfo, IDisposable, IInterceptor, IRange, IUndoRedoCommandInfosByInterceptor, Nullable
|
|
1
|
+
import { Disposable, InterceptorEffectEnum, IUniverInstanceService, ICommandInfo, IDisposable, IInterceptor, IRange, IUndoRedoCommandInfosByInterceptor, Nullable } from '@univerjs/core';
|
|
2
2
|
export interface IBeforeCommandInterceptor {
|
|
3
3
|
priority?: number;
|
|
4
4
|
performCheck(info: ICommandInfo): Promise<boolean>;
|
|
@@ -52,7 +52,7 @@ export declare class SheetInterceptorService extends Disposable {
|
|
|
52
52
|
onCommandExecute(info: ICommandInfo): IUndoRedoCommandInfosByInterceptor;
|
|
53
53
|
generateMutationsByRanges(info: IRangesInfo): IUndoRedoCommandInfosByInterceptor;
|
|
54
54
|
intercept<T extends IInterceptor<any, any>>(name: T, interceptor: T): IDisposable;
|
|
55
|
-
fetchThroughInterceptors<T, C>(name: IInterceptor<T, C
|
|
55
|
+
fetchThroughInterceptors<T, C>(name: IInterceptor<T, C>, effect?: InterceptorEffectEnum): (initValue: Nullable<T>, initContext: C) => Nullable<T>;
|
|
56
56
|
private _interceptWorkbook;
|
|
57
57
|
private _disposeWorkbookInterceptor;
|
|
58
58
|
private _disposeSheetInterceptor;
|