@univerjs-pro/collaboration 0.2.2 → 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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/types/controllers/sheet-transform/algorithms/__tests__/transform-test-bed.d.ts +7 -8
- package/lib/types/controllers/sheet-transform/algorithms/add-comment/__test__/util.d.ts +6 -6
- package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/__test__/util.d.ts +6 -6
- package/lib/types/controllers/sheet-transform/algorithms/utils.d.ts +4 -2
- package/lib/types/index.d.ts +1 -1
- package/lib/types/models/collaboration-events.d.ts +13 -3
- package/lib/types/plugin.d.ts +1 -2
- package/lib/types/services/compress-mutation/compress-mutations/__test__/set-range-values.spec.d.ts +0 -15
- package/lib/types/services/rev/__tests__/rev.service.spec.d.ts +7 -8
- package/lib/types/services/snapshot/snapshot.service.d.ts +1 -2
- package/lib/types/services/transform/transform.service.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +25 -27
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ICommand, ICommandInfo, IMutationInfo, IWorkbookData, Univer } from '@univerjs/core';
|
|
2
|
-
import { Dependency } from '@wendellhu/redi';
|
|
1
|
+
import { Dependency, ICommand, ICommandInfo, IMutationInfo, IWorkbookData, Univer } from '@univerjs/core';
|
|
3
2
|
import { IMutationTransformAlgorithm, TransformService } from '../../../../services/transform/transform.service';
|
|
4
3
|
|
|
5
4
|
export declare const TEST_WORKBOOK_DATA_DEMO: () => IWorkbookData;
|
|
@@ -7,12 +6,12 @@ export declare function createTransformTestBed(algorithms: IMutationTransformAlg
|
|
|
7
6
|
export declare function createTransformTestUniver(algorithms: IMutationTransformAlgorithm[], dependencies?: Dependency[], workbookData?: IWorkbookData): {
|
|
8
7
|
univer: Univer;
|
|
9
8
|
get: {
|
|
10
|
-
<T>(id: import('@
|
|
11
|
-
<T>(id: import('@
|
|
12
|
-
<T>(id: import('@
|
|
13
|
-
<T>(id: import('@
|
|
14
|
-
<T>(id: import('@
|
|
15
|
-
<T>(id: import('@
|
|
9
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
|
|
10
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
|
|
11
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
|
|
12
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
|
|
13
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
14
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
16
15
|
};
|
|
17
16
|
transformService: TransformService;
|
|
18
17
|
};
|
|
@@ -3,12 +3,12 @@ import { IMutationTransformAlgorithm } from '../../../../../services/transform/t
|
|
|
3
3
|
export declare function createCommentTestBed(transform: IMutationTransformAlgorithm): {
|
|
4
4
|
univer: import('@univerjs/core').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
|
transformService: import('../../../../../services/transform/transform.service').TransformService;
|
|
14
14
|
};
|
package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/__test__/util.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { IMutationTransformAlgorithm } from '../../../../../services/transform/t
|
|
|
3
3
|
export declare function createDataValidationTestBed(transform: IMutationTransformAlgorithm): {
|
|
4
4
|
univer: import('@univerjs/core').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
|
transformService: import('../../../../../services/transform/transform.service').TransformService;
|
|
14
14
|
};
|
|
@@ -2,12 +2,14 @@ import { ICellData, IObjectMatrixPrimitiveType, IRange, Nullable, RANGE_TYPE } f
|
|
|
2
2
|
|
|
3
3
|
export declare function toColumn(range: IRange): {
|
|
4
4
|
rangeType: RANGE_TYPE;
|
|
5
|
-
startColumn: number;
|
|
6
|
-
endColumn: number;
|
|
7
5
|
startAbsoluteRefType?: import('@univerjs/core').AbsoluteRefType;
|
|
8
6
|
endAbsoluteRefType?: import('@univerjs/core').AbsoluteRefType;
|
|
9
7
|
startRow: number;
|
|
10
8
|
endRow: number;
|
|
9
|
+
unitId?: string;
|
|
10
|
+
sheetId?: string;
|
|
11
|
+
startColumn: number;
|
|
12
|
+
endColumn: number;
|
|
11
13
|
};
|
|
12
14
|
export declare function moveRows(o: IObjectMatrixPrimitiveType<Nullable<ICellData>>, start: number, count: number, offset: number): void;
|
|
13
15
|
export declare function moveColumns(o: IObjectMatrixPrimitiveType<Nullable<ICellData>>, start: number, count: number, offset: number): void;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { SheetTransformController } from './controllers/sheet-transform/sheet-transform.controller';
|
|
2
2
|
export { DocTransformController } from './controllers/doc-transform/doc-transform.controller';
|
|
3
3
|
export { type IChangeset, parseProtocolCommand, parseChangesetToProtocol, parseMutationToProtocol, parseProtocolChangeset, parseProtocolMutation, } from './models/changeset';
|
|
4
|
-
export { CollaborationEvent, type IAcknowledgedChangeset, type IAcknowledgementEvent, type ICollaborationEvent, type ICollaborationUser, type IFetchingMissEvent, type IFetchOperationsEvent, type INewChangesetsEvent, type INewHostEvent, type IOperationEvent, type IPseudoFetchMissingResultEvent, type IRejectedChangeset, type IRejectionEvent, type IRequestHostEvent, type ISubmitChangesetEvent, type ITerminateEvent, type IUpdateCursorEvent, type IUserJoinEvent, type IUserLeaveEvent, type IUserSelectionEvent, } from './models/collaboration-events';
|
|
4
|
+
export { CollaborationEvent, type IAcknowledgedChangeset, type IAcknowledgementEvent, type ICollaborationEvent, type ICollaborationUser, type IFetchingMissEvent, type IFetchOperationsEvent, type INewChangesetsEvent, type INewHostEvent, type IOperationEvent, type IPseudoFetchMissingResultEvent, type IRejectedChangeset, type IRejectionEvent, type IRequestHostEvent, type ISubmitChangesetEvent, type ITerminateEvent, type IUpdateCursorEvent, type IUserJoinEvent, type IUserLeaveEvent, type IUserSelectionEvent, type IPermissionUpdateEvent, type IShouldCloseConnEvent, } from './models/collaboration-events';
|
|
5
5
|
export { type ICombRequestEvent, type ICombResponseEvent, type IHeartbeatRequestEvent, type IHeartbeatResponseEvent, type IHelloRequestEvent, type IHelloResponseEvent, type IIngestQuestEvent, type IJoinRequestEvent, type IJoinResponseEvent, type ILeaveRequestEvent, type IRecvResponseEvent, } from './models/socket-events';
|
|
6
6
|
export { UniverCollaborationPlugin } from './plugin';
|
|
7
7
|
export { CompressMutationService } from './services/compress-mutation/compress-mutation-service';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICollaMsgErrorEvent, ICollaMsgJoin, ICollaMsgLeave, ICommentUpdate, ILiveShareNewHost, ILiveShareOperation, ILiveShareRequestHost, ILiveShareTerminate, IChangeset as IProtocolChangeset, IUpdateCursor, UniverType } from '@univerjs/protocol';
|
|
1
|
+
import { ICollaMsgErrorEvent, ICollaMsgJoin, ICollaMsgLeave, ICommentUpdate, ILiveShareNewHost, ILiveShareOperation, ILiveShareRequestHost, ILiveShareTerminate, IChangeset as IProtocolChangeset, IShouldCloseConn, IUpdateCursor, IUpdatePermissionObj, UniverType } from '@univerjs/protocol';
|
|
2
2
|
import { IChangeset } from './changeset';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -88,7 +88,9 @@ export declare enum CollaborationEvent {
|
|
|
88
88
|
*/
|
|
89
89
|
MSG_FOR_ERROR = "error_msg",
|
|
90
90
|
PERMISSION_REJ = "permission_rej",
|
|
91
|
-
COMMENT_UPDATE = "comment_update"
|
|
91
|
+
COMMENT_UPDATE = "comment_update",
|
|
92
|
+
UPDATE_PERMISSION_OBJ = "update_permission_obj",
|
|
93
|
+
SHOULD_CLOSE_CONN = "should_close_conn"
|
|
92
94
|
}
|
|
93
95
|
/**
|
|
94
96
|
* Awaiting mutations were acknowledged by the server.
|
|
@@ -211,7 +213,15 @@ export interface ICommentUpdateEvent {
|
|
|
211
213
|
eventID: CollaborationEvent.COMMENT_UPDATE;
|
|
212
214
|
data: ICommentUpdate;
|
|
213
215
|
}
|
|
216
|
+
export interface IPermissionUpdateEvent {
|
|
217
|
+
eventID: CollaborationEvent.UPDATE_PERMISSION_OBJ;
|
|
218
|
+
data: IUpdatePermissionObj;
|
|
219
|
+
}
|
|
220
|
+
export interface IShouldCloseConnEvent {
|
|
221
|
+
eventID: CollaborationEvent.SHOULD_CLOSE_CONN;
|
|
222
|
+
data: IShouldCloseConn;
|
|
223
|
+
}
|
|
214
224
|
/**
|
|
215
225
|
* A union type of all possible collaboration events.
|
|
216
226
|
*/
|
|
217
|
-
export type ICollaborationEvent = IAcknowledgementEvent | INewChangesetsEvent | IRejectionEvent | ISubmitChangesetEvent | IPseudoFetchMissingResultEvent | IUserSelectionEvent | IFetchingMissEvent | IUpdateCursorEvent | IUserJoinEvent | IUserLeaveEvent | ICustomEvent | IRequestHostEvent | IFetchOperationsEvent | ITerminateEvent | INewHostEvent | IOperationEvent | IMsgErrEvent | ICommentUpdateEvent;
|
|
227
|
+
export type ICollaborationEvent = IAcknowledgementEvent | INewChangesetsEvent | IRejectionEvent | ISubmitChangesetEvent | IPseudoFetchMissingResultEvent | IUserSelectionEvent | IFetchingMissEvent | IUpdateCursorEvent | IUserJoinEvent | IUserLeaveEvent | ICustomEvent | IRequestHostEvent | IFetchOperationsEvent | ITerminateEvent | INewHostEvent | IOperationEvent | IMsgErrEvent | ICommentUpdateEvent | IPermissionUpdateEvent | IShouldCloseConnEvent;
|
package/lib/types/plugin.d.ts
CHANGED
package/lib/types/services/compress-mutation/compress-mutations/__test__/set-range-values.spec.d.ts
CHANGED
|
@@ -1,16 +1 @@
|
|
|
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
1
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IWorkbookData, PluginCtor, Workbook, Plugin, Univer } from '@univerjs/core';
|
|
2
|
-
import { Dependency, Injector } from '@wendellhu/redi';
|
|
1
|
+
import { Dependency, IWorkbookData, PluginCtor, Workbook, Injector, Plugin, Univer } from '@univerjs/core';
|
|
3
2
|
|
|
4
3
|
export interface ITestBed {
|
|
5
4
|
univer: Univer;
|
|
@@ -9,12 +8,12 @@ export interface ITestBed {
|
|
|
9
8
|
export declare function createCollaborationTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[], plugins?: Array<PluginCtor<Plugin>>): {
|
|
10
9
|
univer: Univer;
|
|
11
10
|
get: {
|
|
12
|
-
<T>(id: import('@
|
|
13
|
-
<T>(id: import('@
|
|
14
|
-
<T>(id: import('@
|
|
15
|
-
<T>(id: import('@
|
|
16
|
-
<T>(id: import('@
|
|
17
|
-
<T>(id: import('@
|
|
11
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, lookUp?: import('@univerjs/core').LookUp): T;
|
|
12
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.MANY, lookUp?: import('@univerjs/core').LookUp): T[];
|
|
13
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.OPTIONAL, lookUp?: import('@univerjs/core').LookUp): T | null;
|
|
14
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity: import("@univerjs/core").Quantity.REQUIRED, lookUp?: import('@univerjs/core').LookUp): T;
|
|
15
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantity?: import('@univerjs/core').Quantity, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
16
|
+
<T>(id: import('@univerjs/core').DependencyIdentifier<T>, quantityOrLookup?: import('@univerjs/core').Quantity | import('@univerjs/core').LookUp, lookUp?: import('@univerjs/core').LookUp): T[] | T | null;
|
|
18
17
|
};
|
|
19
18
|
sheet: Workbook;
|
|
20
19
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DocumentDataModel, IDocumentData, ILogContext, IWorkbookData, Workbook, ICommandService, IResourceManagerService, ISnapshotServerService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import { Injector } from '@wendellhu/redi';
|
|
1
|
+
import { DocumentDataModel, IDocumentData, ILogContext, IWorkbookData, Workbook, ICommandService, Injector, IResourceManagerService, ISnapshotServerService, IUniverInstanceService } from '@univerjs/core';
|
|
3
2
|
import { CompressMutationService } from '../compress-mutation/compress-mutation-service';
|
|
4
3
|
import { RevisionService } from '../rev/rev.service';
|
|
5
4
|
|
|
@@ -90,7 +90,7 @@ export interface ITransformService {
|
|
|
90
90
|
*/
|
|
91
91
|
transformMutationsWithChangeset: (c1: IChangeset, m2: IMutationInfo[]) => ITransformMutationsWithChangesetResult;
|
|
92
92
|
}
|
|
93
|
-
export declare const ITransformService: import('@
|
|
93
|
+
export declare const ITransformService: import('@univerjs/core').IdentifierDecorator<ITransformService>;
|
|
94
94
|
export declare class TransformService extends Disposable implements ITransformService {
|
|
95
95
|
private readonly _transformMap;
|
|
96
96
|
dispose(): void;
|