@univerjs-pro/exchange-client 0.4.2 → 0.5.0-alpha.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.
Files changed (58) hide show
  1. package/lib/cjs/facade.js +1 -0
  2. package/lib/cjs/index.js +2 -2
  3. package/lib/cjs/locale/en-US.js +1 -0
  4. package/lib/cjs/locale/fa-IR.js +1 -0
  5. package/lib/cjs/locale/ru-RU.js +1 -0
  6. package/lib/cjs/locale/vi-VN.js +1 -0
  7. package/lib/cjs/locale/zh-CN.js +1 -0
  8. package/lib/cjs/locale/zh-TW.js +1 -0
  9. package/lib/es/facade.js +1 -0
  10. package/lib/es/index.js +2 -2
  11. package/lib/es/locale/en-US.js +1 -0
  12. package/lib/es/locale/fa-IR.js +1 -0
  13. package/lib/es/locale/ru-RU.js +1 -0
  14. package/lib/es/locale/vi-VN.js +1 -0
  15. package/lib/es/locale/zh-CN.js +1 -0
  16. package/lib/es/locale/zh-TW.js +1 -0
  17. package/lib/types/index.d.ts +483 -10
  18. package/lib/umd/facade.js +1 -0
  19. package/lib/umd/index.js +2 -2
  20. package/lib/umd/locale/en-US.js +1 -0
  21. package/lib/umd/locale/fa-IR.js +1 -0
  22. package/lib/umd/locale/ru-RU.js +1 -0
  23. package/lib/umd/locale/vi-VN.js +1 -0
  24. package/lib/umd/locale/zh-CN.js +1 -0
  25. package/lib/umd/locale/zh-TW.js +1 -0
  26. package/package.json +37 -19
  27. package/lib/locale/en-US.json +0 -20
  28. package/lib/locale/fa-IR.json +0 -20
  29. package/lib/locale/ru-RU.json +0 -20
  30. package/lib/locale/vi-VN.json +0 -20
  31. package/lib/locale/zh-CN.json +0 -20
  32. package/lib/locale/zh-TW.json +0 -20
  33. package/lib/types/controllers/config.schema.d.ts +0 -16
  34. package/lib/types/controllers/exchange.controller.d.ts +0 -8
  35. package/lib/types/locale/en-US.d.ts +0 -3
  36. package/lib/types/locale/fa-IR.d.ts +0 -3
  37. package/lib/types/locale/ru-RU.d.ts +0 -3
  38. package/lib/types/locale/vi-VN.d.ts +0 -3
  39. package/lib/types/locale/zh-CN.d.ts +0 -21
  40. package/lib/types/locale/zh-TW.d.ts +0 -3
  41. package/lib/types/plugin.d.ts +0 -11
  42. package/lib/types/services/__tests__/snapshot.spec.d.ts +0 -16
  43. package/lib/types/services/exchange.service.d.ts +0 -87
  44. package/lib/types/services/operate.service.d.ts +0 -121
  45. package/lib/types/services/request.service.d.ts +0 -107
  46. package/lib/types/services/upload-notification.service.d.ts +0 -52
  47. package/lib/types/services/utils/snapshot.d.ts +0 -76
  48. package/lib/types/services/utils/tool.d.ts +0 -19
  49. package/lib/types/views/UploadNotificationContainer.d.ts +0 -2
  50. package/lib/types/views/link-list/LinkList.d.ts +0 -6
  51. package/lib/types/views/upload-again/UploadAgain.d.ts +0 -2
  52. package/lib/types/views/upload-button/UploadButton.d.ts +0 -7
  53. package/lib/types/views/upload-error/UploadError.d.ts +0 -2
  54. package/lib/types/views/upload-notification/UploadNotification.d.ts +0 -2
  55. package/lib/types/views/upload-success/UploadSuccess.d.ts +0 -5
  56. package/lib/types/views/uploading/Uploading.d.ts +0 -2
  57. package/lib/types/views/uploading/upload-cancel/UploadCancel.d.ts +0 -2
  58. package/lib/types/views/uploading/upload-progress/UploadProgress.d.ts +0 -5
