@univerjs-pro/sheets-exchange-client 0.16.1 → 0.17.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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/plugin.d.ts +2 -0
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x32cf61=_0x1300;(function(_0x367302,_0x25f227){const _0x3ad8af=_0x1300,_0x24fa0b=_0x367302();while(!![]){try{const _0x2179a7=parseInt(_0x3ad8af(0x178))/0x1*(parseInt(_0x3ad8af(0x195))/0x2)+parseInt(_0x3ad8af(0x16f))/0x3*(parseInt(_0x3ad8af(0x192))/0x4)+-parseInt(_0x3ad8af(0x15d))/0x5+parseInt(_0x3ad8af(0x15f))/0x6+parseInt(_0x3ad8af(0x182))/0x7+-parseInt(_0x3ad8af(0x18a))/0x8+parseInt(_0x3ad8af(0x189))/0x9*(parseInt(_0x3ad8af(0x19f))/0xa);if(_0x2179a7===_0x25f227)break;else _0x24fa0b['push'](_0x24fa0b['shift']());}catch(_0x43d224){_0x24fa0b['push'](_0x24fa0b['shift']());}}}(_0x1bbb,0xbf88f));function _0x1300(_0x3ab053,_0x48c3dc){_0x3ab053=_0x3ab053-0x15b;const _0x1bbbc3=_0x1bbb();let _0x13004c=_0x1bbbc3[_0x3ab053];return _0x13004c;}Object[_0x32cf61(0x180)](exports,Symbol[_0x32cf61(0x184)],{'value':_0x32cf61(0x16e)});const p=require('@univerjs-pro/exchange-client'),i=require('@univerjs/core'),c=require('@univerjs/ui'),v=require('@univerjs/sheets'),I=require('@univerjs/sheets-ui'),l={'id':'exchange-client.operation.import-xlsx','type':i['CommandType']['OPERATION'],'handler':async _0x68a5b1=>{const _0x11eb3a=_0x32cf61,_0x43b26d=_0x68a5b1['get'](p['IExchangeOperateService']);return new URLSearchParams(location[_0x11eb3a(0x179)])['get'](_0x11eb3a(0x187))?_0x43b26d[_0x11eb3a(0x175)]():_0x43b26d[_0x11eb3a(0x162)](),!0x0;}},g={'id':'exchange-client.operation.export-xlsx','type':i[_0x32cf61(0x188)]['OPERATION'],'handler':async _0x180c59=>{const _0x1702bd=_0x32cf61,_0x2dc166=_0x180c59[_0x1702bd(0x19a)](p[_0x1702bd(0x165)]);return new URLSearchParams(location['search'])['get'](_0x1702bd(0x187))?_0x2dc166[_0x1702bd(0x168)]():_0x2dc166[_0x1702bd(0x161)](),!0x0;}},x=_0x32cf61(0x176),P=_0x32cf61(0x16c),E={'name':x,'version':P},C=_0x32cf61(0x199),m={},_=_0x32cf61(0x18d);function f(_0x178674){const _0xa9fd70=_0x32cf61;return{'id':_,'type':c[_0xa9fd70(0x19d)][_0xa9fd70(0x17c)],'icon':_0xa9fd70(0x177),'tooltip':_0xa9fd70(0x181),'hidden$':c[_0xa9fd70(0x19e)](_0x178674,i[_0xa9fd70(0x172)]['UNIVER_SHEET']),'disabled$':I[_0xa9fd70(0x1a5)](_0x178674,{'workbookTypes':[v[_0xa9fd70(0x160)]]})};}function y(){const _0x94f1d9=_0x32cf61;return{'id':l['id'],'type':c[_0x94f1d9(0x19d)]['BUTTON'],'title':_0x94f1d9(0x17a),'icon':_0x94f1d9(0x1a1)};}function T(){const _0x422af0=_0x32cf61;return{'id':g['id'],'type':c[_0x422af0(0x19d)][_0x422af0(0x185)],'title':_0x422af0(0x191),'icon':_0x422af0(0x15b)};}const O={[c[_0x32cf61(0x190)][_0x32cf61(0x1a2)]]:{[_]:{'order':0.3,'menuItemFactory':f,[l['id']]:{'order':0x0,'menuItemFactory':y},[g['id']]:{'order':0x1,'menuItemFactory':T}}}};var U=Object['getOwnPropertyDescriptor'],X=(_0x406ba2,_0x4c27d5,_0x52d8fd,_0x418597)=>{for(var _0x486780=_0x418597>0x1?void 0x0:_0x418597?U(_0x4c27d5,_0x52d8fd):_0x4c27d5,_0x3f7745=_0x406ba2['length']-0x1,_0x314cae;_0x3f7745>=0x0;_0x3f7745--)(_0x314cae=_0x406ba2[_0x3f7745])&&(_0x486780=_0x314cae(_0x486780)||_0x486780);return _0x486780;},d=(_0x5b6983,_0x46bbe5)=>(_0x168d9c,_0xdcb09a)=>_0x46bbe5(_0x168d9c,_0xdcb09a,_0x5b6983);let u=class extends i['Disposable']{constructor(_0x5b7388,_0x240f80){const _0x5875d3=_0x32cf61;super(),this[_0x5875d3(0x18b)]=_0x5b7388,this[_0x5875d3(0x169)]=_0x240f80,this[_0x5875d3(0x16a)](),this[_0x5875d3(0x15c)]();}['_initCommands'](){const _0x29d8b1=_0x32cf61;[l,g][_0x29d8b1(0x16d)](_0x50cdb4=>{const _0x521431=_0x29d8b1;this[_0x521431(0x186)](this[_0x521431(0x18b)]['registerCommand'](_0x50cdb4));});}[_0x32cf61(0x15c)](){const _0x51524a=_0x32cf61;this[_0x51524a(0x169)][_0x51524a(0x170)](O);}};u=X([d(0x0,i['ICommandService']),d(0x1,c[_0x32cf61(0x1a0)])],u);var N=Object['defineProperty'],b=Object[_0x32cf61(0x196)],M=(_0x713af4,_0xe4e54a,_0x2df4c1)=>_0xe4e54a in _0x713af4?N(_0x713af4,_0xe4e54a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2df4c1}):_0x713af4[_0xe4e54a]=_0x2df4c1,L=(_0x467e36,_0x1fb05e,_0x56474e,_0x381f2a)=>{const _0x2ebc03=_0x32cf61;for(var _0xed3430=_0x381f2a>0x1?void 0x0:_0x381f2a?b(_0x1fb05e,_0x56474e):_0x1fb05e,_0x458ea8=_0x467e36[_0x2ebc03(0x1a4)]-0x1,_0x228b62;_0x458ea8>=0x0;_0x458ea8--)(_0x228b62=_0x467e36[_0x458ea8])&&(_0xed3430=_0x228b62(_0xed3430)||_0xed3430);return _0xed3430;},S=(_0x1827f2,_0x322471)=>(_0xd5bbe3,_0x322735)=>_0x322471(_0xd5bbe3,_0x322735,_0x1827f2),h=(_0x15ea57,_0x13f546,_0x3b2758)=>M(_0x15ea57,typeof _0x13f546!=_0x32cf61(0x171)?_0x13f546+'':_0x13f546,_0x3b2758);exports[_0x32cf61(0x164)]=class extends i[_0x32cf61(0x19c)]{constructor(_0x23db1f=m,_0x2142fa,_0x2ee789){const _0x5dbd32=_0x32cf61;super(),this['_config']=_0x23db1f,this['_injector']=_0x2142fa,this[_0x5dbd32(0x19b)]=_0x2ee789;const {menu:_0xd86f00,..._0x279061}=i[_0x5dbd32(0x173)]({},m,this[_0x5dbd32(0x17f)]);_0xd86f00&&this[_0x5dbd32(0x19b)][_0x5dbd32(0x183)](_0x5dbd32(0x18f),_0xd86f00,{'merge':!0x0}),this['_configService']['setConfig'](C,_0x279061);}[_0x32cf61(0x18c)](){const _0x20032f=_0x32cf61;[[u]][_0x20032f(0x16d)](_0x1b1528=>this[_0x20032f(0x193)][_0x20032f(0x1a3)](_0x1b1528));}[_0x32cf61(0x198)](){const _0x26b40e=_0x32cf61;this['_injector'][_0x26b40e(0x19a)](u);}},h(exports['UniverSheetsExchangeClientPlugin'],_0x32cf61(0x167),_0x32cf61(0x18e)),h(exports['UniverSheetsExchangeClientPlugin'],_0x32cf61(0x166),E[_0x32cf61(0x15e)]),h(exports['UniverSheetsExchangeClientPlugin'],_0x32cf61(0x194),E[_0x32cf61(0x194)]),h(exports[_0x32cf61(0x164)],_0x32cf61(0x174),i[_0x32cf61(0x172)]['UNIVER_SHEET']),exports[_0x32cf61(0x164)]=L([i[_0x32cf61(0x197)](p[_0x32cf61(0x17d)]),S(0x1,i[_0x32cf61(0x17b)](i['Injector'])),S(0x2,i[_0x32cf61(0x16b)])],exports[_0x32cf61(0x164)]),exports[_0x32cf61(0x163)]=g,exports[_0x32cf61(0x17e)]=l;function _0x1bbb(){const _0x226106=['exchange.download','241772SyiZKx','_injector','version','2NPxlWc','getOwnPropertyDescriptor','DependentOn','onReady','sheets-exchange-client.config','get','_configService','Plugin','MenuItemType','getMenuHiddenObservable','3340YWNuGa','IMenuManagerService','FolderIcon','OTHERS','add','length','getCurrentRangeDisable$','ExportIcon','_initMenus','6756545INrbgu','name','1857312MzieGU','WorkbookExportPermission','exportXLSXBySnapshot','importXLSXToSnapshot','ExportXLSXOperation','UniverSheetsExchangeClientPlugin','IExchangeOperateService','packageName','pluginName','exportXLSXByUnitId','_menuManagerService','_initCommands','IConfigService','0.17.0','forEach','Module','24FBqdvZ','mergeMenu','symbol','UniverInstanceType','merge','type','importXLSXToUnitId','@univerjs-pro/sheets-exchange-client','DirectExportIcon','174321aTzZEw','search','exchange.upload','Inject','SUBITEMS','UniverExchangeClientPlugin','ImportXLSXOperation','_config','defineProperty','exchange.file','6189680WIpUXJ','setConfig','toStringTag','BUTTON','disposeWithMe','unit','CommandType','40491EzrfRa','9747896ungLKa','_commandService','onStarting','sheets-exchange-client.operation.exchange','SHEET_EXCHANGE_CLIENT_PLUGIN','menu','RibbonStartGroup'];_0x1bbb=function(){return _0x226106;};return _0x1bbb();}
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x6c1c08=_0x1740;function _0x1740(_0x57b8ab,_0x32e7c9){_0x57b8ab=_0x57b8ab-0x1aa;const _0x1b7d0d=_0x1b7d();let _0x1740e8=_0x1b7d0d[_0x57b8ab];return _0x1740e8;}(function(_0x43a9d7,_0x5ae64d){const _0x4ae98d=_0x1740,_0x3c9603=_0x43a9d7();while(!![]){try{const _0x5c6078=parseInt(_0x4ae98d(0x1d2))/0x1+-parseInt(_0x4ae98d(0x1c1))/0x2*(parseInt(_0x4ae98d(0x1dc))/0x3)+parseInt(_0x4ae98d(0x1d9))/0x4*(parseInt(_0x4ae98d(0x1be))/0x5)+parseInt(_0x4ae98d(0x1ae))/0x6*(parseInt(_0x4ae98d(0x1df))/0x7)+parseInt(_0x4ae98d(0x1c4))/0x8*(-parseInt(_0x4ae98d(0x1c7))/0x9)+parseInt(_0x4ae98d(0x1b6))/0xa*(parseInt(_0x4ae98d(0x1c2))/0xb)+parseInt(_0x4ae98d(0x1c6))/0xc*(-parseInt(_0x4ae98d(0x1ac))/0xd);if(_0x5c6078===_0x5ae64d)break;else _0x3c9603['push'](_0x3c9603['shift']());}catch(_0x324f42){_0x3c9603['push'](_0x3c9603['shift']());}}}(_0x1b7d,0xca70f));function _0x1b7d(){const _0xc0574c=['_initMenus','10350140jSiuyz','length','BUTTON','symbol','mergeMenu','exchange-client.operation.import-xlsx','importXLSXToUnitId','registerCommand','2885870LpebqE','disposeWithMe','onStarting','14LFeGJl','11EygIXQ','_menuManagerService','43168ARNjKh','_initCommands','708ftHPqM','2196qUmQpM','search','menu','ExportIcon','exportXLSXByUnitId','get','exchange.file','_config','UNIVER_SHEET','name','importXLSXToSnapshot','675925JULuUk','setConfig','0.17.0','OPERATION','version','DirectExportIcon','FolderIcon','4DcxTjE','onReady','OTHERS','84288sBPsKT','defineProperty','exchange.upload','35DxGkRf','sheets-exchange-client.operation.exchange','getOwnPropertyDescriptor','packageName','_injector','110721CIJXPd','exportXLSXBySnapshot','668262MeXTqk','forEach','@univerjs-pro/sheets-exchange-client','_commandService','pluginName','sheets-exchange-client.config','_configService'];_0x1b7d=function(){return _0xc0574c;};return _0x1b7d();}import{IExchangeOperateService as _0x5aba1a,UniverExchangeClientPlugin as _0xed0cdc}from'@univerjs-pro/exchange-client';import{CommandType as _0x1904e3,UniverInstanceType as _0x169a21,Disposable as _0x54f436,ICommandService as _0x41e2f4,DependentOn as _0x470d5f,Inject as _0x44ff8a,Injector as _0x1010e3,Plugin as _0x463098,merge as _0x2b66cd,IConfigService as _0x179a44}from'@univerjs/core';import{MenuItemType as _0x563db0,getMenuHiddenObservable as _0x3bd324,RibbonStartGroup as _0x57307d,IMenuManagerService as _0x40d202}from'@univerjs/ui';import{WorkbookExportPermission as _0x18a59b}from'@univerjs/sheets';import{getCurrentRangeDisable$ as _0x1ef32c}from'@univerjs/sheets-ui';const u={'id':_0x6c1c08(0x1bb),'type':_0x1904e3[_0x6c1c08(0x1d5)],'handler':async _0x2c81f5=>{const _0x412158=_0x6c1c08,_0x20f72b=_0x2c81f5[_0x412158(0x1cc)](_0x5aba1a);return new URLSearchParams(location['search'])[_0x412158(0x1cc)]('unit')?_0x20f72b[_0x412158(0x1bc)]():_0x20f72b[_0x412158(0x1d1)](),!0x0;}},l={'id':'exchange-client.operation.export-xlsx','type':_0x1904e3['OPERATION'],'handler':async _0xe2f824=>{const _0x178c47=_0x6c1c08,_0x4a3590=_0xe2f824[_0x178c47(0x1cc)](_0x5aba1a);return new URLSearchParams(location[_0x178c47(0x1c8)])[_0x178c47(0x1cc)]('unit')?_0x4a3590[_0x178c47(0x1cb)]():_0x4a3590[_0x178c47(0x1ad)](),!0x0;}},H=_0x6c1c08(0x1b0),w=_0x6c1c08(0x1d4),v={'name':H,'version':w},D=_0x6c1c08(0x1b3),g={},I=_0x6c1c08(0x1e0);function F(_0x4b1f88){const _0x4f019b=_0x6c1c08;return{'id':I,'type':_0x563db0['SUBITEMS'],'icon':_0x4f019b(0x1d7),'tooltip':_0x4f019b(0x1cd),'hidden$':_0x3bd324(_0x4b1f88,_0x169a21[_0x4f019b(0x1cf)]),'disabled$':_0x1ef32c(_0x4b1f88,{'workbookTypes':[_0x18a59b]})};}function j(){const _0x54c5bf=_0x6c1c08;return{'id':u['id'],'type':_0x563db0[_0x54c5bf(0x1b8)],'title':_0x54c5bf(0x1de),'icon':_0x54c5bf(0x1d8)};}function G(){const _0x429819=_0x6c1c08;return{'id':l['id'],'type':_0x563db0['BUTTON'],'title':'exchange.download','icon':_0x429819(0x1ca)};}const A={[_0x57307d[_0x6c1c08(0x1db)]]:{[I]:{'order':0.3,'menuItemFactory':F,[u['id']]:{'order':0x0,'menuItemFactory':j},[l['id']]:{'order':0x1,'menuItemFactory':G}}}};var B=Object['getOwnPropertyDescriptor'],$=(_0x16ab41,_0x47462f,_0x3b5b33,_0x4131af)=>{const _0x12c93a=_0x6c1c08;for(var _0x48eec2=_0x4131af>0x1?void 0x0:_0x4131af?B(_0x47462f,_0x3b5b33):_0x47462f,_0x2e5588=_0x16ab41[_0x12c93a(0x1b7)]-0x1,_0x3293a5;_0x2e5588>=0x0;_0x2e5588--)(_0x3293a5=_0x16ab41[_0x2e5588])&&(_0x48eec2=_0x3293a5(_0x48eec2)||_0x48eec2);return _0x48eec2;},d=(_0x5458af,_0x4291a9)=>(_0xfe9075,_0x4301c8)=>_0x4291a9(_0xfe9075,_0x4301c8,_0x5458af);let s=class extends _0x54f436{constructor(_0x34f986,_0x37a43a){const _0x1852d3=_0x6c1c08;super(),this[_0x1852d3(0x1b1)]=_0x34f986,this['_menuManagerService']=_0x37a43a,this[_0x1852d3(0x1c5)](),this[_0x1852d3(0x1b5)]();}['_initCommands'](){[u,l]['forEach'](_0x10a421=>{const _0x3bd192=_0x1740;this[_0x3bd192(0x1bf)](this['_commandService'][_0x3bd192(0x1bd)](_0x10a421));});}['_initMenus'](){const _0x52e9d9=_0x6c1c08;this[_0x52e9d9(0x1c3)][_0x52e9d9(0x1ba)](A);}};s=$([d(0x0,_0x41e2f4),d(0x1,_0x40d202)],s);var V=Object[_0x6c1c08(0x1dd)],W=Object[_0x6c1c08(0x1e1)],K=(_0x41e3a2,_0x4477d5,_0x55e417)=>_0x4477d5 in _0x41e3a2?V(_0x41e3a2,_0x4477d5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55e417}):_0x41e3a2[_0x4477d5]=_0x55e417,Y=(_0x3084cb,_0x3d104e,_0x148d29,_0x1e8792)=>{for(var _0x5c509e=_0x1e8792>0x1?void 0x0:_0x1e8792?W(_0x3d104e,_0x148d29):_0x3d104e,_0x51bb63=_0x3084cb['length']-0x1,_0x5617e3;_0x51bb63>=0x0;_0x51bb63--)(_0x5617e3=_0x3084cb[_0x51bb63])&&(_0x5c509e=_0x5617e3(_0x5c509e)||_0x5c509e);return _0x5c509e;},h=(_0x45c3da,_0x19c78c)=>(_0x430383,_0x205a16)=>_0x19c78c(_0x430383,_0x205a16,_0x45c3da),m=(_0x15ffd8,_0x44390b,_0x10e3cc)=>K(_0x15ffd8,typeof _0x44390b!=_0x6c1c08(0x1b9)?_0x44390b+'':_0x44390b,_0x10e3cc);let a=class extends _0x463098{constructor(_0x111e78=g,_0x22f2fe,_0x34ae8e){const _0x16d8b6=_0x6c1c08;super(),this['_config']=_0x111e78,this[_0x16d8b6(0x1ab)]=_0x22f2fe,this[_0x16d8b6(0x1b4)]=_0x34ae8e;const {menu:_0x2fc43b,..._0x56e67a}=_0x2b66cd({},g,this[_0x16d8b6(0x1ce)]);_0x2fc43b&&this[_0x16d8b6(0x1b4)][_0x16d8b6(0x1d3)](_0x16d8b6(0x1c9),_0x2fc43b,{'merge':!0x0}),this[_0x16d8b6(0x1b4)][_0x16d8b6(0x1d3)](D,_0x56e67a);}[_0x6c1c08(0x1c0)](){const _0x2f6294=_0x6c1c08;[[s]][_0x2f6294(0x1af)](_0x2d984e=>this[_0x2f6294(0x1ab)]['add'](_0x2d984e));}[_0x6c1c08(0x1da)](){this['_injector']['get'](s);}};m(a,_0x6c1c08(0x1b2),'SHEET_EXCHANGE_CLIENT_PLUGIN'),m(a,_0x6c1c08(0x1aa),v[_0x6c1c08(0x1d0)]),m(a,_0x6c1c08(0x1d6),v['version']),m(a,'type',_0x169a21[_0x6c1c08(0x1cf)]),a=Y([_0x470d5f(_0xed0cdc),h(0x1,_0x44ff8a(_0x1010e3)),h(0x2,_0x179a44)],a);export{l as ExportXLSXOperation,u as ImportXLSXOperation,a as UniverSheetsExchangeClientPlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x6c1c08=_0x1740;function _0x1740(_0x57b8ab,_0x32e7c9){_0x57b8ab=_0x57b8ab-0x1aa;const _0x1b7d0d=_0x1b7d();let _0x1740e8=_0x1b7d0d[_0x57b8ab];return _0x1740e8;}(function(_0x43a9d7,_0x5ae64d){const _0x4ae98d=_0x1740,_0x3c9603=_0x43a9d7();while(!![]){try{const _0x5c6078=parseInt(_0x4ae98d(0x1d2))/0x1+-parseInt(_0x4ae98d(0x1c1))/0x2*(parseInt(_0x4ae98d(0x1dc))/0x3)+parseInt(_0x4ae98d(0x1d9))/0x4*(parseInt(_0x4ae98d(0x1be))/0x5)+parseInt(_0x4ae98d(0x1ae))/0x6*(parseInt(_0x4ae98d(0x1df))/0x7)+parseInt(_0x4ae98d(0x1c4))/0x8*(-parseInt(_0x4ae98d(0x1c7))/0x9)+parseInt(_0x4ae98d(0x1b6))/0xa*(parseInt(_0x4ae98d(0x1c2))/0xb)+parseInt(_0x4ae98d(0x1c6))/0xc*(-parseInt(_0x4ae98d(0x1ac))/0xd);if(_0x5c6078===_0x5ae64d)break;else _0x3c9603['push'](_0x3c9603['shift']());}catch(_0x324f42){_0x3c9603['push'](_0x3c9603['shift']());}}}(_0x1b7d,0xca70f));function _0x1b7d(){const _0xc0574c=['_initMenus','10350140jSiuyz','length','BUTTON','symbol','mergeMenu','exchange-client.operation.import-xlsx','importXLSXToUnitId','registerCommand','2885870LpebqE','disposeWithMe','onStarting','14LFeGJl','11EygIXQ','_menuManagerService','43168ARNjKh','_initCommands','708ftHPqM','2196qUmQpM','search','menu','ExportIcon','exportXLSXByUnitId','get','exchange.file','_config','UNIVER_SHEET','name','importXLSXToSnapshot','675925JULuUk','setConfig','0.17.0','OPERATION','version','DirectExportIcon','FolderIcon','4DcxTjE','onReady','OTHERS','84288sBPsKT','defineProperty','exchange.upload','35DxGkRf','sheets-exchange-client.operation.exchange','getOwnPropertyDescriptor','packageName','_injector','110721CIJXPd','exportXLSXBySnapshot','668262MeXTqk','forEach','@univerjs-pro/sheets-exchange-client','_commandService','pluginName','sheets-exchange-client.config','_configService'];_0x1b7d=function(){return _0xc0574c;};return _0x1b7d();}import{IExchangeOperateService as _0x5aba1a,UniverExchangeClientPlugin as _0xed0cdc}from'@univerjs-pro/exchange-client';import{CommandType as _0x1904e3,UniverInstanceType as _0x169a21,Disposable as _0x54f436,ICommandService as _0x41e2f4,DependentOn as _0x470d5f,Inject as _0x44ff8a,Injector as _0x1010e3,Plugin as _0x463098,merge as _0x2b66cd,IConfigService as _0x179a44}from'@univerjs/core';import{MenuItemType as _0x563db0,getMenuHiddenObservable as _0x3bd324,RibbonStartGroup as _0x57307d,IMenuManagerService as _0x40d202}from'@univerjs/ui';import{WorkbookExportPermission as _0x18a59b}from'@univerjs/sheets';import{getCurrentRangeDisable$ as _0x1ef32c}from'@univerjs/sheets-ui';const u={'id':_0x6c1c08(0x1bb),'type':_0x1904e3[_0x6c1c08(0x1d5)],'handler':async _0x2c81f5=>{const _0x412158=_0x6c1c08,_0x20f72b=_0x2c81f5[_0x412158(0x1cc)](_0x5aba1a);return new URLSearchParams(location['search'])[_0x412158(0x1cc)]('unit')?_0x20f72b[_0x412158(0x1bc)]():_0x20f72b[_0x412158(0x1d1)](),!0x0;}},l={'id':'exchange-client.operation.export-xlsx','type':_0x1904e3['OPERATION'],'handler':async _0xe2f824=>{const _0x178c47=_0x6c1c08,_0x4a3590=_0xe2f824[_0x178c47(0x1cc)](_0x5aba1a);return new URLSearchParams(location[_0x178c47(0x1c8)])[_0x178c47(0x1cc)]('unit')?_0x4a3590[_0x178c47(0x1cb)]():_0x4a3590[_0x178c47(0x1ad)](),!0x0;}},H=_0x6c1c08(0x1b0),w=_0x6c1c08(0x1d4),v={'name':H,'version':w},D=_0x6c1c08(0x1b3),g={},I=_0x6c1c08(0x1e0);function F(_0x4b1f88){const _0x4f019b=_0x6c1c08;return{'id':I,'type':_0x563db0['SUBITEMS'],'icon':_0x4f019b(0x1d7),'tooltip':_0x4f019b(0x1cd),'hidden$':_0x3bd324(_0x4b1f88,_0x169a21[_0x4f019b(0x1cf)]),'disabled$':_0x1ef32c(_0x4b1f88,{'workbookTypes':[_0x18a59b]})};}function j(){const _0x54c5bf=_0x6c1c08;return{'id':u['id'],'type':_0x563db0[_0x54c5bf(0x1b8)],'title':_0x54c5bf(0x1de),'icon':_0x54c5bf(0x1d8)};}function G(){const _0x429819=_0x6c1c08;return{'id':l['id'],'type':_0x563db0['BUTTON'],'title':'exchange.download','icon':_0x429819(0x1ca)};}const A={[_0x57307d[_0x6c1c08(0x1db)]]:{[I]:{'order':0.3,'menuItemFactory':F,[u['id']]:{'order':0x0,'menuItemFactory':j},[l['id']]:{'order':0x1,'menuItemFactory':G}}}};var B=Object['getOwnPropertyDescriptor'],$=(_0x16ab41,_0x47462f,_0x3b5b33,_0x4131af)=>{const _0x12c93a=_0x6c1c08;for(var _0x48eec2=_0x4131af>0x1?void 0x0:_0x4131af?B(_0x47462f,_0x3b5b33):_0x47462f,_0x2e5588=_0x16ab41[_0x12c93a(0x1b7)]-0x1,_0x3293a5;_0x2e5588>=0x0;_0x2e5588--)(_0x3293a5=_0x16ab41[_0x2e5588])&&(_0x48eec2=_0x3293a5(_0x48eec2)||_0x48eec2);return _0x48eec2;},d=(_0x5458af,_0x4291a9)=>(_0xfe9075,_0x4301c8)=>_0x4291a9(_0xfe9075,_0x4301c8,_0x5458af);let s=class extends _0x54f436{constructor(_0x34f986,_0x37a43a){const _0x1852d3=_0x6c1c08;super(),this[_0x1852d3(0x1b1)]=_0x34f986,this['_menuManagerService']=_0x37a43a,this[_0x1852d3(0x1c5)](),this[_0x1852d3(0x1b5)]();}['_initCommands'](){[u,l]['forEach'](_0x10a421=>{const _0x3bd192=_0x1740;this[_0x3bd192(0x1bf)](this['_commandService'][_0x3bd192(0x1bd)](_0x10a421));});}['_initMenus'](){const _0x52e9d9=_0x6c1c08;this[_0x52e9d9(0x1c3)][_0x52e9d9(0x1ba)](A);}};s=$([d(0x0,_0x41e2f4),d(0x1,_0x40d202)],s);var V=Object[_0x6c1c08(0x1dd)],W=Object[_0x6c1c08(0x1e1)],K=(_0x41e3a2,_0x4477d5,_0x55e417)=>_0x4477d5 in _0x41e3a2?V(_0x41e3a2,_0x4477d5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55e417}):_0x41e3a2[_0x4477d5]=_0x55e417,Y=(_0x3084cb,_0x3d104e,_0x148d29,_0x1e8792)=>{for(var _0x5c509e=_0x1e8792>0x1?void 0x0:_0x1e8792?W(_0x3d104e,_0x148d29):_0x3d104e,_0x51bb63=_0x3084cb['length']-0x1,_0x5617e3;_0x51bb63>=0x0;_0x51bb63--)(_0x5617e3=_0x3084cb[_0x51bb63])&&(_0x5c509e=_0x5617e3(_0x5c509e)||_0x5c509e);return _0x5c509e;},h=(_0x45c3da,_0x19c78c)=>(_0x430383,_0x205a16)=>_0x19c78c(_0x430383,_0x205a16,_0x45c3da),m=(_0x15ffd8,_0x44390b,_0x10e3cc)=>K(_0x15ffd8,typeof _0x44390b!=_0x6c1c08(0x1b9)?_0x44390b+'':_0x44390b,_0x10e3cc);let a=class extends _0x463098{constructor(_0x111e78=g,_0x22f2fe,_0x34ae8e){const _0x16d8b6=_0x6c1c08;super(),this['_config']=_0x111e78,this[_0x16d8b6(0x1ab)]=_0x22f2fe,this[_0x16d8b6(0x1b4)]=_0x34ae8e;const {menu:_0x2fc43b,..._0x56e67a}=_0x2b66cd({},g,this[_0x16d8b6(0x1ce)]);_0x2fc43b&&this[_0x16d8b6(0x1b4)][_0x16d8b6(0x1d3)](_0x16d8b6(0x1c9),_0x2fc43b,{'merge':!0x0}),this[_0x16d8b6(0x1b4)][_0x16d8b6(0x1d3)](D,_0x56e67a);}[_0x6c1c08(0x1c0)](){const _0x2f6294=_0x6c1c08;[[s]][_0x2f6294(0x1af)](_0x2d984e=>this[_0x2f6294(0x1ab)]['add'](_0x2d984e));}[_0x6c1c08(0x1da)](){this['_injector']['get'](s);}};m(a,_0x6c1c08(0x1b2),'SHEET_EXCHANGE_CLIENT_PLUGIN'),m(a,_0x6c1c08(0x1aa),v[_0x6c1c08(0x1d0)]),m(a,_0x6c1c08(0x1d6),v['version']),m(a,'type',_0x169a21[_0x6c1c08(0x1cf)]),a=Y([_0x470d5f(_0xed0cdc),h(0x1,_0x44ff8a(_0x1010e3)),h(0x2,_0x179a44)],a);export{l as ExportXLSXOperation,u as ImportXLSXOperation,a as UniverSheetsExchangeClientPlugin};
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export declare class UniverSheetsExchangeClientPlugin extends Plugin {
|
|
|
5
5
|
readonly _injector: Injector;
|
|
6
6
|
private readonly _configService;
|
|
7
7
|
static pluginName: string;
|
|
8
|
+
static packageName: string;
|
|
9
|
+
static version: string;
|
|
8
10
|
static type: UniverInstanceType;
|
|
9
11
|
constructor(_config: Partial<IUniverSheetsExchangeClientConfig> | undefined, _injector: Injector, _configService: IConfigService);
|
|
10
12
|
onStarting(): void;
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x2ced(_0x43ce7c,_0x52cd56){_0x43ce7c=_0x43ce7c-0x174;const _0x550de4=_0x550d();let _0x2ced1c=_0x550de4[_0x43ce7c];return _0x2ced1c;}(function(_0x303913,_0x231747){const _0x18e0f1=_0x2ced,_0x3ac5c3=_0x303913();while(!![]){try{const _0x41784f=-parseInt(_0x18e0f1(0x19a))/0x1*(-parseInt(_0x18e0f1(0x193))/0x2)+parseInt(_0x18e0f1(0x188))/0x3+-parseInt(_0x18e0f1(0x1a2))/0x4*(-parseInt(_0x18e0f1(0x1b2))/0x5)+parseInt(_0x18e0f1(0x17c))/0x6+parseInt(_0x18e0f1(0x198))/0x7*(-parseInt(_0x18e0f1(0x1ae))/0x8)+parseInt(_0x18e0f1(0x1a8))/0x9*(parseInt(_0x18e0f1(0x177))/0xa)+-parseInt(_0x18e0f1(0x1c2))/0xb*(parseInt(_0x18e0f1(0x18d))/0xc);if(_0x41784f===_0x231747)break;else _0x3ac5c3['push'](_0x3ac5c3['shift']());}catch(_0x62ba51){_0x3ac5c3['push'](_0x3ac5c3['shift']());}}}(_0x550d,0xf1e8d),function(_0x407af4,_0x10dbd5){const _0x35ca17=_0x2ced;typeof exports=='object'&&typeof module<'u'?_0x10dbd5(exports,require('@univerjs-pro/exchange-client'),require('@univerjs/core'),require('@univerjs/ui'),require('@univerjs/sheets'),require('@univerjs/sheets-ui')):typeof define=='function'&&define['amd']?define(['exports',_0x35ca17(0x179),_0x35ca17(0x1b1),_0x35ca17(0x1a5),'@univerjs/sheets',_0x35ca17(0x176)],_0x10dbd5):(_0x407af4=typeof globalThis<'u'?globalThis:_0x407af4||self,_0x10dbd5(_0x407af4[_0x35ca17(0x1b9)]={},_0x407af4[_0x35ca17(0x19b)],_0x407af4[_0x35ca17(0x17a)],_0x407af4['UniverUi'],_0x407af4[_0x35ca17(0x199)],_0x407af4[_0x35ca17(0x1a9)]));}(this,function(_0x2bfa46,_0x21bfb6,_0x9d2fe0,_0x273c37,_0x201a90,_0x2b2044){'use strict';const _0x2b1816=_0x2ced;const _0x266ae4={'id':_0x2b1816(0x174),'type':_0x9d2fe0[_0x2b1816(0x19f)][_0x2b1816(0x197)],'handler':async _0x3a9e99=>{const _0x1bb832=_0x2b1816,_0x16f3fe=_0x3a9e99['get'](_0x21bfb6[_0x1bb832(0x1ba)]);return new URLSearchParams(location[_0x1bb832(0x18e)])[_0x1bb832(0x195)](_0x1bb832(0x18b))?_0x16f3fe[_0x1bb832(0x19c)]():_0x16f3fe[_0x1bb832(0x18f)](),!0x0;}},_0x4d3fd0={'id':_0x2b1816(0x1a3),'type':_0x9d2fe0[_0x2b1816(0x19f)]['OPERATION'],'handler':async _0xea94ac=>{const _0x5939b9=_0x2b1816,_0x1cb0b6=_0xea94ac[_0x5939b9(0x195)](_0x21bfb6[_0x5939b9(0x1ba)]);return new URLSearchParams(location[_0x5939b9(0x18e)])[_0x5939b9(0x195)](_0x5939b9(0x18b))?_0x1cb0b6[_0x5939b9(0x196)]():_0x1cb0b6[_0x5939b9(0x184)](),!0x0;}},_0x158a48={'name':_0x2b1816(0x1a4),'version':_0x2b1816(0x1ad)},_0x140f8a=_0x2b1816(0x180),_0x4ddce0={},_0x2485a5='sheets-exchange-client.operation.exchange';function _0x2446da(_0x536e2e){const _0x395069=_0x2b1816;return{'id':_0x2485a5,'type':_0x273c37['MenuItemType'][_0x395069(0x1c5)],'icon':_0x395069(0x1af),'tooltip':'exchange.file','hidden$':_0x273c37[_0x395069(0x190)](_0x536e2e,_0x9d2fe0[_0x395069(0x1b5)]['UNIVER_SHEET']),'disabled$':_0x2b2044['getCurrentRangeDisable$'](_0x536e2e,{'workbookTypes':[_0x201a90[_0x395069(0x1ab)]]})};}function _0x1b66a1(){const _0x4619aa=_0x2b1816;return{'id':_0x266ae4['id'],'type':_0x273c37[_0x4619aa(0x1bb)][_0x4619aa(0x194)],'title':_0x4619aa(0x1bc),'icon':'FolderIcon'};}function _0x3d5e41(){const _0x10417c=_0x2b1816;return{'id':_0x4d3fd0['id'],'type':_0x273c37[_0x10417c(0x1bb)][_0x10417c(0x194)],'title':_0x10417c(0x1b6),'icon':_0x10417c(0x17b)};}const _0x507b99={[_0x273c37[_0x2b1816(0x178)][_0x2b1816(0x19d)]]:{[_0x2485a5]:{'order':0.3,'menuItemFactory':_0x2446da,[_0x266ae4['id']]:{'order':0x0,'menuItemFactory':_0x1b66a1},[_0x4d3fd0['id']]:{'order':0x1,'menuItemFactory':_0x3d5e41}}}};var _0x5e884e=Object['getOwnPropertyDescriptor'],_0x3f751f=(_0x183798,_0x3cb9c2,_0x39a117,_0x46a658)=>{const _0x42e2e4=_0x2b1816;for(var _0x1dc483=_0x46a658>0x1?void 0x0:_0x46a658?_0x5e884e(_0x3cb9c2,_0x39a117):_0x3cb9c2,_0x16124a=_0x183798[_0x42e2e4(0x1aa)]-0x1,_0x152587;_0x16124a>=0x0;_0x16124a--)(_0x152587=_0x183798[_0x16124a])&&(_0x1dc483=_0x152587(_0x1dc483)||_0x1dc483);return _0x1dc483;},_0x5c3cbe=(_0x480bea,_0x5287a1)=>(_0x45a8b8,_0x66cdd0)=>_0x5287a1(_0x45a8b8,_0x66cdd0,_0x480bea);let _0x320782=class extends _0x9d2fe0[_0x2b1816(0x1b4)]{constructor(_0x315e00,_0x5685cf){const _0x355b1f=_0x2b1816;super(),this[_0x355b1f(0x17f)]=_0x315e00,this[_0x355b1f(0x18a)]=_0x5685cf,this[_0x355b1f(0x1bd)](),this['_initMenus']();}[_0x2b1816(0x1bd)](){const _0x21af2a=_0x2b1816;[_0x266ae4,_0x4d3fd0][_0x21af2a(0x1b7)](_0x46117e=>{const _0x3a78fe=_0x21af2a;this['disposeWithMe'](this[_0x3a78fe(0x17f)][_0x3a78fe(0x1a6)](_0x46117e));});}[_0x2b1816(0x17d)](){const _0x11953f=_0x2b1816;this[_0x11953f(0x18a)][_0x11953f(0x1b8)](_0x507b99);}};_0x320782=_0x3f751f([_0x5c3cbe(0x0,_0x9d2fe0[_0x2b1816(0x19e)]),_0x5c3cbe(0x1,_0x273c37[_0x2b1816(0x187)])],_0x320782);var _0x309808=Object['defineProperty'],_0x18b573=Object[_0x2b1816(0x191)],_0x137cc0=(_0x39f06f,_0x1ac433,_0x368425)=>_0x1ac433 in _0x39f06f?_0x309808(_0x39f06f,_0x1ac433,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x368425}):_0x39f06f[_0x1ac433]=_0x368425,_0x265296=(_0x3faae9,_0x191f68,_0x3b9eeb,_0x22e74e)=>{const _0x3ab55f=_0x2b1816;for(var _0x3d6df1=_0x22e74e>0x1?void 0x0:_0x22e74e?_0x18b573(_0x191f68,_0x3b9eeb):_0x191f68,_0x5c0eb7=_0x3faae9[_0x3ab55f(0x1aa)]-0x1,_0x3dca0b;_0x5c0eb7>=0x0;_0x5c0eb7--)(_0x3dca0b=_0x3faae9[_0x5c0eb7])&&(_0x3d6df1=_0x3dca0b(_0x3d6df1)||_0x3d6df1);return _0x3d6df1;},_0x16f7f2=(_0x23f068,_0x46481c)=>(_0x538af6,_0x2e75fe)=>_0x46481c(_0x538af6,_0x2e75fe,_0x23f068),_0xec52b5=(_0x458ad7,_0x133994,_0x12f729)=>_0x137cc0(_0x458ad7,typeof _0x133994!=_0x2b1816(0x1ac)?_0x133994+'':_0x133994,_0x12f729);_0x2bfa46[_0x2b1816(0x1a0)]=class extends _0x9d2fe0['Plugin']{constructor(_0x1d6c2e=_0x4ddce0,_0x5032c5,_0x5b6812){const _0xbc4f64=_0x2b1816;super(),this[_0xbc4f64(0x1b0)]=_0x1d6c2e,this[_0xbc4f64(0x1a7)]=_0x5032c5,this[_0xbc4f64(0x1a1)]=_0x5b6812;const {menu:_0x43ce14,..._0x2e6327}=_0x9d2fe0[_0xbc4f64(0x181)]({},_0x4ddce0,this[_0xbc4f64(0x1b0)]);_0x43ce14&&this[_0xbc4f64(0x1a1)]['setConfig'](_0xbc4f64(0x189),_0x43ce14,{'merge':!0x0}),this[_0xbc4f64(0x1a1)][_0xbc4f64(0x1c4)](_0x140f8a,_0x2e6327);}[_0x2b1816(0x192)](){const _0xfa391=_0x2b1816;[[_0x320782]][_0xfa391(0x1b7)](_0x2ff367=>this['_injector'][_0xfa391(0x1c0)](_0x2ff367));}[_0x2b1816(0x1be)](){const _0xe29a16=_0x2b1816;this[_0xe29a16(0x1a7)]['get'](_0x320782);}},_0xec52b5(_0x2bfa46[_0x2b1816(0x1a0)],_0x2b1816(0x183),_0x2b1816(0x1c1)),_0xec52b5(_0x2bfa46[_0x2b1816(0x1a0)],'packageName',_0x158a48['name']),_0xec52b5(_0x2bfa46[_0x2b1816(0x1a0)],_0x2b1816(0x1b3),_0x158a48[_0x2b1816(0x1b3)]),_0xec52b5(_0x2bfa46[_0x2b1816(0x1a0)],'type',_0x9d2fe0[_0x2b1816(0x1b5)][_0x2b1816(0x186)]),_0x2bfa46[_0x2b1816(0x1a0)]=_0x265296([_0x9d2fe0[_0x2b1816(0x17e)](_0x21bfb6[_0x2b1816(0x18c)]),_0x16f7f2(0x1,_0x9d2fe0['Inject'](_0x9d2fe0[_0x2b1816(0x175)])),_0x16f7f2(0x2,_0x9d2fe0[_0x2b1816(0x182)])],_0x2bfa46[_0x2b1816(0x1a0)]),_0x2bfa46['ExportXLSXOperation']=_0x4d3fd0,_0x2bfa46['ImportXLSXOperation']=_0x266ae4,Object[_0x2b1816(0x1bf)](_0x2bfa46,Symbol[_0x2b1816(0x1c3)],{'value':_0x2b1816(0x185)});}));function _0x550d(){const _0x46fe0a=['WorkbookExportPermission','symbol','0.17.0','8AbSSWR','DirectExportIcon','_config','@univerjs/core','1016585TvYmou','version','Disposable','UniverInstanceType','exchange.download','forEach','mergeMenu','UniverProSheetsExchangeClient','IExchangeOperateService','MenuItemType','exchange.upload','_initCommands','onReady','defineProperty','add','SHEET_EXCHANGE_CLIENT_PLUGIN','669339VBWsVE','toStringTag','setConfig','SUBITEMS','exchange-client.operation.import-xlsx','Injector','@univerjs/sheets-ui','70BNlcMa','RibbonStartGroup','@univerjs-pro/exchange-client','UniverCore','ExportIcon','4493418USbmVb','_initMenus','DependentOn','_commandService','sheets-exchange-client.config','merge','IConfigService','pluginName','exportXLSXBySnapshot','Module','UNIVER_SHEET','IMenuManagerService','1362813qTDEKc','menu','_menuManagerService','unit','UniverExchangeClientPlugin','732qaNLII','search','importXLSXToSnapshot','getMenuHiddenObservable','getOwnPropertyDescriptor','onStarting','3889234nnRgEh','BUTTON','get','exportXLSXByUnitId','OPERATION','5767538UaPuBM','UniverSheets','1qMEumy','UniverProExchangeClient','importXLSXToUnitId','OTHERS','ICommandService','CommandType','UniverSheetsExchangeClientPlugin','_configService','8Zzqdtp','exchange-client.operation.export-xlsx','@univerjs-pro/sheets-exchange-client','@univerjs/ui','registerCommand','_injector','2535633qkMdss','UniverSheetsUi','length'];_0x550d=function(){return _0x46fe0a;};return _0x550d();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/sheets-exchange-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"lib"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@univerjs/
|
|
46
|
-
"@univerjs/
|
|
47
|
-
"@univerjs
|
|
48
|
-
"@univerjs/
|
|
49
|
-
"@univerjs/
|
|
45
|
+
"@univerjs-pro/exchange-client": "0.17.0",
|
|
46
|
+
"@univerjs/core": "0.17.0",
|
|
47
|
+
"@univerjs/sheets-ui": "0.17.0",
|
|
48
|
+
"@univerjs/sheets": "0.17.0",
|
|
49
|
+
"@univerjs/ui": "0.17.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"typescript": "^5.9.3",
|
|
53
53
|
"vite": "^7.3.1",
|
|
54
54
|
"vitest": "^4.0.18",
|
|
55
|
-
"@univerjs-infra/shared": "0.
|
|
55
|
+
"@univerjs-infra/shared": "0.17.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"test": "vitest run",
|