@univerjs-pro/collaboration-client 0.6.6 → 0.6.7-experimental.20250328-3aaa828

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.
@@ -1,3 +1,4 @@
1
+ import { UnitModel, UniverInstanceType } from '@univerjs/core';
1
2
  import { FUniver } from '@univerjs/core/facade';
2
3
  import { FCollaboration } from './f-collaboration';
3
4
  /**
@@ -14,9 +15,24 @@ export interface IFUniverCollaborationClientMixin {
14
15
  * ```
15
16
  */
16
17
  getCollaboration(): FCollaboration;
18
+ /**
19
+ * Load the server unit by the given unit id and unit type.
20
+ * @param {string} unitId The unit id.
21
+ * @param {UniverInstanceType} unitType The unit type.
22
+ * @param {string} [subUnitId] The sub unit id.
23
+ * @returns {Promise<UnitModel | null>} The promise with the unit model.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * const unitModel = await univerAPI.loadServerUnit('unitId', univerAPI.Enum.UniverInstanceType.UNIVER_SHEET);
28
+ * console.log(unitModel, unitModel?.getSnapshot());
29
+ * ```
30
+ */
31
+ loadServerUnit(unitId: string, unitType: UniverInstanceType, subUnitId?: string): Promise<UnitModel | null>;
17
32
  }
18
33
  export declare class FUniverCollaborationClientMixin extends FUniver implements IFUniverCollaborationClientMixin {
19
34
  getCollaboration(): FCollaboration;
35
+ loadServerUnit(unitId: string, unitType: UniverInstanceType, subUnitId?: string): Promise<UnitModel | null>;
20
36
  }
