@univerjs-pro/exchange-client 0.8.0-nightly.202506081606 → 0.8.0-nightly.202506101607
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 +2 -2
- package/lib/cjs/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +2 -2
- package/lib/es/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +2 -2
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/facade/f-univer.d.ts +13 -4
- package/lib/types/index.d.ts +1 -1
- package/lib/types/locale/en-US.d.ts +1 -0
- package/lib/types/services/exchange.service.d.ts +11 -6
- package/lib/types/services/operate.service.d.ts +5 -5
- package/lib/types/services/request.service.d.ts +2 -0
- package/lib/types/services/utils/tool.d.ts +3 -2
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/lib/umd/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/package.json +7 -7
package/lib/locale/en-US.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x2d876a=_0x2f7c;(function(_0x86c0be,_0xcafe97){const _0x5b3e16=_0x2f7c,_0x579d62=_0x86c0be();while(!![]){try{const _0x2098ef=parseInt(_0x5b3e16(0xed))/0x1+parseInt(_0x5b3e16(0xf6))/0x2*(-parseInt(_0x5b3e16(0xf5))/0x3)+-parseInt(_0x5b3e16(0xf7))/0x4*(-parseInt(_0x5b3e16(0xf3))/0x5)+-parseInt(_0x5b3e16(0xfb))/0x6+parseInt(_0x5b3e16(0xf2))/0x7*(parseInt(_0x5b3e16(0xea))/0x8)+-parseInt(_0x5b3e16(0xef))/0x9+parseInt(_0x5b3e16(0xee))/0xa*(parseInt(_0x5b3e16(0xe9))/0xb);if(_0x2098ef===_0xcafe97)break;else _0x579d62['push'](_0x579d62['shift']());}catch(_0x43e6db){_0x579d62['push'](_0x579d62['shift']());}}}(_0x5978,0x1b65c));const e={'exchange':{'file':_0x2d876a(0xe7),'upload':_0x2d876a(0xfe),'download':'Save\x20As','downloadWPS':_0x2d876a(0xfd),'uploading':_0x2d876a(0xe8),'uploadSuccess':_0x2d876a(0xf9),'uploadSuccessTip':_0x2d876a(0xf4),'downloading':'Downloading','downloadSuccess':_0x2d876a(0xf1),'unknownMistake':_0x2d876a(0xfa),'networkError':'Network\x20error','tooLarge':'Data\x20is\x20too\x20large','internalError':_0x2d876a(0xfc),'interrupt':_0x2d876a(0xf0),'fileTypeError':'Selected\x20file\x20[{0}]\x20is\x20not\x20supported\x20for\x20upload','wait':_0x2d876a(0xec),'cancel':_0x2d876a(0xeb),'uploadAgain':_0x2d876a(0xf8)}};export{e as default};function _0x2f7c(_0x677b71,_0x3b6a09){const _0x597827=_0x5978();return _0x2f7c=function(_0x2f7ccb,_0x45cd36){_0x2f7ccb=_0x2f7ccb-0xe7;let _0x1673c8=_0x597827[_0x2f7ccb];return _0x1673c8;},_0x2f7c(_0x677b71,_0x3b6a09);}function _0x5978(){const _0x35eee4=['16prWWdz','Upload\x20again','File\x20uploaded\x20successfully','Unknown\x20mistake','201612tasdww','Internal\x20unknown\x20error','Save\x20As\x20WPS','Open(File)','File','Uploading','8613xKIEYm','32xchgqD','Cancel','Please\x20wait...','31334LDxbQM','90mdUHFr','888138DfaWNo','The\x20network\x20connection\x20was\x20interrupted\x20and\x20the\x20file\x20upload\x20failed','Download\x20success','190981RfArFe','250805yrXCYn','{0}\x20file(s)\x20uploaded\x20successfully','891QtZZqA','698vVJFqG'];_0x5978=function(){return _0x35eee4;};return _0x5978();}
|
package/lib/locale/fa-IR.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x596014=_0x445b;(function(_0x3750e6,_0x26815b){const _0x5e36a7=_0x445b,_0x3dc3ae=_0x3750e6();while(!![]){try{const _0x1836e5=parseInt(_0x5e36a7(0x121))/0x1+parseInt(_0x5e36a7(0x134))/0x2*(parseInt(_0x5e36a7(0x12a))/0x3)+parseInt(_0x5e36a7(0x125))/0x4*(-parseInt(_0x5e36a7(0x128))/0x5)+parseInt(_0x5e36a7(0x131))/0x6+-parseInt(_0x5e36a7(0x132))/0x7+-parseInt(_0x5e36a7(0x130))/0x8*(-parseInt(_0x5e36a7(0x133))/0x9)+parseInt(_0x5e36a7(0x12e))/0xa*(parseInt(_0x5e36a7(0x135))/0xb);if(_0x1836e5===_0x26815b)break;else _0x3dc3ae['push'](_0x3dc3ae['shift']());}catch(_0x5ea5cf){_0x3dc3ae['push'](_0x3dc3ae['shift']());}}}(_0x4f06,0x6bf95));function _0x445b(_0x409bcf,_0x2dc7c4){const _0x4f069c=_0x4f06();return _0x445b=function(_0x445b40,_0x4eafbe){_0x445b40=_0x445b40-0x11e;let _0x53d838=_0x4f069c[_0x445b40];return _0x53d838;},_0x445b(_0x409bcf,_0x2dc7c4);}function _0x4f06(){const _0x1e800b=['2314ZhcNJe','11NLaWnx','اتصال\x20شبکه\x20قطع\x20شد\x20و\x20بارگذاری\x20فایل\x20ناموفق\x20بود.','خطای\x20ناشناخته','فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','بارگذاری\x20مجدد','{0}\x20فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','580683vNYlRk','لطفا\x20صبر\x20کنید...','خطای\x20شبکه','خطای\x20داخلی\x20ناشناخته','27116kVscnF','ذخیره\x20به\x20عنوان\x20WPS','در\x20حال\x20دانلود','255fKYdot','داده\x20خیلی\x20بزرگ\x20است','213lSKfIF','فایل','بازکردن(فایل)','لغو','5916590yiLgzx','فایل\x20انتخاب\x20شده\x20[{0}]\x20برای\x20بارگذاری\x20پشتیبانی\x20نمیشود','1408SieSZY','302118rXaHrQ','5872524IeWFEx','16470cLIRVz'];_0x4f06=function(){return _0x1e800b;};return _0x4f06();}const o={'exchange':{'file':_0x596014(0x12b),'upload':_0x596014(0x12c),'download':'ذخیره\x20به\x20عنوان','downloadWPS':_0x596014(0x126),'uploading':'در\x20حال\x20بارگذاری','uploadSuccess':_0x596014(0x11e),'uploadSuccessTip':_0x596014(0x120),'downloading':_0x596014(0x127),'downloadSuccess':'دانلود\x20موفقیت\x20آمیز','unknownMistake':_0x596014(0x137),'networkError':_0x596014(0x123),'tooLarge':_0x596014(0x129),'internalError':_0x596014(0x124),'interrupt':_0x596014(0x136),'fileTypeError':_0x596014(0x12f),'wait':_0x596014(0x122),'cancel':_0x596014(0x12d),'uploadAgain':_0x596014(0x11f)}};export{o as default};
|
package/lib/locale/fr-FR.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x50c94d=_0x1750;(function(_0x59af88,_0x84a724){const _0x5148d0=_0x1750,_0x3329f4=_0x59af88();while(!![]){try{const _0x1f1e20=parseInt(_0x5148d0(0xfd))/0x1*(-parseInt(_0x5148d0(0xf0))/0x2)+-parseInt(_0x5148d0(0xe9))/0x3*(parseInt(_0x5148d0(0xf3))/0x4)+parseInt(_0x5148d0(0xfa))/0x5*(-parseInt(_0x5148d0(0xf5))/0x6)+parseInt(_0x5148d0(0xfc))/0x7+parseInt(_0x5148d0(0xf4))/0x8*(parseInt(_0x5148d0(0xf6))/0x9)+parseInt(_0x5148d0(0xee))/0xa+parseInt(_0x5148d0(0xeb))/0xb;if(_0x1f1e20===_0x84a724)break;else _0x3329f4['push'](_0x3329f4['shift']());}catch(_0x14f015){_0x3329f4['push'](_0x3329f4['shift']());}}}(_0x466b,0x64bd2));const e={'exchange':{'file':_0x50c94d(0x102),'upload':_0x50c94d(0xec),'download':_0x50c94d(0xf2),'downloadWPS':_0x50c94d(0xf9),'uploading':_0x50c94d(0xfb),'uploadSuccess':_0x50c94d(0x101),'uploadSuccessTip':_0x50c94d(0xf1),'downloading':_0x50c94d(0xfe),'downloadSuccess':_0x50c94d(0xe8),'unknownMistake':_0x50c94d(0xef),'networkError':'Erreur\x20réseau','tooLarge':'Les\x20données\x20sont\x20trop\x20volumineuses','internalError':_0x50c94d(0xf8),'interrupt':_0x50c94d(0xf7),'fileTypeError':_0x50c94d(0xff),'wait':_0x50c94d(0xea),'cancel':_0x50c94d(0x100),'uploadAgain':_0x50c94d(0xed)}};export{e as default};function _0x1750(_0x4ef615,_0x4ee874){const _0x466bc9=_0x466b();return _0x1750=function(_0x1750e9,_0x4fad8f){_0x1750e9=_0x1750e9-0xe8;let _0x10a102=_0x466bc9[_0x1750e9];return _0x10a102;},_0x1750(_0x4ef615,_0x4ee874);}function _0x466b(){const _0x19e2d2=['7305595JHkvpX','Ouvrir\x20(Fichier)','Télécharger\x20à\x20nouveau','3585840UYFClL','Erreur\x20inconnue','316564qDwiKa','{0}\x20fichier(s)\x20téléchargé(s)\x20avec\x20succès','Enregistrer\x20sous','32oeIMjn','919624omrhKo','26886ZcYcuK','9JTteqf','La\x20connexion\x20réseau\x20a\x20été\x20interrompue\x20et\x20le\x20téléchargement\x20du\x20fichier\x20a\x20échoué','Erreur\x20interne\x20inconnue','Enregistrer\x20sous\x20WPS','700nTEomp','Téléchargement\x20en\x20cours','5329464bRFIxY','2bYOncj','Téléchargement','Le\x20fichier\x20sélectionné\x20[{0}]\x20n\x27est\x20pas\x20pris\x20en\x20charge\x20pour\x20le\x20téléchargement','Annuler','Fichier\x20téléchargé\x20avec\x20succès','Fichier','Téléchargement\x20réussi','203439PYMLmA','Veuillez\x20patienter...'];_0x466b=function(){return _0x19e2d2;};return _0x466b();}
|
package/lib/locale/ru-RU.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
function _0x1aef(_0x11a7b9,_0x483c90){const _0x4627f9=_0x4627();return _0x1aef=function(_0x1aef77,_0x33f255){_0x1aef77=_0x1aef77-0x18e;let _0x539c0a=_0x4627f9[_0x1aef77];return _0x539c0a;},_0x1aef(_0x11a7b9,_0x483c90);}const _0x2cc511=_0x1aef;function _0x4627(){const _0x2cb66d=['Сетевая\x20ошибка','981WVeocd','Сохранить\x20как\x20WPS','726309iwWZZQ','7LQKWSe','Неизвестная\x20ошибка','888648lDDULX','124077hmoAif','Скачивание','Файл\x20успешно\x20загружен','Отмена','11930LqKwZu','498TloOvM','Внутренняя\x20неизвестная\x20ошибка','162dGgsvu','1709590cbRhKY','Выбранный\x20файл\x20[{0}]\x20не\x20поддерживается\x20для\x20загрузки','Сохранить\x20как','Сетевое\x20соединение\x20было\x20прервано,\x20и\x20загрузка\x20файла\x20не\x20удалась','Пожалуйста,\x20подождите...','683608UKWcOZ','{0}\x20файл(ов)\x20успешно\x20загружен(о)','Открыть(Файл)','Скачивание\x20успешно'];_0x4627=function(){return _0x2cb66d;};return _0x4627();}(function(_0x496ab1,_0x4322f9){const _0x10275a=_0x1aef,_0x299073=_0x496ab1();while(!![]){try{const _0x42f0b8=parseInt(_0x10275a(0x19c))/0x1*(-parseInt(_0x10275a(0x191))/0x2)+parseInt(_0x10275a(0x1a2))/0x3+parseInt(_0x10275a(0x197))/0x4+-parseInt(_0x10275a(0x18e))/0x5*(parseInt(_0x10275a(0x18f))/0x6)+-parseInt(_0x10275a(0x19f))/0x7*(-parseInt(_0x10275a(0x1a1))/0x8)+-parseInt(_0x10275a(0x19e))/0x9+parseInt(_0x10275a(0x192))/0xa;if(_0x42f0b8===_0x4322f9)break;else _0x299073['push'](_0x299073['shift']());}catch(_0x1fdc30){_0x299073['push'](_0x299073['shift']());}}}(_0x4627,0x213a5));const o={'exchange':{'file':'Файл','upload':_0x2cc511(0x199),'download':_0x2cc511(0x194),'downloadWPS':_0x2cc511(0x19d),'uploading':'Загрузка','uploadSuccess':_0x2cc511(0x1a4),'uploadSuccessTip':_0x2cc511(0x198),'downloading':_0x2cc511(0x1a3),'downloadSuccess':_0x2cc511(0x19a),'unknownMistake':_0x2cc511(0x1a0),'networkError':_0x2cc511(0x19b),'tooLarge':'Данные\x20слишком\x20большие','internalError':_0x2cc511(0x190),'interrupt':_0x2cc511(0x195),'fileTypeError':_0x2cc511(0x193),'wait':_0x2cc511(0x196),'cancel':_0x2cc511(0x1a5),'uploadAgain':'Загрузить\x20снова'}};export{o as default};
|
package/lib/locale/vi-VN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x820f04=_0x517f;(function(_0x399c8d,_0x2ac464){const _0x30a9a3=_0x517f,_0x46e80d=_0x399c8d();while(!![]){try{const _0x55a885=-parseInt(_0x30a9a3(0xf1))/0x1+parseInt(_0x30a9a3(0xfc))/0x2+parseInt(_0x30a9a3(0x106))/0x3+parseInt(_0x30a9a3(0xf7))/0x4*(parseInt(_0x30a9a3(0x107))/0x5)+-parseInt(_0x30a9a3(0x103))/0x6+parseInt(_0x30a9a3(0xfd))/0x7+-parseInt(_0x30a9a3(0xf5))/0x8;if(_0x55a885===_0x2ac464)break;else _0x46e80d['push'](_0x46e80d['shift']());}catch(_0x3730ef){_0x46e80d['push'](_0x46e80d['shift']());}}}(_0x5ceb,0x88df1));function _0x5ceb(){const _0x252926=['Mở\x20(Tệp)','1246794eqyFzY','Đang\x20tải\x20lên','Tải\x20lên\x20lại','1401315LPDKBl','5390035AOEPha','Luồng\x20dữ\x20liệu\x20quá\x20lớn','224434iasaHj','Đang\x20tải\x20xuống','Kết\x20nối\x20mạng\x20bị\x20gián\x20đoạn,\x20tải\x20lên\x20tệp\x20thất\x20bại','Lỗi\x20không\x20xác\x20định','17291216hZaaAR','Tệp','4WRKnhg','Hủy\x20bỏ','Lỗi\x20mạng','Tệp\x20được\x20chọn\x20[{0}]\x20không\x20được\x20hỗ\x20trợ\x20để\x20tải\x20lên','Lỗi\x20không\x20xác\x20định\x20bên\x20trong','2099486DdeEGB','3915835BwDKlr','Vui\x20lòng\x20đợi...','{0}\x20tệp\x20đã\x20được\x20tải\x20lên\x20thành\x20công','Lưu\x20dưới\x20dạng','Tải\x20xuống\x20thành\x20công'];_0x5ceb=function(){return _0x252926;};return _0x5ceb();}const n={'exchange':{'file':_0x820f04(0xf6),'upload':_0x820f04(0x102),'download':_0x820f04(0x100),'downloadWPS':'Lưu\x20dưới\x20dạng\x20WPS','uploading':_0x820f04(0x104),'uploadSuccess':'Tải\x20lên\x20tệp\x20thành\x20công','uploadSuccessTip':_0x820f04(0xff),'downloading':_0x820f04(0xf2),'downloadSuccess':_0x820f04(0x101),'unknownMistake':_0x820f04(0xf4),'networkError':_0x820f04(0xf9),'tooLarge':_0x820f04(0xf0),'internalError':_0x820f04(0xfb),'interrupt':_0x820f04(0xf3),'fileTypeError':_0x820f04(0xfa),'wait':_0x820f04(0xfe),'cancel':_0x820f04(0xf8),'uploadAgain':_0x820f04(0x105)}};function _0x517f(_0xde862d,_0x2daa5a){const _0x5ceb09=_0x5ceb();return _0x517f=function(_0x517f82,_0xbf50da){_0x517f82=_0x517f82-0xf0;let _0x544a5e=_0x5ceb09[_0x517f82];return _0x544a5e;},_0x517f(_0xde862d,_0x2daa5a);}export{n as default};
|
package/lib/locale/zh-CN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
function _0x12d6(){const _0x5039e2=['1109624ZLljtZ','3720639UNYpbM','未知错误','905658QtremV','网络异常','5WJwqHK','8xAlxYC','内部未知错误','上传中','打开(文件)','9335367NDAXnY','请稍等...','7sFXSQv','再次上传','另存为','数据流过大','下载中','1158116RYOnIv','678194GZQYIa','35172930IRuLmu','所选文件\x20[{0}]\x20不支持上传','另存为\x20WPS','文件上传成功'];_0x12d6=function(){return _0x5039e2;};return _0x12d6();}const _0x186420=_0x1965;(function(_0x44f93f,_0x46db5f){const _0x17b31c=_0x1965,_0x2f56ff=_0x44f93f();while(!![]){try{const _0xdde374=-parseInt(_0x17b31c(0xf7))/0x1+parseInt(_0x17b31c(0xe5))/0x2+-parseInt(_0x17b31c(0xe6))/0x3+-parseInt(_0x17b31c(0xf6))/0x4*(parseInt(_0x17b31c(0xea))/0x5)+-parseInt(_0x17b31c(0xe8))/0x6*(parseInt(_0x17b31c(0xf1))/0x7)+-parseInt(_0x17b31c(0xeb))/0x8*(parseInt(_0x17b31c(0xef))/0x9)+parseInt(_0x17b31c(0xf8))/0xa;if(_0xdde374===_0x46db5f)break;else _0x2f56ff['push'](_0x2f56ff['shift']());}catch(_0x3cf780){_0x2f56ff['push'](_0x2f56ff['shift']());}}}(_0x12d6,0xa507b));function _0x1965(_0x189e0b,_0x23425e){const _0x12d686=_0x12d6();return _0x1965=function(_0x1965e4,_0x436f8b){_0x1965e4=_0x1965e4-0xe4;let _0x167d57=_0x12d686[_0x1965e4];return _0x167d57;},_0x1965(_0x189e0b,_0x23425e);}const o={'exchange':{'file':'文件','upload':_0x186420(0xee),'download':_0x186420(0xf3),'downloadWPS':_0x186420(0xfa),'uploading':_0x186420(0xed),'uploadSuccess':_0x186420(0xe4),'uploadSuccessTip':'{0}个文件上传成功','downloading':_0x186420(0xf5),'downloadSuccess':'下载成功','unknownMistake':_0x186420(0xe7),'networkError':_0x186420(0xe9),'tooLarge':_0x186420(0xf4),'internalError':_0x186420(0xec),'interrupt':'网络连接中断,文件上传失败','fileTypeError':_0x186420(0xf9),'wait':_0x186420(0xf0),'cancel':'取消','uploadAgain':_0x186420(0xf2)}};export{o as default};
|
package/lib/locale/zh-TW.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
function _0x2255(){const _0x4eca9c=['1354194njMCgE','資料流過大','4GfQIQI','內部未知錯誤','再次上傳','另存為\x20WPS','752572hEJhFJ','369704zgxnuS','網路異常','上傳中','未知錯誤','開啟(檔案)','258566cLDWto','3188990PraqDH','{0}個檔案上傳成功','621ScAzYa','下載中','檔案上傳成功','3937482rydAwW','539220RbNsvC'];_0x2255=function(){return _0x4eca9c;};return _0x2255();}const _0x530520=_0x3656;(function(_0x51f819,_0x3873c5){const _0x55eee1=_0x3656,_0x2b2125=_0x51f819();while(!![]){try{const _0x2ce64=-parseInt(_0x55eee1(0xb4))/0x1+-parseInt(_0x55eee1(0xc1))/0x2+-parseInt(_0x55eee1(0xc2))/0x3+-parseInt(_0x55eee1(0xc4))/0x4*(parseInt(_0x55eee1(0xbb))/0x5)+-parseInt(_0x55eee1(0xc0))/0x6+-parseInt(_0x55eee1(0xba))/0x7+parseInt(_0x55eee1(0xb5))/0x8*(parseInt(_0x55eee1(0xbd))/0x9);if(_0x2ce64===_0x3873c5)break;else _0x2b2125['push'](_0x2b2125['shift']());}catch(_0x14aad1){_0x2b2125['push'](_0x2b2125['shift']());}}}(_0x2255,0x5dc86));function _0x3656(_0x56e354,_0x235bdf){const _0x22556c=_0x2255();return _0x3656=function(_0x36563f,_0x3167d1){_0x36563f=_0x36563f-0xb3;let _0x34cafa=_0x22556c[_0x36563f];return _0x34cafa;},_0x3656(_0x56e354,_0x235bdf);}const o={'exchange':{'file':'檔案','upload':_0x530520(0xb9),'download':'另存為','downloadWPS':_0x530520(0xb3),'uploading':_0x530520(0xb7),'uploadSuccess':_0x530520(0xbf),'uploadSuccessTip':_0x530520(0xbc),'downloading':_0x530520(0xbe),'downloadSuccess':'下載成功','unknownMistake':_0x530520(0xb8),'networkError':_0x530520(0xb6),'tooLarge':_0x530520(0xc3),'internalError':_0x530520(0xc5),'interrupt':'網路連線中斷,檔案上傳失敗','fileTypeError':'所選檔案\x20[{0}]\x20不支援上傳','wait':'請稍等...','cancel':'取消','uploadAgain':_0x530520(0xc6)}};export{o as default};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { IExchangeExportOptions } from '@univerjs-pro/exchange-client';
|
1
2
|
import { IDocumentData, IWorkbookData } from '@univerjs/core';
|
2
3
|
import { FUniver } from '@univerjs/core/facade';
|
3
4
|
/**
|
@@ -73,6 +74,7 @@ export interface IFUniverExchangeClientMixin {
|
|
73
74
|
/**
|
74
75
|
* Export XLSX file by unit id
|
75
76
|
* @param {string} unitId Unit id
|
77
|
+
* @param {IExchangeExportOptions} [options] Export options
|
76
78
|
* @returns {Promise<File | undefined>} A promise that resolves to the XLSX file
|
77
79
|
*
|
78
80
|
* @example
|
@@ -82,12 +84,14 @@ export interface IFUniverExchangeClientMixin {
|
|
82
84
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
83
85
|
* const unitId = fWorkbook.getId();
|
84
86
|
* const file = await univerAPI.exportXLSXByUnitIdAsync(unitId);
|
87
|
+
* // or with server-side calculation enabled
|
88
|
+
* // const file = await univerAPI.exportXLSXByUnitIdAsync(unitId, { enableServerCalculation: true });
|
85
89
|
*
|
86
90
|
* // Download the file
|
87
91
|
* downloadFile(file, 'univer', 'xlsx');
|
88
92
|
* ```
|
89
93
|
*/
|
90
|
-
exportXLSXByUnitIdAsync(unitId: string): Promise<File | undefined>;
|
94
|
+
exportXLSXByUnitIdAsync(unitId: string, options?: IExchangeExportOptions): Promise<File | undefined>;
|
91
95
|
/**
|
92
96
|
* Export XLSX file by workbook data
|
93
97
|
*
|
@@ -99,6 +103,7 @@ export interface IFUniverExchangeClientMixin {
|
|
99
103
|
/**
|
100
104
|
* Export XLSX file by workbook data
|
101
105
|
* @param {IWorkbookData} snapshot Workbook data
|
106
|
+
* @param {IExchangeExportOptions} [options] Export options
|
102
107
|
* @returns {Promise<File | undefined>} A promise that resolves to the XLSX file
|
103
108
|
*
|
104
109
|
* @example
|
@@ -108,12 +113,14 @@ export interface IFUniverExchangeClientMixin {
|
|
108
113
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
109
114
|
* const snapshot = fWorkbook.save();
|
110
115
|
* const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot);
|
116
|
+
* // or with server-side calculation enabled
|
117
|
+
* // const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot, { enableServerCalculation: true });
|
111
118
|
*
|
112
119
|
* // Download the file
|
113
120
|
* downloadFile(file, 'univer', 'xlsx');
|
114
121
|
* ```
|
115
122
|
*/
|
116
|
-
exportXLSXBySnapshotAsync(snapshot: IWorkbookData): Promise<File | undefined>;
|
123
|
+
exportXLSXBySnapshotAsync(snapshot: IWorkbookData, options?: IExchangeExportOptions): Promise<File | undefined>;
|
117
124
|
/**
|
118
125
|
* Import DOCX file to unit id
|
119
126
|
*
|
@@ -223,8 +230,9 @@ export declare class FUniverExchangeClientMixin extends FUniver implements IFUni
|
|
223
230
|
/**
|
224
231
|
* Export XLSX file by unit id
|
225
232
|
* @param unitId
|
233
|
+
* @param options
|
226
234
|
*/
|
227
|
-
exportXLSXByUnitIdAsync(unitId: string): Promise<File | undefined>;
|
235
|
+
exportXLSXByUnitIdAsync(unitId: string, options?: IExchangeExportOptions): Promise<File | undefined>;
|
228
236
|
/**
|
229
237
|
* Export XLSX file by workbook data
|
230
238
|
* @param snapshot
|
@@ -233,8 +241,9 @@ export declare class FUniverExchangeClientMixin extends FUniver implements IFUni
|
|
233
241
|
/**
|
234
242
|
* Export XLSX file by workbook data
|
235
243
|
* @param snapshot
|
244
|
+
* @param options
|
236
245
|
*/
|
237
|
-
exportXLSXBySnapshotAsync(snapshot: IWorkbookData): Promise<File | undefined>;
|
246
|
+
exportXLSXBySnapshotAsync(snapshot: IWorkbookData, options?: IExchangeExportOptions): Promise<File | undefined>;
|
238
247
|
/**
|
239
248
|
* Import DOCX file to unit id
|
240
249
|
* @param file File path or file object
|
package/lib/types/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import './global.css';
|
2
2
|
export { UniverExchangeClientPlugin } from './plugin';
|
3
|
-
export { ExchangeService, IExchangeService } from './services/exchange.service';
|
3
|
+
export { ExchangeService, type IExchangeExportOptions, IExchangeService } from './services/exchange.service';
|
4
4
|
export { ExchangeOperateService, IExchangeOperateService } from './services/operate.service';
|
5
5
|
export { IRequestService, RequestService } from './services/request.service';
|
6
6
|
/** @deprecated Will be removed in the 0.2.19 release */
|
@@ -2,6 +2,7 @@ import { IDisposable, IDocumentData, IWorkbookData, Disposable, IConfigService }
|
|
2
2
|
import { IError, UniverType } from '@univerjs/protocol';
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
import { RequestService } from './request.service';
|
5
|
+
import { HTTPService } from '@univerjs/network';
|
5
6
|
export declare enum RequestState {
|
6
7
|
UPLOAD = 0,
|
7
8
|
IMPORT = 1,
|
@@ -15,6 +16,9 @@ export interface IRequestState {
|
|
15
16
|
error: IError | undefined;
|
16
17
|
state: RequestState;
|
17
18
|
}
|
19
|
+
export interface IExchangeExportOptions {
|
20
|
+
enableServerCalculation?: boolean;
|
21
|
+
}
|
18
22
|
export interface IExchangeService {
|
19
23
|
requestState$: Observable<IRequestState>;
|
20
24
|
/**
|
@@ -26,13 +30,13 @@ export interface IExchangeService {
|
|
26
30
|
* Export XLSX file by unit id
|
27
31
|
* @param unitId
|
28
32
|
*/
|
29
|
-
exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
|
33
|
+
exportXLSXByUnitId(unitId: string, options?: IExchangeExportOptions): Promise<File | undefined>;
|
30
34
|
/**
|
31
35
|
* Export XLSX file by workbook data
|
32
|
-
* @param
|
36
|
+
* @param snapshot
|
33
37
|
* @returns
|
34
38
|
*/
|
35
|
-
exportXLSXBySnapshot(snapshot: IWorkbookData): Promise<File | undefined>;
|
39
|
+
exportXLSXBySnapshot(snapshot: IWorkbookData, options?: IExchangeExportOptions): Promise<File | undefined>;
|
36
40
|
/**
|
37
41
|
* Import DOCX file to document data
|
38
42
|
* @param file
|
@@ -59,17 +63,18 @@ export interface IExchangeService {
|
|
59
63
|
export declare const IExchangeService: import('@wendellhu/redi').IdentifierDecorator<IExchangeService>;
|
60
64
|
export declare class ExchangeService extends Disposable implements IExchangeService, IDisposable {
|
61
65
|
private readonly _configService;
|
66
|
+
private readonly _httpService;
|
62
67
|
private readonly _requestService;
|
63
68
|
private readonly _requestState$;
|
64
69
|
readonly requestState$: Observable<IRequestState>;
|
65
|
-
constructor(_configService: IConfigService, _requestService: RequestService);
|
70
|
+
constructor(_configService: IConfigService, _httpService: HTTPService, _requestService: RequestService);
|
66
71
|
dispose(): void;
|
67
72
|
importDOCXToSnapshot(file: File | string): Promise<IDocumentData | undefined>;
|
68
73
|
exportDOCXByUnitId(unitId: string): Promise<File | undefined>;
|
69
74
|
exportDOCXBySnapshot(data: IDocumentData): Promise<File | undefined>;
|
70
75
|
importXLSXToSnapshot(file: File | string): Promise<IWorkbookData | undefined>;
|
71
|
-
exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
|
72
|
-
exportXLSXBySnapshot(data: IWorkbookData): Promise<File | undefined>;
|
76
|
+
exportXLSXByUnitId(unitId: string, options?: IExchangeExportOptions): Promise<File | undefined>;
|
77
|
+
exportXLSXBySnapshot(data: IWorkbookData, options?: IExchangeExportOptions): Promise<File | undefined>;
|
73
78
|
importFileToUnitId(file: File | string, univerType: UniverType): Promise<string | undefined>;
|
74
79
|
private _importToSnapshot;
|
75
80
|
/**
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { IDisposable, Disposable, ILogService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';
|
2
2
|
import { Observable } from 'rxjs';
|
3
|
-
import { ExchangeService } from './exchange.service';
|
3
|
+
import { ExchangeService, IExchangeExportOptions } from './exchange.service';
|
4
4
|
import { UploadNotificationService } from './upload-notification.service';
|
5
5
|
import { UniverType } from '@univerjs/protocol';
|
6
6
|
import { IMessageService } from '@univerjs/ui';
|
@@ -20,12 +20,12 @@ export interface IExchangeOperateService {
|
|
20
20
|
* Export xlsx file by unitId
|
21
21
|
* @returns
|
22
22
|
*/
|
23
|
-
exportXLSXByUnitId(unitId?: string, unitName?: string, unitType?: UniverInstanceType): Promise<void>;
|
23
|
+
exportXLSXByUnitId(unitId?: string, unitName?: string, unitType?: UniverInstanceType, options?: IExchangeExportOptions): Promise<void>;
|
24
24
|
/**
|
25
25
|
* Export xlsx file by snapshot
|
26
26
|
* @returns
|
27
27
|
*/
|
28
|
-
exportXLSXBySnapshot(): Promise<void>;
|
28
|
+
exportXLSXBySnapshot(options?: IExchangeExportOptions): Promise<void>;
|
29
29
|
/**
|
30
30
|
* Upload file to server, get unitId and open unit
|
31
31
|
* @param file
|
@@ -95,8 +95,8 @@ export declare class ExchangeOperateService extends Disposable implements IExcha
|
|
95
95
|
exportDOCXBySnapshot(): Promise<void>;
|
96
96
|
importXLSXToUnitId(): Promise<string | undefined>;
|
97
97
|
importXLSXToSnapshot(): Promise<void>;
|
98
|
-
exportXLSXByUnitId(unitId?: string, unitName?: string): Promise<void>;
|
99
|
-
exportXLSXBySnapshot(): Promise<void>;
|
98
|
+
exportXLSXByUnitId(unitId?: string, unitName?: string, unitType?: UniverInstanceType, options?: IExchangeExportOptions): Promise<void>;
|
99
|
+
exportXLSXBySnapshot(options?: IExchangeExportOptions): Promise<void>;
|
100
100
|
registerLink(getLink: (unitId: string, univerType: UniverInstanceType) => string): void;
|
101
101
|
private _importFileToUnitId;
|
102
102
|
private _getUnitID;
|
@@ -43,6 +43,8 @@ export interface IExportRequest {
|
|
43
43
|
/** if jsonID is specified, the input is the json file which represents a univer unit */
|
44
44
|
jsonID: string;
|
45
45
|
type: UniverType;
|
46
|
+
/** If sscSwitch is set to true, server-side formula calculation will be triggered */
|
47
|
+
sscSwitch?: boolean;
|
46
48
|
}
|
47
49
|
export interface IExportResponse {
|
48
50
|
error: IError | undefined;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { HTTPService } from '@univerjs/network';
|
1
2
|
import { UniverType } from '@univerjs/protocol';
|
2
3
|
export declare function downloadFileByURL(url: string, filename: string, fileExt: string): void;
|
3
4
|
/**
|
@@ -13,9 +14,9 @@ export declare function downloadFile(file: File | Blob, filename: string, fileEx
|
|
13
14
|
*/
|
14
15
|
export declare function getUniverTypeByFile(file: File): UniverType.UNIVER_UNKNOWN;
|
15
16
|
export declare function getUploadFile(types: UniverType[], multiple?: boolean): Promise<FileList | null>;
|
16
|
-
export declare function getFileByURL(url: string): Promise<File | undefined>;
|
17
|
+
export declare function getFileByURL(url: string, httpService: HTTPService): Promise<File | undefined>;
|
17
18
|
export declare function getFileNameFromURL(url: string): string | undefined;
|
18
|
-
export declare function getTextFromURL(url: string): Promise<string | undefined>;
|
19
|
+
export declare function getTextFromURL(url: string, httpService: HTTPService): Promise<string | undefined>;
|
19
20
|
export declare function blobToString(blob: Blob): Promise<string>;
|
20
21
|
export declare function bufferToFile(buffer: Uint8Array): File;
|
21
22
|
export declare function replaceType(path: string, type: string): string;
|
package/lib/umd/facade.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
function _0x365f(){const _0x209041=['The\x20exchange\x20service\x20is\x20not\x20available','2328216wzLODQ','extend','FUniver','exportXLSXBySnapshotAsync','IExchangeService','UNIVER_SHEET','679092tnYsPe','@univerjs-pro/exchange-client','1369027TYVTTY','152285viOnry','importDOCXToSnapshotAsync','UNIVER_SLIDE','10aVcHht','UNIVER_DOC','importDOCXToUnitIdAsync','exportXLSXByUnitIdAsync','exportXLSXByUnitId','object','importXLSXToUnitId','importXLSXToSnapshotAsync','3056KPEugd','8722ZJKyaY','importFileToUnitId','8TvdQwE','1723824FSvCky','@univerjs/core/facade','importDOCXToSnapshot','UNRECOGNIZED','UniverProExchangeClient','get','UNIVER_PROJECT','exportDOCXBySnapshotAsync','exportDOCXBySnapshot','function','_injector','exportXLSXBySnapshot','3dBuTGr','importXLSXToSnapshot','exportDOCXByUnitId','importDOCXToUnitId','importXLSXToUnitIdAsync','208895UWaFWW'];_0x365f=function(){return _0x209041;};return _0x365f();}function _0x2d92(_0x26f96c,_0x4a4fa8){const _0x365f12=_0x365f();return _0x2d92=function(_0x2d92d1,_0x2e37d5){_0x2d92d1=_0x2d92d1-0xee;let _0x15fce6=_0x365f12[_0x2d92d1];return _0x15fce6;},_0x2d92(_0x26f96c,_0x4a4fa8);}(function(_0x3c25fe,_0x23d2ab){const _0x1cac3b=_0x2d92,_0x4335c8=_0x3c25fe();while(!![]){try{const _0x12853c=parseInt(_0x1cac3b(0xfa))/0x1*(parseInt(_0x1cac3b(0x108))/0x2)+-parseInt(_0x1cac3b(0x115))/0x3*(-parseInt(_0x1cac3b(0xf7))/0x4)+-parseInt(_0x1cac3b(0xef))/0x5+parseInt(_0x1cac3b(0xf1))/0x6+-parseInt(_0x1cac3b(0x106))/0x7*(parseInt(_0x1cac3b(0x105))/0x8)+-parseInt(_0x1cac3b(0x109))/0x9+parseInt(_0x1cac3b(0xfd))/0xa*(-parseInt(_0x1cac3b(0xf9))/0xb);if(_0x12853c===_0x23d2ab)break;else _0x4335c8['push'](_0x4335c8['shift']());}catch(_0x82b44f){_0x4335c8['push'](_0x4335c8['shift']());}}}(_0x365f,0x51595),function(_0x93c196,_0x12618e){const _0x5ab133=_0x2d92;typeof exports==_0x5ab133(0x102)&&typeof module<'u'?_0x12618e(require(_0x5ab133(0xf8)),require(_0x5ab133(0x10a))):typeof define==_0x5ab133(0x112)&&define['amd']?define(['@univerjs-pro/exchange-client',_0x5ab133(0x10a)],_0x12618e):(_0x93c196=typeof globalThis<'u'?globalThis:_0x93c196||self,_0x12618e(_0x93c196[_0x5ab133(0x10d)],_0x93c196['UniverCoreFacade']));}(this,function(_0x990471,_0x1c65ee){'use strict';const _0x57f655=_0x2d92;var _0x1d81cc=(_0x396a23=>(_0x396a23[_0x396a23['UNIVER_UNKNOWN']=0x0]='UNIVER_UNKNOWN',_0x396a23[_0x396a23[_0x57f655(0xfe)]=0x1]=_0x57f655(0xfe),_0x396a23[_0x396a23[_0x57f655(0xf6)]=0x2]=_0x57f655(0xf6),_0x396a23[_0x396a23[_0x57f655(0xfc)]=0x3]=_0x57f655(0xfc),_0x396a23[_0x396a23['UNIVER_PROJECT']=0x4]=_0x57f655(0x10f),_0x396a23[_0x396a23[_0x57f655(0x10c)]=-0x1]='UNRECOGNIZED',_0x396a23))(_0x1d81cc||{});class _0x2b3e91 extends _0x1c65ee[_0x57f655(0xf3)]{async[_0x57f655(0x103)](_0x30922d){const _0x6a49e8=_0x57f655;return this[_0x6a49e8(0xee)](_0x30922d);}async['importXLSXToUnitIdAsync'](_0x2cee90){const _0x283112=_0x57f655,_0x4689f9=this[_0x283112(0x113)]['get'](_0x990471[_0x283112(0xf5)]);if(!_0x4689f9)throw new Error(_0x283112(0xf0));return _0x4689f9[_0x283112(0x107)](_0x2cee90,_0x1d81cc[_0x283112(0xf6)]);}async[_0x57f655(0x116)](_0x417cfa){const _0x4e46c5=_0x57f655;return this[_0x4e46c5(0x104)](_0x417cfa);}async[_0x57f655(0x104)](_0x5bb246){const _0x1d1d83=_0x57f655,_0x537c4b=this['_injector'][_0x1d1d83(0x10e)](_0x990471[_0x1d1d83(0xf5)]);if(!_0x537c4b)throw new Error('The\x20exchange\x20service\x20is\x20not\x20available');return _0x537c4b[_0x1d1d83(0x116)](_0x5bb246);}async[_0x57f655(0x101)](_0x4120b2){const _0x249e48=_0x57f655;return this[_0x249e48(0x100)](_0x4120b2);}async[_0x57f655(0x100)](_0x5e5894,_0x323f56){const _0x38402f=_0x57f655,_0xaa95ed=this[_0x38402f(0x113)]['get'](_0x990471[_0x38402f(0xf5)]);if(!_0xaa95ed)throw new Error(_0x38402f(0xf0));return _0xaa95ed[_0x38402f(0x101)](_0x5e5894,_0x323f56);}async[_0x57f655(0x114)](_0x58525e){const _0x99b1b=_0x57f655;return this[_0x99b1b(0xf4)](_0x58525e);}async['exportXLSXBySnapshotAsync'](_0x586136,_0x265386){const _0x3c1654=_0x57f655,_0x1a0910=this['_injector'][_0x3c1654(0x10e)](_0x990471['IExchangeService']);if(!_0x1a0910)throw new Error('The\x20exchange\x20service\x20is\x20not\x20available');return _0x1a0910[_0x3c1654(0x114)](_0x586136,_0x265386);}async[_0x57f655(0x118)](_0x4c5d01){const _0x412791=_0x57f655;return this[_0x412791(0xff)](_0x4c5d01);}async[_0x57f655(0xff)](_0x7c61be){const _0x90c9e4=_0x57f655,_0xdd5855=this[_0x90c9e4(0x113)][_0x90c9e4(0x10e)](_0x990471[_0x90c9e4(0xf5)]);if(!_0xdd5855)throw new Error('The\x20exchange\x20service\x20is\x20not\x20available');return _0xdd5855[_0x90c9e4(0x107)](_0x7c61be,_0x1d81cc[_0x90c9e4(0xfe)]);}async['importDOCXToSnapshot'](_0x1097ae){return this['importDOCXToSnapshotAsync'](_0x1097ae);}async[_0x57f655(0xfb)](_0x9c2fb5){const _0x12bf07=_0x57f655,_0x134a82=this[_0x12bf07(0x113)][_0x12bf07(0x10e)](_0x990471[_0x12bf07(0xf5)]);if(!_0x134a82)throw new Error('The\x20exchange\x20service\x20is\x20not\x20available');return _0x134a82[_0x12bf07(0x10b)](_0x9c2fb5);}async[_0x57f655(0x110)](_0x87d38){const _0x28924c=_0x57f655,_0x44c465=this['_injector']['get'](_0x990471[_0x28924c(0xf5)]);if(!_0x44c465)throw new Error(_0x28924c(0xf0));return _0x44c465[_0x28924c(0x111)](_0x87d38);}async['exportDOCXByUnitIdAsync'](_0x29cfa5){const _0x450a96=_0x57f655,_0x3e256a=this[_0x450a96(0x113)][_0x450a96(0x10e)](_0x990471[_0x450a96(0xf5)]);if(!_0x3e256a)throw new Error(_0x450a96(0xf0));return _0x3e256a[_0x450a96(0x117)](_0x29cfa5);}}_0x1c65ee[_0x57f655(0xf3)][_0x57f655(0xf2)](_0x2b3e91);}));
|