@univerjs-pro/exchange-client 0.5.0-nightly.202411120616 → 0.5.0-nightly.202411131606

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.
Files changed (54) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +2 -2
  3. package/lib/cjs/locale/en-US.js +1 -1
  4. package/lib/cjs/locale/fa-IR.js +1 -1
  5. package/lib/cjs/locale/ru-RU.js +1 -1
  6. package/lib/cjs/locale/vi-VN.js +1 -1
  7. package/lib/cjs/locale/zh-CN.js +1 -1
  8. package/lib/cjs/locale/zh-TW.js +1 -1
  9. package/lib/es/facade.js +1 -1
  10. package/lib/es/index.js +2 -2
  11. package/lib/es/locale/en-US.js +1 -1
  12. package/lib/es/locale/fa-IR.js +1 -1
  13. package/lib/es/locale/ru-RU.js +1 -1
  14. package/lib/es/locale/vi-VN.js +1 -1
  15. package/lib/es/locale/zh-CN.js +1 -1
  16. package/lib/es/locale/zh-TW.js +1 -1
  17. package/lib/types/controllers/config.schema.d.ts +16 -0
  18. package/lib/types/controllers/exchange.controller.d.ts +8 -0
  19. package/lib/types/facade/f-univer.d.ts +36 -0
  20. package/lib/types/facade/index.d.ts +1 -0
  21. package/lib/types/index.d.ts +10 -483
  22. package/lib/types/locale/en-US.d.ts +3 -0
  23. package/lib/types/locale/fa-IR.d.ts +3 -0
  24. package/lib/types/locale/ru-RU.d.ts +3 -0
  25. package/lib/types/locale/vi-VN.d.ts +3 -0
  26. package/lib/types/locale/zh-CN.d.ts +21 -0
  27. package/lib/types/locale/zh-TW.d.ts +3 -0
  28. package/lib/types/plugin.d.ts +11 -0
  29. package/lib/types/services/__tests__/snapshot.spec.d.ts +1 -0
  30. package/lib/types/services/exchange.service.d.ts +87 -0
  31. package/lib/types/services/operate.service.d.ts +121 -0
  32. package/lib/types/services/request.service.d.ts +107 -0
  33. package/lib/types/services/upload-notification.service.d.ts +52 -0
  34. package/lib/types/services/utils/snapshot.d.ts +76 -0
  35. package/lib/types/services/utils/tool.d.ts +19 -0
  36. package/lib/types/views/UploadNotificationContainer.d.ts +2 -0
  37. package/lib/types/views/link-list/LinkList.d.ts +6 -0
  38. package/lib/types/views/upload-again/UploadAgain.d.ts +2 -0
  39. package/lib/types/views/upload-button/UploadButton.d.ts +7 -0
  40. package/lib/types/views/upload-error/UploadError.d.ts +2 -0
  41. package/lib/types/views/upload-notification/UploadNotification.d.ts +2 -0
  42. package/lib/types/views/upload-success/UploadSuccess.d.ts +5 -0
  43. package/lib/types/views/uploading/Uploading.d.ts +2 -0
  44. package/lib/types/views/uploading/upload-cancel/UploadCancel.d.ts +2 -0
  45. package/lib/types/views/uploading/upload-progress/UploadProgress.d.ts +5 -0
  46. package/lib/umd/facade.js +1 -1
  47. package/lib/umd/index.js +2 -2
  48. package/lib/umd/locale/en-US.js +1 -1
  49. package/lib/umd/locale/fa-IR.js +1 -1
  50. package/lib/umd/locale/ru-RU.js +1 -1
  51. package/lib/umd/locale/vi-VN.js +1 -1
  52. package/lib/umd/locale/zh-CN.js +1 -1
  53. package/lib/umd/locale/zh-TW.js +1 -1
  54. package/package.json +6 -6