@@ -0,0 +1 @@
1
+ (function(_0x8e91ae,_0x541829){var _0x33b69d=_0xfe6d,_0x5ca9d4=_0x8e91ae();while(!![]){try{var _0xa21e46=parseInt(_0x33b69d(0x1a7))/0x1*(parseInt(_0x33b69d(0x191))/0x2)+parseInt(_0x33b69d(0x198))/0x3+-parseInt(_0x33b69d(0x1a1))/0x4+parseInt(_0x33b69d(0x196))/0x5*(parseInt(_0x33b69d(0x19a))/0x6)+parseInt(_0x33b69d(0x192))/0x7+-parseInt(_0x33b69d(0x1a5))/0x8+parseInt(_0x33b69d(0x1a8))/0x9*(-parseInt(_0x33b69d(0x197))/0xa);if(_0xa21e46===_0x541829)break;else _0x5ca9d4['push'](_0x5ca9d4['shift']());}catch(_0x102ee3){_0x5ca9d4['push'](_0x5ca9d4['shift']());}}}(_0x5b96,0x547db),function(_0x56d70f,_0x364ae2){var _0x1bf5ea=_0xfe6d;typeof exports==_0x1bf5ea(0x193)&&typeof module<'u'?module[_0x1bf5ea(0x1a2)]=_0x364ae2():typeof define=='function'&&define[_0x1bf5ea(0x194)]?define(_0x364ae2):(_0x56d70f=typeof globalThis<'u'?globalThis:_0x56d70f||self,_0x56d70f['UniverExchangeClientEnUS']=_0x364ae2());}(this,function(){'use strict';var _0x1fcf0a=_0xfe6d;return{'exchange':{'file':'File','upload':_0x1fcf0a(0x1a6),'download':_0x1fcf0a(0x199),'uploading':_0x1fcf0a(0x1a3),'uploadSuccess':_0x1fcf0a(0x19b),'uploadSuccessTip':_0x1fcf0a(0x19f),'downloading':_0x1fcf0a(0x19d),'downloadSuccess':_0x1fcf0a(0x19c),'unknownMistake':'Unknown\x20mistake','networkError':_0x1fcf0a(0x195),'tooLarge':'Data\x20is\x20too\x20large','internalError':_0x1fcf0a(0x1a4),'interrupt':_0x1fcf0a(0x19e),'wait':_0x1fcf0a(0x1a0),'cancel':'Cancel','uploadAgain':_0x1fcf0a(0x1a9)}};}));function _0xfe6d(_0x97705e,_0x5a1b98){var _0x5b9621=_0x5b96();return _0xfe6d=function(_0xfe6dc1,_0x534688){_0xfe6dc1=_0xfe6dc1-0x191;var _0x156358=_0x5b9621[_0xfe6dc1];return _0x156358;},_0xfe6d(_0x97705e,_0x5a1b98);}function _0x5b96(){var _0x5837b4=['File\x20uploaded\x20successfully','Download\x20success','Downloading','The\x20network\x20connection\x20was\x20interrupted\x20and\x20the\x20file\x20upload\x20failed.','{0}\x20file(s)\x20uploaded\x20successfully','Please\x20wait...','1071552CUPMAG','exports','Uploading','Internal\x20unknown\x20error','3524920CcJlNg','Open(File)','10QemSgG','603kVLiDi','Upload\x20again','97022OEZcfr','4478187IqEMXd','object','amd','Network\x20error','185465ExMMeP','94550MocWxS','910683FFHeSi','Save\x20As','42kqIjqF'];_0x5b96=function(){return _0x5837b4;};return _0x5b96();}
@@ -0,0 +1 @@
1
+ function _0x16a4(){var _0xfae0d1=['دانلود\x20موفقیت\x20آمیز','8974620rfxsOq','خطای\x20شبکه','exports','object','2217187kJQuuz','993906Dtvsbo','لطفا\x20صبر\x20کنید...','ذخیره\x20به\x20عنوان','UniverExchangeClientFaIR','11hioYfn','خطای\x20داخلی\x20ناشناخته','داده\x20خیلی\x20بزرگ\x20است','بارگذاری\x20مجدد','49260ZOQhVQ','فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','function','39294rYmokZ','بازکردن(فایل)','در\x20حال\x20دانلود','amd','1217091FduOXd','1672AXbytr','18686110zQiObc','492WEDlvl','{0}\x20فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','3imabVi'];_0x16a4=function(){return _0xfae0d1;};return _0x16a4();}function _0x428a(_0x32666f,_0x3948b8){var _0x16a4a3=_0x16a4();return _0x428a=function(_0x428a99,_0x23b70d){_0x428a99=_0x428a99-0x19b;var _0xf84822=_0x16a4a3[_0x428a99];return _0xf84822;},_0x428a(_0x32666f,_0x3948b8);}(function(_0x4e8bef,_0x50e3fa){var _0x117b22=_0x428a,_0x1ab836=_0x4e8bef();while(!![]){try{var _0x40503b=-parseInt(_0x117b22(0x1ad))/0x1*(-parseInt(_0x117b22(0x1b4))/0x2)+parseInt(_0x117b22(0x1a8))/0x3+parseInt(_0x117b22(0x1ab))/0x4*(-parseInt(_0x117b22(0x1a1))/0x5)+parseInt(_0x117b22(0x1af))/0x6+-parseInt(_0x117b22(0x1b3))/0x7+parseInt(_0x117b22(0x1a9))/0x8*(parseInt(_0x117b22(0x1a4))/0x9)+-parseInt(_0x117b22(0x1aa))/0xa*(parseInt(_0x117b22(0x19d))/0xb);if(_0x40503b===_0x50e3fa)break;else _0x1ab836['push'](_0x1ab836['shift']());}catch(_0x5825e2){_0x1ab836['push'](_0x1ab836['shift']());}}}(_0x16a4,0xdd998),function(_0x1f879f,_0x7d864b){var _0x4cb565=_0x428a;typeof exports==_0x4cb565(0x1b2)&&typeof module<'u'?module[_0x4cb565(0x1b1)]=_0x7d864b():typeof define==_0x4cb565(0x1a3)&&define[_0x4cb565(0x1a7)]?define(_0x7d864b):(_0x1f879f=typeof globalThis<'u'?globalThis:_0x1f879f||self,_0x1f879f[_0x4cb565(0x19c)]=_0x7d864b());}(this,function(){'use strict';var _0x540df5=_0x428a;return{'exchange':{'file':'فایل','upload':_0x540df5(0x1a5),'download':_0x540df5(0x19b),'uploading':'در\x20حال\x20بارگذاری','uploadSuccess':_0x540df5(0x1a2),'uploadSuccessTip':_0x540df5(0x1ac),'downloading':_0x540df5(0x1a6),'downloadSuccess':_0x540df5(0x1ae),'unknownMistake':'خطای\x20ناشناخته','networkError':_0x540df5(0x1b0),'tooLarge':_0x540df5(0x19f),'internalError':_0x540df5(0x19e),'interrupt':'اتصال\x20شبکه\x20قطع\x20شد\x20و\x20بارگذاری\x20فایل\x20ناموفق\x20بود.','wait':_0x540df5(0x1b5),'cancel':'لغو','uploadAgain':_0x540df5(0x1a0)}};}));
@@ -0,0 +1 @@
1
+ function _0x348d(_0x212f99,_0x5078a1){var _0x5a3280=_0x5a32();return _0x348d=function(_0x348d58,_0x16af72){_0x348d58=_0x348d58-0xef;var _0x1ab108=_0x5a3280[_0x348d58];return _0x1ab108;},_0x348d(_0x212f99,_0x5078a1);}(function(_0x2616fc,_0x31e0ce){var _0x6ff1b1=_0x348d,_0x17a573=_0x2616fc();while(!![]){try{var _0x48d8ff=-parseInt(_0x6ff1b1(0xfd))/0x1*(-parseInt(_0x6ff1b1(0x107))/0x2)+parseInt(_0x6ff1b1(0xf3))/0x3+parseInt(_0x6ff1b1(0x10a))/0x4*(-parseInt(_0x6ff1b1(0x106))/0x5)+-parseInt(_0x6ff1b1(0x102))/0x6+-parseInt(_0x6ff1b1(0xff))/0x7+parseInt(_0x6ff1b1(0x109))/0x8*(parseInt(_0x6ff1b1(0xfa))/0x9)+parseInt(_0x6ff1b1(0xf8))/0xa;if(_0x48d8ff===_0x31e0ce)break;else _0x17a573['push'](_0x17a573['shift']());}catch(_0x24b19a){_0x17a573['push'](_0x17a573['shift']());}}}(_0x5a32,0xb5a3c),function(_0x2d8976,_0x481c04){var _0x238b37=_0x348d;typeof exports==_0x238b37(0x103)&&typeof module<'u'?module[_0x238b37(0x105)]=_0x481c04():typeof define==_0x238b37(0xf5)&&define[_0x238b37(0xf6)]?define(_0x481c04):(_0x2d8976=typeof globalThis<'u'?globalThis:_0x2d8976||self,_0x2d8976[_0x238b37(0xf0)]=_0x481c04());}(this,function(){'use strict';var _0x1262d2=_0x348d;return{'exchange':{'file':_0x1262d2(0xf2),'upload':_0x1262d2(0xf4),'download':_0x1262d2(0x100),'uploading':_0x1262d2(0x101),'uploadSuccess':'Файл\x20успешно\x20загружен','uploadSuccessTip':'{0}\x20файл(ов)\x20успешно\x20загружен(о)','downloading':_0x1262d2(0x104),'downloadSuccess':_0x1262d2(0xf1),'unknownMistake':'Неизвестная\x20ошибка','networkError':_0x1262d2(0xfc),'tooLarge':_0x1262d2(0xef),'internalError':_0x1262d2(0xfe),'interrupt':_0x1262d2(0xfb),'wait':_0x1262d2(0x108),'cancel':_0x1262d2(0xf7),'uploadAgain':_0x1262d2(0xf9)}};}));function _0x5a32(){var _0x5e907f=['Отмена','338620lhUfQZ','Загрузить\x20снова','927eEKegY','Сетевое\x20соединение\x20было\x20прервано,\x20и\x20загрузка\x20файла\x20не\x20удалась.','Сетевая\x20ошибка','5wBRBJs','Внутренняя\x20неизвестная\x20ошибка','232155NNfFFQ','Сохранить\x20как','Загрузка','2272020tZTQlG','object','Скачивание','exports','3812785vdsSRk','378414cPoUiy','Пожалуйста,\x20подождите...','4504gIZNiS','4zMxvXR','Данные\x20слишком\x20большие','UniverExchangeClientRuRU','Скачивание\x20успешно','Файл','2641506huyloS','Открыть(Файл)','function','amd'];_0x5a32=function(){return _0x5e907f;};return _0x5a32();}
@@ -0,0 +1 @@
1
+ function _0x79e9(_0xe2fc98,_0x457d3c){var _0x453596=_0x4535();return _0x79e9=function(_0x79e968,_0x4432c7){_0x79e968=_0x79e968-0x174;var _0x4fc002=_0x453596[_0x79e968];return _0x4fc002;},_0x79e9(_0xe2fc98,_0x457d3c);}function _0x4535(){var _0xf88333=['157246ykvkyZ','Lỗi\x20không\x20xác\x20định\x20bên\x20trong','Tải\x20xuống\x20thành\x20công','Lỗi\x20không\x20xác\x20định','{0}\x20tệp\x20đã\x20được\x20tải\x20lên\x20thành\x20công','18279wSbBrI','Mở\x20(Tệp)','2990jJlbUe','Đang\x20tải\x20lên','Hủy\x20bỏ','6FmCXid','4977784FDuDTI','Kết\x20nối\x20mạng\x20bị\x20gián\x20đoạn,\x20tải\x20lên\x20tệp\x20thất\x20bại.','1009815QiEaNK','279176dGXeWM','Lưu\x20dưới\x20dạng','1825845ZLAMvt','exports','Tải\x20lên\x20lại','Đang\x20tải\x20xuống','object','212NPrCky','Tệp','52035sRCLKA','Tải\x20lên\x20tệp\x20thành\x20công','function','Lỗi\x20mạng','amd'];_0x4535=function(){return _0xf88333;};return _0x4535();}(function(_0x118707,_0x49e8b5){var _0x54e9a4=_0x79e9,_0x46a47c=_0x118707();while(!![]){try{var _0x9c67b7=parseInt(_0x54e9a4(0x184))/0x1+parseInt(_0x54e9a4(0x176))/0x2+-parseInt(_0x54e9a4(0x183))/0x3+parseInt(_0x54e9a4(0x18b))/0x4*(parseInt(_0x54e9a4(0x18d))/0x5)+-parseInt(_0x54e9a4(0x180))/0x6*(parseInt(_0x54e9a4(0x186))/0x7)+parseInt(_0x54e9a4(0x181))/0x8+-parseInt(_0x54e9a4(0x17b))/0x9*(parseInt(_0x54e9a4(0x17d))/0xa);if(_0x9c67b7===_0x49e8b5)break;else _0x46a47c['push'](_0x46a47c['shift']());}catch(_0x541356){_0x46a47c['push'](_0x46a47c['shift']());}}}(_0x4535,0x4fce4),function(_0x4c969b,_0x1f2c50){var _0x3fba92=_0x79e9;typeof exports==_0x3fba92(0x18a)&&typeof module<'u'?module[_0x3fba92(0x187)]=_0x1f2c50():typeof define==_0x3fba92(0x18f)&&define[_0x3fba92(0x175)]?define(_0x1f2c50):(_0x4c969b=typeof globalThis<'u'?globalThis:_0x4c969b||self,_0x4c969b['UniverExchangeClientViVN']=_0x1f2c50());}(this,function(){'use strict';var _0x5a339a=_0x79e9;return{'exchange':{'file':_0x5a339a(0x18c),'upload':_0x5a339a(0x17c),'download':_0x5a339a(0x185),'uploading':_0x5a339a(0x17e),'uploadSuccess':_0x5a339a(0x18e),'uploadSuccessTip':_0x5a339a(0x17a),'downloading':_0x5a339a(0x189),'downloadSuccess':_0x5a339a(0x178),'unknownMistake':_0x5a339a(0x179),'networkError':_0x5a339a(0x174),'tooLarge':'Luồng\x20dữ\x20liệu\x20quá\x20lớn','internalError':_0x5a339a(0x177),'interrupt':_0x5a339a(0x182),'wait':'Vui\x20lòng\x20đợi...','cancel':_0x5a339a(0x17f),'uploadAgain':_0x5a339a(0x188)}};}));
@@ -0,0 +1 @@
1
+ function _0x1bae(_0x160a86,_0x544ada){var _0x11c2ea=_0x11c2();return _0x1bae=function(_0x1bae08,_0x472da0){_0x1bae08=_0x1bae08-0x6b;var _0x51ccd4=_0x11c2ea[_0x1bae08];return _0x51ccd4;},_0x1bae(_0x160a86,_0x544ada);}(function(_0x5977b4,_0x470303){var _0x189a95=_0x1bae,_0x16b118=_0x5977b4();while(!![]){try{var _0x1ffebd=parseInt(_0x189a95(0x74))/0x1*(-parseInt(_0x189a95(0x6f))/0x2)+parseInt(_0x189a95(0x79))/0x3*(parseInt(_0x189a95(0x76))/0x4)+-parseInt(_0x189a95(0x71))/0x5*(parseInt(_0x189a95(0x7b))/0x6)+-parseInt(_0x189a95(0x7c))/0x7*(parseInt(_0x189a95(0x72))/0x8)+-parseInt(_0x189a95(0x80))/0x9+parseInt(_0x189a95(0x6c))/0xa*(parseInt(_0x189a95(0x85))/0xb)+parseInt(_0x189a95(0x7e))/0xc*(parseInt(_0x189a95(0x78))/0xd);if(_0x1ffebd===_0x470303)break;else _0x16b118['push'](_0x16b118['shift']());}catch(_0x279ca3){_0x16b118['push'](_0x16b118['shift']());}}}(_0x11c2,0x73121),function(_0x199f03,_0x324fd8){var _0x5add12=_0x1bae;typeof exports==_0x5add12(0x7f)&&typeof module<'u'?module[_0x5add12(0x6e)]=_0x324fd8():typeof define==_0x5add12(0x81)&&define[_0x5add12(0x70)]?define(_0x324fd8):(_0x199f03=typeof globalThis<'u'?globalThis:_0x199f03||self,_0x199f03[_0x5add12(0x82)]=_0x324fd8());}(this,function(){'use strict';var _0x5b7023=_0x1bae;return{'exchange':{'file':'文件','upload':_0x5b7023(0x6b),'download':'另存为','uploading':'上传中','uploadSuccess':_0x5b7023(0x77),'uploadSuccessTip':_0x5b7023(0x7d),'downloading':_0x5b7023(0x83),'downloadSuccess':'下载成功','unknownMistake':_0x5b7023(0x7a),'networkError':_0x5b7023(0x6d),'tooLarge':_0x5b7023(0x75),'internalError':_0x5b7023(0x86),'interrupt':_0x5b7023(0x73),'wait':_0x5b7023(0x84),'cancel':'取消','uploadAgain':'再次上传'}};}));function _0x11c2(){var _0x4c7053=['1632IkDYCq','网络连接中断,文件上传失败。','11HgPNQP','数据流过大','5864dBROfm','文件上传成功','3796lMswmy','399dWGnGP','未知错误','58998WioPgY','24241pHpzJk','{0}个文件上传成功','97320zvCQZQ','object','708885ZHpQTv','function','UniverExchangeClientZhCN','下载中','请稍等...','27302hyOELG','内部未知错误','打开(文件)','1270mbPTAP','网络异常','exports','162568mTCpjo','amd','370EBKPHz'];_0x11c2=function(){return _0x4c7053;};return _0x11c2();}
@@ -0,0 +1 @@
1
+ function _0x1d7d(_0x1f332e,_0x2b90d0){var _0x1a1144=_0x1a11();return _0x1d7d=function(_0x1d7dd6,_0x5b4e69){_0x1d7dd6=_0x1d7dd6-0x99;var _0x502700=_0x1a1144[_0x1d7dd6];return _0x502700;},_0x1d7d(_0x1f332e,_0x2b90d0);}(function(_0xe01d59,_0x45dfaf){var _0xb8e0f6=_0x1d7d,_0x237422=_0xe01d59();while(!![]){try{var _0x4121e5=parseInt(_0xb8e0f6(0xab))/0x1*(parseInt(_0xb8e0f6(0xa0))/0x2)+parseInt(_0xb8e0f6(0xa4))/0x3+parseInt(_0xb8e0f6(0xa8))/0x4+parseInt(_0xb8e0f6(0xad))/0x5+-parseInt(_0xb8e0f6(0xa7))/0x6*(-parseInt(_0xb8e0f6(0xaf))/0x7)+-parseInt(_0xb8e0f6(0xa6))/0x8+parseInt(_0xb8e0f6(0x99))/0x9*(-parseInt(_0xb8e0f6(0xb0))/0xa);if(_0x4121e5===_0x45dfaf)break;else _0x237422['push'](_0x237422['shift']());}catch(_0x32ec46){_0x237422['push'](_0x237422['shift']());}}}(_0x1a11,0xcc8e7),function(_0x1028f2,_0x4df6fc){var _0x4dde86=_0x1d7d;typeof exports=='object'&&typeof module<'u'?module[_0x4dde86(0x9a)]=_0x4df6fc():typeof define==_0x4dde86(0xa1)&&define[_0x4dde86(0x9c)]?define(_0x4df6fc):(_0x1028f2=typeof globalThis<'u'?globalThis:_0x1028f2||self,_0x1028f2[_0x4dde86(0xaa)]=_0x4df6fc());}(this,function(){'use strict';var _0x2ecdf5=_0x1d7d;return{'exchange':{'file':'檔案','upload':_0x2ecdf5(0xac),'download':_0x2ecdf5(0xa3),'uploading':_0x2ecdf5(0xa9),'uploadSuccess':'檔案上傳成功','uploadSuccessTip':'{0}個檔案上傳成功','downloading':_0x2ecdf5(0xa2),'downloadSuccess':_0x2ecdf5(0x9d),'unknownMistake':_0x2ecdf5(0x9f),'networkError':_0x2ecdf5(0xb1),'tooLarge':_0x2ecdf5(0x9b),'internalError':_0x2ecdf5(0x9e),'interrupt':_0x2ecdf5(0xa5),'wait':'請稍等...','cancel':'取消','uploadAgain':_0x2ecdf5(0xae)}};}));function _0x1a11(){var _0x4e2032=['上傳中','UniverExchangeClientZhTW','15809MMjpuh','開啟(檔案)','7048695mjEjxo','再次上傳','200193IrKlOe','10zeaCXW','網路異常','31770495veCogO','exports','資料流過大','amd','下載成功','內部未知錯誤','未知錯誤','134jcoXFU','function','下載中','另存為','3061689uopawZ','網路連線中斷,檔案上傳失敗。\x20','9111752myFFOm','192QJdqTB','4408856YWMprH'];_0x1a11=function(){return _0x4e2032;};return _0x1a11();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/exchange-client",
3
- "version": "0.4.2",
3
+ "version": "0.5.0-alpha.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -28,11 +28,19 @@
28
28
  "require": "./lib/cjs/*",
29
29
  "types": "./lib/types/index.d.ts"
30
30
  },
