@univerjs-pro/exchange-client 1.0.0-alpha.8 → 1.0.0-beta.1
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/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.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/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.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/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.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-HK.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/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.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/id-ID.js +1 -1
- package/lib/es/locale/it-IT.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/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.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-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.css +46 -38
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.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/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.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-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/config/config.d.ts +0 -23
- package/lib/types/controllers/components.controller.d.ts +3 -3
- package/lib/types/facade/f-univer.d.ts +5 -279
- package/lib/types/index.d.ts +5 -2
- package/lib/types/locale/en-US.d.ts +1 -0
- package/lib/types/services/exchange.service.d.ts +15 -82
- package/lib/types/services/operate.service.d.ts +17 -96
- package/lib/types/services/request.service.d.ts +78 -10
- package/lib/types/services/utils/content-type.d.ts +6 -2
- package/lib/types/services/utils/snapshot.d.ts +7 -39
- package/lib/types/services/utils/tool.d.ts +3 -0
- package/lib/types/views/export-format-dialog/ExportFormatDialog.d.ts +14 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.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/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.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/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.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-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +11 -12
- package/lib/types/views/UploadNotificationContainer.d.ts +0 -1
package/lib/locale/pt-BR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x282ea2=_0x3065;(function(_0x4d3102,_0x5b04c8){const _0x5f567a=_0x3065,_0x3fedb7=_0x4d3102();while(!![]){try{const _0x4326f6=-parseInt(_0x5f567a(0xd6))/0x1*(parseInt(_0x5f567a(0xd4))/0x2)+-parseInt(_0x5f567a(0xd3))/0x3+parseInt(_0x5f567a(0xdc))/0x4*(-parseInt(_0x5f567a(0xd1))/0x5)+-parseInt(_0x5f567a(0xcf))/0x6*(parseInt(_0x5f567a(0xce))/0x7)+parseInt(_0x5f567a(0xd8))/0x8+-parseInt(_0x5f567a(0xdf))/0x9+parseInt(_0x5f567a(0xd9))/0xa*(parseInt(_0x5f567a(0xe0))/0xb);if(_0x4326f6===_0x5b04c8)break;else _0x3fedb7['push'](_0x3fedb7['shift']());}catch(_0x42f1e5){_0x3fedb7['push'](_0x3fedb7['shift']());}}}(_0x1f91,0x27269));const e={'exchange-client':{'uploading':_0x282ea2(0xd7),'uploadSuccess':'Arquivo\x20enviado\x20com\x20sucesso','uploadSuccessTip':_0x282ea2(0xdb),'downloading':'Baixando','downloadSuccess':_0x282ea2(0xd5),'unknownMistake':_0x282ea2(0xda),'networkError':'Erro\x20de\x20rede','tooLarge':_0x282ea2(0xd2),'internalError':'Erro\x20interno\x20desconhecido','interrupt':'A\x20conexão\x20de\x20rede\x20foi\x20interrompida\x20e\x20o\x20envio\x20do\x20arquivo\x20falhou','fileTypeError':_0x282ea2(0xdd),'wait':_0x282ea2(0xde),'cancel':'Cancelar','confirm':_0x282ea2(0xd0),'uploadAgain':'Enviar\x20novamente'}};function _0x3065(_0x42a856,_0x290cbf){_0x42a856=_0x42a856-0xce;const _0x1f91a5=_0x1f91();let _0x3065d2=_0x1f91a5[_0x42a856];return _0x3065d2;}function _0x1f91(){const _0x159050=['O\x20arquivo\x20selecionado\x20[{0}]\x20não\x20é\x20suportado\x20para\x20envio','Aguarde...','456786sABnsl','11VOBrYO','63fyqwBh','167904YCDJcM','Confirmar','20dMboge','Os\x20dados\x20são\x20muito\x20grandes','4497NHXXgw','16hUjiHM','Download\x20concluído\x20com\x20sucesso','4563SWlzop','Enviando','2507720AkOPvp','3631930JYoJUg','Erro\x20desconhecido','{0}\x20arquivo(s)\x20enviado(s)\x20com\x20sucesso','175684oldcdK'];_0x1f91=function(){return _0x159050;};return _0x1f91();}export{e as default};
|
package/lib/locale/ru-RU.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4467ca=_0x1670;(function(_0x7003,_0x2abc8f){const _0x5a7a16=_0x1670,_0x411c1e=_0x7003();while(!![]){try{const _0x132f1d=-parseInt(_0x5a7a16(0x1a2))/0x1*(-parseInt(_0x5a7a16(0x198))/0x2)+-parseInt(_0x5a7a16(0x194))/0x3*(parseInt(_0x5a7a16(0x1a9))/0x4)+parseInt(_0x5a7a16(0x197))/0x5+-parseInt(_0x5a7a16(0x19a))/0x6+parseInt(_0x5a7a16(0x193))/0x7*(parseInt(_0x5a7a16(0x19b))/0x8)+-parseInt(_0x5a7a16(0x1a5))/0x9+parseInt(_0x5a7a16(0x1a0))/0xa;if(_0x132f1d===_0x2abc8f)break;else _0x411c1e['push'](_0x411c1e['shift']());}catch(_0x2328b9){_0x411c1e['push'](_0x411c1e['shift']());}}}(_0x8d5d,0xceab9));function _0x8d5d(){const _0x17c8b4=['6473808dolLaJ','Неизвестная\x20ошибка','Данные\x20слишком\x20большие','Скачивание\x20успешно','932188yVRrdM','14VgisJf','12sbtSky','Сетевое\x20соединение\x20было\x20прервано,\x20и\x20загрузка\x20файла\x20не\x20удалась','Внутренняя\x20неизвестная\x20ошибка','5696780oqAhjW','9806iJBONf','Отмена','8243994lgQJUB','2113016RRiycn','Сетевая\x20ошибка','Загрузить\x20снова','{0}\x20файл(ов)\x20успешно\x20загружен(о)','Загрузка','21357680nxpXGp','Файл\x20успешно\x20загружен','14epKKIi','Скачивание','Пожалуйста,\x20подождите...'];_0x8d5d=function(){return _0x17c8b4;};return _0x8d5d();}function _0x1670(_0x5ae7f7,_0x40da42){_0x5ae7f7=_0x5ae7f7-0x193;const _0x8d5d19=_0x8d5d();let _0x167036=_0x8d5d19[_0x5ae7f7];return _0x167036;}const e={'exchange-client':{'uploading':_0x4467ca(0x19f),'uploadSuccess':_0x4467ca(0x1a1),'uploadSuccessTip':_0x4467ca(0x19e),'downloading':_0x4467ca(0x1a3),'downloadSuccess':_0x4467ca(0x1a8),'unknownMistake':_0x4467ca(0x1a6),'networkError':_0x4467ca(0x19c),'tooLarge':_0x4467ca(0x1a7),'internalError':_0x4467ca(0x196),'interrupt':_0x4467ca(0x195),'fileTypeError':'Выбранный\x20файл\x20[{0}]\x20не\x20поддерживается\x20для\x20загрузки','wait':_0x4467ca(0x1a4),'cancel':_0x4467ca(0x199),'confirm':'Подтвердить','uploadAgain':_0x4467ca(0x19d)}};export{e as default};
|
package/lib/locale/sk-SK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x389e(_0x44ef98,_0x2dcd6b){_0x44ef98=_0x44ef98-0x96;const _0x39fcbb=_0x39fc();let _0x389e80=_0x39fcbb[_0x44ef98];return _0x389e80;}function _0x39fc(){const _0x5b8e37=['2619525wFihwA','Úspešne\x20nahraných\x20{0}\x20súborov','Sieťová\x20chyba','Nahrať\x20znova','3065072YWOqHT','Sťahovanie\x20úspešné','742584HPqWsA','2MXYbPs','131828QyLbQf','Neznáma\x20chyba','Súbor\x20bol\x20úspešne\x20nahraný','Vybraný\x20súbor\x20[{0}]\x20nie\x20je\x20podporovaný\x20na\x20nahrávanie','Sťahovanie','Potvrdiť','8012592AMkbzz','Prosím\x20počkajte...','Nahrávanie','3hFexxV','4089666uPIBDV','3783816KWYGXl','Dáta\x20sú\x20príliš\x20veľké','Interná\x20neznáma\x20chyba'];_0x39fc=function(){return _0x5b8e37;};return _0x39fc();}const _0xdea452=_0x389e;(function(_0x4d063c,_0x4b1294){const _0x381ffd=_0x389e,_0x146462=_0x4d063c();while(!![]){try{const _0x4b3011=-parseInt(_0x381ffd(0xa6))/0x1*(parseInt(_0x381ffd(0xa7))/0x2)+-parseInt(_0x381ffd(0x9b))/0x3*(parseInt(_0x381ffd(0xa8))/0x4)+-parseInt(_0x381ffd(0xa0))/0x5+parseInt(_0x381ffd(0x9d))/0x6+parseInt(_0x381ffd(0x9c))/0x7+-parseInt(_0x381ffd(0xa4))/0x8+parseInt(_0x381ffd(0x98))/0x9;if(_0x4b3011===_0x4b1294)break;else _0x146462['push'](_0x146462['shift']());}catch(_0x5d2304){_0x146462['push'](_0x146462['shift']());}}}(_0x39fc,0x672b6));const e={'exchange-client':{'uploading':_0xdea452(0x9a),'uploadSuccess':_0xdea452(0xaa),'uploadSuccessTip':_0xdea452(0xa1),'downloading':_0xdea452(0x96),'downloadSuccess':_0xdea452(0xa5),'unknownMistake':_0xdea452(0xa9),'networkError':_0xdea452(0xa2),'tooLarge':_0xdea452(0x9e),'internalError':_0xdea452(0x9f),'interrupt':'Sieťové\x20pripojenie\x20bolo\x20prerušené\x20a\x20nahrávanie\x20súboru\x20zlyhalo','fileTypeError':_0xdea452(0xab),'wait':_0xdea452(0x99),'cancel':'Zrušiť','confirm':_0xdea452(0x97),'uploadAgain':_0xdea452(0xa3)}};export{e as default};
|
package/lib/locale/vi-VN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x23fd(_0x431d86,_0x4f93ac){_0x431d86=_0x431d86-0x13c;const _0x3c2ccf=_0x3c2c();let _0x23fdfc=_0x3c2ccf[_0x431d86];return _0x23fdfc;}const _0x29a7f8=_0x23fd;(function(_0x17f99f,_0x25dc6f){const _0x3ad57c=_0x23fd,_0xba8a03=_0x17f99f();while(!![]){try{const _0x545c55=parseInt(_0x3ad57c(0x143))/0x1*(parseInt(_0x3ad57c(0x144))/0x2)+parseInt(_0x3ad57c(0x14f))/0x3*(parseInt(_0x3ad57c(0x148))/0x4)+-parseInt(_0x3ad57c(0x13f))/0x5*(parseInt(_0x3ad57c(0x13e))/0x6)+parseInt(_0x3ad57c(0x153))/0x7+parseInt(_0x3ad57c(0x147))/0x8*(-parseInt(_0x3ad57c(0x14d))/0x9)+-parseInt(_0x3ad57c(0x152))/0xa*(parseInt(_0x3ad57c(0x14e))/0xb)+-parseInt(_0x3ad57c(0x14b))/0xc*(-parseInt(_0x3ad57c(0x13c))/0xd);if(_0x545c55===_0x25dc6f)break;else _0xba8a03['push'](_0xba8a03['shift']());}catch(_0x4ca48e){_0xba8a03['push'](_0xba8a03['shift']());}}}(_0x3c2c,0x9fc9e));function _0x3c2c(){const _0x256ac5=['Lỗi\x20không\x20xác\x20định\x20bên\x20trong','Đang\x20tải\x20xuống','5DzkKuR','53302ZmImCA','{0}\x20tệp\x20đã\x20được\x20tải\x20lên\x20thành\x20công','Lỗi\x20không\x20xác\x20định','216064AGjBEu','2533796XJRmPF','Đang\x20tải\x20lên','Kết\x20nối\x20mạng\x20bị\x20gián\x20đoạn,\x20tải\x20lên\x20tệp\x20thất\x20bại','8069808zrtMMr','Tải\x20lên\x20tệp\x20thành\x20công','9CQcWJs','22HBORBK','3HgBNGR','Tải\x20lên\x20lại','Luồng\x20dữ\x20liệu\x20quá\x20lớn','5095970mrBdnS','5531869ipnHzU','13AdtTUe','Tệp\x20được\x20chọn\x20[{0}]\x20không\x20được\x20hỗ\x20trợ\x20để\x20tải\x20lên','352506iKGbNC','45yOiWRd','Xác\x20nhận'];_0x3c2c=function(){return _0x256ac5;};return _0x3c2c();}const e={'exchange-client':{'uploading':_0x29a7f8(0x149),'uploadSuccess':_0x29a7f8(0x14c),'uploadSuccessTip':_0x29a7f8(0x145),'downloading':_0x29a7f8(0x142),'downloadSuccess':'Tải\x20xuống\x20thành\x20công','unknownMistake':_0x29a7f8(0x146),'networkError':'Lỗi\x20mạng','tooLarge':_0x29a7f8(0x151),'internalError':_0x29a7f8(0x141),'interrupt':_0x29a7f8(0x14a),'fileTypeError':_0x29a7f8(0x13d),'wait':'Vui\x20lòng\x20đợi...','cancel':'Hủy\x20bỏ','confirm':_0x29a7f8(0x140),'uploadAgain':_0x29a7f8(0x150)}};export{e as default};
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4def48=_0x303d;function _0x3bed(){const _0x2dc6ad=['204253BsVcVc','下载中','再次上传','请稍等...','142803VTcuuw','212POpLpG','248OkHiiy','内部未知错误','1402164zfROSr','未知错误','所选文件\x20[{0}]\x20不支持上传','32553pANebr','16765914JiqFSR','408860RzJvCR','网络连接中断,文件上传失败','36ecnzYZ','6006282wLIoEB','网络异常','820XNWvqB'];_0x3bed=function(){return _0x2dc6ad;};return _0x3bed();}(function(_0x2c9fe2,_0x1c5f5c){const _0x1359d6=_0x303d,_0x1bbeef=_0x2c9fe2();while(!![]){try{const _0x3455ba=-parseInt(_0x1359d6(0x1ce))/0x1+-parseInt(_0x1359d6(0x1cb))/0x2*(-parseInt(_0x1359d6(0x1be))/0x3)+parseInt(_0x1359d6(0x1c2))/0x4*(parseInt(_0x1359d6(0x1c0))/0x5)+parseInt(_0x1359d6(0x1c3))/0x6+-parseInt(_0x1359d6(0x1c6))/0x7*(parseInt(_0x1359d6(0x1cc))/0x8)+parseInt(_0x1359d6(0x1ca))/0x9*(-parseInt(_0x1359d6(0x1c5))/0xa)+parseInt(_0x1359d6(0x1bf))/0xb;if(_0x3455ba===_0x1c5f5c)break;else _0x1bbeef['push'](_0x1bbeef['shift']());}catch(_0x54e764){_0x1bbeef['push'](_0x1bbeef['shift']());}}}(_0x3bed,0xc42f0));const e={'exchange-client':{'uploading':'上传中','uploadSuccess':'文件上传成功','uploadSuccessTip':'{0}个文件上传成功','downloading':_0x4def48(0x1c7),'downloadSuccess':'下载成功','unknownMistake':_0x4def48(0x1bc),'networkError':_0x4def48(0x1c4),'tooLarge':'数据流过大','internalError':_0x4def48(0x1cd),'interrupt':_0x4def48(0x1c1),'fileTypeError':_0x4def48(0x1bd),'wait':_0x4def48(0x1c9),'cancel':'取消','confirm':'确认','uploadAgain':_0x4def48(0x1c8)}};function _0x303d(_0x233ab8,_0x450db8){_0x233ab8=_0x233ab8-0x1bc;const _0x3bed66=_0x3bed();let _0x303d45=_0x3bed66[_0x233ab8];return _0x303d45;}export{e as default};
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x2ec8(){const _0x313f73=['4000402mweqjG','15795pYWCqw','下載成功','下載中','402676pcJNNJ','59762UFQzKX','180Jryvgg','內部未知錯誤','資料流過大','1326psYDuh','504020HWeSWW','22iFXjqt','網絡連線中斷,檔案上傳失敗','檔案上傳成功','再次上傳','35748996MDnFvZ','98752LjsXCw','29vGkwfT','{0}個檔案上傳成功','30XZSIKw','網絡異常','所選檔案\x20[{0}]\x20不支援上傳'];_0x2ec8=function(){return _0x313f73;};return _0x2ec8();}const _0x484d55=_0x4dc1;(function(_0x1c4ea7,_0xc75476){const _0x1dbc60=_0x4dc1,_0xcd07e3=_0x1c4ea7();while(!![]){try{const _0x1c5023=-parseInt(_0x1dbc60(0x14f))/0x1*(parseInt(_0x1dbc60(0x143))/0x2)+parseInt(_0x1dbc60(0x13b))/0x3*(-parseInt(_0x1dbc60(0x142))/0x4)+-parseInt(_0x1dbc60(0x13f))/0x5*(parseInt(_0x1dbc60(0x147))/0x6)+parseInt(_0x1dbc60(0x13e))/0x7+-parseInt(_0x1dbc60(0x14e))/0x8*(parseInt(_0x1dbc60(0x144))/0x9)+-parseInt(_0x1dbc60(0x148))/0xa*(parseInt(_0x1dbc60(0x149))/0xb)+parseInt(_0x1dbc60(0x14d))/0xc;if(_0x1c5023===_0xc75476)break;else _0xcd07e3['push'](_0xcd07e3['shift']());}catch(_0x23ddd0){_0xcd07e3['push'](_0xcd07e3['shift']());}}}(_0x2ec8,0x9a2d3));function _0x4dc1(_0x56bc64,_0xeefbd0){_0x56bc64=_0x56bc64-0x13a;const _0x2ec887=_0x2ec8();let _0x4dc1be=_0x2ec887[_0x56bc64];return _0x4dc1be;}const e={'exchange-client':{'uploading':'上傳中','uploadSuccess':_0x484d55(0x14b),'uploadSuccessTip':_0x484d55(0x13a),'downloading':_0x484d55(0x141),'downloadSuccess':_0x484d55(0x140),'unknownMistake':'未知錯誤','networkError':_0x484d55(0x13c),'tooLarge':_0x484d55(0x146),'internalError':_0x484d55(0x145),'interrupt':_0x484d55(0x14a),'fileTypeError':_0x484d55(0x13d),'wait':'請稍等...','cancel':'取消','confirm':'確認','uploadAgain':_0x484d55(0x14c)}};export{e as default};
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x3f385b=_0x203b;(function(_0x473e88,_0x92544f){const _0xb2a36e=_0x203b,_0xbfdb62=_0x473e88();while(!![]){try{const _0x58e4e8=parseInt(_0xb2a36e(0x17e))/0x1+parseInt(_0xb2a36e(0x181))/0x2+parseInt(_0xb2a36e(0x173))/0x3*(parseInt(_0xb2a36e(0x17b))/0x4)+parseInt(_0xb2a36e(0x17c))/0x5+-parseInt(_0xb2a36e(0x172))/0x6+parseInt(_0xb2a36e(0x17a))/0x7+-parseInt(_0xb2a36e(0x183))/0x8;if(_0x58e4e8===_0x92544f)break;else _0xbfdb62['push'](_0xbfdb62['shift']());}catch(_0xaad544){_0xbfdb62['push'](_0xbfdb62['shift']());}}}(_0x2d9f,0xb851d));function _0x203b(_0x4556ba,_0xfda01f){_0x4556ba=_0x4556ba-0x171;const _0x2d9f2b=_0x2d9f();let _0x203bad=_0x2d9f2b[_0x4556ba];return _0x203bad;}function _0x2d9f(){const _0x10361=['再次上傳','下載中','8127434cGrSZg','1156PFpTdo','3498555yBzpZi','下載成功','1251319IGXhQg','上傳中','網路連線中斷,檔案上傳失敗','71520MPjkTI','網路異常','10702280JCRQRw','{0}個檔案上傳成功','7670946dvJXnA','2319HJjgIO','請稍等...','資料流過大','內部未知錯誤','檔案上傳成功'];_0x2d9f=function(){return _0x10361;};return _0x2d9f();}const e={'exchange-client':{'uploading':_0x3f385b(0x17f),'uploadSuccess':_0x3f385b(0x177),'uploadSuccessTip':_0x3f385b(0x171),'downloading':_0x3f385b(0x179),'downloadSuccess':_0x3f385b(0x17d),'unknownMistake':'未知錯誤','networkError':_0x3f385b(0x182),'tooLarge':_0x3f385b(0x175),'internalError':_0x3f385b(0x176),'interrupt':_0x3f385b(0x180),'fileTypeError':'所選檔案\x20[{0}]\x20不支援上傳','wait':_0x3f385b(0x174),'cancel':'取消','confirm':'確認','uploadAgain':_0x3f385b(0x178)}};export{e as default};
|
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
export declare const EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY = "exchange-client.config";
|
|
2
2
|
export declare const configSymbol: unique symbol;
|
|
3
|
-
export interface IUniverExchangeClientOptions {
|
|
4
|
-
/**
|
|
5
|
-
* The minimum number of rows in the worksheet after import.
|
|
6
|
-
*/
|
|
7
|
-
minSheetRowCount?: number;
|
|
8
|
-
/**
|
|
9
|
-
* The minimum number of columns in the worksheet after import.
|
|
10
|
-
*/
|
|
11
|
-
minSheetColumnCount?: number;
|
|
12
|
-
/**
|
|
13
|
-
* Whether to disable converting cell images to link on export.
|
|
14
|
-
* If the cell image source is a URL, the default behavior is to convert the url to the cell value on export.
|
|
15
|
-
* Because the server will download all the resource files, when there are many images, it will consume a lot of resources and take a long time.
|
|
16
|
-
* @default true
|
|
17
|
-
*/
|
|
18
|
-
disableCellImageConversion?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Whether to ignore Table when exporting.
|
|
21
|
-
* @default false
|
|
22
|
-
*/
|
|
23
|
-
ignoreTableExport?: boolean;
|
|
24
|
-
}
|
|
25
3
|
export interface IUniverExchangeClientConfig {
|
|
26
4
|
/**
|
|
27
5
|
* The URL of the endpoint for downloading files.
|
|
@@ -34,6 +12,5 @@ export interface IUniverExchangeClientConfig {
|
|
|
34
12
|
getTaskServerUrl?: string;
|
|
35
13
|
signUrlServerUrl?: string;
|
|
36
14
|
maxTimeoutTime?: number;
|
|
37
|
-
options?: IUniverExchangeClientOptions;
|
|
38
15
|
}
|
|
39
16
|
export declare const defaultPluginConfig: IUniverExchangeClientConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Disposable } from '@univerjs/core';
|
|
2
|
-
import { IconManager } from '@univerjs/ui';
|
|
2
|
+
import { ComponentManager, IconManager } from '@univerjs/ui';
|
|
3
3
|
export declare class ComponentsController extends Disposable {
|
|
4
4
|
private readonly _iconManager;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private readonly _componentManager;
|
|
6
|
+
constructor(_iconManager: IconManager, _componentManager: ComponentManager);
|
|
7
7
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { IExchangeSlideDocumentData, ISnapshotBlockJson, ISnapshotBlockJsonResponse } from '@univerjs-pro/exchange-client';
|
|
2
|
-
import type { IDocumentData, IWorkbookData } from '@univerjs/core';
|
|
3
1
|
import { FUniver } from '@univerjs/core/facade';
|
|
4
2
|
/**
|
|
5
3
|
* @ignore
|
|
@@ -7,293 +5,21 @@ import { FUniver } from '@univerjs/core/facade';
|
|
|
7
5
|
export interface IFUniverExchangeClientMixin {
|
|
8
6
|
/**
|
|
9
7
|
* Trigger a browser download for a file or blob.
|
|
10
|
-
* @param file File or blob to download
|
|
11
|
-
* @param filename Filename without extension
|
|
12
|
-
* @param fileExt File extension without a leading dot
|
|
8
|
+
* @param {File | Blob} file File or blob to download
|
|
9
|
+
* @param {string} filename Filename without extension
|
|
10
|
+
* @param {string} fileExt File extension without a leading dot
|
|
11
|
+
* @returns {void}
|
|
13
12
|
*
|
|
14
13
|
* @example
|
|
15
14
|
* ```typescript
|
|
16
|
-
* const file = await univerAPI.
|
|
15
|
+
* const file = await univerAPI.exportSheetByUnitIdAsync(unitId);
|
|
17
16
|
* if (file) univerAPI.downloadFile(file, 'univer', 'xlsx');
|
|
18
17
|
* ```
|
|
19
18
|
*/
|
|
20
19
|
downloadFile(file: File | Blob, filename: string, fileExt: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* Transform snapshot JSON returned by the exchange service to workbook data.
|
|
23
|
-
* @param json Snapshot JSON returned by the exchange service
|
|
24
|
-
* @returns Workbook data
|
|
25
|
-
*/
|
|
26
|
-
transformSnapshotJsonToWorkbookDataAsync(json: ISnapshotBlockJsonResponse): Promise<IWorkbookData>;
|
|
27
|
-
/**
|
|
28
|
-
* Transform workbook data to snapshot JSON accepted by the exchange service.
|
|
29
|
-
* @param workbookData Workbook data
|
|
30
|
-
* @returns Snapshot JSON
|
|
31
|
-
*/
|
|
32
|
-
transformWorkbookDataToSnapshotJsonAsync(workbookData: IWorkbookData): Promise<ISnapshotBlockJson>;
|
|
33
|
-
/**
|
|
34
|
-
* Import XLSX file to unit id
|
|
35
|
-
* @param {string | File} file File path or file object
|
|
36
|
-
* @returns {Promise<string | undefined>} A promise that resolves to the unit id
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```typescript
|
|
40
|
-
* // Accepts a File object
|
|
41
|
-
* const unitId = await univerAPI.importXLSXToUnitIdAsync(file);
|
|
42
|
-
* // Or accepts a URL to a remote file
|
|
43
|
-
* // const unitId = await univerAPI.importXLSXToUnitIdAsync('https://example.com/filename.xlsx');
|
|
44
|
-
*
|
|
45
|
-
* // Utilize automatic data loading in conjunction with collaborative editing. https://docs.univer.ai/en-US/guides/sheets/features/collaboration#loading-collaborative-documents
|
|
46
|
-
* const url = new URL(window.location.href);
|
|
47
|
-
* const unit = url.searchParams.get('unit');
|
|
48
|
-
* url.searchParams.set('unit', unitId);
|
|
49
|
-
* url.searchParams.set('type', "2"); // The meaning of "2" is String(UniverInstanceType.UNIVER_SHEET)
|
|
50
|
-
* console.log('Unit URL:', url.toString());
|
|
51
|
-
*
|
|
52
|
-
* // Open the unit in the new window
|
|
53
|
-
* window.open(url.toString(), '_blank');
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
importXLSXToUnitIdAsync(file: string | File): Promise<string | undefined>;
|
|
57
|
-
/**
|
|
58
|
-
* Import XLSX file to workbook data
|
|
59
|
-
* @param {string | File} file File path or file object
|
|
60
|
-
* @returns {Promise<IWorkbookData | undefined>} A promise that resolves to the workbook data
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```typescript
|
|
64
|
-
* // Accepts a File object
|
|
65
|
-
* const snapshot = await univerAPI.importXLSXToSnapshotAsync(file);
|
|
66
|
-
* // Or accepts a URL to a remote file
|
|
67
|
-
* // const snapshot = await univerAPI.importXLSXToSnapshotAsync('https://example.com/filename.xlsx');
|
|
68
|
-
* console.log('Snapshot created:', snapshot); // see more: https://docs.univer.ai/en-US/guides/sheets/getting-started/workbook-data
|
|
69
|
-
*
|
|
70
|
-
* // Create a new workbook with the snapshot
|
|
71
|
-
* univerAPI.createWorkbook(snapshot);
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
importXLSXToSnapshotAsync(file: string | File): Promise<IWorkbookData | undefined>;
|
|
75
|
-
/**
|
|
76
|
-
* Export XLSX file by unit id
|
|
77
|
-
* @param {string} unitId Unit id
|
|
78
|
-
* @returns {Promise<File | undefined>} A promise that resolves to the XLSX file
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* ```typescript
|
|
82
|
-
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
83
|
-
* const unitId = fWorkbook.getId();
|
|
84
|
-
* const file = await univerAPI.exportXLSXByUnitIdAsync(unitId);
|
|
85
|
-
* // or with server-side calculation enabled
|
|
86
|
-
* // const file = await univerAPI.exportXLSXByUnitIdAsync(unitId);
|
|
87
|
-
*
|
|
88
|
-
* // Download the file
|
|
89
|
-
* univerAPI.downloadFile(file, 'univer', 'xlsx');
|
|
90
|
-
* ```
|
|
91
|
-
*/
|
|
92
|
-
exportXLSXByUnitIdAsync(unitId: string): Promise<File | undefined>;
|
|
93
|
-
/**
|
|
94
|
-
* Export XLSX file by workbook data
|
|
95
|
-
* @param {IWorkbookData} snapshot Workbook data
|
|
96
|
-
* @returns {Promise<File | undefined>} A promise that resolves to the XLSX file
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* ```typescript
|
|
100
|
-
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
101
|
-
* const snapshot = fWorkbook.save();
|
|
102
|
-
* const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot);
|
|
103
|
-
* // or with server-side calculation enabled
|
|
104
|
-
* // const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot, { enableServerCalculation: true });
|
|
105
|
-
*
|
|
106
|
-
* // Download the file
|
|
107
|
-
* univerAPI.downloadFile(file, 'univer', 'xlsx');
|
|
108
|
-
* ```
|
|
109
|
-
*/
|
|
110
|
-
exportXLSXBySnapshotAsync(snapshot: IWorkbookData): Promise<File | undefined>;
|
|
111
|
-
/**
|
|
112
|
-
* Import DOCX file to unit id
|
|
113
|
-
* @param {string | File} file File path or file object
|
|
114
|
-
* @returns {Promise<string | undefined>} A promise that resolves to the unit id
|
|
115
|
-
*
|
|
116
|
-
* @example
|
|
117
|
-
* ```typescript
|
|
118
|
-
* // Accepts a File object
|
|
119
|
-
* const unitId = await univerAPI.importDOCXToUnitIdAsync(file);
|
|
120
|
-
* // Or accepts a URL to a remote file
|
|
121
|
-
* // const unitId = await univerAPI.importDOCXToUnitIdAsync('https://example.com/filename.docx');
|
|
122
|
-
*
|
|
123
|
-
* const url = new URL(window.location.href);
|
|
124
|
-
* const unit = url.searchParams.get('unit');
|
|
125
|
-
* url.searchParams.set('unit', unitId);
|
|
126
|
-
* url.searchParams.set('type', "1"); // The meaning of "1" is String(UniverInstanceType.UNIVER_DOC)
|
|
127
|
-
*
|
|
128
|
-
* // Open the unit in the new window
|
|
129
|
-
* window.open(url.toString(), '_blank');
|
|
130
|
-
* ```
|
|
131
|
-
*/
|
|
132
|
-
importDOCXToUnitIdAsync(file: string | File): Promise<string | undefined>;
|
|
133
|
-
/**
|
|
134
|
-
* Import DOCX file to document data
|
|
135
|
-
* @param {string | File} file File path or file object
|
|
136
|
-
* @returns {Promise<IDocumentData | undefined>} A promise that resolves to the document data
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```typescript
|
|
140
|
-
* // Accepts a File object
|
|
141
|
-
* const snapshot = await univerAPI.importDOCXToSnapshotAsync(file);
|
|
142
|
-
* // Or accepts a URL to a remote file
|
|
143
|
-
* // const snapshot = await univerAPI.importDOCXToSnapshotAsync('https://example.com/filename.docx');
|
|
144
|
-
* console.log('Snapshot created:', snapshot);
|
|
145
|
-
* ```
|
|
146
|
-
*/
|
|
147
|
-
importDOCXToSnapshotAsync(file: string | File): Promise<IDocumentData | undefined>;
|
|
148
|
-
/**
|
|
149
|
-
* Export DOCX file by snapshot
|
|
150
|
-
* @param snapshot Document data
|
|
151
|
-
* @returns DOCX file
|
|
152
|
-
*
|
|
153
|
-
* @example
|
|
154
|
-
* ```typescript
|
|
155
|
-
* const snapshot = univerAPI.getActiveDocument().save();
|
|
156
|
-
* const file = await univerAPI.exportDOCXBySnapshotAsync(snapshot);
|
|
157
|
-
* univerAPI.downloadFile(file, 'univer', 'docx');
|
|
158
|
-
* ```
|
|
159
|
-
*/
|
|
160
|
-
exportDOCXBySnapshotAsync(snapshot: IDocumentData): Promise<File | undefined>;
|
|
161
|
-
/**
|
|
162
|
-
* Export DOCX file by unit id
|
|
163
|
-
* @param unitId Unit id
|
|
164
|
-
* @returns XLSX file
|
|
165
|
-
*
|
|
166
|
-
* @example
|
|
167
|
-
* ```typescript
|
|
168
|
-
* const unitId = univerAPI.getActiveWorkbook().getId();
|
|
169
|
-
* const file = await univerAPI.exportDOCXByUnitIdAsync(unitId);
|
|
170
|
-
* univerAPI.downloadFile(file, 'univer', 'docx');
|
|
171
|
-
* ```
|
|
172
|
-
*/
|
|
173
|
-
exportDOCXByUnitIdAsync(unitId: string): Promise<File | undefined>;
|
|
174
|
-
/**
|
|
175
|
-
* Import PPTX file to unit id
|
|
176
|
-
* @param {string | File} file File path or file object
|
|
177
|
-
* @returns {Promise<string | undefined>} A promise that resolves to the unit id
|
|
178
|
-
*
|
|
179
|
-
* @example
|
|
180
|
-
* ```typescript
|
|
181
|
-
* // Accepts a File object
|
|
182
|
-
* const unitId = await univerAPI.importPPTXToUnitIdAsync(file);
|
|
183
|
-
* // Or accepts a URL to a remote file
|
|
184
|
-
* // const unitId = await univerAPI.importPPTXToUnitIdAsync('https://example.com/filename.pptx');
|
|
185
|
-
*
|
|
186
|
-
* const url = new URL(window.location.href);
|
|
187
|
-
* url.searchParams.set('unit', unitId);
|
|
188
|
-
* url.searchParams.set('type', "3"); // The meaning of "3" is String(UniverInstanceType.UNIVER_SLIDE)
|
|
189
|
-
*
|
|
190
|
-
* // Open the unit in the new window
|
|
191
|
-
* window.open(url.toString(), '_blank');
|
|
192
|
-
* ```
|
|
193
|
-
*/
|
|
194
|
-
importPPTXToUnitIdAsync(file: string | File): Promise<string | undefined>;
|
|
195
|
-
/**
|
|
196
|
-
* Import PPTX file to slide data
|
|
197
|
-
* @param {string | File} file File path or file object
|
|
198
|
-
* @returns {Promise<IExchangeSlideDocumentData | undefined>} A promise that resolves to the slide data
|
|
199
|
-
*
|
|
200
|
-
* @example
|
|
201
|
-
* ```typescript
|
|
202
|
-
* // Accepts a File object
|
|
203
|
-
* const snapshot = await univerAPI.importPPTXToSnapshotAsync(file);
|
|
204
|
-
* // Or accepts a URL to a remote file
|
|
205
|
-
* // const snapshot = await univerAPI.importPPTXToSnapshotAsync('https://example.com/filename.pptx');
|
|
206
|
-
* console.log('Snapshot created:', snapshot);
|
|
207
|
-
* ```
|
|
208
|
-
*/
|
|
209
|
-
importPPTXToSnapshotAsync(file: string | File): Promise<IExchangeSlideDocumentData | undefined>;
|
|
210
|
-
/**
|
|
211
|
-
* Export PPTX file by unit id
|
|
212
|
-
* @param {string} unitId Unit id
|
|
213
|
-
* @returns {Promise<File | undefined>} A promise that resolves to the PPTX file
|
|
214
|
-
*
|
|
215
|
-
* @example
|
|
216
|
-
* ```typescript
|
|
217
|
-
* const fPresentation = univerAPI.getActivePresentation();
|
|
218
|
-
* const unitId = fPresentation.getId();
|
|
219
|
-
* const file = await univerAPI.exportPPTXByUnitIdAsync(unitId);
|
|
220
|
-
*
|
|
221
|
-
* // Download the file
|
|
222
|
-
* univerAPI.downloadFile(file, 'univer', 'pptx');
|
|
223
|
-
* ```
|
|
224
|
-
*/
|
|
225
|
-
exportPPTXByUnitIdAsync(unitId: string): Promise<File | undefined>;
|
|
226
|
-
/**
|
|
227
|
-
* Export PPTX file by slide data
|
|
228
|
-
* @param {IExchangeSlideDocumentData} snapshot Slide data
|
|
229
|
-
* @returns {Promise<File | undefined>} A promise that resolves to the PPTX file
|
|
230
|
-
*
|
|
231
|
-
* @example
|
|
232
|
-
* ```typescript
|
|
233
|
-
* const snapshot = univerAPI.getActivePresentation().save();
|
|
234
|
-
* const file = await univerAPI.exportPPTXBySnapshotAsync(snapshot);
|
|
235
|
-
*
|
|
236
|
-
* // Download the file
|
|
237
|
-
* univerAPI.downloadFile(file, 'univer', 'pptx');
|
|
238
|
-
* ```
|
|
239
|
-
*/
|
|
240
|
-
exportPPTXBySnapshotAsync(snapshot: IExchangeSlideDocumentData): Promise<File | undefined>;
|
|
241
20
|
}
|
|
242
21
|
export declare class FUniverExchangeClientMixin extends FUniver implements IFUniverExchangeClientMixin {
|
|
243
|
-
/**
|
|
244
|
-
* Trigger a browser download for a file or blob.
|
|
245
|
-
*/
|
|
246
22
|
downloadFile(file: File | Blob, filename: string, fileExt: string): void;
|
|
247
|
-
/**
|
|
248
|
-
* Transform snapshot JSON to workbook data.
|
|
249
|
-
*/
|
|
250
|
-
transformSnapshotJsonToWorkbookDataAsync(json: ISnapshotBlockJsonResponse): Promise<IWorkbookData>;
|
|
251
|
-
/**
|
|
252
|
-
* Transform workbook data to snapshot JSON.
|
|
253
|
-
*/
|
|
254
|
-
transformWorkbookDataToSnapshotJsonAsync(workbookData: IWorkbookData): Promise<ISnapshotBlockJson>;
|
|
255
|
-
/**
|
|
256
|
-
* Import XLSX file to unit id
|
|
257
|
-
*/
|
|
258
|
-
importXLSXToUnitIdAsync(file: string | File): Promise<string | undefined>;
|
|
259
|
-
/**
|
|
260
|
-
* Import XLSX file to workbook data
|
|
261
|
-
*/
|
|
262
|
-
importXLSXToSnapshotAsync(file: string | File): Promise<IWorkbookData | undefined>;
|
|
263
|
-
/**
|
|
264
|
-
* Export XLSX file by unit id
|
|
265
|
-
*/
|
|
266
|
-
exportXLSXByUnitIdAsync(unitId: string): Promise<File | undefined>;
|
|
267
|
-
/**
|
|
268
|
-
* Export XLSX file by workbook data
|
|
269
|
-
*/
|
|
270
|
-
exportXLSXBySnapshotAsync(snapshot: IWorkbookData): Promise<File | undefined>;
|
|
271
|
-
/**
|
|
272
|
-
* Import DOCX file to unit id
|
|
273
|
-
*/
|
|
274
|
-
importDOCXToUnitIdAsync(file: string | File): Promise<string | undefined>;
|
|
275
|
-
/**
|
|
276
|
-
* Import DOCX file to document data
|
|
277
|
-
*/
|
|
278
|
-
importDOCXToSnapshotAsync(file: string | File): Promise<IDocumentData | undefined>;
|
|
279
|
-
exportDOCXBySnapshotAsync(snapshot: IDocumentData): Promise<File | undefined>;
|
|
280
|
-
exportDOCXByUnitIdAsync(unitId: string): Promise<File | undefined>;
|
|
281
|
-
/**
|
|
282
|
-
* Import PPTX file to unit id
|
|
283
|
-
*/
|
|
284
|
-
importPPTXToUnitIdAsync(file: string | File): Promise<string | undefined>;
|
|
285
|
-
/**
|
|
286
|
-
* Import PPTX file to slide data
|
|
287
|
-
*/
|
|
288
|
-
importPPTXToSnapshotAsync(file: string | File): Promise<IExchangeSlideDocumentData | undefined>;
|
|
289
|
-
/**
|
|
290
|
-
* Export PPTX file by unit id
|
|
291
|
-
*/
|
|
292
|
-
exportPPTXByUnitIdAsync(unitId: string): Promise<File | undefined>;
|
|
293
|
-
/**
|
|
294
|
-
* Export PPTX file by slide data
|
|
295
|
-
*/
|
|
296
|
-
exportPPTXBySnapshotAsync(snapshot: IExchangeSlideDocumentData): Promise<File | undefined>;
|
|
297
23
|
}
|
|
298
24
|
declare module '@univerjs/core/facade' {
|
|
299
25
|
interface FUniver extends IFUniverExchangeClientMixin {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import './global.css';
|
|
2
|
-
export type { IUniverExchangeClientOptions } from './config/config';
|
|
3
2
|
export { UniverExchangeClientPlugin } from './plugin';
|
|
4
3
|
export { IExchangeService } from './services/exchange.service';
|
|
5
4
|
export { IExchangeOperateService } from './services/operate.service';
|
|
5
|
+
export { ExchangeBaseExportMode, ExchangeBaseFormulaPolicy, ExchangeBaseImportMode, ExchangeFormat, ImportOutputType, } from './services/request.service';
|
|
6
|
+
export type { IExchangeBaseExportOption, IExchangeBaseImportOption, IExchangeExportOptions, IExchangeImportOptions, IExchangeSheetExportOption, IExchangeSheetImportOption, IExportRequest, IImportRequest, } from './services/request.service';
|
|
6
7
|
export { isCurrentUnitLoadedFromServer } from './services/utils/collaboration';
|
|
7
|
-
export
|
|
8
|
+
export { ClientSnapshotServerService, transformSheetBlockMetaToString, transformWorkbookSnapshotMetaToString, } from './services/utils/snapshot';
|
|
9
|
+
export type { ISnapshotBlockJson, ISnapshotBlockJsonResponse, ISnapshotJson, } from './services/utils/snapshot';
|
|
10
|
+
export { EXPORT_FORMAT_DIALOG } from './views/export-format-dialog/ExportFormatDialog';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { IDisposable, IDocumentData, IWorkbookData } from '@univerjs/core';
|
|
1
|
+
import type { IDisposable, UniverInstanceType } from '@univerjs/core';
|
|
3
2
|
import type { IError } from '@univerjs/protocol';
|
|
4
3
|
import type { Observable } from 'rxjs';
|
|
5
|
-
import type { RequestService } from './request.service';
|
|
6
|
-
import type {
|
|
7
|
-
import { Disposable, IConfigService
|
|
4
|
+
import type { ExchangeFormat, IExchangeExportOptions, IExchangeImportOptions, RequestService } from './request.service';
|
|
5
|
+
import type { ISnapshotBlockJson } from './utils/snapshot';
|
|
6
|
+
import { Disposable, IConfigService } from '@univerjs/core';
|
|
8
7
|
import { HTTPService } from '@univerjs/network';
|
|
9
8
|
export declare enum RequestState {
|
|
10
9
|
UPLOAD = 0,
|
|
@@ -25,68 +24,18 @@ export interface IExchangeService {
|
|
|
25
24
|
* Download a file in the browser.
|
|
26
25
|
*/
|
|
27
26
|
downloadFile(file: File | Blob, filename: string, fileExt: string): void;
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Transform workbook data to snapshot JSON.
|
|
34
|
-
*/
|
|
35
|
-
transformWorkbookDataToSnapshotJson(workbookData: IWorkbookData): Promise<ISnapshotBlockJson>;
|
|
36
|
-
/**
|
|
37
|
-
* Import XLSX file to workbook data
|
|
38
|
-
*/
|
|
39
|
-
importXLSXToSnapshot(file: File | string): Promise<IWorkbookData | undefined>;
|
|
40
|
-
/**
|
|
41
|
-
* Export XLSX file by unit id
|
|
42
|
-
*/
|
|
43
|
-
exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
|
|
44
|
-
/**
|
|
45
|
-
* Export XLSX file by workbook data
|
|
46
|
-
*/
|
|
47
|
-
exportXLSXBySnapshot(snapshot: IWorkbookData): Promise<File | undefined>;
|
|
48
|
-
/**
|
|
49
|
-
* Import DOCX file to document data
|
|
50
|
-
*/
|
|
51
|
-
importDOCXToSnapshot(file: File | string): Promise<IDocumentData | undefined>;
|
|
52
|
-
/**
|
|
53
|
-
* Export DOCX file by unit id
|
|
54
|
-
*/
|
|
55
|
-
exportDOCXByUnitId(unitId: string): Promise<File | undefined>;
|
|
56
|
-
/**
|
|
57
|
-
* Export DOCX file by document data
|
|
58
|
-
*/
|
|
59
|
-
exportDOCXBySnapshot(snapshot: IDocumentData): Promise<File | undefined>;
|
|
60
|
-
/**
|
|
61
|
-
* Import PPTX file to slide data
|
|
62
|
-
*/
|
|
63
|
-
importPPTXToSnapshot(file: File | string): Promise<IExchangeSlideDocumentData | undefined>;
|
|
64
|
-
/**
|
|
65
|
-
* Export PPTX file by unit id
|
|
66
|
-
*/
|
|
67
|
-
exportPPTXByUnitId(unitId: string): Promise<File | undefined>;
|
|
68
|
-
/**
|
|
69
|
-
* Export PPTX file by slide data
|
|
70
|
-
*/
|
|
71
|
-
exportPPTXBySnapshot(snapshot: IExchangeSlideDocumentData): Promise<File | undefined>;
|
|
72
|
-
/** Import PDF file to PDF unit data. */
|
|
73
|
-
importPDFToSnapshot(file: File | string): Promise<IPdfUnitData | undefined>;
|
|
74
|
-
/** Export PDF file by unit id. */
|
|
75
|
-
exportPDFByUnitId(unitId: string): Promise<File | undefined>;
|
|
76
|
-
/** Export PDF file by PDF unit data. */
|
|
77
|
-
exportPDFBySnapshot(snapshot: IPdfUnitData): Promise<File | undefined>;
|
|
27
|
+
/** Resolve and fetch one file artifact by protocol file id. */
|
|
28
|
+
getFileById(fileId: string, signal?: AbortSignal): Promise<File | undefined>;
|
|
29
|
+
exportFileByUnitId(unitId: string, univerType: UniverInstanceType, format: ExchangeFormat, options?: IExchangeExportOptions): Promise<File | undefined>;
|
|
30
|
+
exportFileBySnapshot(snapshot: ISnapshotBlockJson, univerType: UniverInstanceType, format: ExchangeFormat, options?: IExchangeExportOptions): Promise<File | undefined>;
|
|
78
31
|
/**
|
|
79
32
|
* Import file to unit id
|
|
80
33
|
*/
|
|
81
|
-
importFileToUnitId(file: File | string, univerType: UniverInstanceType): Promise<string | undefined>;
|
|
34
|
+
importFileToUnitId(file: File | string, univerType: UniverInstanceType, options?: IExchangeImportOptions): Promise<string | undefined>;
|
|
82
35
|
/**
|
|
83
36
|
* Import file to json without creating a unit
|
|
84
37
|
*/
|
|
85
|
-
importFileToJson<T = unknown>(file: File | string, univerType: UniverInstanceType): Promise<T | undefined>;
|
|
86
|
-
/**
|
|
87
|
-
* Import workbook data to unit id
|
|
88
|
-
*/
|
|
89
|
-
importWorkbookDataToUnitId(snapshot: IWorkbookData): Promise<string | undefined>;
|
|
38
|
+
importFileToJson<T = unknown>(file: File | string, univerType: UniverInstanceType, options?: IExchangeImportOptions): Promise<T | undefined>;
|
|
90
39
|
interruptImportTask(): void;
|
|
91
40
|
}
|
|
92
41
|
export declare const IExchangeService: import("@wendellhu/redi").IdentifierDecorator<IExchangeService>;
|
|
@@ -100,23 +49,11 @@ export declare class ExchangeService extends Disposable implements IExchangeServ
|
|
|
100
49
|
constructor(_configService: IConfigService, _httpService: HTTPService, _requestService: RequestService);
|
|
101
50
|
dispose(): void;
|
|
102
51
|
downloadFile(file: File | Blob, filename: string, fileExt: string): void;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
importPPTXToSnapshot(file: File | string): Promise<IExchangeSlideDocumentData | undefined>;
|
|
109
|
-
exportPPTXByUnitId(unitId: string): Promise<File | undefined>;
|
|
110
|
-
exportPPTXBySnapshot(data: IExchangeSlideDocumentData): Promise<File | undefined>;
|
|
111
|
-
importPDFToSnapshot(file: File | string): Promise<IPdfUnitData | undefined>;
|
|
112
|
-
exportPDFByUnitId(unitId: string): Promise<File | undefined>;
|
|
113
|
-
exportPDFBySnapshot(data: IPdfUnitData): Promise<File | undefined>;
|
|
114
|
-
importXLSXToSnapshot(file: File | string): Promise<IWorkbookData | undefined>;
|
|
115
|
-
exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
|
|
116
|
-
exportXLSXBySnapshot(data: IWorkbookData): Promise<File | undefined>;
|
|
117
|
-
importFileToUnitId(file: File | string, univerType: UniverInstanceType): Promise<string | undefined>;
|
|
118
|
-
importFileToJson<T = unknown>(file: File | string, univerType: UniverInstanceType): Promise<T | undefined>;
|
|
119
|
-
importWorkbookDataToUnitId(snapshot: IWorkbookData): Promise<string | undefined>;
|
|
52
|
+
getFileById(fileId: string, signal?: AbortSignal): Promise<File | undefined>;
|
|
53
|
+
importFileToUnitId(file: File | string, univerType: UniverInstanceType, options?: IExchangeImportOptions): Promise<string | undefined>;
|
|
54
|
+
importFileToJson<T = unknown>(file: File | string, univerType: UniverInstanceType, options?: IExchangeImportOptions): Promise<T | undefined>;
|
|
55
|
+
exportFileByUnitId(unitId: string, univerType: UniverInstanceType, format: ExchangeFormat, options?: IExchangeExportOptions): Promise<File | undefined>;
|
|
56
|
+
exportFileBySnapshot(snapshot: ISnapshotBlockJson, univerType: UniverInstanceType, format: ExchangeFormat, options?: IExchangeExportOptions): Promise<File | undefined>;
|
|
120
57
|
interruptImportTask(): void;
|
|
121
58
|
private _importToJson;
|
|
122
59
|
/**
|
|
@@ -131,8 +68,4 @@ export declare class ExchangeService extends Disposable implements IExchangeServ
|
|
|
131
68
|
private _import;
|
|
132
69
|
private _signUrl;
|
|
133
70
|
private _getDownloadEndpointURL;
|
|
134
|
-
private _getMinSheetRowCount;
|
|
135
|
-
private _getMinSheetColumnCount;
|
|
136
|
-
private _getDisableCellImageConversion;
|
|
137
|
-
private _getIgnoreTableExport;
|
|
138
71
|
}
|