@univerjs-pro/collaboration-client 0.2.3 → 0.2.4
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/collaboration/__tests__/mocks.d.ts +1 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/models/cursor.d.ts +3 -1
- package/lib/types/services/auth-server/authz-io-http.service.d.ts +3 -2
- package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +2 -0
- package/lib/types/services/local-cache/local-cache.service.d.ts +1 -1
- package/lib/types/views/shapes/sheet-collab-cursor.shape.d.ts +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +35 -35
@@ -49,6 +49,7 @@ export declare class MockLocalStorageService implements ILocalStorageService {
|
|
49
49
|
export declare class MockMessageService implements IMessageService {
|
50
50
|
show(_options: IMessageOptions & Omit<IMessageProps, 'key'>): IDisposable;
|
51
51
|
setContainer(_container: HTMLElement): void;
|
52
|
+
getContainer(): HTMLElement;
|
52
53
|
}
|
53
54
|
export declare class MockNotificationService implements INotificationService {
|
54
55
|
show(): IDisposable;
|
package/lib/types/index.d.ts
CHANGED
@@ -13,4 +13,8 @@ export { DesktopCollaborationStatusDisplayController } from './controllers/colla
|
|
13
13
|
export { AUTHZ_URL_KEY, AuthzIoHttpService } from './services/auth-server/authz-io-http.service';
|
14
14
|
export { deserializeToCombResponse, serializeCombRequest } from './services/socket/serialize';
|
15
15
|
export { CollaborationStatusDisplay } from './views/components/CollabStatus';
|
16
|
+
export { SnapshotServerOverHTTPService } from './services/snapshot-server/snapshot-server.service';
|
16
17
|
export { CommentService } from './services/comment/comment.service';
|
18
|
+
export { SheetCollaborationEntity } from './controllers/collaboration/collaboration.controller';
|
19
|
+
export { SheetCollabCursorShape, type ISheetCollabCursorShapeProps } from './views/shapes/sheet-collab-cursor.shape';
|
20
|
+
export { ImageIoService } from './services/image-remote/image-io.service';
|
@@ -5,7 +5,7 @@ import { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
5
5
|
* The data structure to store collab cursor info of sheet.
|
6
6
|
*/
|
7
7
|
export interface ISheetCollabCursor {
|
8
|
-
/**
|
8
|
+
/** Stroke color of this collab cursor */
|
9
9
|
color: string;
|
10
10
|
/** Position of this cursor */
|
11
11
|
range: IRange;
|
@@ -15,6 +15,8 @@ export interface ISheetCollabCursor {
|
|
15
15
|
selection: string;
|
16
16
|
/** Worksheet ID */
|
17
17
|
sheetID: string;
|
18
|
+
/** Background color of this collab cursor */
|
19
|
+
backgroundColor?: string;
|
18
20
|
}
|
19
21
|
/**
|
20
22
|
* The data structure to store collab cursor info of doc.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IAuthzIoService, IConfigService } from '@univerjs/core';
|
1
|
+
import { IAuthzIoService, Disposable, IConfigService } from '@univerjs/core';
|
2
2
|
import { HTTPService } from '@univerjs/network';
|
3
3
|
import { IActionInfo, IAllowedRequest, IBatchAllowedResponse, ICollaborator, ICreateCollaboratorRequest, ICreateRequest, IDeleteCollaboratorRequest, IListCollaboratorRequest, IListPermPointRequest, IListPermPointResponse, IListRolesRequest, IPutCollaboratorsRequest, IUnitRoleKV, IUpdateCollaboratorRequest, IUpdatePermPointRequest, UnitAction } from '@univerjs/protocol';
|
4
4
|
|
@@ -7,10 +7,11 @@ import { IActionInfo, IAllowedRequest, IBatchAllowedResponse, ICollaborator, ICr
|
|
7
7
|
* The URL should not ends with a slash.
|
8
8
|
*/
|
9
9
|
export declare const AUTHZ_URL_KEY = "AUTHZ_URL_KEY";
|
10
|
-
export declare class AuthzIoHttpService implements IAuthzIoService {
|
10
|
+
export declare class AuthzIoHttpService extends Disposable implements IAuthzIoService {
|
11
11
|
private _HTTPService;
|
12
12
|
private _configService;
|
13
13
|
constructor(_HTTPService: HTTPService, _configService: IConfigService);
|
14
|
+
private _initMergeInterceptor;
|
14
15
|
private _getAPIPrefixPath;
|
15
16
|
create(config: ICreateRequest): Promise<string>;
|
16
17
|
list(config: IListPermPointRequest): Promise<IListPermPointResponse['objects']>;
|
@@ -37,6 +37,7 @@ export declare class CollaborationSession extends RxDisposable implements IDispo
|
|
37
37
|
constructor(_unitID: string, socket$: Observable<Nullable<ICollaborationSocket>>, _logService: ILogService, _beforeCloseService: IBeforeCloseService, _messageService: IMessageService, _configService: IConfigService, _localeService: LocaleService, _memberService: MemberService, _commentService: CommentService);
|
38
38
|
getMemberID(): string | null;
|
39
39
|
dispose(): void;
|
40
|
+
close(): void;
|
40
41
|
private _onCombEvent;
|
41
42
|
private _joinRoom;
|
42
43
|
private _onJoinRoomEvent;
|
@@ -83,6 +84,7 @@ export declare class CollaborationSessionService extends Disposable {
|
|
83
84
|
* @returns a collaboration session.
|
84
85
|
*/
|
85
86
|
requireSession(unitID: string): Promise<CollaborationSession>;
|
87
|
+
closeSession(unitID: string): void;
|
86
88
|
private _createSocket;
|
87
89
|
/**
|
88
90
|
* Try to establish connection to the collaboration server.
|
@@ -32,7 +32,7 @@ export declare class LocalCacheService extends Disposable {
|
|
32
32
|
private _scheduleSaving;
|
33
33
|
private _getSaveTimeout;
|
34
34
|
private _saveCache;
|
35
|
-
|
35
|
+
exhaustSavingTask(): Promise<void>;
|
36
36
|
private _setupBeforeClosingHandler;
|
37
37
|
}
|
38
38
|
export declare function getLocalCacheKey(unitID: string): string;
|
@@ -16,6 +16,7 @@ export declare class SheetCollabCursorShape<T extends ISheetCollabCursorShapePro
|
|
16
16
|
private _range;
|
17
17
|
private _name;
|
18
18
|
private _labelPosition;
|
19
|
+
private _backgroundColor?;
|
19
20
|
constructor(key?: string, props?: T);
|
20
21
|
setShapeProps(props: Partial<ISheetCollabCursorShapeProps>): void;
|
21
22
|
onMouseMove(position: {
|