31
- "./lib/*": "./lib/*",
32
- "./locale/*": "./lib/locale/*.json"
31
+ "./facade": {
32
+ "import": "./lib/es/facade.js",
33
+ "require": "./lib/cjs/facade.js",
34
+ "types": "./lib/types/facade/index.d.ts"
35
+ },
36
+ "./locale/*": {
37
+ "import": "./lib/es/locale/*.js",
38
+ "require": "./lib/cjs/locale/*.js",
39
+ "types": "./lib/types/locale/*.d.ts"
40
+ },
41
+ "./lib/*": "./lib/*"
33
42
  },
34
- "main": "./lib/cjs/index.js",
35
- "module": "./lib/es/index.js",
43
+ "main": "./lib/es/index.js",
36
44
  "types": "./lib/types/index.d.ts",
37
45
  "publishConfig": {
38
46
  "access": "public"
@@ -48,25 +56,25 @@
48
56
  "rxjs": ">=7.0.0"
49
57
  },
50
58
  "dependencies": {
51
- "@univerjs/icons": "^0.1.78",
59
+ "@univerjs/icons": "^0.2.5",
52
60
  "pako": "^2.1.0",
53
- "@univerjs/core": "0.4.2",
54
- "@univerjs/design": "0.4.2",
55
- "@univerjs-pro/collaboration": "0.4.2",
61
+ "@univerjs/design": "0.5.0-alpha.0",
62
+ "@univerjs/core": "0.5.0-alpha.0",
63
+ "@univerjs-pro/collaboration": "0.5.0-alpha.0",
64
+ "@univerjs/network": "0.5.0-alpha.0",
56
65
  "@univerjs/protocol": "0.1.39-alpha.38",
57
- "@univerjs/network": "0.4.2",
58
- "@univerjs/ui": "0.4.2"
66
+ "@univerjs/ui": "0.5.0-alpha.0"
59
67
  },