@@ -1 +1 @@
1
- const _0x162408=_0x1c05;(function(_0x2cf0dc,_0x373349){const _0x2f5c4e=_0x1c05,_0x202957=_0x2cf0dc();while(!![]){try{const _0x3a1652=parseInt(_0x2f5c4e(0x87))/0x1+-parseInt(_0x2f5c4e(0x95))/0x2+-parseInt(_0x2f5c4e(0x91))/0x3*(parseInt(_0x2f5c4e(0x8f))/0x4)+parseInt(_0x2f5c4e(0x94))/0x5+parseInt(_0x2f5c4e(0x88))/0x6*(-parseInt(_0x2f5c4e(0x8d))/0x7)+parseInt(_0x2f5c4e(0x93))/0x8+parseInt(_0x2f5c4e(0x99))/0x9;if(_0x3a1652===_0x373349)break;else _0x202957['push'](_0x202957['shift']());}catch(_0x4b4ecf){_0x202957['push'](_0x202957['shift']());}}}(_0x4550,0x77222));const e={'exchange':{'file':'File','upload':'Open(File)','download':_0x162408(0x8b),'uploading':_0x162408(0x8a),'uploadSuccess':_0x162408(0x8e),'uploadSuccessTip':_0x162408(0x97),'downloading':'Downloading','downloadSuccess':_0x162408(0x89),'unknownMistake':'Unknown\x20mistake','networkError':'Network\x20error','tooLarge':'Data\x20is\x20too\x20large','internalError':_0x162408(0x98),'interrupt':_0x162408(0x8c),'wait':_0x162408(0x90),'cancel':_0x162408(0x96),'uploadAgain':_0x162408(0x92)}};function _0x1c05(_0x36fad8,_0x38f225){const _0x4550b4=_0x4550();return _0x1c05=function(_0x1c05cb,_0x2cbe99){_0x1c05cb=_0x1c05cb-0x87;let _0x3f5d39=_0x4550b4[_0x1c05cb];return _0x3f5d39;},_0x1c05(_0x36fad8,_0x38f225);}export{e as default};function _0x4550(){const _0x322cbb=['703888FKZPqn','3942zlgloZ','Download\x20success','Uploading','Save\x20As','The\x20network\x20connection\x20was\x20interrupted\x20and\x20the\x20file\x20upload\x20failed.','8974idBReJ','File\x20uploaded\x20successfully','52wFvLco','Please\x20wait...','137169MQrMhy','Upload\x20again','3819456kgsPPh','1983685RMbTad','900126Fjizfn','Cancel','{0}\x20file(s)\x20uploaded\x20successfully','Internal\x20unknown\x20error','7169841LuOPpF'];_0x4550=function(){return _0x322cbb;};return _0x4550();}
1
+ const _0x3bc735=_0x1ada;(function(_0x3ba37a,_0x35ac46){const _0xd88960=_0x1ada,_0x30c77e=_0x3ba37a();while(!![]){try{const _0x349236=-parseInt(_0xd88960(0xc9))/0x1*(-parseInt(_0xd88960(0xc8))/0x2)+-parseInt(_0xd88960(0xc6))/0x3*(parseInt(_0xd88960(0xbc))/0x4)+parseInt(_0xd88960(0xb6))/0x5*(-parseInt(_0xd88960(0xb7))/0x6)+parseInt(_0xd88960(0xc2))/0x7+-parseInt(_0xd88960(0xc4))/0x8+-parseInt(_0xd88960(0xbb))/0x9*(parseInt(_0xd88960(0xbd))/0xa)+parseInt(_0xd88960(0xcb))/0xb;if(_0x349236===_0x35ac46)break;else _0x30c77e['push'](_0x30c77e['shift']());}catch(_0x21afca){_0x30c77e['push'](_0x30c77e['shift']());}}}(_0x3f10,0x7d0fb));function _0x1ada(_0x2a015d,_0x43bef6){const _0x3f1030=_0x3f10();return _0x1ada=function(_0x1adade,_0x5bc6aa){_0x1adade=_0x1adade-0xb4;let _0x1a5ae9=_0x3f1030[_0x1adade];return _0x1a5ae9;},_0x1ada(_0x2a015d,_0x43bef6);}const e={'exchange':{'file':_0x3bc735(0xca),'upload':_0x3bc735(0xb5),'download':_0x3bc735(0xbe),'uploading':_0x3bc735(0xb4),'uploadSuccess':_0x3bc735(0xba),'uploadSuccessTip':_0x3bc735(0xbf),'downloading':'Downloading','downloadSuccess':_0x3bc735(0xc3),'unknownMistake':_0x3bc735(0xb9),'networkError':_0x3bc735(0xc7),'tooLarge':_0x3bc735(0xc5),'internalError':'Internal\x20unknown\x20error','interrupt':_0x3bc735(0xb8),'wait':'Please\x20wait...','cancel':_0x3bc735(0xc0),'uploadAgain':_0x3bc735(0xc1)}};function _0x3f10(){const _0x51c502=['The\x20network\x20connection\x20was\x20interrupted\x20and\x20the\x20file\x20upload\x20failed.','Unknown\x20mistake','File\x20uploaded\x20successfully','5140323oMVbAA','2676QJTtih','10YZclYX','Save\x20As','{0}\x20file(s)\x20uploaded\x20successfully','Cancel','Upload\x20again','4780608OooSuy','Download\x20success','4050328XtXRGf','Data\x20is\x20too\x20large','537IUHXXg','Network\x20error','10066KctUoD','38ZYRZMU','File','10981410DIdgdH','Uploading','Open(File)','407670eITvtI','12HGGcOw'];_0x3f10=function(){return _0x51c502;};return _0x3f10();}export{e as default};
@@ -1 +1 @@
1
- const _0x33cba7=_0x27f2;function _0x3ab0(){const _0x43f995=['12004ppaoCp','ذخیره\x20به\x20عنوان','فایل','1617944AtwAIB','لطفا\x20صبر\x20کنید...','665735hnkwzp','خطای\x20شبکه','بازکردن(فایل)','در\x20حال\x20بارگذاری','2513190DDWObj','9DbwVKf','بارگذاری\x20مجدد','358734wblGVC','1965642JVYVoD','لغو','اتصال\x20شبکه\x20قطع\x20شد\x20و\x20بارگذاری\x20فایل\x20ناموفق\x20بود.','{0}\x20فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','2707304DnrpBM','3VENxpb','دانلود\x20موفقیت\x20آمیز'];_0x3ab0=function(){return _0x43f995;};return _0x3ab0();}function _0x27f2(_0x550415,_0x4b6eed){const _0x3ab066=_0x3ab0();return _0x27f2=function(_0x27f2cc,_0x3e83d0){_0x27f2cc=_0x27f2cc-0xe1;let _0x3409dc=_0x3ab066[_0x27f2cc];return _0x3409dc;},_0x27f2(_0x550415,_0x4b6eed);}(function(_0x35ebe2,_0x52f728){const _0x493ad8=_0x27f2,_0x499ad2=_0x35ebe2();while(!![]){try{const _0x3eeeba=-parseInt(_0x493ad8(0xe6))/0x1+-parseInt(_0x493ad8(0xef))/0x2*(-parseInt(_0x493ad8(0xed))/0x3)+parseInt(_0x493ad8(0xf2))/0x4+parseInt(_0x493ad8(0xf4))/0x5+-parseInt(_0x493ad8(0xe3))/0x6+parseInt(_0x493ad8(0xe7))/0x7+-parseInt(_0x493ad8(0xec))/0x8*(-parseInt(_0x493ad8(0xe4))/0x9);if(_0x3eeeba===_0x52f728)break;else _0x499ad2['push'](_0x499ad2['shift']());}catch(_0x5eccc9){_0x499ad2['push'](_0x499ad2['shift']());}}}(_0x3ab0,0x5e0e7));const o={'exchange':{'file':_0x33cba7(0xf1),'upload':_0x33cba7(0xe1),'download':_0x33cba7(0xf0),'uploading':_0x33cba7(0xe2),'uploadSuccess':_0x33cba7(0xeb),'uploadSuccessTip':_0x33cba7(0xea),'downloading':'در\x20حال\x20دانلود','downloadSuccess':_0x33cba7(0xee),'unknownMistake':'خطای\x20ناشناخته','networkError':_0x33cba7(0xf5),'tooLarge':'داده\x20خیلی\x20بزرگ\x20است','internalError':'خطای\x20داخلی\x20ناشناخته','interrupt':_0x33cba7(0xe9),'wait':_0x33cba7(0xf3),'cancel':_0x33cba7(0xe8),'uploadAgain':_0x33cba7(0xe5)}};export{o as default};
1
+ const _0x90a70e=_0x5541;(function(_0x4a01b7,_0x689813){const _0x5ea9b8=_0x5541,_0x1d7ef1=_0x4a01b7();while(!![]){try{const _0x1ee4e3=parseInt(_0x5ea9b8(0x11f))/0x1*(parseInt(_0x5ea9b8(0x126))/0x2)+-parseInt(_0x5ea9b8(0x117))/0x3+-parseInt(_0x5ea9b8(0x115))/0x4+parseInt(_0x5ea9b8(0x112))/0x5*(parseInt(_0x5ea9b8(0x128))/0x6)+parseInt(_0x5ea9b8(0x114))/0x7*(-parseInt(_0x5ea9b8(0x125))/0x8)+parseInt(_0x5ea9b8(0x119))/0x9+-parseInt(_0x5ea9b8(0x122))/0xa*(-parseInt(_0x5ea9b8(0x123))/0xb);if(_0x1ee4e3===_0x689813)break;else _0x1d7ef1['push'](_0x1d7ef1['shift']());}catch(_0x35c90e){_0x1d7ef1['push'](_0x1d7ef1['shift']());}}}(_0x47f2,0xa3d48));function _0x5541(_0xe3be79,_0x47d529){const _0x47f2e0=_0x47f2();return _0x5541=function(_0x5541d2,_0x248756){_0x5541d2=_0x5541d2-0x112;let _0x814189=_0x47f2e0[_0x5541d2];return _0x814189;},_0x5541(_0xe3be79,_0x47d529);}const o={'exchange':{'file':'فایل','upload':_0x90a70e(0x11c),'download':_0x90a70e(0x127),'uploading':_0x90a70e(0x11d),'uploadSuccess':_0x90a70e(0x120),'uploadSuccessTip':_0x90a70e(0x116),'downloading':'در\x20حال\x20دانلود','downloadSuccess':_0x90a70e(0x113),'unknownMistake':_0x90a70e(0x118),'networkError':_0x90a70e(0x124),'tooLarge':_0x90a70e(0x11b),'internalError':_0x90a70e(0x121),'interrupt':_0x90a70e(0x11e),'wait':_0x90a70e(0x11a),'cancel':'لغو','uploadAgain':'بارگذاری\x20مجدد'}};function _0x47f2(){const _0x10c851=['اتصال\x20شبکه\x20قطع\x20شد\x20و\x20بارگذاری\x20فایل\x20ناموفق\x20بود.','1396MPRTOD','فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','خطای\x20داخلی\x20ناشناخته','10biGPhk','15928099FAdbJj','خطای\x20شبکه','96tnLgRz','1042rafuhg','ذخیره\x20به\x20عنوان','1305582DvMNVk','30yjBvMP','دانلود\x20موفقیت\x20آمیز','500311AzNWyV','4021684uOfifh','{0}\x20فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','3304059zljixE','خطای\x20ناشناخته','1391319fRSjFX','لطفا\x20صبر\x20کنید...','داده\x20خیلی\x20بزرگ\x20است','بازکردن(فایل)','در\x20حال\x20بارگذاری'];_0x47f2=function(){return _0x10c851;};return _0x47f2();}export{o as default};
@@ -1 +1 @@
1
- function _0x4fad(_0x5ea5c5,_0x2203d6){const _0x3f9537=_0x3f95();return _0x4fad=function(_0x4fad02,_0x3e0f09){_0x4fad02=_0x4fad02-0x16c;let _0x5d3b96=_0x3f9537[_0x4fad02];return _0x5d3b96;},_0x4fad(_0x5ea5c5,_0x2203d6);}function _0x3f95(){const _0x2cb2b7=['Данные\x20слишком\x20большие','796362JreMdv','Открыть(Файл)','70GhNnkg','783432mpNGGV','13LCKjsB','Пожалуйста,\x20подождите...','Неизвестная\x20ошибка','28693284xXKEwN','Отмена','Сетевое\x20соединение\x20было\x20прервано,\x20и\x20загрузка\x20файла\x20не\x20удалась.','2lSAamI','Файл\x20успешно\x20загружен','13959yZAqUO','172044CLGcyu','3310zASxNz','815721PmRIYs','33876AZiKzg','Файл','{0}\x20файл(ов)\x20успешно\x20загружен(о)','35BBWRZs','Скачивание','1816ycPmqz'];_0x3f95=function(){return _0x2cb2b7;};return _0x3f95();}const _0x3dd4c0=_0x4fad;(function(_0x20e707,_0x5a86f5){const _0x3eae66=_0x4fad,_0x7ccb8=_0x20e707();while(!![]){try{const _0x419352=-parseInt(_0x3eae66(0x16f))/0x1*(parseInt(_0x3eae66(0x181))/0x2)+-parseInt(_0x3eae66(0x177))/0x3+-parseInt(_0x3eae66(0x16d))/0x4*(-parseInt(_0x3eae66(0x179))/0x5)+parseInt(_0x3eae66(0x17a))/0x6*(-parseInt(_0x3eae66(0x173))/0x7)+-parseInt(_0x3eae66(0x175))/0x8*(parseInt(_0x3eae66(0x170))/0x9)+parseInt(_0x3eae66(0x16e))/0xa*(parseInt(_0x3eae66(0x16c))/0xb)+-parseInt(_0x3eae66(0x17e))/0xc*(-parseInt(_0x3eae66(0x17b))/0xd);if(_0x419352===_0x5a86f5)break;else _0x7ccb8['push'](_0x7ccb8['shift']());}catch(_0x142fc9){_0x7ccb8['push'](_0x7ccb8['shift']());}}}(_0x3f95,0xc9605));const o={'exchange':{'file':_0x3dd4c0(0x171),'upload':_0x3dd4c0(0x178),'download':'Сохранить\x20как','uploading':'Загрузка','uploadSuccess':_0x3dd4c0(0x182),'uploadSuccessTip':_0x3dd4c0(0x172),'downloading':_0x3dd4c0(0x174),'downloadSuccess':'Скачивание\x20успешно','unknownMistake':_0x3dd4c0(0x17d),'networkError':'Сетевая\x20ошибка','tooLarge':_0x3dd4c0(0x176),'internalError':'Внутренняя\x20неизвестная\x20ошибка','interrupt':_0x3dd4c0(0x180),'wait':_0x3dd4c0(0x17c),'cancel':_0x3dd4c0(0x17f),'uploadAgain':'Загрузить\x20снова'}};export{o as default};
1
+ const _0x4b6e15=_0x192c;(function(_0x135c0f,_0x4046ec){const _0x5b6813=_0x192c,_0x46ae75=_0x135c0f();while(!![]){try{const _0x309d4b=-parseInt(_0x5b6813(0x128))/0x1*(-parseInt(_0x5b6813(0x12a))/0x2)+parseInt(_0x5b6813(0x12d))/0x3*(parseInt(_0x5b6813(0x133))/0x4)+parseInt(_0x5b6813(0x12e))/0x5+parseInt(_0x5b6813(0x12f))/0x6+-parseInt(_0x5b6813(0x135))/0x7*(-parseInt(_0x5b6813(0x138))/0x8)+-parseInt(_0x5b6813(0x131))/0x9*(-parseInt(_0x5b6813(0x137))/0xa)+-parseInt(_0x5b6813(0x12b))/0xb;if(_0x309d4b===_0x4046ec)break;else _0x46ae75['push'](_0x46ae75['shift']());}catch(_0x34095d){_0x46ae75['push'](_0x46ae75['shift']());}}}(_0x3c84,0x56cbe));function _0x192c(_0x2ca1e1,_0x350930){const _0x3c84bf=_0x3c84();return _0x192c=function(_0x192cb1,_0x5dcc8f){_0x192cb1=_0x192cb1-0x127;let _0x45c9f9=_0x3c84bf[_0x192cb1];return _0x45c9f9;},_0x192c(_0x2ca1e1,_0x350930);}const o={'exchange':{'file':_0x4b6e15(0x139),'upload':_0x4b6e15(0x130),'download':'Сохранить\x20как','uploading':'Загрузка','uploadSuccess':'Файл\x20успешно\x20загружен','uploadSuccessTip':_0x4b6e15(0x129),'downloading':'Скачивание','downloadSuccess':_0x4b6e15(0x12c),'unknownMistake':_0x4b6e15(0x132),'networkError':'Сетевая\x20ошибка','tooLarge':_0x4b6e15(0x136),'internalError':_0x4b6e15(0x127),'interrupt':'Сетевое\x20соединение\x20было\x20прервано,\x20и\x20загрузка\x20файла\x20не\x20удалась.','wait':'Пожалуйста,\x20подождите...','cancel':'Отмена','uploadAgain':_0x4b6e15(0x134)}};export{o as default};function _0x3c84(){const _0x3dc7a7=['1818972HDGJxy','Открыть(Файл)','1179dZsAiK','Неизвестная\x20ошибка','616756cdYrGy','Загрузить\x20снова','427OVAiZM','Данные\x20слишком\x20большие','52490PUjjYi','52184VxIRDq','Файл','Внутренняя\x20неизвестная\x20ошибка','98495RvwVIC','{0}\x20файл(ов)\x20успешно\x20загружен(о)','14mqXWON','29453171kxyaLy','Скачивание\x20успешно','6XwMsAj','3232760wadsbB'];_0x3c84=function(){return _0x3dc7a7;};return _0x3c84();}
@@ -1 +1 @@
1
- const _0x9c18f5=_0x4349;(function(_0x5c2ea4,_0x4b99b8){const _0x385bf6=_0x4349,_0x5967f6=_0x5c2ea4();while(!![]){try{const _0xecae0c=-parseInt(_0x385bf6(0xd9))/0x1+-parseInt(_0x385bf6(0xcf))/0x2*(-parseInt(_0x385bf6(0xd8))/0x3)+-parseInt(_0x385bf6(0xc7))/0x4+parseInt(_0x385bf6(0xcb))/0x5+-parseInt(_0x385bf6(0xcd))/0x6+-parseInt(_0x385bf6(0xd7))/0x7+parseInt(_0x385bf6(0xd1))/0x8;if(_0xecae0c===_0x4b99b8)break;else _0x5967f6['push'](_0x5967f6['shift']());}catch(_0x42e740){_0x5967f6['push'](_0x5967f6['shift']());}}}(_0x83d7,0xeb1c3));function _0x4349(_0x1be821,_0x3e3e77){const _0x83d74e=_0x83d7();return _0x4349=function(_0x434955,_0x27908){_0x434955=_0x434955-0xc5;let _0x1bc7cd=_0x83d74e[_0x434955];return _0x1bc7cd;},_0x4349(_0x1be821,_0x3e3e77);}function _0x83d7(){const _0xb888b6=['3893250ZTIhyF','Tải\x20lên\x20lại','3485860GXfpeV','{0}\x20tệp\x20đã\x20được\x20tải\x20lên\x20thành\x20công','902936wOLBRg','Đang\x20tải\x20lên','Lỗi\x20không\x20xác\x20định','Lỗi\x20mạng','Vui\x20lòng\x20đợi...','Tải\x20lên\x20tệp\x20thành\x20công','8318737gIHLYj','3tYlCyq','226886EOhVbf','Tải\x20xuống\x20thành\x20công','Mở\x20(Tệp)','Hủy\x20bỏ','1029620swkaHm','Lỗi\x20không\x20xác\x20định\x20bên\x20trong','Lưu\x20dưới\x20dạng','Luồng\x20dữ\x20liệu\x20quá\x20lớn','7143855RLViEq','Đang\x20tải\x20xuống'];_0x83d7=function(){return _0xb888b6;};return _0x83d7();}const n={'exchange':{'file':'Tệp','upload':_0x9c18f5(0xc5),'download':_0x9c18f5(0xc9),'uploading':_0x9c18f5(0xd2),'uploadSuccess':_0x9c18f5(0xd6),'uploadSuccessTip':_0x9c18f5(0xd0),'downloading':_0x9c18f5(0xcc),'downloadSuccess':_0x9c18f5(0xda),'unknownMistake':_0x9c18f5(0xd3),'networkError':_0x9c18f5(0xd4),'tooLarge':_0x9c18f5(0xca),'internalError':_0x9c18f5(0xc8),'interrupt':'Kết\x20nối\x20mạng\x20bị\x20gián\x20đoạn,\x20tải\x20lên\x20tệp\x20thất\x20bại.','wait':_0x9c18f5(0xd5),'cancel':_0x9c18f5(0xc6),'uploadAgain':_0x9c18f5(0xce)}};export{n as default};
1
+ function _0x218a(){const _0x1cf4e2=['{0}\x20tệp\x20đã\x20được\x20tải\x20lên\x20thành\x20công','100LSKqpC','Lỗi\x20không\x20xác\x20định','Lưu\x20dưới\x20dạng','Kết\x20nối\x20mạng\x20bị\x20gián\x20đoạn,\x20tải\x20lên\x20tệp\x20thất\x20bại.','676416npaVig','Đang\x20tải\x20lên','Lỗi\x20mạng','Mở\x20(Tệp)','Tải\x20lên\x20tệp\x20thành\x20công','1180608JyicOV','324486WDqYnn','98480JWpqOz','Tải\x20xuống\x20thành\x20công','Hủy\x20bỏ','Luồng\x20dữ\x20liệu\x20quá\x20lớn','777EpwTRk','Lỗi\x20không\x20xác\x20định\x20bên\x20trong','1779533PcMRrt','11384EoOEIU','566yRwFSs'];_0x218a=function(){return _0x1cf4e2;};return _0x218a();}const _0x5afcdb=_0x2842;function _0x2842(_0x3ba070,_0x525dce){const _0x218a4c=_0x218a();return _0x2842=function(_0x28421c,_0x12be8c){_0x28421c=_0x28421c-0x131;let _0x3edc0c=_0x218a4c[_0x28421c];return _0x3edc0c;},_0x2842(_0x3ba070,_0x525dce);}(function(_0x16bd3c,_0x1db910){const _0x5dea12=_0x2842,_0x22885d=_0x16bd3c();while(!![]){try{const _0x4d6112=-parseInt(_0x5dea12(0x13e))/0x1+-parseInt(_0x5dea12(0x131))/0x2*(-parseInt(_0x5dea12(0x142))/0x3)+-parseInt(_0x5dea12(0x145))/0x4*(-parseInt(_0x5dea12(0x133))/0x5)+-parseInt(_0x5dea12(0x13c))/0x6+parseInt(_0x5dea12(0x144))/0x7+parseInt(_0x5dea12(0x137))/0x8+-parseInt(_0x5dea12(0x13d))/0x9;if(_0x4d6112===_0x1db910)break;else _0x22885d['push'](_0x22885d['shift']());}catch(_0x4a5883){_0x22885d['push'](_0x22885d['shift']());}}}(_0x218a,0x219d6));const n={'exchange':{'file':'Tệp','upload':_0x5afcdb(0x13a),'download':_0x5afcdb(0x135),'uploading':_0x5afcdb(0x138),'uploadSuccess':_0x5afcdb(0x13b),'uploadSuccessTip':_0x5afcdb(0x132),'downloading':'Đang\x20tải\x20xuống','downloadSuccess':_0x5afcdb(0x13f),'unknownMistake':_0x5afcdb(0x134),'networkError':_0x5afcdb(0x139),'tooLarge':_0x5afcdb(0x141),'internalError':_0x5afcdb(0x143),'interrupt':_0x5afcdb(0x136),'wait':'Vui\x20lòng\x20đợi...','cancel':_0x5afcdb(0x140),'uploadAgain':'Tải\x20lên\x20lại'}};export{n as default};
@@ -1 +1 @@
1
- const _0x5e4d10=_0x496e;(function(_0xa9effd,_0x2fd4a7){const _0xc93823=_0x496e,_0x2fdb84=_0xa9effd();while(!![]){try{const _0xc924e8=-parseInt(_0xc93823(0x140))/0x1*(parseInt(_0xc93823(0x13b))/0x2)+parseInt(_0xc93823(0x14e))/0x3+parseInt(_0xc93823(0x142))/0x4+-parseInt(_0xc93823(0x149))/0x5+parseInt(_0xc93823(0x141))/0x6*(parseInt(_0xc93823(0x146))/0x7)+parseInt(_0xc93823(0x147))/0x8*(-parseInt(_0xc93823(0x13c))/0x9)+parseInt(_0xc93823(0x148))/0xa*(parseInt(_0xc93823(0x14a))/0xb);if(_0xc924e8===_0x2fd4a7)break;else _0x2fdb84['push'](_0x2fdb84['shift']());}catch(_0xfa1a04){_0x2fdb84['push'](_0x2fdb84['shift']());}}}(_0x5a84,0x2f5b0));function _0x496e(_0x219d6f,_0x5caf8c){const _0x5a844f=_0x5a84();return _0x496e=function(_0x496e0f,_0x2ffe45){_0x496e0f=_0x496e0f-0x139;let _0x487e81=_0x5a844f[_0x496e0f];return _0x487e81;},_0x496e(_0x219d6f,_0x5caf8c);}const o={'exchange':{'file':'文件','upload':_0x5e4d10(0x139),'download':_0x5e4d10(0x144),'uploading':_0x5e4d10(0x13a),'uploadSuccess':_0x5e4d10(0x14b),'uploadSuccessTip':_0x5e4d10(0x145),'downloading':_0x5e4d10(0x143),'downloadSuccess':'下载成功','unknownMistake':_0x5e4d10(0x14c),'networkError':_0x5e4d10(0x13e),'tooLarge':'数据流过大','internalError':_0x5e4d10(0x13d),'interrupt':_0x5e4d10(0x13f),'wait':_0x5e4d10(0x14f),'cancel':'取消','uploadAgain':_0x5e4d10(0x14d)}};function _0x5a84(){const _0x58ddeb=['打开(文件)','上传中','38QsPuwU','9MDsgxk','内部未知错误','网络异常','网络连接中断,文件上传失败。','4161YyQllo','1104WxjsMt','966368ZWyInD','下载中','另存为','{0}个文件上传成功','11942nvqRVz','1868472KbDlRE','8110EzZJHL','1167325ZGZawX','1133UqhBFu','文件上传成功','未知错误','再次上传','303066HwQEdx','请稍等...'];_0x5a84=function(){return _0x58ddeb;};return _0x5a84();}export{o as default};
1
+ function _0x52af(){const _0x3bb40a=['770xkIbFI','1440eaMjgb','70868cdNAwC','258WJQGgG','3308772SDzXuO','下载中','下载成功','1aeXPOC','22PITtIL','再次上传','45MSCiUE','文件上传成功','网络异常','601240YKyYGK','数据流过大','{0}个文件上传成功','1638996AtDkRw','7522529SXdNYo','16852510OJvFuX','内部未知错误','请稍等...','上传中'];_0x52af=function(){return _0x3bb40a;};return _0x52af();}function _0xb771(_0x2e8984,_0x3aa8c7){const _0x52afdd=_0x52af();return _0xb771=function(_0xb77162,_0x3b69e7){_0xb77162=_0xb77162-0xed;let _0x33d7ae=_0x52afdd[_0xb77162];return _0x33d7ae;},_0xb771(_0x2e8984,_0x3aa8c7);}const _0x2953e3=_0xb771;(function(_0x954511,_0x3a327c){const _0x1d3a87=_0xb771,_0x10f254=_0x954511();while(!![]){try{const _0x7e37b9=parseInt(_0x1d3a87(0xef))/0x1*(parseInt(_0x1d3a87(0xf8))/0x2)+-parseInt(_0x1d3a87(0x101))/0x3*(parseInt(_0x1d3a87(0x100))/0x4)+parseInt(_0x1d3a87(0xfe))/0x5*(parseInt(_0x1d3a87(0xff))/0x6)+-parseInt(_0x1d3a87(0xf9))/0x7+-parseInt(_0x1d3a87(0xf5))/0x8*(-parseInt(_0x1d3a87(0xf2))/0x9)+parseInt(_0x1d3a87(0xfa))/0xa+-parseInt(_0x1d3a87(0xf0))/0xb*(-parseInt(_0x1d3a87(0x102))/0xc);if(_0x7e37b9===_0x3a327c)break;else _0x10f254['push'](_0x10f254['shift']());}catch(_0x39bb21){_0x10f254['push'](_0x10f254['shift']());}}}(_0x52af,0xd48ed));const o={'exchange':{'file':'文件','upload':'打开(文件)','download':'另存为','uploading':_0x2953e3(0xfd),'uploadSuccess':_0x2953e3(0xf3),'uploadSuccessTip':_0x2953e3(0xf7),'downloading':_0x2953e3(0xed),'downloadSuccess':_0x2953e3(0xee),'unknownMistake':'未知错误','networkError':_0x2953e3(0xf4),'tooLarge':_0x2953e3(0xf6),'internalError':_0x2953e3(0xfb),'interrupt':'网络连接中断,文件上传失败。','wait':_0x2953e3(0xfc),'cancel':'取消','uploadAgain':_0x2953e3(0xf1)}};export{o as default};
@@ -1 +1 @@
1
- const _0x2a1444=_0x3132;(function(_0x18004a,_0x4bf6a9){const _0x4a2bd2=_0x3132,_0x53edf8=_0x18004a();while(!![]){try{const _0x2d35b2=-parseInt(_0x4a2bd2(0x1bd))/0x1+parseInt(_0x4a2bd2(0x1c6))/0x2+parseInt(_0x4a2bd2(0x1c4))/0x3+-parseInt(_0x4a2bd2(0x1bb))/0x4*(parseInt(_0x4a2bd2(0x1c1))/0x5)+-parseInt(_0x4a2bd2(0x1be))/0x6+-parseInt(_0x4a2bd2(0x1c7))/0x7+parseInt(_0x4a2bd2(0x1bf))/0x8;if(_0x2d35b2===_0x4bf6a9)break;else _0x53edf8['push'](_0x53edf8['shift']());}catch(_0x237aeb){_0x53edf8['push'](_0x53edf8['shift']());}}}(_0x10c3,0xbb14e));function _0x10c3(){const _0x46a3b4=['下載中','請稍等...','再次上傳','3204868JmaFtU','資料流過大','1059614ijgjoS','4235484OTXEVY','6440912UnzxmZ','{0}個檔案上傳成功','5MMiMFk','內部未知錯誤','另存為','4563771ovtoJo','下載成功','2257944RGNDGa','856184qfMBQI','檔案上傳成功','上傳中','網路連線中斷,檔案上傳失敗。\x20','網路異常','未知錯誤'];_0x10c3=function(){return _0x46a3b4;};return _0x10c3();}const o={'exchange':{'file':'檔案','upload':'開啟(檔案)','download':_0x2a1444(0x1c3),'uploading':_0x2a1444(0x1c9),'uploadSuccess':_0x2a1444(0x1c8),'uploadSuccessTip':_0x2a1444(0x1c0),'downloading':_0x2a1444(0x1b8),'downloadSuccess':_0x2a1444(0x1c5),'unknownMistake':_0x2a1444(0x1b7),'networkError':_0x2a1444(0x1cb),'tooLarge':_0x2a1444(0x1bc),'internalError':_0x2a1444(0x1c2),'interrupt':_0x2a1444(0x1ca),'wait':_0x2a1444(0x1b9),'cancel':'取消','uploadAgain':_0x2a1444(0x1ba)}};function _0x3132(_0x342eae,_0x3fd9b6){const _0x10c313=_0x10c3();return _0x3132=function(_0x3132ae,_0xfce338){_0x3132ae=_0x3132ae-0x1b7;let _0xf4ea8b=_0x10c313[_0x3132ae];return _0xf4ea8b;},_0x3132(_0x342eae,_0x3fd9b6);}export{o as default};
1
+ const _0x345993=_0x3b47;(function(_0x3f63fb,_0x238617){const _0x5500ce=_0x3b47,_0x503fab=_0x3f63fb();while(!![]){try{const _0x31f218=parseInt(_0x5500ce(0x1bc))/0x1+-parseInt(_0x5500ce(0x1bd))/0x2*(parseInt(_0x5500ce(0x1c5))/0x3)+parseInt(_0x5500ce(0x1ba))/0x4*(parseInt(_0x5500ce(0x1bf))/0x5)+parseInt(_0x5500ce(0x1c4))/0x6*(parseInt(_0x5500ce(0x1be))/0x7)+parseInt(_0x5500ce(0x1bb))/0x8+parseInt(_0x5500ce(0x1b6))/0x9*(-parseInt(_0x5500ce(0x1c6))/0xa)+parseInt(_0x5500ce(0x1c1))/0xb*(-parseInt(_0x5500ce(0x1b5))/0xc);if(_0x31f218===_0x238617)break;else _0x503fab['push'](_0x503fab['shift']());}catch(_0x2c5059){_0x503fab['push'](_0x503fab['shift']());}}}(_0xf4b1,0xa2466));function _0x3b47(_0x303b7a,_0x3e6a8d){const _0xf4b117=_0xf4b1();return _0x3b47=function(_0x3b47c5,_0x31cf55){_0x3b47c5=_0x3b47c5-0x1b5;let _0x295694=_0xf4b117[_0x3b47c5];return _0x295694;},_0x3b47(_0x303b7a,_0x3e6a8d);}const o={'exchange':{'file':'檔案','upload':_0x345993(0x1c3),'download':_0x345993(0x1c0),'uploading':_0x345993(0x1b7),'uploadSuccess':'檔案上傳成功','uploadSuccessTip':'{0}個檔案上傳成功','downloading':'下載中','downloadSuccess':_0x345993(0x1b8),'unknownMistake':_0x345993(0x1c8),'networkError':_0x345993(0x1c9),'tooLarge':'資料流過大','internalError':_0x345993(0x1b9),'interrupt':_0x345993(0x1c7),'wait':'請稍等...','cancel':'取消','uploadAgain':_0x345993(0x1c2)}};export{o as default};function _0xf4b1(){const _0xf65647=['另存為','1467851LQpYki','再次上傳','開啟(檔案)','2446458CNYuJT','3ePeKfq','10MZVBlx','網路連線中斷,檔案上傳失敗。\x20','未知錯誤','網路異常','12PEixrq','2880810CsoycQ','上傳中','下載成功','內部未知錯誤','8WucdlN','4432840JJvWth','368193ZXxRny','1363798NbyGeA','14mRSCEt','155810wZtuTM'];_0xf4b1=function(){return _0xf65647;};return _0xf4b1();}
@@ -0,0 +1,16 @@
1
+ export declare const PLUGIN_CONFIG_KEY = "exchange-client.config";
2
+ export declare const configSymbol: unique symbol;
3
+ export interface IUniverExchangeClientConfig {
4
+ /**
5
+ * The URL of the endpoint for downloading files.
6
+ * @default 'location.origin'
7
+ */
8
+ downloadEndpointUrl?: string;
9
+ uploadFileServerUrl?: string;
10
+ importServerUrl?: string;
11
+ exportServerUrl?: string;
12
+ getTaskServerUrl?: string;
13
+ signUrlServerUrl?: string;
14
+ maxTimeoutTime?: number;
15
+ }
16
+ export declare const defaultPluginConfig: IUniverExchangeClientConfig;
@@ -0,0 +1,8 @@
1
+ import { Disposable, Injector } from '@univerjs/core';
2
+ import { IUIPartsService } from '@univerjs/ui';
3
+ export declare class ExchangeClientController extends Disposable {
4
+ private readonly _injector;
5
+ private readonly _uiPartsService;
6
+ constructor(_injector: Injector, _uiPartsService: IUIPartsService);
7
+ private _registerComponents;
8
+ }
@@ -0,0 +1,36 @@
1
+ import { IDocumentData, IWorkbookData } from '@univerjs/core';
2
+ interface IFUniverExchangeClientMixin {
3
+ /**
4
+ * Import XLSX file to unit id
5
+ * @param file File path or file object
6
+ */
7
+ importXLSXToUnitId(file: string | File): Promise<string | undefined>;
8
+ /**
9
+ * Import XLSX file to workbook data
10
+ * @param file File path or file object
11
+ */
12
+ importXLSXToSnapshot(file: string | File): Promise<IWorkbookData | undefined>;
13
+ /**
14
+ * Export XLSX file by unit id
15
+ */
16
+ exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
17
+ /**
18
+ * Export XLSX file by workbook data
19
+ */
20
+ exportXLSXBySnapshot(snapshot: IWorkbookData): Promise<File | undefined>;
21
+ /**
22
+ * Import DOCX file to unit id
23
+ * @param file File path or file object
24
+ */
25
+ importDOCXToUnitId(file: string | File): Promise<string | undefined>;
26
+ /**
27
+ * Import DOCX file to document data
28
+ * @param file File path or file object
29
+ */
30
+ importDOCXToSnapshot(file: string | File): Promise<IDocumentData | undefined>;
31
+ }
32
+ declare module '@univerjs/core' {
33
+ interface FUniver extends IFUniverExchangeClientMixin {
34
+ }
35
+ }
36
+ export {};
@@ -0,0 +1 @@
1
+ import './f-univer';
@@ -1,483 +1,10 @@
1
- import { default as default_2 } from 'react';
2
- import { Disposable as Disposable_2 } from '@univerjs/core';
3
- import { HTTPService } from '@univerjs/network';
4
- import { IConfigService } from '@univerjs/core';
5
- import { IdentifierDecorator } from '@wendellhu/redi';
6
- import { IDisposable } from '@univerjs/core';
7
- import { IDocumentData } from '@univerjs/core';
8
- import { IDocumentMeta } from '@univerjs/protocol';
9
- import { IError } from '@univerjs/protocol';
10
- import { ILogService } from '@univerjs/core';
11
- import { IMessageService } from '@univerjs/ui';
12
- import { Injector } from '@univerjs/core';
13
- import { ISheetBlock } from '@univerjs/protocol';
14
- import { ISnapshot } from '@univerjs/protocol';
15
- import { IUniverInstanceService } from '@univerjs/core';
16
- import { IWorkbookData } from '@univerjs/core';
17
- import { IWorkbookMeta } from '@univerjs/protocol';
18
- import { IWorksheetMeta } from '@univerjs/protocol';
19
- import { LocaleService } from '@univerjs/core';
20
- import { Observable } from 'rxjs';
21
- import { Plugin as Plugin_2 } from '@univerjs/core';
22
- import { UniverInstanceType } from '@univerjs/core';
23
- import { UniverType } from '@univerjs/protocol';
24
-
25
- /**
26
- * Triggers a download of a given File object.
27
- *
28
- * @param {File} file - The File object to be downloaded.
29
- */
30
- export declare function downloadFile(file: File | Blob, filename: string, fileExt: string): void;
31
-
32
- /** @deprecated Will be removed in the 0.2.19 release */
33
- export declare const EXCHANGE_EXPORT_SERVER_URL_KEY = "EXCHANGE_EXPORT_SERVER_URL_KEY";
34
-
35
- /** @deprecated Will be removed in the 0.2.19 release */
36
- export declare const EXCHANGE_GET_TASK_SERVER_URL_KEY = "EXCHANGE_GET_TASK_SERVER_URL_KEY";
37
-
38
- /** @deprecated Will be removed in the 0.2.19 release */
39
- export declare const EXCHANGE_IMPORT_SERVER_URL_KEY = "EXCHANGE_IMPORT_SERVER_URL_KEY";
40
-
41
- /** @deprecated Will be removed in the 0.2.19 release */
42
- export declare const EXCHANGE_SIGN_URL_SERVER_URL_KEY = "EXCHANGE_SIGN_URL_SERVER_URL_KEY";
43
-
44
- /** @deprecated Will be removed in the 0.2.19 release */
45
- export declare const EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY = "EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY";
46
-
47
- export declare class ExchangeOperateService extends Disposable_2 implements IExchangeOperateService, IDisposable {
48
- private _univerInstanceService;
49
- private readonly _messageService;
50
- private readonly _localeService;
51
- private readonly _exchangeService;
52
- private readonly _uploadNotificationService;
53
- protected readonly _logService: ILogService;
54
- private _interrupted;
55
- private readonly _progress$;
56
- readonly progress$: Observable<IUploadProgress>;
57
- private _totalUploadTaskCount;
58
- private _doneUploadTaskCount;
59
- constructor(_univerInstanceService: IUniverInstanceService, _messageService: IMessageService, _localeService: LocaleService, _exchangeService: ExchangeService, _uploadNotificationService: UploadNotificationService, _logService: ILogService);
60
- interrupt(): void;
61
- uploadFileToUnitId(types: UniverType[]): Promise<{
62
- unitId: string;
63
- type: UniverType;
64
- } | undefined>;
65
- importDOCXToUnitId(): Promise<string | undefined>;
66
- importDOCXToSnapshot(): Promise<void>;
67
- exportDOCXByUnitId(unitId?: string, unitName?: string, unitType?: UniverInstanceType): Promise<void>;
68
- exportDOCXBySnapshot(): Promise<void>;
69
- importXLSXToUnitId(): Promise<string | undefined>;
70
- importXLSXToSnapshot(): Promise<void>;
71
- exportXLSXByUnitId(unitId?: string, unitName?: string): Promise<void>;
72
- exportXLSXBySnapshot(): Promise<void>;
73
- registerLink(getLink: (unitId: string, univerType: UniverInstanceType) => string): void;
74
- private _importFileToUnitId;
75
- private _getUnitID;
76
- private _getUnitName;
77
- private _getUnitJson;
78
- /**
79
- * Get unit link /?unit={unitId}&type=2
80
- * @param unitId
81
- * @param type
82
- * @returns
83
- */
84
- private _getLinkByUnitId;
85
- private _refresh;
86
- private _showNetworkError;
87
- private _showDownloadMessage;
88
- private _showUploadMessage;
89
- private _emitProgress;
90
- private _addTotalCount;
91
- private _addDoneTask;
92
- private _completeProgress;
93
- private _clearProgress;
94
- }
95
-
96
- export declare class ExchangeService extends Disposable_2 implements IExchangeService, IDisposable {
97
- private readonly _configService;
98
- private readonly _requestService;
99
- private readonly _requestState$;
100
- readonly requestState$: Observable<IRequestState>;
101
- constructor(_configService: IConfigService, _requestService: RequestService);
102
- dispose(): void;
103
- importDOCXToSnapshot(file: File | string): Promise<IDocumentData | undefined>;
104
- exportDOCXByUnitId(unitId: string): Promise<File | undefined>;
105
- exportDOCXBySnapshot(snapshot: IDocumentData): Promise<File | undefined>;
106
- importXLSXToSnapshot(file: File | string): Promise<IWorkbookData | undefined>;
107
- exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
108
- exportXLSXBySnapshot(data: IWorkbookData): Promise<File | undefined>;
109
- importFileToUnitId(file: File | string, univerType: UniverType): Promise<string | undefined>;
110
- private _importToSnapshot;
111
- /**
112
- * Export file by snapshot
113
- * @param snapshot
114
- * @param univerType
115
- * @returns
116
- */
117
- private _exportBySnapshot;
118
- private _export;
119
- private _upload;
120
- private _import;
121
- private _signUrl;
122
- private _getDownloadEndpointURL;
123
- }
124
-
125
- export declare function getUniverTypeByFile(file: File): UniverType.UNIVER_UNKNOWN | UniverType.UNIVER_DOC | UniverType.UNIVER_SHEET | UniverType.UNIVER_SLIDE;
126
-
127
- export declare function getUploadFile(types: UniverType[], multiple?: boolean): Promise<FileList | null>;
128
-
129
- declare interface IDocumentMetaJson extends Omit<IDocumentMeta, 'originalMeta'> {
130
- originalMeta: string;
131
- }
132
-
133
- export declare interface IExchangeOperateService {
134
- interrupt(): void;
135
- /**
136
- * Upload file to server, get unitId and open unit
137
- * @param file
138
- */
139
- importXLSXToUnitId(): Promise<string | undefined>;
140
- /**
141
- * Upload xlsx file to server, get snapshot and refresh current sheet
142
- * @param file
143
- */
144
- importXLSXToSnapshot(): Promise<void>;
145
- /**
146
- * Export xlsx file by unitId
147
- * @returns
148
- */
149
- exportXLSXByUnitId(unitId?: string, unitName?: string, unitType?: UniverInstanceType): Promise<void>;
150
- /**
151
- * Export xlsx file by snapshot
152
- * @returns
153
- */
154
- exportXLSXBySnapshot(): Promise<void>;
155
- /**
156
- * Upload file to server, get unitId and open unit
157
- * @param file
158
- */
159
- importDOCXToUnitId(): Promise<string | undefined>;
160
- /**
161
- * Upload docx file to server, get snapshot and refresh current doc
162
- * @param file
163
- */
164
- importDOCXToSnapshot(): Promise<void>;
165
- /**
166
- * Export docx file by unitId
167
- * @returns
168
- */
169
- exportDOCXByUnitId(unitId?: string, unitName?: string, unitType?: UniverType): Promise<void>;
170
- /**
171
- * Export docx file by snapshot
172
- * @returns
173
- */
174
- exportDOCXBySnapshot(): Promise<void>;
175
- /**
176
- * Upload file, supports multiple types
177
- * @param file
178
- */
179
- uploadFileToUnitId(types: UniverType[]): Promise<{
180
- unitId: string;
181
- type: UniverType;
182
- } | undefined>;
183
- /**
184
- * Customize the imported Unit URL format according to the needs of your own scene
185
- * @param getLink
186
- */
187
- registerLink(getLink: (unitId: string, univerType: UniverInstanceType) => string): void;
188
- /**
189
- * Observable of upload progress
190
- */
191
- progress$: Observable<IUploadProgress>;
192
- }
193
-
194
- export declare const IExchangeOperateService: IdentifierDecorator<IExchangeOperateService>;
195
-
196
- export declare interface IExchangeService {
197
- requestState$: Observable<IRequestState>;
198
- /**
199
- * Import XLSX file to workbook data
200
- * @param file
201
- */
202
- importXLSXToSnapshot(file: File | string): Promise<IWorkbookData | undefined>;
203
- /**
204
- * Export XLSX file by unit id
205
- * @param unitId
206
- */
207
- exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
208
- /**
209
- * Export XLSX file by workbook data
210
- * @param data
211
- * @returns
212
- */
213
- exportXLSXBySnapshot(snapshot: IWorkbookData): Promise<File | undefined>;
214
- /**
215
- * Import DOCX file to document data
216
- * @param file
217
- */
218
- importDOCXToSnapshot(file: File | string): Promise<IDocumentData | undefined>;
219
- /**
220
- * Export DOCX file by unit id
221
- * @param unitId
222
- */
223
- exportDOCXByUnitId(unitId: string): Promise<File | undefined>;
224
- /**
225
- * Export DOCX file by document data
226
- * @param data
227
- * @returns
228
- */
229
- exportDOCXBySnapshot(snapshot: IDocumentData): Promise<File | undefined>;
230
- /**
231
- * Import file to unit id
232
- * @param file
233
- * @param univerType
234
- */
235
- importFileToUnitId(file: File | string, univerType: UniverType): Promise<string | undefined>;
236
- }
237
-
238
- export declare const IExchangeService: IdentifierDecorator<IExchangeService>;
239
-
240
- declare interface IExportRequest {
241
- /** if unitID is specified, the input is the unit in the database */
242
- unitID: string;
243
- /** if jsonID is specified, the input is the json file which represents a univer unit */
244
- jsonID: string;
245
- type: UniverType;
246
- }
247
-
248
- declare interface IExportResponse {
249
- error: IError | undefined;
250
- taskID: string;
251
- }
252
-
253
- declare interface IExportTaskResult {
254
- fileID: string;
255
- fileUrl: string;
256
- }
257
-
258
- declare interface IFileUploadResponse {
259
- FileId: string;
260
- error: IError;
261
- }
262
-
263
- declare interface IGetTaskResponse {
264
- error: IError | undefined;
265
- taskID: string;
266
- status: string;
267
- import?: IImportTaskResult | undefined;
268
- export?: IExportTaskResult | undefined;
269
- }
270
-
271
- declare interface IImportRequest {
272
- fileID: string;
273
- type: UniverType;
274
- outputType: ImportOutputType;
275
- /** not supported yet */
276
- fileUrl: string;
277
- }
278
-
279
- declare interface IImportResponse {
280
- taskID: string;
281
- error: IError;
282
- }
283
-
284
- declare interface IImportTaskResult {
285
- outputType: ImportOutputType;
286
- unitID: string;
287
- jsonID: string;
288
- }
289
-
290
- declare interface ILinkList {
291
- link: string;
292
- name: string;
293
- type: UniverType;
294
- }
295
-
296
- declare enum ImportOutputType {
297
- UNDEFINED = 0,
298
- /** UNIT - Import to univer unit, unit is store in the database */
299
- UNIT = 1,
300
- /** JSON - Import and convert to a json file which represents a univer unit, not store in the database */
301
- JSON = 2,
302
- UNRECOGNIZED = -1
303
- }
304
-
305
- export declare interface IRequestService {
306
- upload(file: File | string): Promise<IFileUploadResponse | undefined>;
307
- import(importRequest: IImportRequest): Promise<IImportResponse | undefined>;
308
- export(exportRequest: IExportRequest): Promise<IExportResponse | undefined>;
309
- getTask(taskID: string): Promise<IGetTaskResponse | undefined>;
310
- signUrl(fileID: string): Promise<ISignUrlResponse | undefined>;
311
- }
312
-
313
- export declare const IRequestService: IdentifierDecorator<IRequestService>;
314
-
315
- declare interface IRequestState {
316
- error: IError | undefined;
317
- state: RequestState;
318
- }
319
-
320
- declare interface ISheetBlockData extends Omit<ISheetBlock, 'data'> {
321
- data: string;
322
- }
323
-
324
- declare interface ISheetBlockJson {
325
- [key: string]: Partial<ISheetBlockData>;
326
- }
327
-
328
- declare interface ISignUrlResponse {
329
- error: IError | undefined;
330
- url: string;
331
- }
332
-
333
- declare interface ISnapshotBlockJson {
334
- snapshot: ISnapshotJson;
335
- sheetBlocks: ISheetBlockJson;
336
- }
337
-
338
- declare interface ISnapshotJson extends Omit<ISnapshot, 'workbook' | 'doc'> {
339
- workbook: Partial<IWorkbookMetaJson>;
340
- doc: Partial<IDocumentMetaJson>;
341
- }
342
-
343
- declare interface IUniverExchangeClientConfig {
344
- /**
345
- * The URL of the endpoint for downloading files.
346
- * @default 'location.origin'
347
- */
348
- downloadEndpointUrl?: string;
349
- uploadFileServerUrl?: string;
350
- importServerUrl?: string;
351
- exportServerUrl?: string;
352
- getTaskServerUrl?: string;
353
- signUrlServerUrl?: string;
354
- maxTimeoutTime?: number;
355
- }
356
-
357
- export declare interface IUploadNotificationService {
358
- visible$: Observable<boolean>;
359
- state$: Observable<UploadNotificationState>;
360
- list$: Observable<ILinkList[]>;
361
- /**
362
- * Show upload notification
363
- */
364
- show(): void;
365
- /**
366
- * Hide upload notification
367
- */
368
- hide(): void;
369
- /**
370
- * Update upload notification state
371
- * @param state
372
- */
373
- updateState(state: UploadNotificationState): void;
374
- /**
375
- * Push link to upload notification
376
- * @param link
377
- */
378
- pushLink(link: ILinkList): void;
379
- }
380
-
381
- export declare const IUploadNotificationService: IdentifierDecorator<IUploadNotificationService>;
382
-
383
- declare interface IUploadProgress {
384
- /** Task that already completed. */
385
- done: number;
386
- /** The total number of tasks need to execute. */
387
- count: number;
388
- }
389
-
390
- declare interface IWorkbookMetaJson extends Omit<IWorkbookMeta, 'originalMeta' | 'sheets'> {
391
- originalMeta: string;
392
- sheets: {
393
- [key: string]: Partial<IWorksheetMetaJson>;
394
- };
395
- }
396
-
397
- declare interface IWorksheetMetaJson extends Omit<IWorksheetMeta, 'originalMeta'> {
398
- originalMeta: string;
399
- }
400
-
401
- /**
402
- * TODO@Dushusir maybe move to ExchangeClientPlugin plugin for reuse
403
- */
404
- export declare class RequestService implements IRequestService, IDisposable {
405
- private readonly _configService;
406
- private readonly _httpService;
407
- constructor(_configService: IConfigService, _httpService: HTTPService);
408
- dispose(): void;
409
- /**
410
- * upload file to server
411
- * @param file
412
- */
413
- upload(file: File | string, size?: number, flate?: boolean): Promise<IFileUploadResponse | undefined>;
414
- import(importRequest: IImportRequest): Promise<IImportResponse | undefined>;
415
- export(exportRequest: IExportRequest): Promise<IExportResponse | undefined>;
416
- getTask(taskID: string): Promise<IGetTaskResponse | undefined>;
417
- signUrl(fileID: string): Promise<ISignUrlResponse | undefined>;
418
- private _getUploadFileURL;
419
- private _getImportURL;
420
- private _getExportURL;
421
- private _getTaskURL;
422
- private _getSignURL;
423
- private _getMaxPollingTime;
424
- }
425
-
426
- declare enum RequestState {
427
- UPLOAD = 0,
428
- IMPORT = 1,
429
- EXPORT = 2,
430
- GET_TASK = 3,
431
- SIGN_URL = 4,
432
- GET_JSON = 5,
433
- GET_FILE = 6
434
- }
435
-
436
- /**
437
- * Convert the workbook data to snapshot data
438
- * @param workbookData
439
- * @returns
440
- */
441
- export declare function transformWorkbookDataToSnapshotJson(workbookData: IWorkbookData): Promise<ISnapshotBlockJson>;
442
-
443
- export declare class UniverExchangeClientPlugin extends Plugin_2 {
444
- private readonly _config;
445
- readonly _injector: Injector;
446
- private readonly _configService;
447
- static pluginName: string;
448
- constructor(_config: IUniverExchangeClientConfig | undefined, _injector: Injector, _configService: IConfigService);
449
- onStarting(): void;
450
- onReady(): void;
451
- }
452
-
453
- export declare function UploadNotificationContainer(): default_2.JSX.Element;
454
-
455
- export declare class UploadNotificationService extends Disposable_2 implements IUploadNotificationService, IDisposable {
456
- private readonly _visible$;
457
- private readonly _state$;
458
- private readonly _list$;
459
- readonly visible$: Observable<boolean>;
460
- readonly state$: Observable<UploadNotificationState>;
461
- readonly list$: Observable<ILinkList[]>;
462
- private _list;
463
- constructor();
464
- dispose(): void;
465
- show(): void;
466
- hide(): void;
467
- updateState(state: UploadNotificationState): void;
468
- pushLink(link: ILinkList): void;
469
- }
470
-
471
- export declare enum UploadNotificationState {
472
- UPLOADING = 0,
473
- SUCCESS = 1,
474
- ERROR = 2
475
- }
476
-
477
- export { }
478
-
479
-
480
- declare module '@univerjs/core' {
481
- interface FUniver extends IFUniverExchangeClientMixin {
482
- }
483
- }
1
+ export { UniverExchangeClientPlugin } from './plugin';
2
+ export { ExchangeService, IExchangeService } from './services/exchange.service';
3
+ export { ExchangeOperateService, IExchangeOperateService } from './services/operate.service';
4
+ export { IRequestService, RequestService } from './services/request.service';
5
+ /** @deprecated Will be removed in the 0.2.19 release */
6
+ export { EXCHANGE_EXPORT_SERVER_URL_KEY, EXCHANGE_GET_TASK_SERVER_URL_KEY, EXCHANGE_IMPORT_SERVER_URL_KEY, EXCHANGE_SIGN_URL_SERVER_URL_KEY, EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY } from './services/request.service';
7
+ export { IUploadNotificationService, UploadNotificationService, UploadNotificationState } from './services/upload-notification.service';
8
+ export { downloadFile, getUniverTypeByFile, getUploadFile } from './services/utils/tool';
9
+ export { UploadNotificationContainer } from './views/UploadNotificationContainer';
10
+ export { transformWorkbookDataToSnapshotJson } from './services/utils/snapshot';