@univerjs-pro/collaboration-client-ui 1.0.0-alpha.8 → 1.0.0-beta.1
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/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.css +10 -26
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/commands/operations/update-remote-unit-presence.operation.d.ts +25 -0
- package/lib/types/controllers/collab-cursor/collab-cursor.controller.d.ts +2 -4
- package/lib/types/controllers/collab-cursor/unit-presence-collab-cursor-entity.d.ts +38 -0
- package/lib/types/controllers/collab-cursor/unit-presence-collab-cursor.controller.d.ts +21 -0
- package/lib/types/controllers/collab-status/collab-status.controller.d.ts +8 -13
- package/lib/types/controllers/data-loader/data-loader.controller.d.ts +1 -2
- package/lib/types/controllers/snapshot-loading/snapshot-loading.controller.d.ts +3 -15
- package/lib/types/locale/en-US.d.ts +0 -1
- package/lib/types/models/cursor.d.ts +0 -25
- package/lib/types/plugin.d.ts +3 -2
- package/lib/types/services/text-selection/doc-transform-selections.service.d.ts +3 -3
- package/lib/types/views/components/SnapshotLoadingTimeout.d.ts +0 -4
- package/lib/types/views/shapes/doc-collab-cursor.d.ts +6 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +19 -23
- package/lib/types/controllers/collab-cursor/board-collab-cursor-entity.d.ts +0 -31
- package/lib/types/controllers/collab-cursor/board-collab-cursor-render.controller.d.ts +0 -21
- package/lib/types/controllers/collab-cursor/slide-collab-cursor-entity.d.ts +0 -34
- package/lib/types/controllers/collab-cursor/slide-collab-cursor-render.controller.d.ts +0 -21
- package/lib/types/views/shapes/slide-collab-cursor.shape.d.ts +0 -15
package/lib/locale/zh-HK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x531c(_0x404e00,_0x37487f){_0x404e00=_0x404e00-0xf8;const _0x171b3d=_0x171b();let _0x531cd6=_0x171b3d[_0x404e00];return _0x531cd6;}const _0x11ee9b=_0x531c;function _0x171b(){const _0x1bed62=['935124hVckUK','5yWIIQj','9TrQhnO','協作房間已滿,您的編輯將暫存於本機。','506832oRnRsL','已離線,編輯將儲存在本機','已同步','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','連線失敗,請檢查您的網絡。','正在擷取伺服器資料...','您有未儲存至伺服器的離線編輯,請檢查網絡後重試。','1048030xBCubX','公式計算佇列已滿,正在等待可用資源...','1318905pKORnL','109067EEiHTM','1714398tvlPxP','目前無法執行公式計算,請稍後重試。','171724cARcLR','由於協作房間已關閉,編輯權限已被收回。','248TdeZLd','公式計算已開始。'];_0x171b=function(){return _0x1bed62;};return _0x171b();}(function(_0x4c0d43,_0x1e922a){const _0x22670c=_0x531c,_0x4be5d0=_0x4c0d43();while(!![]){try{const _0x48aa1d=-parseInt(_0x22670c(0xf8))/0x1+parseInt(_0x22670c(0xfc))/0x2+parseInt(_0x22670c(0x10a))/0x3+-parseInt(_0x22670c(0x100))/0x4+-parseInt(_0x22670c(0xfd))/0x5*(-parseInt(_0x22670c(0x10c))/0x6)+parseInt(_0x22670c(0x10b))/0x7*(-parseInt(_0x22670c(0xfa))/0x8)+parseInt(_0x22670c(0xfe))/0x9*(-parseInt(_0x22670c(0x108))/0xa);if(_0x48aa1d===_0x1e922a)break;else _0x4be5d0['push'](_0x4be5d0['shift']());}catch(_0x42cb96){_0x4be5d0['push'](_0x4be5d0['shift']());}}}(_0x171b,0x4adfc));const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':'點擊重新連線'}},'collabStatus':{'fetchMiss':_0x11ee9b(0x106),'conflict':'編輯衝突','notCollab':'本機檔案','synced':_0x11ee9b(0x102),'syncing':'同步中...','offline':_0x11ee9b(0x101)},'snapshotLoading':{'timeout':'資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','refresh':'重新整理頁面'},'session':{'connection-failed':_0x11ee9b(0x105),'will-retry':'連線失敗,將在稍後重試連線。','room-full':_0x11ee9b(0xff),'collaboration-timeout':'伺服器未回應協作請求,您的編輯將儲存在本機。'},'conflict':{'title':'協作衝突','content':_0x11ee9b(0x103)},'permission':{'title':'認證錯誤','content':'您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。'},'collaboration':{'offline-data-not-saved':_0x11ee9b(0x107),'single-unit':{'warning':_0x11ee9b(0x104)},'closeRoom':_0x11ee9b(0xf9)},'auth':{'needGotoLoginAlert':'您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。'},'formula':{'calculation':{'started':_0x11ee9b(0xfb),'waiting':_0x11ee9b(0x109),'unable':_0x11ee9b(0x10d)}}}};export{e as default};
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x33f2(){const _0x2a1053=['重新整理頁面','72Ufczog','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','資料載入停留在\x20{0}/{1},請重新整理頁面後再試。','公式計算佇列已滿,正在等待可用資源...','75467qDUJGC','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','558874vUzvEe','3647310tFgWOv','5296437roifeh','5hYMKTE','公式計算已開始。','連線失敗,將在稍後重試連線。','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','137109VPVtcv','由於協作房間已關閉,編輯權限已被收回。','點擊重新連線','本機檔案','已離線,編輯將儲存在本機','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','9993445jdOUtn','您有未儲存至伺服器的離線編輯,請檢查網路後重試。','38443836rVVWKF','正在擷取伺服器資料...','同步中...','16agBPVv','協作房間已滿,您的編輯將暫存於本機。','1wSnzDA','10CQXxgM','連線失敗,請檢查您的網路。'];_0x33f2=function(){return _0x2a1053;};return _0x33f2();}const _0x19d7fc=_0x59fd;(function(_0x3dedef,_0x494b59){const _0x8d5056=_0x59fd,_0x5ea338=_0x3dedef();while(!![]){try{const _0x7bf32a=parseInt(_0x8d5056(0x8c))/0x1*(-parseInt(_0x8d5056(0x96))/0x2)+parseInt(_0x8d5056(0x9d))/0x3*(-parseInt(_0x8d5056(0x8a))/0x4)+-parseInt(_0x8d5056(0x99))/0x5*(parseInt(_0x8d5056(0x97))/0x6)+-parseInt(_0x8d5056(0x94))/0x7*(parseInt(_0x8d5056(0x90))/0x8)+parseInt(_0x8d5056(0x98))/0x9*(-parseInt(_0x8d5056(0x8d))/0xa)+-parseInt(_0x8d5056(0x85))/0xb+parseInt(_0x8d5056(0x87))/0xc;if(_0x7bf32a===_0x494b59)break;else _0x5ea338['push'](_0x5ea338['shift']());}catch(_0xf6ee6e){_0x5ea338['push'](_0x5ea338['shift']());}}}(_0x33f2,0x83b6e));function _0x59fd(_0x599fae,_0x50ff0e){_0x599fae=_0x599fae-0x84;const _0x33f24d=_0x33f2();let _0x59fdc7=_0x33f24d[_0x599fae];return _0x59fdc7;}const e={'collaboration-client-ui':{'collabClient':{'tooltip':{'reconnect':_0x19d7fc(0x9f)}},'collabStatus':{'fetchMiss':_0x19d7fc(0x88),'conflict':'編輯衝突','notCollab':_0x19d7fc(0xa0),'synced':'已同步','syncing':_0x19d7fc(0x89),'offline':_0x19d7fc(0xa1)},'snapshotLoading':{'timeout':_0x19d7fc(0x92),'refresh':_0x19d7fc(0x8f)},'session':{'connection-failed':_0x19d7fc(0x8e),'will-retry':_0x19d7fc(0x9b),'room-full':_0x19d7fc(0x8b),'collaboration-timeout':'伺服器未回應協作請求,您的編輯將儲存在本機。'},'conflict':{'title':'協作衝突','content':_0x19d7fc(0x95)},'permission':{'title':'認證錯誤','content':_0x19d7fc(0x91)},'collaboration':{'offline-data-not-saved':_0x19d7fc(0x86),'single-unit':{'warning':_0x19d7fc(0x9c)},'closeRoom':_0x19d7fc(0x9e)},'auth':{'needGotoLoginAlert':_0x19d7fc(0x84)},'formula':{'calculation':{'started':_0x19d7fc(0x9a),'waiting':_0x19d7fc(0x93),'unable':'目前無法執行公式計算,請稍後重試。'}}}};export{e as default};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IOperation, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import type { IRemoteUnitPresenceState } from '@univerjs/ui';
|
|
3
|
+
export declare enum UnitPresenceUpdateType {
|
|
4
|
+
SET = "set",
|
|
5
|
+
REMOVE = "remove",
|
|
6
|
+
CLEAR = "clear"
|
|
7
|
+
}
|
|
8
|
+
export interface ISetRemoteUnitPresenceUpdate {
|
|
9
|
+
type: UnitPresenceUpdateType.SET;
|
|
10
|
+
state: IRemoteUnitPresenceState;
|
|
11
|
+
}
|
|
12
|
+
export interface IRemoveRemoteUnitPresenceUpdate {
|
|
13
|
+
type: UnitPresenceUpdateType.REMOVE;
|
|
14
|
+
unitId: string;
|
|
15
|
+
memberId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IClearRemoteUnitPresenceUpdate {
|
|
18
|
+
type: UnitPresenceUpdateType.CLEAR;
|
|
19
|
+
unitId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IUpdateRemoteUnitPresenceOperationParams {
|
|
22
|
+
unitType: UniverInstanceType;
|
|
23
|
+
update: ISetRemoteUnitPresenceUpdate | IRemoveRemoteUnitPresenceUpdate | IClearRemoteUnitPresenceUpdate;
|
|
24
|
+
}
|
|
25
|
+
export declare const UpdateRemoteUnitPresenceOperation: IOperation<IUpdateRemoteUnitPresenceOperationParams>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs';
|
|
2
|
-
import type { IDocCollabCursor,
|
|
2
|
+
import type { IDocCollabCursor, ISheetCollabCursor } from '../../models/cursor';
|
|
3
3
|
import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
|
|
4
4
|
import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
5
5
|
/**
|
|
@@ -15,10 +15,8 @@ export declare class CollabCursorController extends RxDisposable {
|
|
|
15
15
|
private readonly _entityInit$;
|
|
16
16
|
constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collabSessionService: CollaborationSessionService);
|
|
17
17
|
dispose(): void;
|
|
18
|
-
getCollabCursors$(unitID: string): Observable<Map<string, ISheetCollabCursor> | Map<string, IDocCollabCursor
|
|
18
|
+
getCollabCursors$(unitID: string): Observable<Map<string, ISheetCollabCursor> | Map<string, IDocCollabCursor>>;
|
|
19
19
|
private _init;
|
|
20
20
|
private _startSheetCollabCursor;
|
|
21
21
|
private _startDocCollabCursor;
|
|
22
|
-
private _startSlideCollabCursor;
|
|
23
|
-
private _startBoardCollabCursor;
|
|
24
22
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CollaborationSession } from '@univerjs-pro/collaboration-client';
|
|
2
|
+
import type { UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
import type { IUnitPresenceUIAdapter } from '@univerjs/ui';
|
|
4
|
+
import { MemberService } from '@univerjs-pro/collaboration-client';
|
|
5
|
+
import { ICommandService, RxDisposable } from '@univerjs/core';
|
|
6
|
+
import { ColorAssignService } from '../../services/color-assign/color-assign.service';
|
|
7
|
+
interface IUnitPresencePayload {
|
|
8
|
+
kind: string;
|
|
9
|
+
unitType: UniverInstanceType;
|
|
10
|
+
unitId: string;
|
|
11
|
+
subUnitId: string;
|
|
12
|
+
selectedIds: string[];
|
|
13
|
+
focusedId: string | null;
|
|
14
|
+
pointer: {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
} | null;
|
|
18
|
+
}
|
|
19
|
+
export declare function parseUnitPresencePayload(selection: string, fallbackUnitType?: UniverInstanceType): IUnitPresencePayload | null;
|
|
20
|
+
export declare class UnitPresenceCollabCursorEntity extends RxDisposable {
|
|
21
|
+
readonly unitId: string;
|
|
22
|
+
private readonly _session;
|
|
23
|
+
private readonly _adapter;
|
|
24
|
+
private readonly _colorAssignService;
|
|
25
|
+
private readonly _memberService;
|
|
26
|
+
private readonly _commandService;
|
|
27
|
+
private _online;
|
|
28
|
+
private _initialized;
|
|
29
|
+
constructor(unitId: string, _session: CollaborationSession, _adapter: IUnitPresenceUIAdapter, _colorAssignService: ColorAssignService, _memberService: MemberService, _commandService: ICommandService);
|
|
30
|
+
get unitType(): UniverInstanceType;
|
|
31
|
+
dispose(): void;
|
|
32
|
+
init(): void;
|
|
33
|
+
private _sendLocalPresence;
|
|
34
|
+
private _handleCursorUpdate;
|
|
35
|
+
private _removeRemotePresence;
|
|
36
|
+
private _clearRemotePresences;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CollaborationSessionService } from '@univerjs-pro/collaboration-client';
|
|
2
|
+
import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
3
|
+
import { IUnitPresenceUIAdapterRegistry } from '@univerjs/ui';
|
|
4
|
+
export declare class UnitPresenceCollabCursorController extends RxDisposable {
|
|
5
|
+
private readonly _univerInstanceService;
|
|
6
|
+
private readonly _injector;
|
|
7
|
+
private readonly _collabSessionService;
|
|
8
|
+
private readonly _adapterRegistry;
|
|
9
|
+
private _isDisposed;
|
|
10
|
+
private readonly _entities;
|
|
11
|
+
private readonly _pendingEntities;
|
|
12
|
+
private readonly _adapterDisposables;
|
|
13
|
+
constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collabSessionService: CollaborationSessionService, _adapterRegistry: IUnitPresenceUIAdapterRegistry);
|
|
14
|
+
dispose(): void;
|
|
15
|
+
private _init;
|
|
16
|
+
private _syncAdapters;
|
|
17
|
+
private _bindAdapter;
|
|
18
|
+
private _startEntity;
|
|
19
|
+
private _disposeEntity;
|
|
20
|
+
private _disposeEntitiesForType;
|
|
21
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CollaborationController, CollaborationStatus } from '@univerjs-pro/collaboration-client';
|
|
2
2
|
import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
|
|
3
|
-
import { IUIPartsService } from '@univerjs/ui';
|
|
3
|
+
import { IUIPartsService, IUnitPresenceUIAdapterRegistry } from '@univerjs/ui';
|
|
4
4
|
import { BehaviorSubject } from 'rxjs';
|
|
5
5
|
/**
|
|
6
6
|
* This controller is responsible for monitoring the collaboration status of the currently focused unit.
|
|
@@ -10,20 +10,15 @@ export declare class DesktopCollaborationStatusDisplayController extends Disposa
|
|
|
10
10
|
private readonly _injector;
|
|
11
11
|
private readonly _collaborationController;
|
|
12
12
|
private readonly _uiPartsService;
|
|
13
|
+
private readonly _presenceAdapterRegistry;
|
|
13
14
|
protected readonly _status$: BehaviorSubject<CollaborationStatus>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
export declare class BoardCollaborationStatusDisplayController extends Disposable {
|
|
19
|
-
private readonly _univerInstanceService;
|
|
20
|
-
private readonly _injector;
|
|
21
|
-
private readonly _collaborationController;
|
|
22
|
-
private readonly _uiPartsService;
|
|
23
|
-
protected readonly _status$: BehaviorSubject<CollaborationStatus>;
|
|
24
|
-
constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collaborationController: CollaborationController, _uiPartsService: IUIPartsService);
|
|
15
|
+
private readonly _presenceStatusRegistrations;
|
|
16
|
+
constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _collaborationController: CollaborationController, _uiPartsService: IUIPartsService, _presenceAdapterRegistry: IUnitPresenceUIAdapterRegistry);
|
|
17
|
+
dispose(): void;
|
|
25
18
|
private _initStatusListener;
|
|
26
19
|
protected _initStatusComponent(): void;
|
|
20
|
+
private _initPresenceStatusComponents;
|
|
21
|
+
private _syncPresenceStatusComponents;
|
|
22
|
+
private _registerPresenceStatusComponent;
|
|
27
23
|
}
|
|
28
24
|
export declare function getCollaborationStatusUnitId(univerInstanceService: IUniverInstanceService): string | null;
|
|
29
|
-
export declare function getBoardCollaborationStatusUnitId(univerInstanceService: IUniverInstanceService): string | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DataLoaderService } from '@univerjs-pro/collaboration-client';
|
|
2
2
|
import { ICommandService, ILogService, RxDisposable } from '@univerjs/core';
|
|
3
|
-
import { IRemoteInstanceService } from '@univerjs/rpc';
|
|
4
3
|
import { IURLService } from '../../services/url/url.service';
|
|
5
4
|
/**
|
|
6
5
|
* This controller loads data when URL changes.
|
|
@@ -10,7 +9,7 @@ export declare class CollaborationDataLoaderController extends RxDisposable {
|
|
|
10
9
|
private readonly _logService;
|
|
11
10
|
private readonly _commandService;
|
|
12
11
|
private readonly _dataLoaderService;
|
|
13
|
-
constructor(_urlService: IURLService, _logService: ILogService, _commandService: ICommandService, _dataLoaderService: DataLoaderService
|
|
12
|
+
constructor(_urlService: IURLService, _logService: ILogService, _commandService: ICommandService, _dataLoaderService: DataLoaderService);
|
|
14
13
|
private _init;
|
|
15
14
|
private _setupSubUnitSync;
|
|
16
15
|
private _updateURLWithCurrentState;
|
|
@@ -1,36 +1,24 @@
|
|
|
1
1
|
import type { ISnapshotLoadingTimeoutState } from '../../views/components/SnapshotLoadingTimeout';
|
|
2
2
|
import { SnapshotLoadingService } from '@univerjs-pro/collaboration';
|
|
3
|
-
import { Disposable, Injector, LocaleService
|
|
4
|
-
import { IMessageService,
|
|
3
|
+
import { Disposable, Injector, LocaleService } from '@univerjs/core';
|
|
4
|
+
import { IMessageService, IUIPartsService } from '@univerjs/ui';
|
|
5
5
|
import { IURLService } from '../../services/url/url.service';
|
|
6
6
|
export declare class SnapshotLoadingController extends Disposable {
|
|
7
7
|
private readonly _snapshotLoadingService;
|
|
8
8
|
private readonly _messageService;
|
|
9
9
|
private readonly _localeService;
|
|
10
10
|
private readonly _injector;
|
|
11
|
-
private readonly _pluginService;
|
|
12
|
-
private readonly _shortcutService;
|
|
13
11
|
private readonly _urlService;
|
|
14
12
|
private readonly _timeoutState$;
|
|
15
|
-
private readonly _interactionBlocked$;
|
|
16
13
|
private readonly _messageIds;
|
|
17
14
|
private readonly _blockProgressWatches;
|
|
18
|
-
private readonly _handoffUnitIds;
|
|
19
15
|
private _latestStates;
|
|
20
|
-
private _previewUnitId?;
|
|
21
|
-
private _shortcutBlock?;
|
|
22
|
-
private _sheetLoadingRenderService?;
|
|
23
16
|
readonly timeoutState$: import("rxjs").Observable<ISnapshotLoadingTimeoutState | null>;
|
|
24
|
-
constructor(_snapshotLoadingService: SnapshotLoadingService, _messageService: IMessageService, _localeService: LocaleService, _injector: Injector,
|
|
17
|
+
constructor(_snapshotLoadingService: SnapshotLoadingService, _messageService: IMessageService, _localeService: LocaleService, _injector: Injector, uiPartsService: IUIPartsService, _urlService: IURLService);
|
|
25
18
|
dispose(): void;
|
|
26
19
|
private _updateMessage;
|
|
27
20
|
private _watchBlockProgress;
|
|
28
21
|
private _clearBlockProgressWatch;
|
|
29
22
|
private _clearTimeoutState;
|
|
30
|
-
private _updateSheetPreview;
|
|
31
|
-
private _handoffPreview;
|
|
32
|
-
private _hidePreview;
|
|
33
|
-
private _setInteractionBlocked;
|
|
34
23
|
private _isVisibleUnit;
|
|
35
|
-
private _getSheetLoadingRenderService;
|
|
36
24
|
}
|
|
@@ -34,28 +34,3 @@ export interface IDocCollabCursor {
|
|
|
34
34
|
/** The deserialized ranges of collab cursor. */
|
|
35
35
|
ranges: ITextRangeWithStyle[];
|
|
36
36
|
}
|
|
37
|
-
export interface IElementCollabSelectionPayload<TKind extends string = string> {
|
|
38
|
-
kind: TKind;
|
|
39
|
-
unitId: string;
|
|
40
|
-
subUnitId: string;
|
|
41
|
-
selectedIds: string[];
|
|
42
|
-
focusedId: string | null;
|
|
43
|
-
}
|
|
44
|
-
export interface IElementCollabCursor {
|
|
45
|
-
/** Stroke color of this collab cursor */
|
|
46
|
-
color: string;
|
|
47
|
-
/** Displayed user name of this cursor */
|
|
48
|
-
name: string;
|
|
49
|
-
/** Host unit ID */
|
|
50
|
-
unitId: string;
|
|
51
|
-
/** Host page ID */
|
|
52
|
-
subUnitId: string;
|
|
53
|
-
/** Remote selected element IDs */
|
|
54
|
-
selectedIds: string[];
|
|
55
|
-
/** Remote focused element ID */
|
|
56
|
-
focusedId: string | null;
|
|
57
|
-
/** Serialized selection payload */
|
|
58
|
-
selection: string;
|
|
59
|
-
}
|
|
60
|
-
export type ISlideCollabSelectionPayload = IElementCollabSelectionPayload<'slide-element-selection'>;
|
|
61
|
-
export type IBoardCollabSelectionPayload = IElementCollabSelectionPayload<'board-element-selection'>;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { IUniverCollaborationClientUIConfig } from './config/config';
|
|
2
|
-
import { IConfigService, Injector, Plugin } from '@univerjs/core';
|
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin } from '@univerjs/core';
|
|
3
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
4
|
export declare class UniverCollaborationClientUIPlugin extends Plugin {
|
|
5
5
|
private readonly _config;
|
|
6
6
|
private readonly _renderManagerService;
|
|
7
7
|
protected _injector: Injector;
|
|
8
8
|
private readonly _configService;
|
|
9
|
+
private readonly _commandService;
|
|
9
10
|
static pluginName: string;
|
|
10
11
|
static packageName: string;
|
|
11
12
|
static version: string;
|
|
12
|
-
constructor(_config: Partial<IUniverCollaborationClientUIConfig> | undefined, _renderManagerService: IRenderManagerService, _injector: Injector, _configService: IConfigService);
|
|
13
|
+
constructor(_config: Partial<IUniverCollaborationClientUIConfig> | undefined, _renderManagerService: IRenderManagerService, _injector: Injector, _configService: IConfigService, _commandService: ICommandService);
|
|
13
14
|
onStarting(): void;
|
|
14
15
|
onRendered(): void;
|
|
15
16
|
private _registerDependencies;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { IChangeset } from '@univerjs-pro/collaboration';
|
|
2
2
|
import { ITransformService } from '@univerjs-pro/collaboration';
|
|
3
|
-
import {
|
|
3
|
+
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
4
4
|
export declare class DocTransformSelectionsService {
|
|
5
|
-
private readonly
|
|
5
|
+
private readonly _docSelectionManagerService;
|
|
6
6
|
private readonly _transformService;
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(_docSelectionManagerService: DocSelectionManagerService, _transformService: ITransformService);
|
|
8
8
|
transformSelections(changeset: IChangeset): void;
|
|
9
9
|
}
|
|
@@ -7,9 +7,5 @@ export interface ISnapshotLoadingTimeoutState {
|
|
|
7
7
|
interface IProps {
|
|
8
8
|
state$: Observable<ISnapshotLoadingTimeoutState | null>;
|
|
9
9
|
}
|
|
10
|
-
interface ISnapshotLoadingGlobalProps extends IProps {
|
|
11
|
-
interactionBlocked$: Observable<boolean>;
|
|
12
|
-
}
|
|
13
|
-
export declare function SnapshotLoadingGlobal({ state$, interactionBlocked$ }: ISnapshotLoadingGlobalProps): import("react").JSX.Element;
|
|
14
10
|
export declare function SnapshotLoadingTimeout({ state$ }: IProps): import("react").JSX.Element | null;
|
|
15
11
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Nullable } from '@univerjs/core';
|
|
2
|
+
import type { Documents, DocumentSkeleton, INodePosition, Scene } from '@univerjs/engine-render';
|
|
2
3
|
import type { IDocCollabCursor } from '../../models/cursor';
|
|
3
4
|
/**
|
|
4
5
|
* Render a single collaborated cursor on the canvas.
|
|
@@ -25,3 +26,7 @@ export declare class DocCollabCursor {
|
|
|
25
26
|
private _getAnchorBounding;
|
|
26
27
|
private _getScale;
|
|
27
28
|
}
|
|
29
|
+
export declare function getDocCollabCursorTextRenderability(startPosition: Nullable<INodePosition>, endPosition: Nullable<INodePosition>): {
|
|
30
|
+
canRenderAnchor: boolean;
|
|
31
|
+
canRenderSelection: boolean;
|
|
32
|
+
};
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x143b(_0x425993,_0x4c5b22){_0x425993=_0x425993-0x156;var _0x186a87=_0x186a();var _0x143b41=_0x186a87[_0x425993];return _0x143b41;}function _0x186a(){var _0x1db30c=['object','16IcjYwf','function','2256648yhrVyv','56RyCveO','616887QSbRfs','runOnServer','1138502cfqRTJ','@univerjs/core/facade','UniverProCollaborationClientUi','1780NPNbSI','_injector','21329ceBZjK','RemoteUniscriptService','89344eVhyQc','FUniver','10090591fkUXUN','299454pTkIoO','10mkrurt','amd','UniverCoreFacade'];_0x186a=function(){return _0x1db30c;};return _0x186a();}(function(_0x182074,_0x438e90){var _0x1abfac=_0x143b,_0x202a66=_0x182074();while(!![]){try{var _0x284d04=parseInt(_0x1abfac(0x159))/0x1+parseInt(_0x1abfac(0x160))/0x2+-parseInt(_0x1abfac(0x163))/0x3*(-parseInt(_0x1abfac(0x156))/0x4)+-parseInt(_0x1abfac(0x164))/0x5*(parseInt(_0x1abfac(0x16a))/0x6)+-parseInt(_0x1abfac(0x162))/0x7+parseInt(_0x1abfac(0x168))/0x8*(parseInt(_0x1abfac(0x157))/0x9)+-parseInt(_0x1abfac(0x15c))/0xa*(-parseInt(_0x1abfac(0x15e))/0xb);if(_0x284d04===_0x438e90)break;else _0x202a66['push'](_0x202a66['shift']());}catch(_0x127876){_0x202a66['push'](_0x202a66['shift']());}}}(_0x186a,0xd4305),function(_0x3989a6,_0x10fc38){var _0x4bc4e3=_0x143b;typeof exports==_0x4bc4e3(0x167)&&typeof module<'u'?_0x10fc38(require('@univerjs-pro/collaboration-client-ui'),require('@univerjs/core/facade')):typeof define==_0x4bc4e3(0x169)&&define[_0x4bc4e3(0x165)]?define(['@univerjs-pro/collaboration-client-ui',_0x4bc4e3(0x15a)],_0x10fc38):(_0x3989a6=typeof globalThis<'u'?globalThis:_0x3989a6||self,_0x10fc38(_0x3989a6[_0x4bc4e3(0x15b)],_0x3989a6[_0x4bc4e3(0x166)]));}(this,function(_0x103547,_0x29a325){var _0x1e4f89=_0x143b,_0x5b0d76=class extends _0x29a325['FUniver']{[_0x1e4f89(0x158)](_0x1bbb52,_0x584631,..._0x526e78){var _0x34caf1=_0x1e4f89;return this[_0x34caf1(0x15d)]['get'](_0x103547[_0x34caf1(0x15f)])['runOnServer'](_0x1bbb52,_0x584631,{},..._0x526e78);}};_0x29a325[_0x1e4f89(0x161)]['extend'](_0x5b0d76);}));
|