60
68
  "devDependencies": {
61
69
  "@types/pako": "^2.0.3",
62
70
  "less": "^4.2.0",
63
71
  "rxjs": "^7.8.1",
64
72
  "typescript": "5.6.3",
65
- "vite": "^5.4.8",
66
- "vitest": "^2.1.2",
67
- "@univerjs-infra/shared": "0.4.2"
73
+ "vite": "^5.4.10",
74
+ "vitest": "^2.1.4",
75
+ "@univerjs-infra/shared": "0.5.0-alpha.0"
68
76
  },
69
- "univerSpace": {
77
+ "space": {
70
78
  ".": {
71
79
  "import": "./lib/es/index.js",
72
80
  "require": "./lib/cjs/index.js",
@@ -77,14 +85,24 @@
77
85
  "require": "./lib/cjs/*",
78
86
  "types": "./lib/types/index.d.ts"
79
87
  },
80
- "./lib/*": "./lib/*",
81
- "./locale/*": "./lib/locale/*.json"
88
+ "./facade": {
89
+ "import": "./lib/es/facade.js",
90
+ "require": "./lib/cjs/facade.js",
91
+ "types": "./lib/types/facade/index.d.ts"
92
+ },
93
+ "./locale/*": {
94
+ "import": "./lib/es/locale/*.js",
95
+ "require": "./lib/cjs/locale/*.js",
96
+ "types": "./lib/types/locale/*.d.ts"
97
+ },
98
+ "./lib/*": "./lib/*"
82
99
  },
83
100
  "scripts": {
84
101
  "test": "vitest run",
85
102
  "test:watch": "vitest",
86
103
  "coverage": "vitest run --coverage",
87
104
  "lint:types": "tsc --noEmit",
88
- "build": "tsc && vite build"
89
- }
105
+ "build": "tsx build.ts"
106
+ },
107
+ "module": "./lib/es/index.js"
90
108
  }
