@univerjs-pro/collaboration-client 0.6.6 → 0.6.7-nightly.202503261607

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 _0x5662(_0x2fb91f,_0x384a68){var _0x145f2a=_0x145f();return _0x5662=function(_0x5662b4,_0x43083d){_0x5662b4=_0x5662b4-0x8f;var _0x3ed268=_0x145f2a[_0x5662b4];return _0x3ed268;},_0x5662(_0x2fb91f,_0x384a68);}function _0x145f(){var _0xcd6519=['FBase','getOwnPropertyDescriptor','_snapshotService','createInstance','_injector','2DentRf','members$','21pAepTt','loadActiveSheet','get','SnapshotService','1860993hEgnYK','pipe','_handler','UniverProCollaborationClientFacade','from','waitForRoom$','rxjs','581418lukBxE','function','toDisposable','5970oNqevv','4872606PhIFvI','length','loadSheet','loadSheetAsync','[FCollaboration]:\x20this\x20method\x20should\x20be\x20override.','2163192KPbKrJ','defineProperty','loadActiveSheetAsync','extend','UniverProCollaborationClient','@univerjs/core','FCollaboration','Inject','DataLoaderService','@univerjs/core/facade','getUniverSheet','UniverCore','21215kyxmwY','MemberService','_univerInstanceService','@univerjs-pro/collaboration','UniverCoreFacade','6937502goSUjd','@univerjs-pro/collaboration-client','472LWAAVg','8352eVoBLn','exports','readyForCollab','FUniver','CollaborationController'];_0x145f=function(){return _0xcd6519;};return _0x145f();}(function(_0x1e0b2f,_0x2efe4b){var _0x2b4736=_0x5662,_0x57e010=_0x1e0b2f();while(!![]){try{var _0xee88aa=-parseInt(_0x2b4736(0xa0))/0x1+-parseInt(_0x2b4736(0x93))/0x2*(-parseInt(_0x2b4736(0x99))/0x3)+parseInt(_0x2b4736(0xbc))/0x4*(parseInt(_0x2b4736(0xb5))/0x5)+parseInt(_0x2b4736(0xa4))/0x6+parseInt(_0x2b4736(0x95))/0x7*(-parseInt(_0x2b4736(0xa9))/0x8)+parseInt(_0x2b4736(0xbd))/0x9*(parseInt(_0x2b4736(0xa3))/0xa)+-parseInt(_0x2b4736(0xba))/0xb;if(_0xee88aa===_0x2efe4b)break;else _0x57e010['push'](_0x57e010['shift']());}catch(_0x49d9ff){_0x57e010['push'](_0x57e010['shift']());}}}(_0x145f,0x713d1),function(_0x2a1812,_0xfc7cf4){var _0x24eb4b=_0x5662;typeof exports=='object'&&typeof module<'u'?_0xfc7cf4(exports,require(_0x24eb4b(0xbb)),require(_0x24eb4b(0xb2)),require(_0x24eb4b(0xb8)),require(_0x24eb4b(0xae)),require(_0x24eb4b(0x9f))):typeof define==_0x24eb4b(0xa1)&&define['amd']?define([_0x24eb4b(0xbe),_0x24eb4b(0xbb),_0x24eb4b(0xb2),'@univerjs-pro/collaboration',_0x24eb4b(0xae),_0x24eb4b(0x9f)],_0xfc7cf4):(_0x2a1812=typeof globalThis<'u'?globalThis:_0x2a1812||self,_0xfc7cf4(_0x2a1812[_0x24eb4b(0x9c)]={},_0x2a1812[_0x24eb4b(0xad)],_0x2a1812[_0x24eb4b(0xb9)],_0x2a1812['UniverProCollaboration'],_0x2a1812[_0x24eb4b(0xb4)],_0x2a1812[_0x24eb4b(0x9f)]));}(this,function(_0x1c1306,_0x94e907,_0x3260e1,_0x548fe4,_0x3df787,_0x12e495){'use strict';var _0x399b8c=_0x5662;var _0x1b5515=Object[_0x399b8c(0x8f)],_0x43ff32=(_0xe1c8cb,_0xcab88e,_0x352aa8,_0x57996f)=>{var _0x5551d2=_0x399b8c;for(var _0x4e5a9a=_0x57996f>0x1?void 0x0:_0x57996f?_0x1b5515(_0xcab88e,_0x352aa8):_0xcab88e,_0x3b40ce=_0xe1c8cb[_0x5551d2(0xa5)]-0x1,_0x24061d;_0x3b40ce>=0x0;_0x3b40ce--)(_0x24061d=_0xe1c8cb[_0x3b40ce])&&(_0x4e5a9a=_0x24061d(_0x4e5a9a)||_0x4e5a9a);return _0x4e5a9a;},_0xf5469d=(_0x598a09,_0x269eeb)=>(_0x277680,_0x2f8d9e)=>_0x269eeb(_0x277680,_0x2f8d9e,_0x598a09);_0x1c1306['FCollaboration']=class extends _0x3260e1[_0x399b8c(0xc2)]{constructor(_0x2e2cc7,_0x342c61,_0x5e9fa5,_0x30a750,_0x27a9fa){var _0x1990ab=_0x399b8c;super(),this[_0x1990ab(0x9b)]=_0x2e2cc7,this[_0x1990ab(0x92)]=_0x342c61,this[_0x1990ab(0xb7)]=_0x5e9fa5,this[_0x1990ab(0x90)]=_0x30a750,this['_collaborationController']=_0x27a9fa;}async[_0x399b8c(0x96)](){var _0x5931ca=_0x399b8c;return this[_0x5931ca(0xab)]();}async[_0x399b8c(0xab)](){var _0x55c87b=_0x399b8c;throw new Error(_0x55c87b(0xa8));}async[_0x399b8c(0xa6)](_0x370815){var _0x1cb47d=_0x399b8c;return this[_0x1cb47d(0xa7)](_0x370815);}async[_0x399b8c(0xa7)](_0x455628,_0x246ce3){var _0x16cec0=_0x399b8c;return await this[_0x16cec0(0x90)][_0x16cec0(0xa6)](_0x455628,0x0,_0x246ce3)?(await this['_collaborationController'][_0x16cec0(0xbf)](_0x455628),this[_0x16cec0(0x9b)]['getUniverSheet'](_0x455628)):null;}['subscribeCollaborators'](_0x3ad8dd,_0x523554){var _0x3b3300=_0x399b8c;const _0x59a675=this['_injector'][_0x3b3300(0x97)](_0x94e907[_0x3b3300(0xb6)])[_0x3b3300(0x9e)](_0x3ad8dd)[_0x3b3300(0x9a)](_0x12e495['switchMap'](_0x65a6ec=>_0x65a6ec[_0x3b3300(0x94)]))['subscribe'](_0x12f28a=>_0x523554(Array[_0x3b3300(0x9d)](_0x12f28a['values']())));return _0x3df787[_0x3b3300(0xa2)](_0x59a675);}},_0x1c1306[_0x399b8c(0xaf)]=_0x43ff32([_0xf5469d(0x1,_0x3df787[_0x399b8c(0xb0)](_0x3df787['Injector'])),_0xf5469d(0x2,_0x3df787['IUniverInstanceService']),_0xf5469d(0x3,_0x3df787['Inject'](_0x548fe4[_0x399b8c(0x98)])),_0xf5469d(0x4,_0x3df787['Inject'](_0x94e907[_0x399b8c(0xc1)]))],_0x1c1306['FCollaboration']);class _0x421611 extends _0x3260e1[_0x399b8c(0xc0)]{['getCollaboration'](){var _0x18ce18=_0x399b8c;return this[_0x18ce18(0x92)]['createInstance'](_0x1c1306[_0x18ce18(0xaf)],{'getUniverSheet':_0x4fc114=>this[_0x18ce18(0xb3)](_0x4fc114)});}['loadServerUnit'](_0x5e33f5,_0x23d100,_0x4906e2){var _0x1e59fb=_0x399b8c;return this[_0x1e59fb(0x92)][_0x1e59fb(0x91)](_0x94e907[_0x1e59fb(0xb1)])['loadUnit'](_0x5e33f5,_0x23d100,_0x4906e2);}}_0x3260e1[_0x399b8c(0xc0)][_0x399b8c(0xac)](_0x421611),Object[_0x399b8c(0xaa)](_0x1c1306,Symbol['toStringTag'],{'value':'Module'});}));