@univerjs-pro/docs-exchange-client 0.2.6
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 +24 -0
- package/lib/cjs/index.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/types/commands/operations/exchange.operation.d.ts +4 -0
- package/lib/types/controllers/exchange.controller.d.ts +16 -0
- package/lib/types/controllers/menu.d.ts +6 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/plugin.d.ts +12 -0
- package/lib/umd/index.js +1 -0
- package/package.json +89 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @univerjs-pro/docs-exchange-client
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/packages/@univerjs-pro/docs-exchange-client)
|
|
4
|
+
[](https://img.shields.io/npm/l/@univerjs-pro/docs-exchange-client)
|
|
5
|
+
|
|
6
|
+
## Introduction
|
|
7
|
+
|
|
8
|
+
The package provides the ability to import and export data between Univer and Word Document.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
### Installation
|
|
13
|
+
|
|
14
|
+
```shell
|
|
15
|
+
npm i @univerjs-pro/docs-exchange-client
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Config
|
|
19
|
+
|
|
20
|
+
```javascript
|
|
21
|
+
import { UniverDocsExchangeClientPlugin } from '@univerjs-pro/docs-exchange-client';
|
|
22
|
+
|
|
23
|
+
univer.registerPlugin(UniverDocsExchangeClientPlugin);
|
|
24
|
+
```
|
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var _0x301ed3=_0x2e0b;(function(_0x591883,_0x3ac9f1){var _0x18bfbc=_0x2e0b,_0x1118bc=_0x591883();while(!![]){try{var _0x49fd33=parseInt(_0x18bfbc(0x14d))/0x1+parseInt(_0x18bfbc(0x12a))/0x2*(parseInt(_0x18bfbc(0x14a))/0x3)+parseInt(_0x18bfbc(0x11d))/0x4+parseInt(_0x18bfbc(0x112))/0x5*(-parseInt(_0x18bfbc(0x146))/0x6)+-parseInt(_0x18bfbc(0x151))/0x7+parseInt(_0x18bfbc(0x127))/0x8+-parseInt(_0x18bfbc(0x142))/0x9;if(_0x49fd33===_0x3ac9f1)break;else _0x1118bc['push'](_0x1118bc['shift']());}catch(_0x4942d0){_0x1118bc['push'](_0x1118bc['shift']());}}}(_0x1390,0xadef6));Object['defineProperty'](exports,Symbol[_0x301ed3(0x11c)],{'value':_0x301ed3(0x140)});const o=require(_0x301ed3(0x143)),u=require(_0x301ed3(0x123)),a=require(_0x301ed3(0x138)),_={'id':_0x301ed3(0x115),'type':o[_0x301ed3(0x152)][_0x301ed3(0x132)],'handler':async _0x18f0b1=>(_0x18f0b1[_0x301ed3(0x10e)](u[_0x301ed3(0x14e)])[_0x301ed3(0x137)](),!0x0)},d={'id':_0x301ed3(0x14b),'type':o[_0x301ed3(0x152)][_0x301ed3(0x132)],'handler':async _0x41778f=>(_0x41778f[_0x301ed3(0x10e)](u[_0x301ed3(0x14e)])[_0x301ed3(0x117)](),!0x0)},h=_0x301ed3(0x11b);function _0x1390(){var _0x44aabc=['850427yBwlbb','IExchangeOperateService','exchange.upload','getOwnPropertyDescriptor','2839326gbVMDi','CommandType','defineProperty','get','BUTTON','createInstance','LifecycleStages','40245LiYBrA','symbol','exchange.file','exchange-client.operation.import-docx-to-unit-id','Tools','exportDOCXByUnitId','FolderSingle','UniverDocsExchangeClientPlugin','length','docs-exchange-client.operation.exchange','toStringTag','1813432WhXKMC','_injector','MenuItemType','_commandService','getMenuHiddenObservable','UNIVER_DOC','@univerjs-pro/exchange-client','_menuService','MenuPosition','registerCommand','231912pSxTud','pluginName','Plugin','252EkGsdu','OnLifecycle','SUBITEMS','Inject','ExportDOCXByUnitIdOperation','disposeWithMe','initialize','TOOLBAR_LAYOUT','OPERATION','_config','Injector','onReady','deepMerge','importDOCXToUnitId','@univerjs/ui','invoke','MenuGroup','IMenuService','Ready','DependentOn','UniverExchangeClientPlugin','TOOLBAR_START','Module','ICommandService','3413979uDwfzy','@univerjs/core','UniverInstanceType','_initCommands','426rMJGXh','add','_initMenus','ImportDOCXToUnitIdOperation','17526JkpHWP','exchange-client.operation.export-docx-by-unit-id','forEach'];_0x1390=function(){return _0x44aabc;};return _0x1390();}function v(_0x30e6ed){var _0x323e6b=_0x301ed3;return{'id':h,'group':a[_0x323e6b(0x13a)][_0x323e6b(0x131)],'type':a[_0x323e6b(0x11f)][_0x323e6b(0x12c)],'icon':'DirectExportSingle','tooltip':_0x323e6b(0x114),'positions':[a[_0x323e6b(0x125)][_0x323e6b(0x13f)]],'hidden$':a[_0x323e6b(0x121)](_0x30e6ed,o['UniverInstanceType'][_0x323e6b(0x122)])};}function C(){var _0xf0266d=_0x301ed3;return{'id':_['id'],'type':a[_0xf0266d(0x11f)][_0xf0266d(0x10f)],'title':_0xf0266d(0x14f),'icon':_0xf0266d(0x118),'positions':[h]};}var I=Object[_0x301ed3(0x153)],m=Object['getOwnPropertyDescriptor'],E=(_0x511594,_0x3259a2,_0x2710b1,_0x1a8445)=>{var _0x109581=_0x301ed3;for(var _0xa0f5a0=_0x1a8445>0x1?void 0x0:_0x1a8445?m(_0x3259a2,_0x2710b1):_0x3259a2,_0x3ff4e6=_0x511594[_0x109581(0x11a)]-0x1,_0x205f83;_0x3ff4e6>=0x0;_0x3ff4e6--)(_0x205f83=_0x511594[_0x3ff4e6])&&(_0xa0f5a0=(_0x1a8445?_0x205f83(_0x3259a2,_0x2710b1,_0xa0f5a0):_0x205f83(_0xa0f5a0))||_0xa0f5a0);return _0x1a8445&&_0xa0f5a0&&I(_0x3259a2,_0x2710b1,_0xa0f5a0),_0xa0f5a0;},l=(_0x2aad61,_0x13d34c)=>(_0x4613e2,_0x5a9ba9)=>_0x13d34c(_0x4613e2,_0x5a9ba9,_0x2aad61);const f={};let p=class extends o['Disposable']{constructor(_0x1e83af,_0x23c786,_0x5e6bae,_0x5f82a1){var _0x2da653=_0x301ed3;super(),this[_0x2da653(0x133)]=_0x1e83af,this[_0x2da653(0x11e)]=_0x23c786,this[_0x2da653(0x120)]=_0x5e6bae,this[_0x2da653(0x124)]=_0x5f82a1,this[_0x2da653(0x145)](),this[_0x2da653(0x148)]();}['_initCommands'](){var _0x645d86=_0x301ed3;[_,d][_0x645d86(0x14c)](_0x225c15=>{var _0x8cdd03=_0x645d86;this[_0x8cdd03(0x12f)](this[_0x8cdd03(0x120)][_0x8cdd03(0x126)](_0x225c15));});}['_initMenus'](){var _0x2e284c=_0x301ed3;const {menu:_0x445b49={}}=this[_0x2e284c(0x133)];[v,C][_0x2e284c(0x14c)](_0x2e4495=>{var _0x488b3f=_0x2e284c;this[_0x488b3f(0x12f)](this[_0x488b3f(0x124)]['addMenuItem'](this[_0x488b3f(0x11e)][_0x488b3f(0x139)](_0x2e4495),_0x445b49));});}};p=E([o[_0x301ed3(0x12b)](o[_0x301ed3(0x111)][_0x301ed3(0x13c)],p),l(0x1,o[_0x301ed3(0x12d)](o[_0x301ed3(0x134)])),l(0x2,o[_0x301ed3(0x141)]),l(0x3,a[_0x301ed3(0x13b)])],p);var g=Object[_0x301ed3(0x153)],D=Object[_0x301ed3(0x150)],x=(_0x325332,_0x55c218,_0x1fd077)=>_0x55c218 in _0x325332?g(_0x325332,_0x55c218,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1fd077}):_0x325332[_0x55c218]=_0x1fd077,P=(_0x36bb47,_0x2a84ee,_0x7fe964,_0x79e5d8)=>{var _0x3de740=_0x301ed3;for(var _0x21cb42=_0x79e5d8>0x1?void 0x0:_0x79e5d8?D(_0x2a84ee,_0x7fe964):_0x2a84ee,_0x2c9273=_0x36bb47[_0x3de740(0x11a)]-0x1,_0x4ba62b;_0x2c9273>=0x0;_0x2c9273--)(_0x4ba62b=_0x36bb47[_0x2c9273])&&(_0x21cb42=(_0x79e5d8?_0x4ba62b(_0x2a84ee,_0x7fe964,_0x21cb42):_0x4ba62b(_0x21cb42))||_0x21cb42);return _0x79e5d8&&_0x21cb42&&g(_0x2a84ee,_0x7fe964,_0x21cb42),_0x21cb42;},T=(_0x3f63e8,_0x22be38)=>(_0x507454,_0x5a051a)=>_0x22be38(_0x507454,_0x5a051a,_0x3f63e8),O=(_0x5bdc90,_0x239589,_0x49fa0b)=>x(_0x5bdc90,typeof _0x239589!=_0x301ed3(0x113)?_0x239589+'':_0x239589,_0x49fa0b);function _0x2e0b(_0xa4f0da,_0x3f3f2e){var _0x1390f2=_0x1390();return _0x2e0b=function(_0x2e0bb2,_0x2c92d5){_0x2e0bb2=_0x2e0bb2-0x10e;var _0x1175a0=_0x1390f2[_0x2e0bb2];return _0x1175a0;},_0x2e0b(_0xa4f0da,_0x3f3f2e);}const y='DOC_EXCHANGE_CLIENT_PLUGIN';exports[_0x301ed3(0x119)]=class extends o[_0x301ed3(0x129)]{constructor(_0x34c41c={},_0x246847){var _0x3a79e0=_0x301ed3;super(),this['_config']=_0x34c41c,this[_0x3a79e0(0x11e)]=_0x246847,this[_0x3a79e0(0x133)]=o[_0x3a79e0(0x116)][_0x3a79e0(0x136)]({},f,this[_0x3a79e0(0x133)]);}[_0x301ed3(0x130)](){var _0x4d94ea=_0x301ed3;[[p,{'useFactory':()=>this['_injector'][_0x4d94ea(0x110)](p,this[_0x4d94ea(0x133)])}]][_0x4d94ea(0x14c)](_0x122b71=>this[_0x4d94ea(0x11e)][_0x4d94ea(0x147)](_0x122b71));}[_0x301ed3(0x135)](){var _0x664698=_0x301ed3;this[_0x664698(0x130)]();}},O(exports[_0x301ed3(0x119)],_0x301ed3(0x128),y),O(exports[_0x301ed3(0x119)],'type',o[_0x301ed3(0x144)][_0x301ed3(0x122)]),exports[_0x301ed3(0x119)]=P([o[_0x301ed3(0x13d)](u[_0x301ed3(0x13e)]),T(0x1,o[_0x301ed3(0x12d)](o['Injector']))],exports['UniverDocsExchangeClientPlugin']),exports[_0x301ed3(0x12e)]=d,exports[_0x301ed3(0x149)]=_;
|
package/lib/es/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x41e3bf=_0x5977;(function(_0x55f53b,_0x55537a){var _0x4b98e3=_0x5977,_0xc6fdd9=_0x55f53b();while(!![]){try{var _0x321772=parseInt(_0x4b98e3(0x169))/0x1*(-parseInt(_0x4b98e3(0x15d))/0x2)+-parseInt(_0x4b98e3(0x15a))/0x3*(-parseInt(_0x4b98e3(0x170))/0x4)+parseInt(_0x4b98e3(0x154))/0x5+parseInt(_0x4b98e3(0x14a))/0x6+-parseInt(_0x4b98e3(0x161))/0x7*(-parseInt(_0x4b98e3(0x171))/0x8)+-parseInt(_0x4b98e3(0x172))/0x9*(-parseInt(_0x4b98e3(0x156))/0xa)+-parseInt(_0x4b98e3(0x14d))/0xb;if(_0x321772===_0x55537a)break;else _0xc6fdd9['push'](_0xc6fdd9['shift']());}catch(_0x41d755){_0xc6fdd9['push'](_0xc6fdd9['shift']());}}}(_0x4f4c,0x2b483));import{CommandType as _0x6e5b8,UniverInstanceType as _0x1bbd71,OnLifecycle as _0x256e96,LifecycleStages as _0x44396c,Inject as _0x280b7e,Injector as _0x19b004,Disposable as _0x32068c,ICommandService as _0x2afad4,DependentOn as _0x48366b,Plugin as _0x2e90d4,Tools as _0x5a3181}from'@univerjs/core';function _0x4f4c(){var _0x43ebed=['30bNlYJV','_commandService','defineProperty','importDOCXToUnitId','123JnLEtq','DirectExportSingle','_config','2278gOFblg','registerCommand','createInstance','docs-exchange-client.operation.exchange','7otrOUK','_menuService','exchange-client.operation.export-docx-by-unit-id','forEach','FolderSingle','SUBITEMS','length','type','223YFlPUu','initialize','_initCommands','disposeWithMe','get','UNIVER_DOC','invoke','18308XCpsqb','1435528HtPuUi','936414nuMYaY','deepMerge','BUTTON','TOOLBAR_LAYOUT','_injector','_initMenus','2093988hLfwsN','OPERATION','TOOLBAR_START','8385729GdPcoS','exchange.file','pluginName','exportDOCXByUnitId','getOwnPropertyDescriptor','exchange.upload','addMenuItem','826925tRATsU','symbol'];_0x4f4c=function(){return _0x43ebed;};return _0x4f4c();}import{IExchangeOperateService as _0x20dec9,UniverExchangeClientPlugin as _0x3c766c}from'@univerjs-pro/exchange-client';import{MenuGroup as _0x116212,MenuItemType as _0x432073,MenuPosition as _0x246412,getMenuHiddenObservable as _0x252a8c,IMenuService as _0x568f7e}from'@univerjs/ui';const O={'id':'exchange-client.operation.import-docx-to-unit-id','type':_0x6e5b8[_0x41e3bf(0x14b)],'handler':async _0x25ff3c=>(_0x25ff3c[_0x41e3bf(0x16d)](_0x20dec9)[_0x41e3bf(0x159)](),!0x0)},b={'id':_0x41e3bf(0x163),'type':_0x6e5b8['OPERATION'],'handler':async _0x5e5145=>(_0x5e5145[_0x41e3bf(0x16d)](_0x20dec9)[_0x41e3bf(0x150)](),!0x0)},g=_0x41e3bf(0x160);function A(_0x11ba8d){var _0x555b20=_0x41e3bf;return{'id':g,'group':_0x116212[_0x555b20(0x147)],'type':_0x432073[_0x555b20(0x166)],'icon':_0x555b20(0x15b),'tooltip':_0x555b20(0x14e),'positions':[_0x246412[_0x555b20(0x14c)]],'hidden$':_0x252a8c(_0x11ba8d,_0x1bbd71[_0x555b20(0x16e)])};}function R(){var _0xa212dc=_0x41e3bf;return{'id':O['id'],'type':_0x432073[_0xa212dc(0x174)],'title':_0xa212dc(0x152),'icon':_0xa212dc(0x165),'positions':[g]};}var j=Object[_0x41e3bf(0x158)],L=Object[_0x41e3bf(0x151)],X=(_0x22362d,_0x3d0bdf,_0x2a1389,_0x43f387)=>{for(var _0x530db7=_0x43f387>0x1?void 0x0:_0x43f387?L(_0x3d0bdf,_0x2a1389):_0x3d0bdf,_0x1612de=_0x22362d['length']-0x1,_0x1a796a;_0x1612de>=0x0;_0x1612de--)(_0x1a796a=_0x22362d[_0x1612de])&&(_0x530db7=(_0x43f387?_0x1a796a(_0x3d0bdf,_0x2a1389,_0x530db7):_0x1a796a(_0x530db7))||_0x530db7);return _0x43f387&&_0x530db7&&j(_0x3d0bdf,_0x2a1389,_0x530db7),_0x530db7;},p=(_0x510b97,_0x195465)=>(_0x4762e8,_0x5dcaa1)=>_0x195465(_0x4762e8,_0x5dcaa1,_0x510b97);const B={};let s=class extends _0x32068c{constructor(_0x46aff3,_0x1924c2,_0x51fab9,_0x239555){var _0x4f5ae8=_0x41e3bf;super(),this[_0x4f5ae8(0x15c)]=_0x46aff3,this['_injector']=_0x1924c2,this[_0x4f5ae8(0x157)]=_0x51fab9,this[_0x4f5ae8(0x162)]=_0x239555,this[_0x4f5ae8(0x16b)](),this[_0x4f5ae8(0x149)]();}[_0x41e3bf(0x16b)](){var _0x50aec1=_0x41e3bf;[O,b][_0x50aec1(0x164)](_0x407925=>{var _0x39cdc0=_0x50aec1;this[_0x39cdc0(0x16c)](this[_0x39cdc0(0x157)][_0x39cdc0(0x15e)](_0x407925));});}[_0x41e3bf(0x149)](){var _0x475411=_0x41e3bf;const {menu:_0x2d7030={}}=this[_0x475411(0x15c)];[A,R][_0x475411(0x164)](_0x2aba4d=>{var _0x3aa72c=_0x475411;this[_0x3aa72c(0x16c)](this[_0x3aa72c(0x162)][_0x3aa72c(0x153)](this[_0x3aa72c(0x148)][_0x3aa72c(0x16f)](_0x2aba4d),_0x2d7030));});}};s=X([_0x256e96(_0x44396c['Ready'],s),p(0x1,_0x280b7e(_0x19b004)),p(0x2,_0x2afad4),p(0x3,_0x568f7e)],s);var f=Object[_0x41e3bf(0x158)],G=Object['getOwnPropertyDescriptor'],w=(_0x182cec,_0x2878a9,_0x212b8a)=>_0x2878a9 in _0x182cec?f(_0x182cec,_0x2878a9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x212b8a}):_0x182cec[_0x2878a9]=_0x212b8a,F=(_0x5d2cdf,_0x237964,_0x3f1073,_0x6f2980)=>{var _0x7e1ca5=_0x41e3bf;for(var _0x597314=_0x6f2980>0x1?void 0x0:_0x6f2980?G(_0x237964,_0x3f1073):_0x237964,_0x30127f=_0x5d2cdf[_0x7e1ca5(0x167)]-0x1,_0x19f4df;_0x30127f>=0x0;_0x30127f--)(_0x19f4df=_0x5d2cdf[_0x30127f])&&(_0x597314=(_0x6f2980?_0x19f4df(_0x237964,_0x3f1073,_0x597314):_0x19f4df(_0x597314))||_0x597314);return _0x6f2980&&_0x597314&&f(_0x237964,_0x3f1073,_0x597314),_0x597314;},$=(_0x234e5c,_0xe566fc)=>(_0x19da3c,_0x5a1cb9)=>_0xe566fc(_0x19da3c,_0x5a1cb9,_0x234e5c),v=(_0x599323,_0x24534c,_0xfe0c3b)=>w(_0x599323,typeof _0x24534c!=_0x41e3bf(0x155)?_0x24534c+'':_0x24534c,_0xfe0c3b);function _0x5977(_0x31ac18,_0x820dd6){var _0x4f4c12=_0x4f4c();return _0x5977=function(_0x597759,_0x4ebac7){_0x597759=_0x597759-0x147;var _0x4b3123=_0x4f4c12[_0x597759];return _0x4b3123;},_0x5977(_0x31ac18,_0x820dd6);}const H='DOC_EXCHANGE_CLIENT_PLUGIN';let a=class extends _0x2e90d4{constructor(_0x225e5e={},_0x581bcd){var _0x48f16e=_0x41e3bf;super(),this['_config']=_0x225e5e,this[_0x48f16e(0x148)]=_0x581bcd,this[_0x48f16e(0x15c)]=_0x5a3181[_0x48f16e(0x173)]({},B,this[_0x48f16e(0x15c)]);}['initialize'](){var _0x47cf00=_0x41e3bf;[[s,{'useFactory':()=>this['_injector'][_0x47cf00(0x15f)](s,this[_0x47cf00(0x15c)])}]]['forEach'](_0x2c077d=>this['_injector']['add'](_0x2c077d));}['onReady'](){var _0x4a270d=_0x41e3bf;this[_0x4a270d(0x16a)]();}};v(a,_0x41e3bf(0x14f),H),v(a,_0x41e3bf(0x168),_0x1bbd71[_0x41e3bf(0x16e)]),a=F([_0x48366b(_0x3c766c),$(0x1,_0x280b7e(_0x19b004))],a);export{b as ExportDOCXByUnitIdOperation,O as ImportDOCXToUnitIdOperation,a as UniverDocsExchangeClientPlugin};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
2
|
+
import { MenuConfig, IMenuService } from '@univerjs/ui';
|
|
3
|
+
|
|
4
|
+
export interface IDocsExchangeClientConfig {
|
|
5
|
+
menu: MenuConfig;
|
|
6
|
+
}
|
|
7
|
+
export declare const DefaultDocsExchangeClientConfig: {};
|
|
8
|
+
export declare class DocsExchangeClientController extends Disposable {
|
|
9
|
+
private readonly _config;
|
|
10
|
+
private readonly _injector;
|
|
11
|
+
private readonly _commandService;
|
|
12
|
+
private readonly _menuService;
|
|
13
|
+
constructor(_config: Partial<IDocsExchangeClientConfig>, _injector: Injector, _commandService: ICommandService, _menuService: IMenuService);
|
|
14
|
+
private _initCommands;
|
|
15
|
+
private _initMenus;
|
|
16
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';
|
|
2
|
+
import { IAccessor } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export declare function DocsExchangeMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
5
|
+
export declare function ImportDOCXToUnitIdMenuItemFactory(): IMenuButtonItem<string>;
|
|
6
|
+
export declare function ExportDOCXByUnitIdMenuItemFactory(): IMenuButtonItem<string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import { IDocsExchangeClientConfig } from './controllers/exchange.controller';
|
|
3
|
+
|
|
4
|
+
export declare class UniverDocsExchangeClientPlugin extends Plugin {
|
|
5
|
+
private readonly _config;
|
|
6
|
+
readonly _injector: Injector;
|
|
7
|
+
static pluginName: string;
|
|
8
|
+
static type: UniverInstanceType;
|
|
9
|
+
constructor(_config: Partial<IDocsExchangeClientConfig>, _injector: Injector);
|
|
10
|
+
initialize(): void;
|
|
11
|
+
onReady(): void;
|
|
12
|
+
}
|
package/lib/umd/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x31cd(_0x452084,_0x250e45){var _0x55712a=_0x5571();return _0x31cd=function(_0x31cdec,_0x9f732d){_0x31cdec=_0x31cdec-0x166;var _0x4e639f=_0x55712a[_0x31cdec];return _0x4e639f;},_0x31cd(_0x452084,_0x250e45);}function _0x5571(){var _0x3d44cb=['invoke','UniverExchangeClient','defineProperty','11774010uwtvnl','UniverUi','1413OukWxu','DependentOn','IMenuService','UNIVER_DOC','addMenuItem','exchange.file','TOOLBAR_START','_commandService','MenuItemType','69977VCyRUq','initialize','type','OnLifecycle','pluginName','UniverExchangeClientPlugin','MenuPosition','Ready','6595020mVGoQb','_menuService','UniverDocsExchangeClient','11ClvdEb','getMenuHiddenObservable','@univerjs/core','exchange-client.operation.import-docx-to-unit-id','UniverDocsExchangeClientPlugin','Disposable','amd','@univerjs-pro/exchange-client','CommandType','Plugin','object','3601704ueWayS','_initMenus','onReady','ICommandService','_injector','createInstance','symbol','forEach','Inject','add','Tools','_config','8018502TDQyxf','DOC_EXCHANGE_CLIENT_PLUGIN','TOOLBAR_LAYOUT','disposeWithMe','IExchangeOperateService','Module','3wDxfXE','Injector','OPERATION','MenuGroup','7neWzwU','DirectExportSingle','registerCommand','2782922GWeYYk','length','79400HtBAOw','deepMerge','FolderSingle','getOwnPropertyDescriptor','exchange.upload','exchange-client.operation.export-docx-by-unit-id','@univerjs/ui','SUBITEMS','ExportDOCXByUnitIdOperation','exportDOCXByUnitId','docs-exchange-client.operation.exchange','UniverInstanceType','exports'];_0x5571=function(){return _0x3d44cb;};return _0x5571();}(function(_0x27b348,_0xb49170){var _0x238da2=_0x31cd,_0x2d370f=_0x27b348();while(!![]){try{var _0x436356=parseInt(_0x238da2(0x1a2))/0x1+-parseInt(_0x238da2(0x185))/0x2*(-parseInt(_0x238da2(0x17e))/0x3)+-parseInt(_0x238da2(0x16c))/0x4+parseInt(_0x238da2(0x1aa))/0x5+-parseInt(_0x238da2(0x178))/0x6*(parseInt(_0x238da2(0x182))/0x7)+parseInt(_0x238da2(0x187))/0x8*(parseInt(_0x238da2(0x199))/0x9)+-parseInt(_0x238da2(0x197))/0xa*(parseInt(_0x238da2(0x1ad))/0xb);if(_0x436356===_0xb49170)break;else _0x2d370f['push'](_0x2d370f['shift']());}catch(_0x3f8b52){_0x2d370f['push'](_0x2d370f['shift']());}}}(_0x5571,0xe1b07),function(_0x3b67fb,_0xff15f7){var _0x24e42b=_0x31cd;typeof exports==_0x24e42b(0x16b)&&typeof module<'u'?_0xff15f7(exports,require(_0x24e42b(0x1af)),require(_0x24e42b(0x168)),require('@univerjs/ui')):typeof define=='function'&&define[_0x24e42b(0x167)]?define([_0x24e42b(0x193),_0x24e42b(0x1af),_0x24e42b(0x168),_0x24e42b(0x18d)],_0xff15f7):(_0x3b67fb=typeof globalThis<'u'?globalThis:_0x3b67fb||self,_0xff15f7(_0x3b67fb[_0x24e42b(0x1ac)]={},_0x3b67fb['UniverCore'],_0x3b67fb[_0x24e42b(0x195)],_0x3b67fb[_0x24e42b(0x198)]));}(this,function(_0x418b4b,_0x3d3b95,_0x237cc3,_0x17c26e){'use strict';var _0x58b18c=_0x31cd;const _0xf44f23={'id':_0x58b18c(0x1b0),'type':_0x3d3b95[_0x58b18c(0x169)][_0x58b18c(0x180)],'handler':async _0x37c410=>(_0x37c410['get'](_0x237cc3[_0x58b18c(0x17c)])['importDOCXToUnitId'](),!0x0)},_0x4f7637={'id':_0x58b18c(0x18c),'type':_0x3d3b95['CommandType'][_0x58b18c(0x180)],'handler':async _0x40b057=>(_0x40b057['get'](_0x237cc3[_0x58b18c(0x17c)])[_0x58b18c(0x190)](),!0x0)},_0x996e04=_0x58b18c(0x191);function _0x1fb162(_0x57f8bd){var _0x1ed8e0=_0x58b18c;return{'id':_0x996e04,'group':_0x17c26e[_0x1ed8e0(0x181)][_0x1ed8e0(0x17a)],'type':_0x17c26e[_0x1ed8e0(0x1a1)][_0x1ed8e0(0x18e)],'icon':_0x1ed8e0(0x183),'tooltip':_0x1ed8e0(0x19e),'positions':[_0x17c26e[_0x1ed8e0(0x1a8)][_0x1ed8e0(0x19f)]],'hidden$':_0x17c26e[_0x1ed8e0(0x1ae)](_0x57f8bd,_0x3d3b95[_0x1ed8e0(0x192)][_0x1ed8e0(0x19c)])};}function _0x50de3c(){var _0x161e7f=_0x58b18c;return{'id':_0xf44f23['id'],'type':_0x17c26e['MenuItemType']['BUTTON'],'title':_0x161e7f(0x18b),'icon':_0x161e7f(0x189),'positions':[_0x996e04]};}var _0x1e5713=Object['defineProperty'],_0x2efcaa=Object[_0x58b18c(0x18a)],_0x447b8e=(_0x3e6f9f,_0x1eeb3,_0x5cd674,_0x1a73eb)=>{var _0x1f6f4d=_0x58b18c;for(var _0x2ae389=_0x1a73eb>0x1?void 0x0:_0x1a73eb?_0x2efcaa(_0x1eeb3,_0x5cd674):_0x1eeb3,_0x1b5064=_0x3e6f9f[_0x1f6f4d(0x186)]-0x1,_0x495601;_0x1b5064>=0x0;_0x1b5064--)(_0x495601=_0x3e6f9f[_0x1b5064])&&(_0x2ae389=(_0x1a73eb?_0x495601(_0x1eeb3,_0x5cd674,_0x2ae389):_0x495601(_0x2ae389))||_0x2ae389);return _0x1a73eb&&_0x2ae389&&_0x1e5713(_0x1eeb3,_0x5cd674,_0x2ae389),_0x2ae389;},_0x2e2bf=(_0x45c2a6,_0x4782a6)=>(_0x4228cd,_0x4cfe30)=>_0x4782a6(_0x4228cd,_0x4cfe30,_0x45c2a6);const _0x333e11={};let _0x50457f=class extends _0x3d3b95[_0x58b18c(0x166)]{constructor(_0x2424ca,_0x563c45,_0x159b7b,_0x43069e){var _0x2615e4=_0x58b18c;super(),this[_0x2615e4(0x177)]=_0x2424ca,this[_0x2615e4(0x170)]=_0x563c45,this[_0x2615e4(0x1a0)]=_0x159b7b,this[_0x2615e4(0x1ab)]=_0x43069e,this['_initCommands'](),this[_0x2615e4(0x16d)]();}['_initCommands'](){var _0x1f3c00=_0x58b18c;[_0xf44f23,_0x4f7637][_0x1f3c00(0x173)](_0x470a21=>{var _0x48fc2b=_0x1f3c00;this[_0x48fc2b(0x17b)](this[_0x48fc2b(0x1a0)][_0x48fc2b(0x184)](_0x470a21));});}[_0x58b18c(0x16d)](){var _0x3f4ed1=_0x58b18c;const {menu:_0x41e629={}}=this[_0x3f4ed1(0x177)];[_0x1fb162,_0x50de3c][_0x3f4ed1(0x173)](_0x1dab94=>{var _0x34861f=_0x3f4ed1;this[_0x34861f(0x17b)](this[_0x34861f(0x1ab)][_0x34861f(0x19d)](this[_0x34861f(0x170)][_0x34861f(0x194)](_0x1dab94),_0x41e629));});}};_0x50457f=_0x447b8e([_0x3d3b95[_0x58b18c(0x1a5)](_0x3d3b95['LifecycleStages'][_0x58b18c(0x1a9)],_0x50457f),_0x2e2bf(0x1,_0x3d3b95[_0x58b18c(0x174)](_0x3d3b95[_0x58b18c(0x17f)])),_0x2e2bf(0x2,_0x3d3b95[_0x58b18c(0x16f)]),_0x2e2bf(0x3,_0x17c26e[_0x58b18c(0x19b)])],_0x50457f);var _0x1ce50b=Object[_0x58b18c(0x196)],_0x2df66e=Object[_0x58b18c(0x18a)],_0x40ca7c=(_0x68a32f,_0x4a2963,_0x5e6e98)=>_0x4a2963 in _0x68a32f?_0x1ce50b(_0x68a32f,_0x4a2963,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e6e98}):_0x68a32f[_0x4a2963]=_0x5e6e98,_0x309013=(_0x267d16,_0x2be410,_0x18b952,_0x1f77b1)=>{var _0x579048=_0x58b18c;for(var _0xf57b9b=_0x1f77b1>0x1?void 0x0:_0x1f77b1?_0x2df66e(_0x2be410,_0x18b952):_0x2be410,_0x4cc9d8=_0x267d16[_0x579048(0x186)]-0x1,_0x461534;_0x4cc9d8>=0x0;_0x4cc9d8--)(_0x461534=_0x267d16[_0x4cc9d8])&&(_0xf57b9b=(_0x1f77b1?_0x461534(_0x2be410,_0x18b952,_0xf57b9b):_0x461534(_0xf57b9b))||_0xf57b9b);return _0x1f77b1&&_0xf57b9b&&_0x1ce50b(_0x2be410,_0x18b952,_0xf57b9b),_0xf57b9b;},_0x7577ce=(_0x843e65,_0x3a3d42)=>(_0x2484cf,_0x22f528)=>_0x3a3d42(_0x2484cf,_0x22f528,_0x843e65),_0x10fddd=(_0xeef7bb,_0x4467dd,_0x2026a5)=>_0x40ca7c(_0xeef7bb,typeof _0x4467dd!=_0x58b18c(0x172)?_0x4467dd+'':_0x4467dd,_0x2026a5);const _0x3cd2d8=_0x58b18c(0x179);_0x418b4b[_0x58b18c(0x1b1)]=class extends _0x3d3b95[_0x58b18c(0x16a)]{constructor(_0x1f73e9={},_0xf84fef){var _0x5af446=_0x58b18c;super(),this[_0x5af446(0x177)]=_0x1f73e9,this[_0x5af446(0x170)]=_0xf84fef,this[_0x5af446(0x177)]=_0x3d3b95[_0x5af446(0x176)][_0x5af446(0x188)]({},_0x333e11,this['_config']);}[_0x58b18c(0x1a3)](){var _0x46854e=_0x58b18c;[[_0x50457f,{'useFactory':()=>this[_0x46854e(0x170)][_0x46854e(0x171)](_0x50457f,this[_0x46854e(0x177)])}]]['forEach'](_0x1f2461=>this[_0x46854e(0x170)][_0x46854e(0x175)](_0x1f2461));}[_0x58b18c(0x16e)](){var _0x2cc4b1=_0x58b18c;this[_0x2cc4b1(0x1a3)]();}},_0x10fddd(_0x418b4b['UniverDocsExchangeClientPlugin'],_0x58b18c(0x1a6),_0x3cd2d8),_0x10fddd(_0x418b4b[_0x58b18c(0x1b1)],_0x58b18c(0x1a4),_0x3d3b95[_0x58b18c(0x192)]['UNIVER_DOC']),_0x418b4b[_0x58b18c(0x1b1)]=_0x309013([_0x3d3b95[_0x58b18c(0x19a)](_0x237cc3[_0x58b18c(0x1a7)]),_0x7577ce(0x1,_0x3d3b95[_0x58b18c(0x174)](_0x3d3b95['Injector']))],_0x418b4b[_0x58b18c(0x1b1)]),_0x418b4b[_0x58b18c(0x18f)]=_0x4f7637,_0x418b4b['ImportDOCXToUnitIdOperation']=_0xf44f23,Object['defineProperty'](_0x418b4b,Symbol['toStringTag'],{'value':_0x58b18c(0x17d)});}));
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@univerjs-pro/docs-exchange-client",
|
|
3
|
+
"version": "0.2.6",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "",
|
|
6
|
+
"author": "DreamNum <developer@univer.ai>",
|
|
7
|
+
"funding": {
|
|
8
|
+
"type": "opencollective",
|
|
9
|
+
"url": "https://opencollective.com/univer"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://univer.ai",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/dream-num/univer"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/dream-num/univer/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"import": "./lib/es/index.js",
|
|
23
|
+
"require": "./lib/cjs/index.js",
|
|
24
|
+
"types": "./lib/types/index.d.ts"
|
|
25
|
+
},
|
|
26
|
+
"./*": {
|
|
27
|
+
"import": "./lib/es/*",
|
|
28
|
+
"require": "./lib/cjs/*",
|
|
29
|
+
"types": "./lib/types/index.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"./lib/*": "./lib/*"
|
|
32
|
+
},
|
|
33
|
+
"main": "./lib/cjs/index.js",
|
|
34
|
+
"module": "./lib/es/index.js",
|
|
35
|
+
"types": "./lib/types/index.d.ts",
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"directories": {
|
|
40
|
+
"lib": "lib"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"lib"
|
|
44
|
+
],
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@univerjs-pro/exchange-client": "0.2.6",
|
|
47
|
+
"@univerjs/core": "0.2.6",
|
|
48
|
+
"@univerjs/ui": "0.2.6"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@univerjs/icons": "^0.1.65",
|
|
52
|
+
"@univerjs/docs": "0.2.6",
|
|
53
|
+
"@univerjs/docs-ui": "0.2.6",
|
|
54
|
+
"@univerjs/protocol": "0.1.38-alpha.23"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/pako": "^2.0.3",
|
|
58
|
+
"less": "^4.2.0",
|
|
59
|
+
"pako": "^2.1.0",
|
|
60
|
+
"rxjs": "^7.8.1",
|
|
61
|
+
"typescript": "^5.5.3",
|
|
62
|
+
"vite": "^5.3.4",
|
|
63
|
+
"vitest": "^2.0.3",
|
|
64
|
+
"@univerjs-pro/exchange-client": "0.2.6",
|
|
65
|
+
"@univerjs/core": "0.2.6",
|
|
66
|
+
"@univerjs/shared": "0.2.6"
|
|
67
|
+
},
|
|
68
|
+
"univerSpace": {
|
|
69
|
+
".": {
|
|
70
|
+
"import": "./lib/es/index.js",
|
|
71
|
+
"require": "./lib/cjs/index.js",
|
|
72
|
+
"types": "./lib/types/index.d.ts"
|
|
73
|
+
},
|
|
74
|
+
"./*": {
|
|
75
|
+
"import": "./lib/es/*",
|
|
76
|
+
"require": "./lib/cjs/*",
|
|
77
|
+
"types": "./lib/types/index.d.ts"
|
|
78
|
+
},
|
|
79
|
+
"./lib/*": "./lib/*"
|
|
80
|
+
},
|
|
81
|
+
"scripts": {
|
|
82
|
+
"test": "vitest run",
|
|
83
|
+
"test:watch": "vitest",
|
|
84
|
+
"coverage": "vitest run --coverage",
|
|
85
|
+
"lint:types": "tsc --noEmit",
|
|
86
|
+
"build": "tsc && vite build",
|
|
87
|
+
"sync:pro:cnpm": "cnpm sync"
|
|
88
|
+
}
|
|
89
|
+
}
|