@univerjs-pro/collaboration 1.0.0-rc.0 → 1.0.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.
@@ -0,0 +1,8 @@
1
+ import type { IMutation } from '@univerjs/core';
2
+ export interface ICreateUnitMutationParams {
3
+ unitId: string;
4
+ }
5
+ /**
6
+ * This mutation will not create a unit but only be a signal
7
+ */
8
+ export declare const CreateUnitMutation: IMutation<ICreateUnitMutationParams>;
@@ -0,0 +1,6 @@
1
+ import type { IMutation } from '@univerjs/core';
2
+ export interface IRevertRevisionMutationParams {
3
+ unitId: string;
4
+ revision: number;
5
+ }
6
+ export declare const RevertRevisionMutation: IMutation<IRevertRevisionMutationParams>;
@@ -0,0 +1,5 @@
1
+ export declare const COLLABORATION_PLUGIN_CONFIG_KEY = "collaboration.config";
2
+ export declare const configSymbol: unique symbol;
3
+ export interface IUniverCollaborationConfig {
4
+ }
5
+ export declare const defaultPluginConfig: IUniverCollaborationConfig;
@@ -0,0 +1,20 @@
1
+ import type { Dependency, ICommand, ICommandInfo, IMutationInfo, IWorkbookData } from '@univerjs/core';
2
+ import type { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ import { Univer } from '@univerjs/core';
4
+ import { TransformService } from '../../../../services/transform/transform.service';
5
+ export declare const TEST_WORKBOOK_DATA_DEMO: () => IWorkbookData;
6
+ export declare function createTransformTestBed(algorithms: IMutationTransformAlgorithm[]): TransformService;
7
+ export declare function createTransformTestUniver(algorithms: IMutationTransformAlgorithm[], dependencies?: Dependency[], workbookData?: IWorkbookData): {
8
+ univer: Univer;
9
+ get: {
10
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, lookUp?: import("@wendellhu/redi").LookUp): T;
11
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import("@wendellhu/redi").LookUp): T[];
12
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import("@wendellhu/redi").LookUp): T | null;
13
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import("@wendellhu/redi").LookUp): T;
14
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity?: import("@wendellhu/redi").Quantity, lookUp?: import("@wendellhu/redi").LookUp): T[] | T | null;
15
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantityOrLookup?: import("@wendellhu/redi").Quantity | import("@wendellhu/redi").LookUp, lookUp?: import("@wendellhu/redi").LookUp): T[] | T | null;
16
+ };
17
+ has: <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>) => boolean;
18
+ transformService: TransformService;
19
+ };
20
+ export declare const getMutations: (commands: ICommand[], commandInfo: ICommandInfo, dependencies?: Dependency[], workbookData?: IWorkbookData) => Promise<IMutationInfo<object>[]>;
@@ -0,0 +1,14 @@
1
+ import type { IMutationTransformAlgorithm } from '../../../../../services/transform/transform.service';
2
+ export declare function createCommentTestBed(transform: IMutationTransformAlgorithm): {
3
+ univer: import("@univerjs/core").Univer;
4
+ get: {
5
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, lookUp?: import("@wendellhu/redi").LookUp): T;
6
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import("@wendellhu/redi").LookUp): T[];
7
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import("@wendellhu/redi").LookUp): T | null;
8
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import("@wendellhu/redi").LookUp): T;
9
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity?: import("@wendellhu/redi").Quantity, lookUp?: import("@wendellhu/redi").LookUp): T[] | T | null;
10
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantityOrLookup?: import("@wendellhu/redi").Quantity | import("@wendellhu/redi").LookUp, lookUp?: import("@wendellhu/redi").LookUp): T[] | T | null;
11
+ };
12
+ has: <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>) => boolean;
13
+ transformService: import("../../../../..").TransformService;
14
+ };
@@ -0,0 +1,14 @@
1
+ import type { IMutationTransformAlgorithm } from '../../../../../services/transform/transform.service';
2
+ export declare function createDataValidationTestBed(transform: IMutationTransformAlgorithm): {
3
+ univer: import("@univerjs/core").Univer;
4
+ get: {
5
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, lookUp?: import("@wendellhu/redi").LookUp): T;
6
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import("@wendellhu/redi").LookUp): T[];
7
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import("@wendellhu/redi").LookUp): T | null;
8
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import("@wendellhu/redi").LookUp): T;
9
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantity?: import("@wendellhu/redi").Quantity, lookUp?: import("@wendellhu/redi").LookUp): T[] | T | null;
10
+ <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>, quantityOrLookup?: import("@wendellhu/redi").Quantity | import("@wendellhu/redi").LookUp, lookUp?: import("@wendellhu/redi").LookUp): T[] | T | null;
11
+ };
12
+ has: <T>(id: import("@wendellhu/redi").DependencyIdentifier<T>) => boolean;
13
+ transformService: import("../../../../..").TransformService;
14
+ };
@@ -0,0 +1,4 @@
1
+ import type { ISheetCommandSharedParams } from '@univerjs/sheets';
2
+ import type { ISetSheetsFilterRangeMutationParams } from '@univerjs/sheets-filter';
3
+ import type { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
4
+ export declare const removeSheetsFilterWithSetSheetsFilterRange: IMutationTransformAlgorithm<ISheetCommandSharedParams, ISetSheetsFilterRangeMutationParams>;
@@ -1,4 +1,4 @@
1
1
  import type { IRevertRevisionMutationParams } from '../../../../commands/revert-revision.mutation';
2
2
  import type { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
- export declare const RevertRevisionMutationWithOthers: IMutationTransformAlgorithm<IRevertRevisionMutationParams, any>;
4
- export declare const OthersWithRevertRevision: IMutationTransformAlgorithm<any, IRevertRevisionMutationParams>;
3
+ export declare const RevertRevisionMutationWithOthers: IMutationTransformAlgorithm<IRevertRevisionMutationParams, object>;
4
+ export declare const OthersWithRevertRevision: IMutationTransformAlgorithm<object, IRevertRevisionMutationParams>;
@@ -1,4 +1,4 @@
1
- import type { ICellData, IObjectMatrixPrimitiveType, IRange, Nullable } from '@univerjs/core';
1
+ import type { ICellData, IObjectArrayPrimitiveType, IObjectMatrixPrimitiveType, IRange, Nullable } from '@univerjs/core';
2
2
  import { RANGE_TYPE } from '@univerjs/core';
3
3
  export declare function toColumn(range: IRange): {
4
4
  rangeType: RANGE_TYPE;
@@ -28,6 +28,14 @@ export interface ISheetRangeLocation {
28
28
  export declare function intersect(line1: ILine, line2: ILine): boolean;
29
29
  export declare function contain(line1: ILine, line2: ILine): boolean;
30
30
  export declare function lineSubtractLines(line1: ILine, lines2: ILine[]): ILine[];
31
+ /**
32
+ * Returns only the rows or columns that a dimension mutation actually writes.
33
+ * Numeric payloads apply to every range index, while map payloads may be sparse.
34
+ */
35
+ export declare function getEffectiveDimensionLines(ranges: IRange[], value: number | IObjectArrayPrimitiveType<Nullable<number>>, axis: 'row' | 'column'): Array<{
36
+ start: number;
37
+ end: number;
38
+ }>;
31
39
  export declare function lineSubtractLine(line1: ILine, line2: ILine): ILine[];
32
40
  export declare function handleInsert(insert: ILine, target: ILine): ILine;
33
41
  export declare function handleRemove(remove: ILine, target: ILine): ILine | null;
@@ -0,0 +1,4 @@
1
+ import type { ISetWorksheetBackgroundImageMutationParams } from '@univerjs/sheets-drawing';
2
+ import type { IMutationTransformAlgorithm } from '../../../../services/transform/transform.service';
3
+ export declare const SetWorksheetBackgroundImageWithSelf: IMutationTransformAlgorithm<ISetWorksheetBackgroundImageMutationParams, ISetWorksheetBackgroundImageMutationParams>;
4
+ export declare const WorksheetBackgroundImageAlgorithms: Array<IMutationTransformAlgorithm>;