@univerjs-pro/collaboration-client 0.21.1 → 0.22.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/README.md +28 -7
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.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-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.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-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/locale/ko-KR.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-TW.js +1 -1
- package/lib/types/controllers/collaboration/collaboration-state.d.ts +17 -12
- package/lib/types/services/image-remote/image-io.service.d.ts +0 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.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/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.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-TW.js +1 -1
- package/package.json +20 -14
package/README.md
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
# @univerjs-pro/collaboration-client
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://npmjs.com/package/@univerjs-pro/collaboration-client)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs-pro/collaboration-client)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
`@univerjs-pro/collaboration-client` provides client-side collaboration plugin for Univer Pro.
|
|
7
|
+
|
|
8
|
+
## Package Overview
|
|
9
|
+
|
|
10
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
11
|
+
| --- | --- | :---: | :---: | :---: |
|
|
12
|
+
| `@univerjs-pro/collaboration-client` | `UniverProCollaborationClient` | No | Yes | Yes |
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @univerjs-pro/collaboration-client
|
|
18
|
+
# or
|
|
19
|
+
npm install @univerjs-pro/collaboration-client
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
6
23
|
|
|
7
24
|
## Usage
|
|
8
25
|
|
|
9
|
-
|
|
26
|
+
```ts
|
|
27
|
+
import EnUS from '@univerjs-pro/collaboration-client/locale/en-US';
|
|
28
|
+
import { UniverCollaborationClientPlugin } from '@univerjs-pro/collaboration-client';
|
|
29
|
+
|
|
30
|
+
univer.registerPlugin(UniverCollaborationClientPlugin);
|
|
10
31
|
|
|
11
|
-
|
|
12
|
-
npm i @univerjs-pro/collaboration-client
|
|
32
|
+
// Merge EnUS into your Univer locale map when this package contributes UI text.
|
|
13
33
|
```
|
|
14
34
|
|
|
15
|
-
|
|
35
|
+
## Resources
|
|
16
36
|
|
|
17
|
-
|
|
37
|
+
- [Documentation](https://docs.univer.ai/guides/pro)
|
|
38
|
+
- [NPM package](https://npmjs.com/package/@univerjs-pro/collaboration-client)
|
|
18
39
|
|
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x2245a0=_0x1bad;function _0x1bad(_0xc5a8a8,_0x2dc24f){_0xc5a8a8=_0xc5a8a8-0x66;const _0x2835f0=_0x2835();let _0x1bad87=_0x2835f0[_0xc5a8a8];return _0x1bad87;}(function(_0x2c6d2a,_0x538a35){const _0x5781e6=_0x1bad,_0x2fd062=_0x2c6d2a();while(!![]){try{const _0x2a6988=-parseInt(_0x5781e6(0x6a))/0x1+parseInt(_0x5781e6(0x91))/0x2*(-parseInt(_0x5781e6(0xa7))/0x3)+parseInt(_0x5781e6(0x9a))/0x4+parseInt(_0x5781e6(0xa3))/0x5*(-parseInt(_0x5781e6(0x77))/0x6)+parseInt(_0x5781e6(0x6f))/0x7*(parseInt(_0x5781e6(0x78))/0x8)+-parseInt(_0x5781e6(0xa4))/0x9+parseInt(_0x5781e6(0x72))/0xa;if(_0x2a6988===_0x538a35)break;else _0x2fd062['push'](_0x2fd062['shift']());}catch(_0x1d87f1){_0x2fd062['push'](_0x2fd062['shift']());}}}(_0x2835,0x92410),Object[_0x2245a0(0x82)](exports,Symbol['toStringTag'],{'value':_0x2245a0(0x8d)}));let _univerjs_pro_collaboration_client=require('@univerjs-pro/collaboration-client'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_core=require('@univerjs/core'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),rxjs=require('rxjs');var FCollaborationClientEnumMixin=class extends _univerjs_core_facade[_0x2245a0(0x85)]{get[_0x2245a0(0x95)](){const _0x4047c0=_0x2245a0;return _univerjs_pro_collaboration_client[_0x4047c0(0x95)];}};_univerjs_core_facade['FEnum'][_0x2245a0(0x7b)](FCollaborationClientEnumMixin);var FCollaborationEventNameMixin=class extends _univerjs_core_facade[_0x2245a0(0x81)]{get[_0x2245a0(0x66)](){const _0x3fdfac=_0x2245a0;return _0x3fdfac(0x66);}};function _0x2835(){const _0x3ccc05=['4039056KVAxun','disposeWithMe','subscribeCollaborators','567771EfWPaz','CollaborationStatusChanged','from','getUnitId','Injector','935615cGlDRh','loadUnitOfRevision','registerEventHandler','unitID','getFocusedUnit','1658734UmOyCT','loadServerUnitOfRevision','entityInit$','17160300UOacQS','loadActiveSheetAsync','loadActiveSheet','NOT_COLLAB','function','2224584QFZLDu','24AJebNk','_injector','loadUnit','extend','Inject','add','FBase','get','getCollaboration','FEventName','defineProperty','_univerInstanceService','_handler','FEnum','decorate','DisposableCollection','pipe','loadSheet','MemberService','_initialize','_collaborationController','Module','FUniver','toDisposable','status','4sqYkTt','getOwnPropertyDescriptor','loadServerUnit','fireEvent','CollaborationStatus','waitForRoom$','status$','readyForCollab','Event','4189380KNDRyk','getUniverSheet','object','subscribe','DataLoaderService','CollaborationController','getCollaborationStatus','SnapshotService','loadSheetAsync','15ZvCAAQ'];_0x2835=function(){return _0x3ccc05;};return _0x2835();}_univerjs_core_facade[_0x2245a0(0x81)][_0x2245a0(0x7b)](FCollaborationEventNameMixin);function __decorateParam(_0x59128a,_0x553744){return function(_0x1039e5,_0x2e6d3d){_0x553744(_0x1039e5,_0x2e6d3d,_0x59128a);};}function __decorate(_0x58a599,_0x407ff4,_0x50a550,_0x4dbb11){const _0x3ce647=_0x2245a0;var _0x48c749=arguments['length'],_0x34b7e0=_0x48c749<0x3?_0x407ff4:_0x4dbb11===null?_0x4dbb11=Object[_0x3ce647(0x92)](_0x407ff4,_0x50a550):_0x4dbb11,_0x118a68;if(typeof Reflect===_0x3ce647(0x9c)&&typeof Reflect[_0x3ce647(0x86)]===_0x3ce647(0x76))_0x34b7e0=Reflect[_0x3ce647(0x86)](_0x58a599,_0x407ff4,_0x50a550,_0x4dbb11);else{for(var _0x54cc1b=_0x58a599['length']-0x1;_0x54cc1b>=0x0;_0x54cc1b--)if(_0x118a68=_0x58a599[_0x54cc1b])_0x34b7e0=(_0x48c749<0x3?_0x118a68(_0x34b7e0):_0x48c749>0x3?_0x118a68(_0x407ff4,_0x50a550,_0x34b7e0):_0x118a68(_0x407ff4,_0x50a550))||_0x34b7e0;}return _0x48c749>0x3&&_0x34b7e0&&Object[_0x3ce647(0x82)](_0x407ff4,_0x50a550,_0x34b7e0),_0x34b7e0;}let FCollaboration=class FCollaboration extends _univerjs_core_facade[_0x2245a0(0x7e)]{constructor(_0x58694d,_0x4784c3,_0x81e932,_0x490d61,_0x4dd8d5){const _0x1c4a27=_0x2245a0;super(),this[_0x1c4a27(0x84)]=_0x58694d,this[_0x1c4a27(0x79)]=_0x4784c3,this[_0x1c4a27(0x83)]=_0x81e932,this['_snapshotService']=_0x490d61,this[_0x1c4a27(0x8c)]=_0x4dd8d5;}async[_0x2245a0(0x74)](){return this['loadActiveSheetAsync']();}async[_0x2245a0(0x73)](){throw new Error('[FCollaboration]:\x20this\x20method\x20should\x20be\x20override.');}async[_0x2245a0(0x89)](_0x2dae88){const _0x148fb3=_0x2245a0;return this[_0x148fb3(0xa2)](_0x2dae88);}async[_0x2245a0(0xa2)](_0x2ee40f,_0x3644d1){const _0x370529=_0x2245a0;if(!await this['_snapshotService'][_0x370529(0x89)](_0x2ee40f,0x0,_0x3644d1))return null;return await this['_collaborationController'][_0x370529(0x98)](_0x2ee40f),this[_0x370529(0x84)][_0x370529(0x9b)](_0x2ee40f);}[_0x2245a0(0xa6)](_0x199707,_0x4c2f69){const _0x5dccb8=_0x2245a0;return(0x0,_univerjs_core[_0x5dccb8(0x8f)])(this[_0x5dccb8(0x79)][_0x5dccb8(0x7f)](_univerjs_pro_collaboration_client[_0x5dccb8(0x8a)])[_0x5dccb8(0x96)](_0x199707)[_0x5dccb8(0x88)]((0x0,rxjs['switchMap'])(_0x290568=>_0x290568['members$']))[_0x5dccb8(0x9d)](_0x254f3a=>_0x4c2f69(Array[_0x5dccb8(0x67)](_0x254f3a['values']()))));}[_0x2245a0(0xa0)](_0x331d49){const _0x4a840e=_0x2245a0;var _0x123e1b;let _0x3e1c70;if(_0x331d49)_0x3e1c70=_0x331d49;else{const _0x88ee44=this['_univerInstanceService'][_0x4a840e(0x6e)]();_0x3e1c70=_0x88ee44===null||_0x88ee44===void 0x0?void 0x0:_0x88ee44[_0x4a840e(0x68)]();}if(!_0x3e1c70)return _univerjs_pro_collaboration_client[_0x4a840e(0x95)][_0x4a840e(0x75)];const _0x3c47b8=this['_collaborationController']['getCollabEntity'](_0x3e1c70);return(_0x123e1b=_0x3c47b8===null||_0x3c47b8===void 0x0?void 0x0:_0x3c47b8['state'][_0x4a840e(0x90)])!==null&&_0x123e1b!==void 0x0?_0x123e1b:_univerjs_pro_collaboration_client['CollaborationStatus']['NOT_COLLAB'];}};FCollaboration=__decorate([__decorateParam(0x1,(0x0,_univerjs_core[_0x2245a0(0x7c)])(_univerjs_core[_0x2245a0(0x69)])),__decorateParam(0x2,_univerjs_core['IUniverInstanceService']),__decorateParam(0x3,(0x0,_univerjs_core[_0x2245a0(0x7c)])(_univerjs_pro_collaboration[_0x2245a0(0xa1)])),__decorateParam(0x4,(0x0,_univerjs_core[_0x2245a0(0x7c)])(_univerjs_pro_collaboration_client[_0x2245a0(0x9f)]))],FCollaboration);var FUniverCollaborationClientMixin=class extends _univerjs_core_facade[_0x2245a0(0x8e)]{[_0x2245a0(0x8b)](_0x3d0121){const _0x833feb=_0x2245a0,_0x99eeb6=_0x3d0121[_0x833feb(0x7f)](_univerjs_pro_collaboration_client[_0x833feb(0x9f)]);this[_0x833feb(0xa5)](this[_0x833feb(0x6c)](this[_0x833feb(0x99)][_0x833feb(0x66)],()=>{const _0x49766d=_0x833feb,_0x4b08f3=new _univerjs_core[(_0x49766d(0x87))](),_0x44d505=_0x99eeb6[_0x49766d(0x71)][_0x49766d(0x9d)](_0x5894d2=>{const _0x2fffb1=_0x49766d,_0x359df1=_0x5894d2[_0x2fffb1(0x97)][_0x2fffb1(0x9d)](_0x3c9a86=>{const _0x303aa4=_0x2fffb1,_0x2db4aa={'unitId':_0x5894d2[_0x303aa4(0x6d)],'status':_0x3c9a86};this[_0x303aa4(0x94)](this[_0x303aa4(0x99)]['CollaborationStatusChanged'],_0x2db4aa);});_0x4b08f3[_0x2fffb1(0x7d)]((0x0,_univerjs_core[_0x2fffb1(0x8f)])(_0x359df1));});return _0x4b08f3[_0x49766d(0x7d)]((0x0,_univerjs_core['toDisposable'])(_0x44d505)),_0x4b08f3;}));}[_0x2245a0(0x80)](){const _0x4d67ae=_0x2245a0;return this[_0x4d67ae(0x79)]['createInstance'](FCollaboration,{'getUniverSheet':_0x1f617b=>this[_0x4d67ae(0x9b)](_0x1f617b)});}[_0x2245a0(0x93)](_0x25c34c,_0x3cc5b2,_0x15e520){const _0x3c7e04=_0x2245a0;return this[_0x3c7e04(0x79)][_0x3c7e04(0x7f)](_univerjs_pro_collaboration_client[_0x3c7e04(0x9e)])[_0x3c7e04(0x7a)](_0x25c34c,_0x3cc5b2,_0x15e520);}[_0x2245a0(0x70)](_0x562944,_0xf62ec9,_0x196afc){const _0x50f572=_0x2245a0;return this[_0x50f572(0x79)][_0x50f572(0x7f)](_univerjs_pro_collaboration_client[_0x50f572(0x9e)])[_0x50f572(0x6b)](_0x562944,_0xf62ec9,_0x196afc);}};_univerjs_core_facade[_0x2245a0(0x8e)][_0x2245a0(0x7b)](FUniverCollaborationClientMixin),Object[_0x2245a0(0x82)](exports,'FCollaboration',{'enumerable':!![],'get':function(){return FCollaboration;}});
|