@univerjs/sheets 0.2.3 → 0.2.4-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 +1834 -1766
- package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +1 -2
- package/lib/types/commands/commands/move-range.command.d.ts +1 -2
- package/lib/types/commands/mutations/__tests__/create-command-test-bed.d.ts +1 -2
- package/lib/types/commands/mutations/add-worksheet-merge.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/delete-range-protection.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/insert-row-col.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/insert-sheet.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/move-rows-cols.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/numfmt-mutation.d.ts +1 -2
- package/lib/types/commands/mutations/remove-row-col.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/remove-sheet.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/remove-worksheet-merge.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-col-visible.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-frozen.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-hide-gridlines.mutatiom.d.ts +1 -2
- package/lib/types/commands/mutations/set-range-protection.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-range-values.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-row-visible.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-tab-color.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-worksheet-col-width.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-worksheet-hide.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-worksheet-name.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-worksheet-order.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-worksheet-right-to-left.mutation.d.ts +1 -2
- package/lib/types/commands/mutations/set-worksheet-row-height.mutation.d.ts +1 -2
- package/lib/types/commands/utils/handle-merge-operation.d.ts +1 -2
- package/lib/types/commands/utils/handle-range-mutation.d.ts +1 -2
- package/lib/types/commands/utils/selection-command-util.d.ts +1 -1
- package/lib/types/controllers/__tests__/util.d.ts +7 -8
- package/lib/types/controllers/basic-worksheet.controller.d.ts +1 -2
- package/lib/types/controllers/merge-cell.controller.d.ts +1 -2
- package/lib/types/index.d.ts +2 -2
- package/lib/types/services/__tests__/util.d.ts +7 -8
- package/lib/types/services/border-style-manager.service.d.ts +1 -2
- package/lib/types/services/numfmt/type.d.ts +1 -1
- package/lib/types/services/permission/permission-point/index.d.ts +2 -0
- package/lib/types/services/permission/permission-point/workbook/recover-history.d.ts +12 -0
- package/lib/types/services/permission/permission-point/workbook/view-history.d.ts +12 -0
- package/lib/types/services/permission/worksheet-permission/worksheet-permission.service.d.ts +1 -2
- package/lib/types/services/ref-range/__tests__/__testing__.d.ts +7 -8
- package/lib/types/services/ref-range/__tests__/ref-range.service.spec.d.ts +6 -6
- package/lib/types/services/ref-range/ref-range.service.d.ts +1 -2
- package/lib/types/services/ref-range/util.d.ts +4 -0
- package/lib/types/services/selections/ref-selections.service.d.ts +12 -2
- package/lib/types/services/selections/selection-manager.service.d.ts +9 -7
- package/lib/types/services/sheet-interceptor/__tests__/create-core-test-bed.d.ts +7 -8
- package/lib/types/services/sheet-interceptor/sheet-interceptor.service.d.ts +1 -2
- package/lib/types/sheets-plugin.d.ts +1 -2
- package/lib/umd/index.js +3 -3
- package/package.json +13 -15
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMutation } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, IMutation } from '@univerjs/core';
|
|
3
2
|
import { IAddWorksheetMergeMutationParams, IRemoveWorksheetMergeMutationParams } from '../../basics/interfaces/mutation-interface';
|
|
4
3
|
|
|
5
4
|
export declare const AddMergeUndoMutationFactory: (accessor: IAccessor, params: IAddWorksheetMergeMutationParams) => IRemoveWorksheetMergeMutationParams;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IAccessor } from '@
|
|
2
|
-
import { IMutation, IMutationInfo } from '@univerjs/core';
|
|
1
|
+
import { IAccessor, IMutation, IMutationInfo } from '@univerjs/core';
|
|
3
2
|
import { IAddRangeProtectionMutationParams } from './add-range-protection.mutation';
|
|
4
3
|
|
|
5
4
|
export interface IDeleteSelectionProtectionMutationParams {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMutation } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, IMutation } from '@univerjs/core';
|
|
3
2
|
import { IInsertColMutationParams, IInsertRowMutationParams, IRemoveColMutationParams, IRemoveRowsMutationParams } from '../../basics/interfaces/mutation-interface';
|
|
4
3
|
|
|
5
4
|
export declare const InsertRowMutationUndoFactory: (accessor: IAccessor, params: IInsertRowMutationParams) => IRemoveRowsMutationParams;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMutation } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, IMutation } from '@univerjs/core';
|
|
3
2
|
import { IInsertSheetMutationParams, IRemoveSheetMutationParams } from '../../basics/interfaces/mutation-interface';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ICommand, IMutationInfo, IRange } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, ICommand, IMutationInfo, IRange } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export declare const factorySetNumfmtUndoMutation: (accessor: IAccessor, option: ISetNumfmtMutationParams) => IMutationInfo<ISetNumfmtMutationParams | IRemoveNumfmtMutationParams>[];
|
|
5
4
|
export interface ISetNumfmtMutationParams {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMutation, Worksheet } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, IMutation, Worksheet } from '@univerjs/core';
|
|
3
2
|
import { IInsertColMutationParams, IInsertRowMutationParams, IRemoveColMutationParams, IRemoveRowsMutationParams } from '../../basics/interfaces/mutation-interface';
|
|
4
3
|
|
|
5
4
|
export declare const RemoveRowsUndoMutationFactory: (params: IRemoveRowsMutationParams, worksheet: Worksheet) => IInsertRowMutationParams;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMutation } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, IMutation } from '@univerjs/core';
|
|
3
2
|
import { IInsertSheetMutationParams, IRemoveSheetMutationParams } from '../../basics/interfaces/mutation-interface';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMutation } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, IMutation } from '@univerjs/core';
|
|
3
2
|
import { IAddWorksheetMergeMutationParams, IRemoveWorksheetMergeMutationParams } from '../../basics/interfaces/mutation-interface';
|
|
4
3
|
|
|
5
4
|
export declare const RemoveMergeUndoMutationFactory: (accessor: IAccessor, params: IRemoveWorksheetMergeMutationParams) => IAddWorksheetMergeMutationParams;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IAccessor } from '@
|
|
2
|
-
import { IMutation, IMutationInfo } from '@univerjs/core';
|
|
1
|
+
import { IAccessor, IMutation, IMutationInfo } from '@univerjs/core';
|
|
3
2
|
import { IRangeProtectionRule } from '../../model/range-protection-rule.model';
|
|
4
3
|
|
|
5
4
|
export interface ISetRangeProtectionMutationParams {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ICellData, ICopyToOptionsData, IMutation, IMutationCommonParams, IObjectMatrixPrimitiveType, IRange, Nullable } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, ICellData, ICopyToOptionsData, IMutation, IMutationCommonParams, IObjectMatrixPrimitiveType, IRange, Nullable } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
/** Params of `SetRangeValuesMutation` */
|
|
5
4
|
export interface ISetRangeValuesMutationParams extends IMutationCommonParams {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMutation, IObjectArrayPrimitiveType, IRange, Nullable } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, IMutation, IObjectArrayPrimitiveType, IRange, Nullable } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export interface ISetWorksheetColWidthMutationParams {
|
|
5
4
|
unitId: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BooleanNumber, IMutation, IObjectArrayPrimitiveType, IRange, IRowAutoHeightInfo, Nullable } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { BooleanNumber, IAccessor, IMutation, IObjectArrayPrimitiveType, IRange, IRowAutoHeightInfo, Nullable } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export interface ISetWorksheetRowHeightMutationParams {
|
|
5
4
|
unitId: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IAccessor } from '@
|
|
2
|
-
import { IRange } from '@univerjs/core';
|
|
1
|
+
import { IAccessor, IRange } from '@univerjs/core';
|
|
3
2
|
import { IAddMergeCommandParams } from '../commands/add-worksheet-merge.command';
|
|
4
3
|
import { ISetSelectionsOperationParams } from '../operations/selection.operation';
|
|
5
4
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMutationInfo, IObjectMatrixPrimitiveType, IRange, Nullable, Dimension, ObjectMatrix } from '@univerjs/core';
|
|
2
|
-
import { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor, IMutationInfo, IObjectMatrixPrimitiveType, IRange, Nullable, Dimension, ObjectMatrix } from '@univerjs/core';
|
|
3
2
|
import { IDeleteRangeMutationParams, IInsertRangeMutationParams } from '../../basics/interfaces/mutation-interface';
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAccessor } from '@
|
|
1
|
+
import { IAccessor } from '@univerjs/core';
|
|
2
2
|
import { SheetsSelectionsService } from '../../services/selections/selection-manager.service';
|
|
3
3
|
|
|
4
4
|
export declare function getSelectionsService(accessor: IAccessor): SheetsSelectionsService;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { IWorkbookData, Univer } from '@univerjs/core';
|
|
2
|
-
import { Dependency } from '@wendellhu/redi';
|
|
1
|
+
import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export declare function createTestBase(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
5
4
|
univer: Univer;
|
|
6
5
|
get: {
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
12
|
-
<T>(id: import('@
|
|
6
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
|
|
7
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
|
|
8
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
|
|
9
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
|
|
10
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
11
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
13
12
|
};
|
|
14
13
|
sheet: import('@univerjs/core').Workbook;
|
|
15
14
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IStyleData, Disposable, ICommandService, IConfigService } from '@univerjs/core';
|
|
2
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { IDisposable, IStyleData, Disposable, ICommandService, IConfigService } from '@univerjs/core';
|
|
3
2
|
import { DataSyncPrimaryController } from '@univerjs/rpc';
|
|
4
3
|
|
|
5
4
|
export interface IStyleTypeValue<T> {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IRange, Dimension, Disposable, DisposableCollection, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import { Injector } from '@wendellhu/redi';
|
|
1
|
+
import { IRange, Dimension, Disposable, DisposableCollection, ICommandService, Injector, IUniverInstanceService } from '@univerjs/core';
|
|
3
2
|
import { IRemoveWorksheetMergeMutationParams } from '../basics/interfaces/mutation-interface';
|
|
4
3
|
import { RefRangeService } from '../services/ref-range/ref-range.service';
|
|
5
4
|
import { EffectRefRangeParams } from '../services/ref-range/type';
|
package/lib/types/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export * from './services/permission/permission-point';
|
|
|
32
32
|
export { WorksheetPermissionService } from './services/permission/worksheet-permission/worksheet-permission.service';
|
|
33
33
|
export { WorkbookPermissionService } from './services/permission/workbook-permission/workbook-permission.service';
|
|
34
34
|
export { SheetsSelectionsService, WorkbookSelections, SelectionMoveType, DISABLE_NORMAL_SELECTIONS, } from './services/selections/selection-manager.service';
|
|
35
|
-
export { IRefSelectionsService } from './services/selections/ref-selections.service';
|
|
35
|
+
export { IRefSelectionsService, RefSelectionsService } from './services/selections/ref-selections.service';
|
|
36
36
|
export { getAddMergeMutationRangeByType } from './controllers/merge-cell.controller';
|
|
37
37
|
export { NumfmtService } from './services/numfmt/numfmt.service';
|
|
38
38
|
export type { INumfmtItem, INumfmtItemWithCache } from './services/numfmt/type';
|
|
@@ -53,7 +53,7 @@ export { defaultWorksheetPermissionPoint, getAllWorksheetPermissionPoint, getAll
|
|
|
53
53
|
export type { IWorksheetProtectionRule } from './services/permission/type';
|
|
54
54
|
export { WorksheetProtectionRuleModel, WorksheetProtectionPointModel } from './services/permission/worksheet-permission';
|
|
55
55
|
export { getAllWorkbookPermissionPoint, defaultWorkbookPermissionPoints } from './services/permission/workbook-permission';
|
|
56
|
-
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, } from './services/permission/permission-point';
|
|
56
|
+
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';
|
|
57
57
|
export { RangeProtectionRenderModel, type ICellPermission } from './model/range-protection-render.model';
|
|
58
58
|
export { RangeProtectionRuleModel, type IObjectModel, type IRangeProtectionRule, type IModel } from './model/range-protection-rule.model';
|
|
59
59
|
export type { IWorksheetProtectionRenderCellData } from './services/permission/worksheet-permission/type';
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { IWorkbookData, Univer } from '@univerjs/core';
|
|
2
|
-
import { Dependency } from '@wendellhu/redi';
|
|
1
|
+
import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export declare const TEST_WORKBOOK_DATA_DEMO: IWorkbookData;
|
|
5
4
|
export declare function createTestBase(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
6
5
|
univer: Univer;
|
|
7
6
|
get: {
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
12
|
-
<T>(id: import('@
|
|
13
|
-
<T>(id: import('@
|
|
7
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
|
|
8
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
|
|
9
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
|
|
10
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
|
|
11
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
12
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
14
13
|
};
|
|
15
14
|
sheet: import('@univerjs/core').Workbook;
|
|
16
15
|
};
|
|
@@ -19,4 +19,4 @@ export interface INumfmtService {
|
|
|
19
19
|
}>): void;
|
|
20
20
|
deleteValues(unitId: string, subUnitId: string, values: IRange[]): void;
|
|
21
21
|
}
|
|
22
|
-
export declare const INumfmtService: import('@
|
|
22
|
+
export declare const INumfmtService: import('@univerjs/core').IdentifierDecorator<INumfmtService>;
|
|
@@ -48,5 +48,7 @@ export { WorkbookSharePermission } from './workbook/share';
|
|
|
48
48
|
export { WorkbookCopyPermission } from './workbook/copy';
|
|
49
49
|
export { WorkbookCopySheetPermission } from './workbook/copy-sheet';
|
|
50
50
|
export { WorkbookManageCollaboratorPermission } from './workbook/manage-collaborator';
|
|
51
|
+
export { WorkbookViewHistoryPermission } from './workbook/view-history';
|
|
52
|
+
export { WorkbookRecoverHistoryPermission } from './workbook/recover-history';
|
|
51
53
|
export { RangeProtectionPermissionEditPoint } from './range/edit';
|
|
52
54
|
export { RangeProtectionPermissionViewPoint } from './range/view';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPermissionPoint, PermissionStatus } from '@univerjs/core';
|
|
2
|
+
import { UnitAction, UnitObject } from '@univerjs/protocol';
|
|
3
|
+
|
|
4
|
+
export declare class WorkbookRecoverHistoryPermission implements IPermissionPoint {
|
|
5
|
+
unitId: string;
|
|
6
|
+
id: string;
|
|
7
|
+
value: boolean;
|
|
8
|
+
type: UnitObject;
|
|
9
|
+
status: PermissionStatus;
|
|
10
|
+
subType: UnitAction;
|
|
11
|
+
constructor(unitId: string);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPermissionPoint, PermissionStatus } from '@univerjs/core';
|
|
2
|
+
import { UnitAction, UnitObject } from '@univerjs/protocol';
|
|
3
|
+
|
|
4
|
+
export declare class WorkbookViewHistoryPermission implements IPermissionPoint {
|
|
5
|
+
unitId: string;
|
|
6
|
+
id: string;
|
|
7
|
+
value: boolean;
|
|
8
|
+
type: UnitObject;
|
|
9
|
+
status: PermissionStatus;
|
|
10
|
+
subType: UnitAction;
|
|
11
|
+
constructor(unitId: string);
|
|
12
|
+
}
|
package/lib/types/services/permission/worksheet-permission/worksheet-permission.service.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IPermissionService, IResourceManagerService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
|
-
import { Injector } from '@wendellhu/redi';
|
|
1
|
+
import { Injector, IPermissionService, IResourceManagerService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
3
2
|
import { RangeProtectionRuleModel } from '../../../model/range-protection-rule.model';
|
|
4
3
|
import { WorksheetProtectionRuleModel } from './worksheet-permission-rule.model';
|
|
5
4
|
import { WorksheetProtectionPointModel } from './worksheet-permission-point.model';
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { IWorkbookData, Univer } from '@univerjs/core';
|
|
2
|
-
import { Dependency } from '@wendellhu/redi';
|
|
1
|
+
import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export declare const TEST_WORKBOOK_DATA_DEMO: IWorkbookData;
|
|
5
4
|
export declare function createTestBase(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
6
5
|
univer: Univer;
|
|
7
6
|
get: {
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
12
|
-
<T>(id: import('@
|
|
13
|
-
<T>(id: import('@
|
|
7
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
|
|
8
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
|
|
9
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
|
|
10
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
|
|
11
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
12
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
14
13
|
};
|
|
15
14
|
sheet: import('@univerjs/core').Workbook;
|
|
16
15
|
};
|
|
@@ -3,12 +3,12 @@ import { Univer } from '@univerjs/core';
|
|
|
3
3
|
export declare function createRefRangeTestBed(): {
|
|
4
4
|
univer: Univer;
|
|
5
5
|
get: {
|
|
6
|
-
<T>(id: import('@
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
6
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
|
|
7
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
|
|
8
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
|
|
9
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
|
|
10
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
11
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
12
12
|
};
|
|
13
13
|
sheet: import('@univerjs/core').Workbook;
|
|
14
14
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IMutationInfo, IRange, Nullable, Disposable, ICommandService, InterceptorManager, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { IDisposable, IMutationInfo, IRange, Nullable, Disposable, ICommandService, InterceptorManager, IUniverInstanceService } from '@univerjs/core';
|
|
3
2
|
import { SheetsSelectionsService } from '../selections/selection-manager.service';
|
|
4
3
|
import { SheetInterceptorService } from '../sheet-interceptor/sheet-interceptor.service';
|
|
5
4
|
import { EffectRefRangeParams } from './type';
|
|
@@ -12,6 +12,8 @@ export declare const handleRangeTypeInput: (range: IRange) => {
|
|
|
12
12
|
endAbsoluteRefType?: import('@univerjs/core').AbsoluteRefType;
|
|
13
13
|
startRow: number;
|
|
14
14
|
endRow: number;
|
|
15
|
+
unitId?: string;
|
|
16
|
+
sheetId?: string;
|
|
15
17
|
startColumn: number;
|
|
16
18
|
endColumn: number;
|
|
17
19
|
};
|
|
@@ -21,6 +23,8 @@ export declare const handleRangeTypeOutput: (range: IRange, maxRow: number, maxC
|
|
|
21
23
|
endAbsoluteRefType?: import('@univerjs/core').AbsoluteRefType;
|
|
22
24
|
startRow: number;
|
|
23
25
|
endRow: number;
|
|
26
|
+
unitId?: string;
|
|
27
|
+
sheetId?: string;
|
|
24
28
|
startColumn: number;
|
|
25
29
|
endColumn: number;
|
|
26
30
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { SheetsSelectionsService } from './selection-manager.service';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Ref selections service reuses code of `SelectionManagerService`. And it only contains ref selections
|
|
@@ -6,4 +7,13 @@ import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
|
6
7
|
*
|
|
7
8
|
* Its data should be cleared by the caller quit editing formula and reconstructed when user starts editing.
|
|
8
9
|
*/
|
|
9
|
-
export declare const IRefSelectionsService: import('@
|
|
10
|
+
export declare const IRefSelectionsService: import('@univerjs/core').IdentifierDecorator<SheetsSelectionsService>;
|
|
11
|
+
/**
|
|
12
|
+
* RefSelectionsService treats `selectionMoveStart$` `selectionMoving$` and `selectionMoveEnd$` differently
|
|
13
|
+
* than `SheetsSelectionsService`. Because ref selections can be in different workbooks.
|
|
14
|
+
*/
|
|
15
|
+
export declare class RefSelectionsService extends SheetsSelectionsService {
|
|
16
|
+
constructor(_instanceSrv: IUniverInstanceService);
|
|
17
|
+
protected _init(): void;
|
|
18
|
+
private _getAliveWorkbooks$;
|
|
19
|
+
}
|
|
@@ -12,12 +12,13 @@ export declare enum SelectionMoveType {
|
|
|
12
12
|
MOVE_END = 2
|
|
13
13
|
}
|
|
14
14
|
export declare class SheetsSelectionsService extends RxDisposable {
|
|
15
|
-
|
|
15
|
+
protected readonly _instanceSrv: IUniverInstanceService;
|
|
16
16
|
private get _currentSelectionPos();
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
selectionMoveStart$: Observable<Nullable<ISelectionWithStyle[]>>;
|
|
18
|
+
selectionMoving$: Observable<Nullable<ISelectionWithStyle[]>>;
|
|
19
|
+
selectionMoveEnd$: Observable<ISelectionWithStyle[]>;
|
|
20
20
|
constructor(_instanceSrv: IUniverInstanceService);
|
|
21
|
+
protected _init(): void;
|
|
21
22
|
/** Clear all selections in all workbooks. */
|
|
22
23
|
clear(): void;
|
|
23
24
|
getCurrentSelections(): Readonly<ISelectionWithStyle[]>;
|
|
@@ -35,10 +36,11 @@ export declare class SheetsSelectionsService extends RxDisposable {
|
|
|
35
36
|
* @deprecated this should be extracted to an pure function
|
|
36
37
|
*/
|
|
37
38
|
isOverlapping(): boolean;
|
|
38
|
-
|
|
39
|
+
protected _getCurrentSelections(): ISelectionWithStyle[];
|
|
39
40
|
getWorkbookSelections(unitId: string): WorkbookSelections;
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
protected _workbookSelections: Map<string, WorkbookSelections>;
|
|
42
|
+
protected _ensureWorkbookSelection(unitId: string): WorkbookSelections;
|
|
43
|
+
protected _removeWorkbookSelection(unitId: string): void;
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* This class manages selections in a single workbook.
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { IWorkbookData, Univer } from '@univerjs/core';
|
|
2
|
-
import { Dependency } from '@wendellhu/redi';
|
|
1
|
+
import { Dependency, IWorkbookData, Univer } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export declare function createCoreTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): {
|
|
5
4
|
univer: Univer;
|
|
6
5
|
get: {
|
|
7
|
-
<T>(id: import('@
|
|
8
|
-
<T>(id: import('@
|
|
9
|
-
<T>(id: import('@
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
12
|
-
<T>(id: import('@
|
|
6
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
|
|
7
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
|
|
8
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
|
|
9
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
|
|
10
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
11
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
13
12
|
};
|
|
14
13
|
sheet: import('@univerjs/core').Workbook;
|
|
15
14
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ICommandInfo, IInterceptor, IUndoRedoCommandInfosByInterceptor, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
1
|
+
import { ICommandInfo, IDisposable, IInterceptor, IUndoRedoCommandInfosByInterceptor, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export interface ICommandInterceptor {
|
|
5
4
|
priority?: number;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DependencyOverride, ICommandService, IConfigService, LocaleService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
-
import { Injector } from '@wendellhu/redi';
|
|
1
|
+
import { DependencyOverride, ICommandService, IConfigService, Injector, LocaleService, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export interface IUniverSheetsConfig {
|
|
5
4
|
notExecuteFormula?: boolean;
|