@@ -1,20 +0,0 @@
1
- {
2
- "exchange": {
3
- "file": "File",
4
- "upload": "Open(File)",
5
- "download": "Save As",
6
- "uploading": "Uploading",
7
- "uploadSuccess": "File uploaded successfully",
8
- "uploadSuccessTip": "{0} file(s) uploaded successfully",
9
- "downloading": "Downloading",
10
- "downloadSuccess": "Download success",
11
- "unknownMistake": "Unknown mistake",
12
- "networkError": "Network error",
13
- "tooLarge": "Data is too large",
14
- "internalError": "Internal unknown error",
15
- "interrupt": "The network connection was interrupted and the file upload failed.",
16
- "wait": "Please wait...",
17
- "cancel": "Cancel",
18
- "uploadAgain": "Upload again"
19
- }
20
- }
@@ -1,20 +0,0 @@
1
- {
2
- "exchange": {
3
- "file": "فایل",
4
- "upload": "بازکردن(فایل)",
5
- "download": "ذخیره به عنوان",
6
- "uploading": "در حال بارگذاری",
7
- "uploadSuccess": "فایل با موفقیت بارگذاری شد",
8
- "uploadSuccessTip": "{0} فایل با موفقیت بارگذاری شد",
9
- "downloading": "در حال دانلود",
10
- "downloadSuccess": "دانلود موفقیت آمیز",
11
- "unknownMistake": "خطای ناشناخته",
12
- "networkError": "خطای شبکه",
13
- "tooLarge": "داده خیلی بزرگ است",
14
- "internalError": "خطای داخلی ناشناخته",
15
- "interrupt": "اتصال شبکه قطع شد و بارگذاری فایل ناموفق بود.",
16
- "wait": "لطفا صبر کنید...",
17
- "cancel": "لغو",
18
- "uploadAgain": "بارگذاری مجدد"
19
- }
20
- }
@@ -1,20 +0,0 @@
1
- {
2
- "exchange": {
3
- "file": "Файл",
4
- "upload": "Открыть(Файл)",
5
- "download": "Сохранить как",
6
- "uploading": "Загрузка",
7
- "uploadSuccess": "Файл успешно загружен",
8
- "uploadSuccessTip": "{0} файл(ов) успешно загружен(о)",
9
- "downloading": "Скачивание",
10
- "downloadSuccess": "Скачивание успешно",
11
- "unknownMistake": "Неизвестная ошибка",
12
- "networkError": "Сетевая ошибка",
13
- "tooLarge": "Данные слишком большие",
14
- "internalError": "Внутренняя неизвестная ошибка",
15
- "interrupt": "Сетевое соединение было прервано, и загрузка файла не удалась.",
16
- "wait": "Пожалуйста, подождите...",
17
- "cancel": "Отмена",
18
- "uploadAgain": "Загрузить снова"
19
- }
20
- }
@@ -1,20 +0,0 @@
1
- {
2
- "exchange": {
3
- "file": "Tệp",
4
- "upload": "Mở (Tệp)",
5
- "download": "Lưu dưới dạng",
6
- "uploading": "Đang tải lên",
7
- "uploadSuccess": "Tải lên tệp thành công",
8
- "uploadSuccessTip": "{0} tệp đã được tải lên thành công",
9
- "downloading": "Đang tải xuống",
10
- "downloadSuccess": "Tải xuống thành công",
11
- "unknownMistake": "Lỗi không xác định",
12
- "networkError": "Lỗi mạng",
13
- "tooLarge": "Luồng dữ liệu quá lớn",
14
- "internalError": "Lỗi không xác định bên trong",
15
- "interrupt": "Kết nối mạng bị gián đoạn, tải lên tệp thất bại.",
16
- "wait": "Vui lòng đợi...",
17
- "cancel": "Hủy bỏ",
18
- "uploadAgain": "Tải lên lại"
19
- }
20
- }
@@ -1,20 +0,0 @@
1
- {
2
- "exchange": {
3
- "file": "文件",
4
- "upload": "打开(文件)",
5
- "download": "另存为",
6
- "uploading": "上传中",
7
- "uploadSuccess": "文件上传成功",
8
- "uploadSuccessTip": "{0}个文件上传成功",
9
- "downloading": "下载中",
10
- "downloadSuccess": "下载成功",
11
- "unknownMistake": "未知错误",
12
- "networkError": "网络异常",
13
- "tooLarge": "数据流过大",
14
- "internalError": "内部未知错误",
15
- "interrupt": "网络连接中断,文件上传失败。",
16
- "wait": "请稍等...",
17
- "cancel": "取消",
18
- "uploadAgain": "再次上传"
19
- }
20
- }
@@ -1,20 +0,0 @@
1
- {
2
- "exchange": {
3
- "file": "檔案",
4
- "upload": "開啟(檔案)",
5
- "download": "另存為",
6
- "uploading": "上傳中",
7
- "uploadSuccess": "檔案上傳成功",
8
- "uploadSuccessTip": "{0}個檔案上傳成功",
9
- "downloading": "下載中",
10
- "downloadSuccess": "下載成功",
11
- "unknownMistake": "未知錯誤",
12
- "networkError": "網路異常",
13
- "tooLarge": "資料流過大",
14
- "internalError": "內部未知錯誤",
15
- "interrupt": "網路連線中斷,檔案上傳失敗。 ",
16
- "wait": "請稍等...",
17
- "cancel": "取消",
18
- "uploadAgain": "再次上傳"
19
- }
20
- }
@@ -1,16 +0,0 @@
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;
@@ -1,8 +0,0 @@
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
- }
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,21 +0,0 @@
1
- declare const locales: {
2
- exchange: {
3
- file: string;
4
- upload: string;
5
- download: string;
6
- uploading: string;
7
- uploadSuccess: string;
8
- uploadSuccessTip: string;
9
- downloading: string;
10
- downloadSuccess: string;
11
- unknownMistake: string;
12
- networkError: string;
13
- tooLarge: string;
14
- internalError: string;
15
- interrupt: string;
16
- wait: string;
17
- cancel: string;
18
- uploadAgain: string;
19
- };
20
- };
21
- export default locales;
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,11 +0,0 @@
1
- import { IUniverExchangeClientConfig } from './controllers/config.schema';
2
- import { IConfigService, Injector, Plugin } from '@univerjs/core';
3
- export declare class UniverExchangeClientPlugin extends Plugin {
4
- private readonly _config;
5
- readonly _injector: Injector;
6
- private readonly _configService;
7
- static pluginName: string;
8
- constructor(_config: IUniverExchangeClientConfig | undefined, _injector: Injector, _configService: IConfigService);
9
- onStarting(): void;
10
- onReady(): void;
11
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export {};
@@ -1,87 +0,0 @@
1
- import { IDisposable, IDocumentData, IWorkbookData, Disposable, IConfigService } from '@univerjs/core';
2
- import { IError, UniverType } from '@univerjs/protocol';
3
- import { RequestService } from './request.service';
4
- import { Observable } from 'rxjs';
5
- export declare enum RequestState {
6
- UPLOAD = 0,
7
- IMPORT = 1,
8
- EXPORT = 2,
9
- GET_TASK = 3,
10
- SIGN_URL = 4,
11
- GET_JSON = 5,
12
- GET_FILE = 6
13
- }
14
- export interface IRequestState {
15
- error: IError | undefined;
16
- state: RequestState;
17
- }
18
- export interface IExchangeService {
19
- requestState$: Observable<IRequestState>;
20
- /**
21
- * Import XLSX file to workbook data
22
- * @param file
23
- */
24
- importXLSXToSnapshot(file: File | string): Promise<IWorkbookData | undefined>;
25
- /**
26
- * Export XLSX file by unit id
27
- * @param unitId
28
- */
29
- exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
30
- /**
31
- * Export XLSX file by workbook data
32
- * @param data
33
- * @returns
34
- */
35
- exportXLSXBySnapshot(snapshot: IWorkbookData): Promise<File | undefined>;
36
- /**
37
- * Import DOCX file to document data
38
- * @param file
39
- */
40
- importDOCXToSnapshot(file: File | string): Promise<IDocumentData | undefined>;
41
- /**
42
- * Export DOCX file by unit id
43
- * @param unitId
44
- */
45
- exportDOCXByUnitId(unitId: string): Promise<File | undefined>;
46
- /**
47
- * Export DOCX file by document data
48
- * @param data
49
- * @returns
50
- */
51
- exportDOCXBySnapshot(snapshot: IDocumentData): Promise<File | undefined>;
52
- /**
53
- * Import file to unit id
54
- * @param file
55
- * @param univerType
56
- */
57
- importFileToUnitId(file: File | string, univerType: UniverType): Promise<string | undefined>;
58
- }
59
- export declare const IExchangeService: import('@wendellhu/redi').IdentifierDecorator<IExchangeService>;
60
- export declare class ExchangeService extends Disposable implements IExchangeService, IDisposable {
61
- private readonly _configService;
62
- private readonly _requestService;
63
- private readonly _requestState$;
64
- readonly requestState$: Observable<IRequestState>;
65
- constructor(_configService: IConfigService, _requestService: RequestService);
66
- dispose(): void;
67
- importDOCXToSnapshot(file: File | string): Promise<IDocumentData | undefined>;
68
- exportDOCXByUnitId(unitId: string): Promise<File | undefined>;
69
- exportDOCXBySnapshot(snapshot: IDocumentData): Promise<File | undefined>;
70
- importXLSXToSnapshot(file: File | string): Promise<IWorkbookData | undefined>;
71
- exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
72
- exportXLSXBySnapshot(data: IWorkbookData): Promise<File | undefined>;
73
- importFileToUnitId(file: File | string, univerType: UniverType): Promise<string | undefined>;
74
- private _importToSnapshot;
75
- /**
76
- * Export file by snapshot
77
- * @param snapshot
78
- * @param univerType
79
- * @returns
80
- */
81
- private _exportBySnapshot;
82
- private _export;
83
- private _upload;
84
- private _import;
85
- private _signUrl;
86
- private _getDownloadEndpointURL;
87
- }
@@ -1,121 +0,0 @@
1
- import { IDisposable, Disposable, ILogService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';
2
- import { Observable } from 'rxjs';
3
- import { ExchangeService } from './exchange.service';
4
- import { UploadNotificationService } from './upload-notification.service';
5
- import { UniverType } from '@univerjs/protocol';
6
- import { IMessageService } from '@univerjs/ui';
7
- export interface IExchangeOperateService {
8
- interrupt(): void;
9
- /**
10
- * Upload file to server, get unitId and open unit
11
- * @param file
12
- */
13
- importXLSXToUnitId(): Promise<string | undefined>;
14
- /**
15
- * Upload xlsx file to server, get snapshot and refresh current sheet
16
- * @param file
17
- */
18
- importXLSXToSnapshot(): Promise<void>;
19
- /**
20
- * Export xlsx file by unitId
21
- * @returns
22
- */
23
- exportXLSXByUnitId(unitId?: string, unitName?: string, unitType?: UniverInstanceType): Promise<void>;
24
- /**
25
- * Export xlsx file by snapshot
26
- * @returns
27
- */
28
- exportXLSXBySnapshot(): Promise<void>;
29
- /**
30
- * Upload file to server, get unitId and open unit
31
- * @param file
32
- */
33
- importDOCXToUnitId(): Promise<string | undefined>;
34
- /**
35
- * Upload docx file to server, get snapshot and refresh current doc
36
- * @param file
37
- */
38
- importDOCXToSnapshot(): Promise<void>;
39
- /**
40
- * Export docx file by unitId
41
- * @returns
42
- */
43
- exportDOCXByUnitId(unitId?: string, unitName?: string, unitType?: UniverType): Promise<void>;
44
- /**
45
- * Export docx file by snapshot
46
- * @returns
47
- */
48
- exportDOCXBySnapshot(): Promise<void>;
49
- /**
50
- * Upload file, supports multiple types
51
- * @param file
52
- */
53
- uploadFileToUnitId(types: UniverType[]): Promise<{
54
- unitId: string;
55
- type: UniverType;
56
- } | undefined>;
57
- /**
58
- * Customize the imported Unit URL format according to the needs of your own scene
59
- * @param getLink
60
- */
61
- registerLink(getLink: (unitId: string, univerType: UniverInstanceType) => string): void;
62
- /**
63
- * Observable of upload progress
64
- */
65
- progress$: Observable<IUploadProgress>;
66
- }
67
- export interface IUploadProgress {
68
- /** Task that already completed. */
69
- done: number;
70
- /** The total number of tasks need to execute. */
71
- count: number;
72
- }
73
- export declare const IExchangeOperateService: import('@wendellhu/redi').IdentifierDecorator<IExchangeOperateService>;
74
- export declare class ExchangeOperateService extends Disposable implements IExchangeOperateService, IDisposable {
75
- private _univerInstanceService;
76
- private readonly _messageService;
77
- private readonly _localeService;
78
- private readonly _exchangeService;
79
- private readonly _uploadNotificationService;
80
- protected readonly _logService: ILogService;
81
- private _interrupted;
82
- private readonly _progress$;
83
- readonly progress$: Observable<IUploadProgress>;
84
- private _totalUploadTaskCount;
85
- private _doneUploadTaskCount;
86
- constructor(_univerInstanceService: IUniverInstanceService, _messageService: IMessageService, _localeService: LocaleService, _exchangeService: ExchangeService, _uploadNotificationService: UploadNotificationService, _logService: ILogService);
87
- interrupt(): void;
88
- uploadFileToUnitId(types: UniverType[]): Promise<{
89
- unitId: string;
90
- type: UniverType;
91
- } | undefined>;
92
- importDOCXToUnitId(): Promise<string | undefined>;
93
- importDOCXToSnapshot(): Promise<void>;
94
- exportDOCXByUnitId(unitId?: string, unitName?: string, unitType?: UniverInstanceType): Promise<void>;
95
- exportDOCXBySnapshot(): Promise<void>;
96
- importXLSXToUnitId(): Promise<string | undefined>;
97
- importXLSXToSnapshot(): Promise<void>;
98
- exportXLSXByUnitId(unitId?: string, unitName?: string): Promise<void>;
99
- exportXLSXBySnapshot(): Promise<void>;
100
- registerLink(getLink: (unitId: string, univerType: UniverInstanceType) => string): void;
101
- private _importFileToUnitId;
102
- private _getUnitID;
103
- private _getUnitName;
104
- private _getUnitJson;
105
- /**
106
- * Get unit link /?unit={unitId}&type=2
107
- * @param unitId
108
- * @param type
109
- * @returns
110
- */
111
- private _getLinkByUnitId;
112
- private _refresh;
113
- private _showNetworkError;
114
- private _showDownloadMessage;
115
- private _showUploadMessage;
116
- private _emitProgress;
117
- private _addTotalCount;
118
- private _addDoneTask;
119
- private _completeProgress;
120
- private _clearProgress;
121
- }