@univerjs-pro/exchange-client 1.0.0-alpha.7 → 1.0.0-beta.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/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 +42 -4
- 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 +6 -4
- package/lib/types/locale/en-US.d.ts +1 -0
- package/lib/types/services/exchange.service.d.ts +12 -89
- package/lib/types/services/operate.service.d.ts +20 -110
- package/lib/types/services/request.service.d.ts +78 -10
- package/lib/types/services/utils/collaboration.d.ts +2 -0
- package/lib/types/services/utils/content-type.d.ts +6 -2
- package/lib/types/services/utils/snapshot.d.ts +12 -45
- package/lib/types/services/utils/tool.d.ts +1 -7
- 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 -11
- package/lib/types/views/UploadNotificationContainer.d.ts +0 -1
package/lib/locale/ru-RU.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x50a3bf=_0x5dd2;(function(_0x447a74,_0x4e9c0c){const _0x1ea970=_0x5dd2,_0x472d73=_0x447a74();while(!![]){try{const _0x128599=-parseInt(_0x1ea970(0x15f))/0x1*(-parseInt(_0x1ea970(0x16e))/0x2)+-parseInt(_0x1ea970(0x16a))/0x3*(-parseInt(_0x1ea970(0x169))/0x4)+parseInt(_0x1ea970(0x15d))/0x5+-parseInt(_0x1ea970(0x168))/0x6+-parseInt(_0x1ea970(0x163))/0x7*(parseInt(_0x1ea970(0x16d))/0x8)+parseInt(_0x1ea970(0x15b))/0x9+-parseInt(_0x1ea970(0x16c))/0xa*(parseInt(_0x1ea970(0x164))/0xb);if(_0x128599===_0x4e9c0c)break;else _0x472d73['push'](_0x472d73['shift']());}catch(_0x4dd21a){_0x472d73['push'](_0x472d73['shift']());}}}(_0x1fa7,0xe9bd2));function _0x5dd2(_0x14c9f6,_0x10c876){_0x14c9f6=_0x14c9f6-0x158;const _0x1fa796=_0x1fa7();let _0x5dd268=_0x1fa796[_0x14c9f6];return _0x5dd268;}function _0x1fa7(){const _0x5be65a=['2956840mPeufL','578440RkoWvM','Отмена','Сетевое\x20соединение\x20было\x20прервано,\x20и\x20загрузка\x20файла\x20не\x20удалась','Скачивание\x20успешно','Загрузка','Выбранный\x20файл\x20[{0}]\x20не\x20поддерживается\x20для\x20загрузки','10566468kMxVpk','Неизвестная\x20ошибка','7020895OXgPUn','Внутренняя\x20неизвестная\x20ошибка','4HsARiC','{0}\x20файл(ов)\x20успешно\x20загружен(о)','Скачивание','Подтвердить','35nZukAY','9795478MNWFuX','Пожалуйста,\x20подождите...','Сетевая\x20ошибка','Загрузить\x20снова','6018480nZFPuP','175252SZjnpd','66ZWRIGR','Файл\x20успешно\x20загружен','10EYSxxx'];_0x1fa7=function(){return _0x5be65a;};return _0x1fa7();}const e={'exchange-client':{'uploading':_0x50a3bf(0x159),'uploadSuccess':_0x50a3bf(0x16b),'uploadSuccessTip':_0x50a3bf(0x160),'downloading':_0x50a3bf(0x161),'downloadSuccess':_0x50a3bf(0x158),'unknownMistake':_0x50a3bf(0x15c),'networkError':_0x50a3bf(0x166),'tooLarge':'Данные\x20слишком\x20большие','internalError':_0x50a3bf(0x15e),'interrupt':_0x50a3bf(0x170),'fileTypeError':_0x50a3bf(0x15a),'wait':_0x50a3bf(0x165),'cancel':_0x50a3bf(0x16f),'confirm':_0x50a3bf(0x162),'uploadAgain':_0x50a3bf(0x167)}};export{e as default};
|
package/lib/locale/sk-SK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x13b4dc=_0x1693;function _0x32a4(){const _0x589467=['Vybraný\x20súbor\x20[{0}]\x20nie\x20je\x20podporovaný\x20na\x20nahrávanie','Dáta\x20sú\x20príliš\x20veľké','6918PJEUjA','1910095FSrBpk','572868VrHdsN','5253072maTTIm','Nahrať\x20znova','12430530PjllwJ','Nahrávanie','Prosím\x20počkajte...','Neznáma\x20chyba','48600vlTnqs','Úspešne\x20nahraných\x20{0}\x20súborov','Interná\x20neznáma\x20chyba','Sťahovanie\x20úspešné','343314IhDUWv','Potvrdiť','Súbor\x20bol\x20úspešne\x20nahraný','4739mzWPZw','8xjygVZ','Sieťová\x20chyba'];_0x32a4=function(){return _0x589467;};return _0x32a4();}function _0x1693(_0x5675db,_0x2fbce4){_0x5675db=_0x5675db-0x11b;const _0x32a47f=_0x32a4();let _0x1693cc=_0x32a47f[_0x5675db];return _0x1693cc;}(function(_0x50d5ab,_0x59fe05){const _0x3d43c1=_0x1693,_0xb8c87d=_0x50d5ab();while(!![]){try{const _0x1404a0=parseInt(_0x3d43c1(0x126))/0x1+-parseInt(_0x3d43c1(0x120))/0x2*(parseInt(_0x3d43c1(0x11c))/0x3)+-parseInt(_0x3d43c1(0x12d))/0x4+parseInt(_0x3d43c1(0x125))/0x5+-parseInt(_0x3d43c1(0x124))/0x6*(parseInt(_0x3d43c1(0x11f))/0x7)+-parseInt(_0x3d43c1(0x127))/0x8+parseInt(_0x3d43c1(0x129))/0x9;if(_0x1404a0===_0x59fe05)break;else _0xb8c87d['push'](_0xb8c87d['shift']());}catch(_0x164251){_0xb8c87d['push'](_0xb8c87d['shift']());}}}(_0x32a4,0x68b8c));const e={'exchange-client':{'uploading':_0x13b4dc(0x12a),'uploadSuccess':_0x13b4dc(0x11e),'uploadSuccessTip':_0x13b4dc(0x12e),'downloading':'Sťahovanie','downloadSuccess':_0x13b4dc(0x11b),'unknownMistake':_0x13b4dc(0x12c),'networkError':_0x13b4dc(0x121),'tooLarge':_0x13b4dc(0x123),'internalError':_0x13b4dc(0x12f),'interrupt':'Sieťové\x20pripojenie\x20bolo\x20prerušené\x20a\x20nahrávanie\x20súboru\x20zlyhalo','fileTypeError':_0x13b4dc(0x122),'wait':_0x13b4dc(0x12b),'cancel':'Zrušiť','confirm':_0x13b4dc(0x11d),'uploadAgain':_0x13b4dc(0x128)}};export{e as default};
|
package/lib/locale/vi-VN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x33e11e=_0x3e28;function _0x3e28(_0x22cf86,_0x40e9e8){_0x22cf86=_0x22cf86-0xbc;const _0x2700ec=_0x2700();let _0x3e2847=_0x2700ec[_0x22cf86];return _0x3e2847;}function _0x2700(){const _0x418751=['6kUcCcf','Lỗi\x20không\x20xác\x20định','44QXpFsg','10099054TUpKCO','Kết\x20nối\x20mạng\x20bị\x20gián\x20đoạn,\x20tải\x20lên\x20tệp\x20thất\x20bại','73572FQIIBF','280WSSlPl','Luồng\x20dữ\x20liệu\x20quá\x20lớn','10766264ZJAuCU','20390nCNeBp','14yviyhe','Đang\x20tải\x20xuống','Tải\x20lên\x20tệp\x20thành\x20công','115558sdWYQq','8974692TbMhZN','2804108EMoKlV','Tệp\x20được\x20chọn\x20[{0}]\x20không\x20được\x20hỗ\x20trợ\x20để\x20tải\x20lên','Tải\x20lên\x20lại','Đang\x20tải\x20lên','9YsmUFX','Tải\x20xuống\x20thành\x20công'];_0x2700=function(){return _0x418751;};return _0x2700();}(function(_0x3bb7be,_0x5135ef){const _0x116363=_0x3e28,_0x58d87f=_0x3bb7be();while(!![]){try{const _0x4616f7=parseInt(_0x116363(0xbe))/0x1*(parseInt(_0x116363(0xd0))/0x2)+-parseInt(_0x116363(0xc6))/0x3*(parseInt(_0x116363(0xc0))/0x4)+-parseInt(_0x116363(0xcc))/0x5*(-parseInt(_0x116363(0xcb))/0x6)+-parseInt(_0x116363(0xc9))/0x7+parseInt(_0x116363(0xce))/0x8*(parseInt(_0x116363(0xc4))/0x9)+-parseInt(_0x116363(0xcf))/0xa*(-parseInt(_0x116363(0xc8))/0xb)+parseInt(_0x116363(0xbf))/0xc;if(_0x4616f7===_0x5135ef)break;else _0x58d87f['push'](_0x58d87f['shift']());}catch(_0x12dae2){_0x58d87f['push'](_0x58d87f['shift']());}}}(_0x2700,0xb7bf8));const e={'exchange-client':{'uploading':_0x33e11e(0xc3),'uploadSuccess':_0x33e11e(0xbd),'uploadSuccessTip':'{0}\x20tệp\x20đã\x20được\x20tải\x20lên\x20thành\x20công','downloading':_0x33e11e(0xbc),'downloadSuccess':_0x33e11e(0xc5),'unknownMistake':_0x33e11e(0xc7),'networkError':'Lỗi\x20mạng','tooLarge':_0x33e11e(0xcd),'internalError':'Lỗi\x20không\x20xác\x20định\x20bên\x20trong','interrupt':_0x33e11e(0xca),'fileTypeError':_0x33e11e(0xc1),'wait':'Vui\x20lòng\x20đợi...','cancel':'Hủy\x20bỏ','confirm':'Xác\x20nhận','uploadAgain':_0x33e11e(0xc2)}};export{e as default};
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x4db0c3=_0x33c7;(function(_0x292073,_0x59ab55){const _0x2e5134=_0x33c7,_0x5917f0=_0x292073();while(!![]){try{const _0x2a5830=-parseInt(_0x2e5134(0x176))/0x1+-parseInt(_0x2e5134(0x174))/0x2*(-parseInt(_0x2e5134(0x168))/0x3)+parseInt(_0x2e5134(0x170))/0x4*(parseInt(_0x2e5134(0x171))/0x5)+-parseInt(_0x2e5134(0x172))/0x6*(-parseInt(_0x2e5134(0x175))/0x7)+-parseInt(_0x2e5134(0x167))/0x8*(parseInt(_0x2e5134(0x178))/0x9)+-parseInt(_0x2e5134(0x16f))/0xa+parseInt(_0x2e5134(0x16e))/0xb;if(_0x2a5830===_0x59ab55)break;else _0x5917f0['push'](_0x5917f0['shift']());}catch(_0x54142f){_0x5917f0['push'](_0x5917f0['shift']());}}}(_0x467b,0x8a010));function _0x33c7(_0x60a3c6,_0x3671f5){_0x60a3c6=_0x60a3c6-0x166;const _0x467bba=_0x467b();let _0x33c768=_0x467bba[_0x60a3c6];return _0x33c768;}const e={'exchange-client':{'uploading':_0x4db0c3(0x16d),'uploadSuccess':_0x4db0c3(0x16b),'uploadSuccessTip':'{0}个文件上传成功','downloading':_0x4db0c3(0x16a),'downloadSuccess':_0x4db0c3(0x179),'unknownMistake':_0x4db0c3(0x16c),'networkError':_0x4db0c3(0x166),'tooLarge':'数据流过大','internalError':_0x4db0c3(0x169),'interrupt':'网络连接中断,文件上传失败','fileTypeError':'所选文件\x20[{0}]\x20不支持上传','wait':_0x4db0c3(0x177),'cancel':'取消','confirm':'确认','uploadAgain':_0x4db0c3(0x173)}};function _0x467b(){const _0x317547=['内部未知错误','下载中','文件上传成功','未知错误','上传中','18505718PLrHjB','1818830XgVONy','32huASvD','289440qKnRRW','6dKFdqY','再次上传','167058yEgryU','73325VeYnww','1060399FePBDr','请稍等...','99zLqCXU','下载成功','网络异常','800096WVUqNH','27MZDjIc'];_0x467b=function(){return _0x317547;};return _0x467b();}export{e as default};
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x1a38(_0x2be3a4,_0x151359){_0x2be3a4=_0x2be3a4-0x6f;const _0x55230f=_0x5523();let _0x1a38ae=_0x55230f[_0x2be3a4];return _0x1a38ae;}const _0x5c3680=_0x1a38;function _0x5523(){const _0x457f2b=['檔案上傳成功','1119203jyYDHi','5309220DsNWbS','上傳中','34294120sYTDSm','27ItJWQO','{0}個檔案上傳成功','內部未知錯誤','再次上傳','9677563euzjWq','4664vJfdUs','3350355UvVSed','網絡異常','資料流過大','319053cZsBuf','2Cfjiyf','請稍等...','所選檔案\x20[{0}]\x20不支援上傳','16gxAKEm'];_0x5523=function(){return _0x457f2b;};return _0x5523();}(function(_0x3934cf,_0xa203c6){const _0x41989d=_0x1a38,_0x14121b=_0x3934cf();while(!![]){try{const _0x4fd564=parseInt(_0x41989d(0x7f))/0x1*(-parseInt(_0x41989d(0x7a))/0x2)+parseInt(_0x41989d(0x79))/0x3*(-parseInt(_0x41989d(0x7d))/0x4)+-parseInt(_0x41989d(0x76))/0x5+parseInt(_0x41989d(0x80))/0x6+-parseInt(_0x41989d(0x74))/0x7+parseInt(_0x41989d(0x75))/0x8*(parseInt(_0x41989d(0x70))/0x9)+parseInt(_0x41989d(0x6f))/0xa;if(_0x4fd564===_0xa203c6)break;else _0x14121b['push'](_0x14121b['shift']());}catch(_0x39debb){_0x14121b['push'](_0x14121b['shift']());}}}(_0x5523,0xaf7fc));const e={'exchange-client':{'uploading':_0x5c3680(0x81),'uploadSuccess':_0x5c3680(0x7e),'uploadSuccessTip':_0x5c3680(0x71),'downloading':'下載中','downloadSuccess':'下載成功','unknownMistake':'未知錯誤','networkError':_0x5c3680(0x77),'tooLarge':_0x5c3680(0x78),'internalError':_0x5c3680(0x72),'interrupt':'網絡連線中斷,檔案上傳失敗','fileTypeError':_0x5c3680(0x7c),'wait':_0x5c3680(0x7b),'cancel':'取消','confirm':'確認','uploadAgain':_0x5c3680(0x73)}};export{e as default};
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x59871b=_0x4184;(function(_0x387261,_0x36f0ad){const _0x88377c=_0x4184,_0x25ee60=_0x387261();while(!![]){try{const _0x3c2472=-parseInt(_0x88377c(0x173))/0x1+parseInt(_0x88377c(0x16c))/0x2*(parseInt(_0x88377c(0x169))/0x3)+parseInt(_0x88377c(0x171))/0x4*(parseInt(_0x88377c(0x16f))/0x5)+parseInt(_0x88377c(0x164))/0x6+parseInt(_0x88377c(0x16d))/0x7*(-parseInt(_0x88377c(0x170))/0x8)+parseInt(_0x88377c(0x163))/0x9*(parseInt(_0x88377c(0x166))/0xa)+parseInt(_0x88377c(0x16e))/0xb*(parseInt(_0x88377c(0x168))/0xc);if(_0x3c2472===_0x36f0ad)break;else _0x25ee60['push'](_0x25ee60['shift']());}catch(_0x3df55c){_0x25ee60['push'](_0x25ee60['shift']());}}}(_0x459e,0x9c9dd));function _0x4184(_0x448fbd,_0xac0582){_0x448fbd=_0x448fbd-0x161;const _0x459e2a=_0x459e();let _0x418477=_0x459e2a[_0x448fbd];return _0x418477;}const e={'exchange-client':{'uploading':_0x59871b(0x162),'uploadSuccess':_0x59871b(0x16b),'uploadSuccessTip':_0x59871b(0x165),'downloading':_0x59871b(0x16a),'downloadSuccess':'下載成功','unknownMistake':'未知錯誤','networkError':'網路異常','tooLarge':'資料流過大','internalError':_0x59871b(0x172),'interrupt':_0x59871b(0x167),'fileTypeError':'所選檔案\x20[{0}]\x20不支援上傳','wait':'請稍等...','cancel':'取消','confirm':'確認','uploadAgain':_0x59871b(0x161)}};function _0x459e(){const _0x4c7b8a=['{0}個檔案上傳成功','150090cYCZzO','網路連線中斷,檔案上傳失敗','1272YAOliS','6wotKvu','下載中','檔案上傳成功','443314ZgHQuM','10598djEJNQ','46871okewol','146835vuzDhw','2584zXXTBo','56FDaTOR','內部未知錯誤','776906qpgvRh','再次上傳','上傳中','189heWHbb','1716732bSdocy'];_0x459e=function(){return _0x4c7b8a;};return _0x459e();}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,8 +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';
|
|
6
|
-
export {
|
|
7
|
-
export type {
|
|
8
|
-
export {
|
|
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';
|
|
7
|
+
export { isCurrentUnitLoadedFromServer } from './services/utils/collaboration';
|
|
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,9 +1,9 @@
|
|
|
1
|
-
import type { IDisposable,
|
|
1
|
+
import type { IDisposable, UniverInstanceType } from '@univerjs/core';
|
|
2
2
|
import type { IError } from '@univerjs/protocol';
|
|
3
3
|
import type { Observable } from 'rxjs';
|
|
4
|
-
import type { RequestService } from './request.service';
|
|
5
|
-
import type {
|
|
6
|
-
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';
|
|
7
7
|
import { HTTPService } from '@univerjs/network';
|
|
8
8
|
export declare enum RequestState {
|
|
9
9
|
UPLOAD = 0,
|
|
@@ -24,79 +24,16 @@ export interface IExchangeService {
|
|
|
24
24
|
* Download a file in the browser.
|
|
25
25
|
*/
|
|
26
26
|
downloadFile(file: File | Blob, filename: string, fileExt: string): void;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
transformSnapshotJsonToWorkbookData(json: ISnapshotBlockJsonResponse): Promise<IWorkbookData>;
|
|
31
|
-
/**
|
|
32
|
-
* Transform workbook data to snapshot JSON.
|
|
33
|
-
*/
|
|
34
|
-
transformWorkbookDataToSnapshotJson(workbookData: IWorkbookData): Promise<ISnapshotBlockJson>;
|
|
35
|
-
/**
|
|
36
|
-
* Import XLSX file to workbook data
|
|
37
|
-
* @param file
|
|
38
|
-
*/
|
|
39
|
-
importXLSXToSnapshot(file: File | string): Promise<IWorkbookData | undefined>;
|
|
40
|
-
/**
|
|
41
|
-
* Export XLSX file by unit id
|
|
42
|
-
* @param unitId
|
|
43
|
-
*/
|
|
44
|
-
exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
|
|
45
|
-
/**
|
|
46
|
-
* Export XLSX file by workbook data
|
|
47
|
-
* @param snapshot
|
|
48
|
-
* @returns
|
|
49
|
-
*/
|
|
50
|
-
exportXLSXBySnapshot(snapshot: IWorkbookData): Promise<File | undefined>;
|
|
51
|
-
/**
|
|
52
|
-
* Import DOCX file to document data
|
|
53
|
-
* @param file
|
|
54
|
-
*/
|
|
55
|
-
importDOCXToSnapshot(file: File | string): Promise<IDocumentData | undefined>;
|
|
56
|
-
/**
|
|
57
|
-
* Export DOCX file by unit id
|
|
58
|
-
* @param unitId
|
|
59
|
-
*/
|
|
60
|
-
exportDOCXByUnitId(unitId: string): Promise<File | undefined>;
|
|
61
|
-
/**
|
|
62
|
-
* Export DOCX file by document data
|
|
63
|
-
* @param snapshot
|
|
64
|
-
* @returns Exported DOCX file
|
|
65
|
-
*/
|
|
66
|
-
exportDOCXBySnapshot(snapshot: IDocumentData): Promise<File | undefined>;
|
|
67
|
-
/**
|
|
68
|
-
* Import PPTX file to slide data
|
|
69
|
-
* @param file
|
|
70
|
-
*/
|
|
71
|
-
importPPTXToSnapshot(file: File | string): Promise<IExchangeSlideDocumentData | undefined>;
|
|
72
|
-
/**
|
|
73
|
-
* Export PPTX file by unit id
|
|
74
|
-
* @param unitId
|
|
75
|
-
*/
|
|
76
|
-
exportPPTXByUnitId(unitId: string): Promise<File | undefined>;
|
|
77
|
-
/**
|
|
78
|
-
* Export PPTX file by slide data
|
|
79
|
-
* @param snapshot
|
|
80
|
-
* @returns Exported PPTX file
|
|
81
|
-
*/
|
|
82
|
-
exportPPTXBySnapshot(snapshot: IExchangeSlideDocumentData): Promise<File | undefined>;
|
|
27
|
+
exportFileByUnitId(unitId: string, univerType: UniverInstanceType, format: ExchangeFormat, options?: IExchangeExportOptions): Promise<File | undefined>;
|
|
28
|
+
exportFileBySnapshot(snapshot: ISnapshotBlockJson, univerType: UniverInstanceType, format: ExchangeFormat, options?: IExchangeExportOptions): Promise<File | undefined>;
|
|
83
29
|
/**
|
|
84
30
|
* Import file to unit id
|
|
85
|
-
* @param file
|
|
86
|
-
* @param univerType
|
|
87
31
|
*/
|
|
88
|
-
importFileToUnitId(file: File | string, univerType: UniverInstanceType): Promise<string | undefined>;
|
|
32
|
+
importFileToUnitId(file: File | string, univerType: UniverInstanceType, options?: IExchangeImportOptions): Promise<string | undefined>;
|
|
89
33
|
/**
|
|
90
34
|
* Import file to json without creating a unit
|
|
91
|
-
* @param file
|
|
92
|
-
* @param univerType
|
|
93
|
-
*/
|
|
94
|
-
importFileToJson<T = unknown>(file: File | string, univerType: UniverInstanceType): Promise<T | undefined>;
|
|
95
|
-
/**
|
|
96
|
-
* Import workbook data to unit id
|
|
97
|
-
* @param snapshot
|
|
98
35
|
*/
|
|
99
|
-
|
|
36
|
+
importFileToJson<T = unknown>(file: File | string, univerType: UniverInstanceType, options?: IExchangeImportOptions): Promise<T | undefined>;
|
|
100
37
|
interruptImportTask(): void;
|
|
101
38
|
}
|
|
102
39
|
export declare const IExchangeService: import("@wendellhu/redi").IdentifierDecorator<IExchangeService>;
|
|
@@ -110,20 +47,10 @@ export declare class ExchangeService extends Disposable implements IExchangeServ
|
|
|
110
47
|
constructor(_configService: IConfigService, _httpService: HTTPService, _requestService: RequestService);
|
|
111
48
|
dispose(): void;
|
|
112
49
|
downloadFile(file: File | Blob, filename: string, fileExt: string): void;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
exportDOCXBySnapshot(data: IDocumentData): Promise<File | undefined>;
|
|
118
|
-
importPPTXToSnapshot(file: File | string): Promise<IExchangeSlideDocumentData | undefined>;
|
|
119
|
-
exportPPTXByUnitId(unitId: string): Promise<File | undefined>;
|
|
120
|
-
exportPPTXBySnapshot(data: IExchangeSlideDocumentData): Promise<File | undefined>;
|
|
121
|
-
importXLSXToSnapshot(file: File | string): Promise<IWorkbookData | undefined>;
|
|
122
|
-
exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
|
|
123
|
-
exportXLSXBySnapshot(data: IWorkbookData): Promise<File | undefined>;
|
|
124
|
-
importFileToUnitId(file: File | string, univerType: UniverInstanceType): Promise<string | undefined>;
|
|
125
|
-
importFileToJson<T = unknown>(file: File | string, univerType: UniverInstanceType): Promise<T | undefined>;
|
|
126
|
-
importWorkbookDataToUnitId(snapshot: IWorkbookData): Promise<string | undefined>;
|
|
50
|
+
importFileToUnitId(file: File | string, univerType: UniverInstanceType, options?: IExchangeImportOptions): Promise<string | undefined>;
|
|
51
|
+
importFileToJson<T = unknown>(file: File | string, univerType: UniverInstanceType, options?: IExchangeImportOptions): Promise<T | undefined>;
|
|
52
|
+
exportFileByUnitId(unitId: string, univerType: UniverInstanceType, format: ExchangeFormat, options?: IExchangeExportOptions): Promise<File | undefined>;
|
|
53
|
+
exportFileBySnapshot(snapshot: ISnapshotBlockJson, univerType: UniverInstanceType, format: ExchangeFormat, options?: IExchangeExportOptions): Promise<File | undefined>;
|
|
127
54
|
interruptImportTask(): void;
|
|
128
55
|
private _importToJson;
|
|
129
56
|
/**
|
|
@@ -138,8 +65,4 @@ export declare class ExchangeService extends Disposable implements IExchangeServ
|
|
|
138
65
|
private _import;
|
|
139
66
|
private _signUrl;
|
|
140
67
|
private _getDownloadEndpointURL;
|
|
141
|
-
private _getMinSheetRowCount;
|
|
142
|
-
private _getMinSheetColumnCount;
|
|
143
|
-
private _getDisableCellImageConversion;
|
|
144
|
-
private _getIgnoreTableExport;
|
|
145
68
|
}
|