21
37
  /**
22
38
  * @ignore
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x5aa8(_0x338341,_0x195a86){var _0x5c624b=_0x5c62();return _0x5aa8=function(_0x5aa8fa,_0x1675d2){_0x5aa8fa=_0x5aa8fa-0x1d2;var _0x323630=_0x5c624b[_0x5aa8fa];return _0x323630;},_0x5aa8(_0x338341,_0x195a86);}(function(_0x118333,_0x19b206){var _0x47d3eb=_0x5aa8,_0x718d2=_0x118333();while(!![]){try{var _0x2574c8=-parseInt(_0x47d3eb(0x1d9))/0x1+-parseInt(_0x47d3eb(0x1f3))/0x2+-parseInt(_0x47d3eb(0x1dc))/0x3+-parseInt(_0x47d3eb(0x1f1))/0x4+parseInt(_0x47d3eb(0x1df))/0x5*(parseInt(_0x47d3eb(0x203))/0x6)+-parseInt(_0x47d3eb(0x1d4))/0x7+parseInt(_0x47d3eb(0x1e0))/0x8*(parseInt(_0x47d3eb(0x200))/0x9);if(_0x2574c8===_0x19b206)break;else _0x718d2['push'](_0x718d2['shift']());}catch(_0x3877e7){_0x718d2['push'](_0x718d2['shift']());}}}(_0x5c62,0x8d98d),function(_0x7dc60a,_0x4303ea){var _0x3b15aa=_0x5aa8;typeof exports==_0x3b15aa(0x1e8)&&typeof module<'u'?_0x4303ea(exports,require(_0x3b15aa(0x1d6)),require(_0x3b15aa(0x1e9)),require(_0x3b15aa(0x1dd)),require(_0x3b15aa(0x1fe)),require('rxjs')):typeof define==_0x3b15aa(0x1ed)&&define[_0x3b15aa(0x1ff)]?define([_0x3b15aa(0x1f9),_0x3b15aa(0x1d6),_0x3b15aa(0x1e9),_0x3b15aa(0x1dd),_0x3b15aa(0x1fe),_0x3b15aa(0x1e1)],_0x4303ea):(_0x7dc60a=typeof globalThis<'u'?globalThis:_0x7dc60a||self,_0x4303ea(_0x7dc60a[_0x3b15aa(0x1f8)]={},_0x7dc60a[_0x3b15aa(0x1ec)],_0x7dc60a[_0x3b15aa(0x201)],_0x7dc60a[_0x3b15aa(0x1fd)],_0x7dc60a['UniverCore'],_0x7dc60a['rxjs']));}(this,function(_0x16de7b,_0x5af837,_0x5a7687,_0x137435,_0xd32f6d,_0x214551){'use strict';var _0x3e5175=_0x5aa8;var _0x744ac7=Object['getOwnPropertyDescriptor'],_0x2739f2=(_0x2a309a,_0x9c787d,_0x357236,_0x1d2d8a)=>{for(var _0x17b24b=_0x1d2d8a>0x1?void 0x0:_0x1d2d8a?_0x744ac7(_0x9c787d,_0x357236):_0x9c787d,_0x1b9e3=_0x2a309a['length']-0x1,_0x2f0f53;_0x1b9e3>=0x0;_0x1b9e3--)(_0x2f0f53=_0x2a309a[_0x1b9e3])&&(_0x17b24b=_0x2f0f53(_0x17b24b)||_0x17b24b);return _0x17b24b;},_0x54f8e2=(_0x103ac8,_0x2eb36d)=>(_0x137855,_0x360232)=>_0x2eb36d(_0x137855,_0x360232,_0x103ac8);_0x16de7b['FCollaboration']=class extends _0x5af837[_0x3e5175(0x1db)]{constructor(_0x18e0cd,_0x4025a1,_0x568594,_0x19e659,_0x3a0443){var _0xab546=_0x3e5175;super(),this['_handler']=_0x18e0cd,this[_0xab546(0x1d3)]=_0x4025a1,this['_univerInstanceService']=_0x568594,this['_snapshotService']=_0x19e659,this[_0xab546(0x1eb)]=_0x3a0443;}async['loadActiveSheet'](){return this['loadActiveSheetAsync']();}async['loadActiveSheetAsync'](){var _0x4149c6=_0x3e5175;throw new Error(_0x4149c6(0x202));}async['loadSheet'](_0x274366){return this['loadSheetAsync'](_0x274366);}async[_0x3e5175(0x1e6)](_0x466281,_0x455e53){var _0xf21994=_0x3e5175;return await this[_0xf21994(0x1fa)][_0xf21994(0x1d2)](_0x466281,0x0,_0x455e53)?(await this[_0xf21994(0x1eb)][_0xf21994(0x1f4)](_0x466281),this[_0xf21994(0x1da)][_0xf21994(0x1f2)](_0x466281)):null;}[_0x3e5175(0x1ea)](_0x59b26c,_0x381c57){var _0x3e0293=_0x3e5175;const _0xac5531=this['_injector'][_0x3e0293(0x1d7)](_0x137435['MemberService'])[_0x3e0293(0x1fb)](_0x59b26c)[_0x3e0293(0x1f5)](_0x214551[_0x3e0293(0x1ef)](_0x4fba9e=>_0x4fba9e['members$']))['subscribe'](_0x3139a3=>_0x381c57(Array[_0x3e0293(0x1e2)](_0x3139a3['values']())));return _0xd32f6d['toDisposable'](_0xac5531);}},_0x16de7b[_0x3e5175(0x1e5)]=_0x2739f2([_0x54f8e2(0x1,_0xd32f6d[_0x3e5175(0x1fc)](_0xd32f6d[_0x3e5175(0x1ee)])),_0x54f8e2(0x2,_0xd32f6d[_0x3e5175(0x1f7)]),_0x54f8e2(0x3,_0xd32f6d[_0x3e5175(0x1fc)](_0x5a7687[_0x3e5175(0x1f6)])),_0x54f8e2(0x4,_0xd32f6d[_0x3e5175(0x1fc)](_0x137435[_0x3e5175(0x1e7)]))],_0x16de7b[_0x3e5175(0x1e5)]);class _0x5dfa05 extends _0x5af837['FUniver']{[_0x3e5175(0x1e4)](){var _0x1f0f77=_0x3e5175;return this[_0x1f0f77(0x1d3)][_0x1f0f77(0x1d5)](_0x16de7b[_0x1f0f77(0x1e5)],{'getUniverSheet':_0x2471f0=>this[_0x1f0f77(0x1f2)](_0x2471f0)});}}_0x5af837[_0x3e5175(0x1de)][_0x3e5175(0x1e3)](_0x5dfa05),Object[_0x3e5175(0x1f0)](_0x16de7b,Symbol[_0x3e5175(0x1d8)],{'value':'Module'});}));function _0x5c62(){var _0x3d7d1c=['3231472RWvnhi','getUniverSheet','2300576ndEhbD','readyForCollab','pipe','SnapshotService','IUniverInstanceService','UniverProCollaborationClientFacade','exports','_snapshotService','waitForRoom$','Inject','UniverProCollaborationClient','@univerjs/core','amd','109818JEZClU','UniverProCollaboration','[FCollaboration]:\x20this\x20method\x20should\x20be\x20override.','1338JDJBav','loadSheet','_injector','1756853AcIKbE','createInstance','@univerjs/core/facade','get','toStringTag','140132vHRHia','_handler','FBase','56553dqNsvJ','@univerjs-pro/collaboration-client','FUniver','2355AehWlu','1864QzzfNT','rxjs','from','extend','getCollaboration','FCollaboration','loadSheetAsync','CollaborationController','object','@univerjs-pro/collaboration','subscribeCollaborators','_collaborationController','UniverCoreFacade','function','Injector','switchMap','defineProperty'];_0x5c62=function(){return _0x3d7d1c;};return _0x5c62();}
1
+ function _0x2e81(_0x20efd6,_0x165c69){var _0x15398a=_0x1539();return _0x2e81=function(_0x2e81b5,_0xf64d75){_0x2e81b5=_0x2e81b5-0xc6;var _0xafe96c=_0x15398a[_0x2e81b5];return _0xafe96c;},_0x2e81(_0x20efd6,_0x165c69);}function _0x1539(){var _0x5adb70=['subscribeCollaborators','MemberService','UniverProCollaborationClient','Inject','7162757kDlBYB','rxjs','5586fNbYji','_collaborationController','UniverCoreFacade','get','values','_univerInstanceService','@univerjs-pro/collaboration','loadActiveSheetAsync','toDisposable','switchMap','getUniverSheet','SnapshotService','@univerjs/core','object','8HcHRbS','18vMtukm','getCollaboration','FBase','UniverCore','loadActiveSheet','exports','CollaborationController','@univerjs-pro/collaboration-client','_injector','loadServerUnit','167812XAfCwi','extend','DataLoaderService','toStringTag','from','readyForCollab','defineProperty','FCollaboration','_handler','Module','UniverProCollaboration','4126450BPgIpi','2TNkwvM','@univerjs/core/facade','Injector','function','UniverProCollaborationClientFacade','1465JuZkKu','loadSheet','members$','loadUnit','createInstance','length','waitForRoom$','_snapshotService','2252162fNBKcv','getOwnPropertyDescriptor','loadSheetAsync','57VBrDsx','149963sByDzm','13314732ozxycj','IUniverInstanceService','subscribe'];_0x1539=function(){return _0x5adb70;};return _0x1539();}(function(_0x22122b,_0x2d5583){var _0x6d4a0b=_0x2e81,_0x329b88=_0x22122b();while(!![]){try{var _0x5c444d=parseInt(_0x6d4a0b(0x104))/0x1*(parseInt(_0x6d4a0b(0xf3))/0x2)+parseInt(_0x6d4a0b(0x103))/0x3*(-parseInt(_0x6d4a0b(0xe7))/0x4)+parseInt(_0x6d4a0b(0xf8))/0x5*(-parseInt(_0x6d4a0b(0xce))/0x6)+-parseInt(_0x6d4a0b(0xcc))/0x7*(-parseInt(_0x6d4a0b(0xdc))/0x8)+parseInt(_0x6d4a0b(0xdd))/0x9*(-parseInt(_0x6d4a0b(0xf2))/0xa)+parseInt(_0x6d4a0b(0x100))/0xb+parseInt(_0x6d4a0b(0x105))/0xc;if(_0x5c444d===_0x2d5583)break;else _0x329b88['push'](_0x329b88['shift']());}catch(_0x1359b2){_0x329b88['push'](_0x329b88['shift']());}}}(_0x1539,0x909d1),function(_0x45fa98,_0xb5e039){var _0x4ba4c9=_0x2e81;typeof exports==_0x4ba4c9(0xdb)&&typeof module<'u'?_0xb5e039(exports,require(_0x4ba4c9(0xe4)),require(_0x4ba4c9(0xf4)),require(_0x4ba4c9(0xd4)),require('@univerjs/core'),require(_0x4ba4c9(0xcd))):typeof define==_0x4ba4c9(0xf6)&&define['amd']?define([_0x4ba4c9(0xe2),'@univerjs-pro/collaboration-client','@univerjs/core/facade',_0x4ba4c9(0xd4),_0x4ba4c9(0xda),_0x4ba4c9(0xcd)],_0xb5e039):(_0x45fa98=typeof globalThis<'u'?globalThis:_0x45fa98||self,_0xb5e039(_0x45fa98[_0x4ba4c9(0xf7)]={},_0x45fa98[_0x4ba4c9(0xca)],_0x45fa98[_0x4ba4c9(0xd0)],_0x45fa98[_0x4ba4c9(0xf1)],_0x45fa98[_0x4ba4c9(0xe0)],_0x45fa98['rxjs']));}(this,function(_0x3e10a4,_0x37377e,_0xd1748d,_0x11b052,_0x5544d9,_0x595497){'use strict';var _0x5544ca=_0x2e81;var _0x1e7a5c=Object[_0x5544ca(0x101)],_0x2f301b=(_0x330417,_0x5bac96,_0x45a238,_0x566735)=>{var _0xc4c52f=_0x5544ca;for(var _0x810bd9=_0x566735>0x1?void 0x0:_0x566735?_0x1e7a5c(_0x5bac96,_0x45a238):_0x5bac96,_0x26e574=_0x330417[_0xc4c52f(0xfd)]-0x1,_0x5e7de4;_0x26e574>=0x0;_0x26e574--)(_0x5e7de4=_0x330417[_0x26e574])&&(_0x810bd9=_0x5e7de4(_0x810bd9)||_0x810bd9);return _0x810bd9;},_0x1b2e68=(_0x1ab15d,_0x516d66)=>(_0x266066,_0x29e80c)=>_0x516d66(_0x266066,_0x29e80c,_0x1ab15d);_0x3e10a4['FCollaboration']=class extends _0xd1748d[_0x5544ca(0xdf)]{constructor(_0x2ff515,_0xf5e217,_0xbcd7ca,_0x209bc6,_0x5f4a98){var _0x53d8c4=_0x5544ca;super(),this['_handler']=_0x2ff515,this['_injector']=_0xf5e217,this[_0x53d8c4(0xd3)]=_0xbcd7ca,this[_0x53d8c4(0xff)]=_0x209bc6,this[_0x53d8c4(0xcf)]=_0x5f4a98;}async[_0x5544ca(0xe1)](){var _0x2979a6=_0x5544ca;return this[_0x2979a6(0xd5)]();}async['loadActiveSheetAsync'](){throw new Error('[FCollaboration]:\x20this\x20method\x20should\x20be\x20override.');}async[_0x5544ca(0xf9)](_0x166b8a){var _0x486e48=_0x5544ca;return this[_0x486e48(0x102)](_0x166b8a);}async[_0x5544ca(0x102)](_0x2bf622,_0x31e773){var _0x34b751=_0x5544ca;return await this[_0x34b751(0xff)]['loadSheet'](_0x2bf622,0x0,_0x31e773)?(await this[_0x34b751(0xcf)][_0x34b751(0xec)](_0x2bf622),this[_0x34b751(0xef)][_0x34b751(0xd8)](_0x2bf622)):null;}[_0x5544ca(0xc8)](_0x43b806,_0x37cb28){var _0x3214f8=_0x5544ca;const _0x2e15fd=this[_0x3214f8(0xe5)][_0x3214f8(0xd1)](_0x37377e[_0x3214f8(0xc9)])[_0x3214f8(0xfe)](_0x43b806)['pipe'](_0x595497[_0x3214f8(0xd7)](_0x5af0d9=>_0x5af0d9[_0x3214f8(0xfa)]))[_0x3214f8(0xc7)](_0x418287=>_0x37cb28(Array[_0x3214f8(0xeb)](_0x418287[_0x3214f8(0xd2)]())));return _0x5544d9[_0x3214f8(0xd6)](_0x2e15fd);}},_0x3e10a4[_0x5544ca(0xee)]=_0x2f301b([_0x1b2e68(0x1,_0x5544d9[_0x5544ca(0xcb)](_0x5544d9[_0x5544ca(0xf5)])),_0x1b2e68(0x2,_0x5544d9[_0x5544ca(0xc6)]),_0x1b2e68(0x3,_0x5544d9[_0x5544ca(0xcb)](_0x11b052[_0x5544ca(0xd9)])),_0x1b2e68(0x4,_0x5544d9[_0x5544ca(0xcb)](_0x37377e[_0x5544ca(0xe3)]))],_0x3e10a4[_0x5544ca(0xee)]);class _0xe2c95a extends _0xd1748d['FUniver']{[_0x5544ca(0xde)](){var _0x5a94d6=_0x5544ca;return this[_0x5a94d6(0xe5)][_0x5a94d6(0xfc)](_0x3e10a4[_0x5a94d6(0xee)],{'getUniverSheet':_0x4136d9=>this[_0x5a94d6(0xd8)](_0x4136d9)});}[_0x5544ca(0xe6)](_0x4d7018,_0x33d288,_0x13b3a0){var _0x401454=_0x5544ca;return this[_0x401454(0xe5)]['createInstance'](_0x37377e[_0x401454(0xe9)])[_0x401454(0xfb)](_0x4d7018,_0x33d288,_0x13b3a0);}}_0xd1748d['FUniver'][_0x5544ca(0xe8)](_0xe2c95a),Object[_0x5544ca(0xed)](_0x3e10a4,Symbol[_0x5544ca(0xea)],{'value':_0x5544ca(0xf0)});}));