@univerjs-pro/exchange-client 0.6.3 → 0.6.4
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/types/facade/f-univer.d.ts +67 -12
- 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/es/locale/en-US.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x37b0fe=_0x14a1;(function(_0x28aed5,_0x323b29){const _0x3bc8ca=_0x14a1,_0x4ecd53=_0x28aed5();while(!![]){try{const _0x207d9a=parseInt(_0x3bc8ca(0x150))/0x1*(-parseInt(_0x3bc8ca(0x157))/0x2)+-parseInt(_0x3bc8ca(0x161))/0x3*(parseInt(_0x3bc8ca(0x151))/0x4)+-parseInt(_0x3bc8ca(0x156))/0x5*(-parseInt(_0x3bc8ca(0x163))/0x6)+parseInt(_0x3bc8ca(0x160))/0x7+-parseInt(_0x3bc8ca(0x15b))/0x8*(parseInt(_0x3bc8ca(0x153))/0x9)+parseInt(_0x3bc8ca(0x14e))/0xa*(-parseInt(_0x3bc8ca(0x15c))/0xb)+parseInt(_0x3bc8ca(0x166))/0xc;if(_0x207d9a===_0x323b29)break;else _0x4ecd53['push'](_0x4ecd53['shift']());}catch(_0xadf3e7){_0x4ecd53['push'](_0x4ecd53['shift']());}}}(_0x1a97,0x73adc));function _0x1a97(){const _0x167768=['4zMKpUm','The\x20network\x20connection\x20was\x20interrupted\x20and\x20the\x20file\x20upload\x20failed','Download\x20success','{0}\x20file(s)\x20uploaded\x20successfully','264joJIvH','1463QroFfh','Open(File)','Network\x20error','Selected\x20file\x20[{0}]\x20is\x20not\x20supported\x20for\x20upload','4245374GjWcmS','108wStrLC','Cancel','1854LJhEeA','Internal\x20unknown\x20error','Downloading','15846924fHHvOd','5050rXJvhI','Unknown\x20mistake','339172XQHTtL','71128jwCCoM','File\x20uploaded\x20successfully','158913pxEyAe','Uploading','Save\x20As','8335ZTybih'];_0x1a97=function(){return _0x167768;};return _0x1a97();}function _0x14a1(_0x3078a6,_0x5ef1f4){const _0x1a97b8=_0x1a97();return _0x14a1=function(_0x14a188,_0x5e6f42){_0x14a188=_0x14a188-0x14e;let _0x3dab71=_0x1a97b8[_0x14a188];return _0x3dab71;},_0x14a1(_0x3078a6,_0x5ef1f4);}const e={'exchange':{'file':'File','upload':_0x37b0fe(0x15d),'download':_0x37b0fe(0x155),'uploading':_0x37b0fe(0x154),'uploadSuccess':_0x37b0fe(0x152),'uploadSuccessTip':_0x37b0fe(0x15a),'downloading':_0x37b0fe(0x165),'downloadSuccess':_0x37b0fe(0x159),'unknownMistake':_0x37b0fe(0x14f),'networkError':_0x37b0fe(0x15e),'tooLarge':'Data\x20is\x20too\x20large','internalError':_0x37b0fe(0x164),'interrupt':_0x37b0fe(0x158),'fileTypeError':_0x37b0fe(0x15f),'wait':'Please\x20wait...','cancel':_0x37b0fe(0x162),'uploadAgain':'Upload\x20again'}};export{e as default};
|
package/lib/es/locale/fa-IR.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x4901b4=_0x4af0;(function(_0x336ca9,_0x1978ef){const _0x1aa86d=_0x4af0,_0x308cdd=_0x336ca9();while(!![]){try{const _0x175787=parseInt(_0x1aa86d(0x1e8))/0x1*(parseInt(_0x1aa86d(0x1dc))/0x2)+parseInt(_0x1aa86d(0x1dd))/0x3+parseInt(_0x1aa86d(0x1e9))/0x4+parseInt(_0x1aa86d(0x1e5))/0x5+-parseInt(_0x1aa86d(0x1ea))/0x6+parseInt(_0x1aa86d(0x1e2))/0x7*(parseInt(_0x1aa86d(0x1e0))/0x8)+-parseInt(_0x1aa86d(0x1eb))/0x9*(parseInt(_0x1aa86d(0x1ec))/0xa);if(_0x175787===_0x1978ef)break;else _0x308cdd['push'](_0x308cdd['shift']());}catch(_0x4a8e77){_0x308cdd['push'](_0x308cdd['shift']());}}}(_0x5674,0x6c9f6));const o={'exchange':{'file':_0x4901b4(0x1ee),'upload':_0x4901b4(0x1da),'download':_0x4901b4(0x1e3),'uploading':'در\x20حال\x20بارگذاری','uploadSuccess':_0x4901b4(0x1e4),'uploadSuccessTip':_0x4901b4(0x1ed),'downloading':_0x4901b4(0x1e6),'downloadSuccess':'دانلود\x20موفقیت\x20آمیز','unknownMistake':_0x4901b4(0x1ef),'networkError':_0x4901b4(0x1e7),'tooLarge':_0x4901b4(0x1db),'internalError':'خطای\x20داخلی\x20ناشناخته','interrupt':_0x4901b4(0x1de),'fileTypeError':'فایل\x20انتخاب\x20شده\x20[{0}]\x20برای\x20بارگذاری\x20پشتیبانی\x20نمیشود','wait':_0x4901b4(0x1e1),'cancel':_0x4901b4(0x1df),'uploadAgain':'بارگذاری\x20مجدد'}};function _0x4af0(_0x2266a4,_0x378d3b){const _0x5674bc=_0x5674();return _0x4af0=function(_0x4af03e,_0x342247){_0x4af03e=_0x4af03e-0x1da;let _0x154298=_0x5674bc[_0x4af03e];return _0x154298;},_0x4af0(_0x2266a4,_0x378d3b);}export{o as default};function _0x5674(){const _0x51bdf3=['81RqMGTf','1422850RjPfad','{0}\x20فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','فایل','خطای\x20ناشناخته','بازکردن(فایل)','داده\x20خیلی\x20بزرگ\x20است','12fzaiQG','1630443Ilfouo','اتصال\x20شبکه\x20قطع\x20شد\x20و\x20بارگذاری\x20فایل\x20ناموفق\x20بود.','لغو','112aBYgfr','لطفا\x20صبر\x20کنید...','123599oWhXCv','ذخیره\x20به\x20عنوان','فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','1303350wTlMaP','در\x20حال\x20دانلود','خطای\x20شبکه','127173amErjZ','2353768HDAGSc','4064076mSyzuT'];_0x5674=function(){return _0x51bdf3;};return _0x5674();}
|
package/lib/es/locale/fr-FR.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
function _0x2313(){const _0x345b45=['Téléchargement\x20réussi','La\x20connexion\x20réseau\x20a\x20été\x20interrompue\x20et\x20le\x20téléchargement\x20du\x20fichier\x20a\x20échoué','926268EgGlyz','Veuillez\x20patienter...','Fichier','276802OAJwMr','Téléchargement','3252879RgIbiO','Erreur\x20inconnue','Les\x20données\x20sont\x20trop\x20volumineuses','1043277CyXGnL','577934kAYwlw','1558915uBSqrJ','Erreur\x20réseau','Télécharger\x20à\x20nouveau','4yEPiRh','Fichier\x20téléchargé\x20avec\x20succès','Enregistrer\x20sous','6051800wYQZVT','Ouvrir\x20(Fichier)','Le\x20fichier\x20sélectionné\x20[{0}]\x20n\x27est\x20pas\x20pris\x20en\x20charge\x20pour\x20le\x20téléchargement','Téléchargement\x20en\x20cours'];_0x2313=function(){return _0x345b45;};return _0x2313();}function _0x3f2b(_0x3af165,_0x9cf5fd){const _0x23138d=_0x2313();return _0x3f2b=function(_0x3f2b98,_0x26e686){_0x3f2b98=_0x3f2b98-0x13e;let _0x218657=_0x23138d[_0x3f2b98];return _0x218657;},_0x3f2b(_0x3af165,_0x9cf5fd);}const _0x3e8517=_0x3f2b;(function(_0x1fa4a6,_0x5a8026){const _0x52ccda=_0x3f2b,_0x11b1df=_0x1fa4a6();while(!![]){try{const _0x207834=-parseInt(_0x52ccda(0x14e))/0x1+-parseInt(_0x52ccda(0x148))/0x2+-parseInt(_0x52ccda(0x14d))/0x3*(-parseInt(_0x52ccda(0x152))/0x4)+parseInt(_0x52ccda(0x14f))/0x5+parseInt(_0x52ccda(0x145))/0x6+-parseInt(_0x52ccda(0x14a))/0x7+parseInt(_0x52ccda(0x13f))/0x8;if(_0x207834===_0x5a8026)break;else _0x11b1df['push'](_0x11b1df['shift']());}catch(_0xda637e){_0x11b1df['push'](_0x11b1df['shift']());}}}(_0x2313,0x5f0f3));const e={'exchange':{'file':_0x3e8517(0x147),'upload':_0x3e8517(0x140),'download':_0x3e8517(0x13e),'uploading':_0x3e8517(0x142),'uploadSuccess':_0x3e8517(0x153),'uploadSuccessTip':'{0}\x20fichier(s)\x20téléchargé(s)\x20avec\x20succès','downloading':_0x3e8517(0x149),'downloadSuccess':_0x3e8517(0x143),'unknownMistake':_0x3e8517(0x14b),'networkError':_0x3e8517(0x150),'tooLarge':_0x3e8517(0x14c),'internalError':'Erreur\x20interne\x20inconnue','interrupt':_0x3e8517(0x144),'fileTypeError':_0x3e8517(0x141),'wait':_0x3e8517(0x146),'cancel':'Annuler','uploadAgain':_0x3e8517(0x151)}};export{e as default};
|
package/lib/es/locale/ru-RU.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
function _0x27b3(){const _0x7de1ce=['Скачивание\x20успешно','497232XbCOww','648DtELdd','Загрузить\x20снова','993oPuGDY','Внутренняя\x20неизвестная\x20ошибка','753896BUuouB','Файл\x20успешно\x20загружен','Неизвестная\x20ошибка','Отмена','{0}\x20файл(ов)\x20успешно\x20загружен(о)','Открыть(Файл)','56152jycAhx','12oQqPGl','1126790YRiDCR','1887065IZJMUS','Скачивание','Загрузка','1145812cLrLlJ','Сетевое\x20соединение\x20было\x20прервано,\x20и\x20загрузка\x20файла\x20не\x20удалась'];_0x27b3=function(){return _0x7de1ce;};return _0x27b3();}const _0x3f32fc=_0x3594;function _0x3594(_0x4850f3,_0x4a58e2){const _0x27b3c5=_0x27b3();return _0x3594=function(_0x35942d,_0x131ca8){_0x35942d=_0x35942d-0x68;let _0x18d0e5=_0x27b3c5[_0x35942d];return _0x18d0e5;},_0x3594(_0x4850f3,_0x4a58e2);}(function(_0x56f4a2,_0x35036b){const _0x472b81=_0x3594,_0x316c73=_0x56f4a2();while(!![]){try{const _0x25a40d=-parseInt(_0x472b81(0x71))/0x1+-parseInt(_0x472b81(0x73))/0x2+-parseInt(_0x472b81(0x6e))/0x3+parseInt(_0x472b81(0x6b))/0x4+-parseInt(_0x472b81(0x68))/0x5+-parseInt(_0x472b81(0x7a))/0x6*(-parseInt(_0x472b81(0x7b))/0x7)+-parseInt(_0x472b81(0x79))/0x8*(-parseInt(_0x472b81(0x6f))/0x9);if(_0x25a40d===_0x35036b)break;else _0x316c73['push'](_0x316c73['shift']());}catch(_0x483f4d){_0x316c73['push'](_0x316c73['shift']());}}}(_0x27b3,0x2f097));const o={'exchange':{'file':'Файл','upload':_0x3f32fc(0x78),'download':'Сохранить\x20как','uploading':_0x3f32fc(0x6a),'uploadSuccess':_0x3f32fc(0x74),'uploadSuccessTip':_0x3f32fc(0x77),'downloading':_0x3f32fc(0x69),'downloadSuccess':_0x3f32fc(0x6d),'unknownMistake':_0x3f32fc(0x75),'networkError':'Сетевая\x20ошибка','tooLarge':'Данные\x20слишком\x20большие','internalError':_0x3f32fc(0x72),'interrupt':_0x3f32fc(0x6c),'fileTypeError':'Выбранный\x20файл\x20[{0}]\x20не\x20поддерживается\x20для\x20загрузки','wait':'Пожалуйста,\x20подождите...','cancel':_0x3f32fc(0x76),'uploadAgain':_0x3f32fc(0x70)}};export{o as default};
|
package/lib/es/locale/vi-VN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x346aa9=_0x1a8b;function _0x2df3(){const _0x1c9c08=['Hủy\x20bỏ','Vui\x20lòng\x20đợi...','880314hWFwzG','Tệp','Lỗi\x20mạng','Tải\x20lên\x20tệp\x20thành\x20công','11402314QFYnnN','Đang\x20tải\x20lên','233472MJjaYE','{0}\x20tệp\x20đã\x20được\x20tải\x20lên\x20thành\x20công','Lỗi\x20không\x20xác\x20định\x20bên\x20trong','Luồng\x20dữ\x20liệu\x20quá\x20lớn','2908136GYPRnh','844150iuYzFy','Lỗi\x20không\x20xác\x20định','1431237XpqynK','Tệp\x20được\x20chọn\x20[{0}]\x20không\x20được\x20hỗ\x20trợ\x20để\x20tải\x20lên','Tải\x20xuống\x20thành\x20công','1512465QKXbxT'];_0x2df3=function(){return _0x1c9c08;};return _0x2df3();}function _0x1a8b(_0x352d89,_0x4b194e){const _0x2df36b=_0x2df3();return _0x1a8b=function(_0x1a8bf9,_0x1f3244){_0x1a8bf9=_0x1a8bf9-0xba;let _0x18f7b4=_0x2df36b[_0x1a8bf9];return _0x18f7b4;},_0x1a8b(_0x352d89,_0x4b194e);}(function(_0x566732,_0x3a840f){const _0x1c5369=_0x1a8b,_0xc671e2=_0x566732();while(!![]){try{const _0x383dfa=parseInt(_0x1c5369(0xcb))/0x1+parseInt(_0x1c5369(0xbd))/0x2+parseInt(_0x1c5369(0xbf))/0x3+parseInt(_0x1c5369(0xbc))/0x4+parseInt(_0x1c5369(0xc2))/0x5+-parseInt(_0x1c5369(0xc5))/0x6+-parseInt(_0x1c5369(0xc9))/0x7;if(_0x383dfa===_0x3a840f)break;else _0xc671e2['push'](_0xc671e2['shift']());}catch(_0x582217){_0xc671e2['push'](_0xc671e2['shift']());}}}(_0x2df3,0x5e5e4));const n={'exchange':{'file':_0x346aa9(0xc6),'upload':'Mở\x20(Tệp)','download':'Lưu\x20dưới\x20dạng','uploading':_0x346aa9(0xca),'uploadSuccess':_0x346aa9(0xc8),'uploadSuccessTip':_0x346aa9(0xcc),'downloading':'Đang\x20tải\x20xuống','downloadSuccess':_0x346aa9(0xc1),'unknownMistake':_0x346aa9(0xbe),'networkError':_0x346aa9(0xc7),'tooLarge':_0x346aa9(0xbb),'internalError':_0x346aa9(0xba),'interrupt':'Kết\x20nối\x20mạng\x20bị\x20gián\x20đoạn,\x20tải\x20lên\x20tệp\x20thất\x20bại','fileTypeError':_0x346aa9(0xc0),'wait':_0x346aa9(0xc4),'cancel':_0x346aa9(0xc3),'uploadAgain':'Tải\x20lên\x20lại'}};export{n as default};
|
package/lib/es/locale/zh-CN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0xf4762a=_0x4906;(function(_0x5a1b58,_0x22ba22){const _0x4a2475=_0x4906,_0x524644=_0x5a1b58();while(!![]){try{const _0xd45999=-parseInt(_0x4a2475(0xfb))/0x1*(-parseInt(_0x4a2475(0xf5))/0x2)+-parseInt(_0x4a2475(0xf8))/0x3+parseInt(_0x4a2475(0xf2))/0x4+-parseInt(_0x4a2475(0xf4))/0x5*(-parseInt(_0x4a2475(0xf9))/0x6)+-parseInt(_0x4a2475(0xfa))/0x7+-parseInt(_0x4a2475(0x102))/0x8*(-parseInt(_0x4a2475(0x103))/0x9)+-parseInt(_0x4a2475(0xf1))/0xa*(parseInt(_0x4a2475(0x100))/0xb);if(_0xd45999===_0x22ba22)break;else _0x524644['push'](_0x524644['shift']());}catch(_0x3b9bb4){_0x524644['push'](_0x524644['shift']());}}}(_0x57df,0x199c6));function _0x57df(){const _0x3b81c7=['下载成功','220ZMTIMk','请稍等...','592eGgxae','12051CYQqJz','再次上传','未知错误','157900NnvZbi','723100dEQXyW','{0}个文件上传成功','509345caNaWv','86852xeEXAc','打开(文件)','所选文件\x20[{0}]\x20不支持上传','190230pxsJvi','12lUsuTx','908355IacotT','3kvmwvF','上传中','数据流过大','另存为'];_0x57df=function(){return _0x3b81c7;};return _0x57df();}function _0x4906(_0x59e990,_0x39208a){const _0x57df30=_0x57df();return _0x4906=function(_0x4906d2,_0x5803b3){_0x4906d2=_0x4906d2-0xf0;let _0x163cb8=_0x57df30[_0x4906d2];return _0x163cb8;},_0x4906(_0x59e990,_0x39208a);}const o={'exchange':{'file':'文件','upload':_0xf4762a(0xf6),'download':_0xf4762a(0xfe),'uploading':_0xf4762a(0xfc),'uploadSuccess':'文件上传成功','uploadSuccessTip':_0xf4762a(0xf3),'downloading':'下载中','downloadSuccess':_0xf4762a(0xff),'unknownMistake':_0xf4762a(0xf0),'networkError':'网络异常','tooLarge':_0xf4762a(0xfd),'internalError':'内部未知错误','interrupt':'网络连接中断,文件上传失败','fileTypeError':_0xf4762a(0xf7),'wait':_0xf4762a(0x101),'cancel':'取消','uploadAgain':_0xf4762a(0x104)}};export{o as default};
|
package/lib/es/locale/zh-TW.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
function _0x1c77(){const _0x31bfd2=['下載成功','3860HMKMCf','355392DFUCiL','205345xTfffP','網路連線中斷,檔案上傳失敗','2486836xzlOrR','網路異常','30KEPdwt','198984kcjauG','2tREaUx','內部未知錯誤','52458bbQmli','另存為','再次上傳','上傳中','2197328QezbFx','資料流過大','檔案上傳成功','174WtiKoN','請稍等...','所選檔案\x20[{0}]\x20不支援上傳','48dRETqL','{0}個檔案上傳成功','36LuFLKu'];_0x1c77=function(){return _0x31bfd2;};return _0x1c77();}function _0x16f6(_0x421dc5,_0x3e9e09){const _0x1c7704=_0x1c77();return _0x16f6=function(_0x16f6c8,_0x46b82a){_0x16f6c8=_0x16f6c8-0x104;let _0x4bc79f=_0x1c7704[_0x16f6c8];return _0x4bc79f;},_0x16f6(_0x421dc5,_0x3e9e09);}const _0x50c399=_0x16f6;(function(_0x4a1af1,_0xfd32cf){const _0xf7927d=_0x16f6,_0x20b27f=_0x4a1af1();while(!![]){try{const _0x24221c=-parseInt(_0xf7927d(0x10a))/0x1*(parseInt(_0xf7927d(0x109))/0x2)+-parseInt(_0xf7927d(0x113))/0x3*(-parseInt(_0xf7927d(0x11a))/0x4)+-parseInt(_0xf7927d(0x104))/0x5*(parseInt(_0xf7927d(0x116))/0x6)+parseInt(_0xf7927d(0x10c))/0x7+parseInt(_0xf7927d(0x110))/0x8+-parseInt(_0xf7927d(0x11b))/0x9*(parseInt(_0xf7927d(0x108))/0xa)+-parseInt(_0xf7927d(0x106))/0xb*(-parseInt(_0xf7927d(0x118))/0xc);if(_0x24221c===_0xfd32cf)break;else _0x20b27f['push'](_0x20b27f['shift']());}catch(_0x746d24){_0x20b27f['push'](_0x20b27f['shift']());}}}(_0x1c77,0x5a6b6));const o={'exchange':{'file':'檔案','upload':'開啟(檔案)','download':_0x50c399(0x10d),'uploading':_0x50c399(0x10f),'uploadSuccess':_0x50c399(0x112),'uploadSuccessTip':_0x50c399(0x117),'downloading':'下載中','downloadSuccess':_0x50c399(0x119),'unknownMistake':'未知錯誤','networkError':_0x50c399(0x107),'tooLarge':_0x50c399(0x111),'internalError':_0x50c399(0x10b),'interrupt':_0x50c399(0x105),'fileTypeError':_0x50c399(0x115),'wait':_0x50c399(0x114),'cancel':'取消','uploadAgain':_0x50c399(0x10e)}};export{o as default};
|
@@ -14,12 +14,25 @@ export interface IFUniverExchangeClientMixin {
|
|
14
14
|
importXLSXToUnitId(file: string | File): Promise<string | undefined>;
|
15
15
|
/**
|
16
16
|
* Import XLSX file to unit id
|
17
|
-
* @param file File path or file object
|
18
|
-
* @returns
|
17
|
+
* @param {string | File} file File path or file object
|
18
|
+
* @returns {Promise<string | undefined>} A promise that resolves to the unit id
|
19
19
|
*
|
20
20
|
* @example
|
21
21
|
* ```typescript
|
22
|
+
* // Accepts a File object
|
22
23
|
* const unitId = await univerAPI.importXLSXToUnitIdAsync(file);
|
24
|
+
* // Or accepts a URL to a remote file
|
25
|
+
* // const unitId = await univerAPI.importXLSXToUnitIdAsync('https://example.com/filename.xlsx');
|
26
|
+
*
|
27
|
+
* // Utilize automatic data loading in conjunction with collaborative editing. https://docs.univer.ai/en-US/guides/sheets/features/collaboration#loading-collaborative-documents
|
28
|
+
* const url = new URL(window.location.href);
|
29
|
+
* const unit = url.searchParams.get('unit');
|
30
|
+
* url.searchParams.set('unit', unitId);
|
31
|
+
* url.searchParams.set('type', "2"); // The meaning of "2" is String(UniverInstanceType.UNIVER_SHEET)
|
32
|
+
* console.log('Unit URL:', url.toString());
|
33
|
+
*
|
34
|
+
* // Open the unit in the new window
|
35
|
+
* window.open(url.toString(), '_blank');
|
23
36
|
* ```
|
24
37
|
*/
|
25
38
|
importXLSXToUnitIdAsync(file: string | File): Promise<string | undefined>;
|
@@ -33,12 +46,19 @@ export interface IFUniverExchangeClientMixin {
|
|
33
46
|
importXLSXToSnapshot(file: string | File): Promise<IWorkbookData | undefined>;
|
34
47
|
/**
|
35
48
|
* Import XLSX file to workbook data
|
36
|
-
* @param file File path or file object
|
37
|
-
* @returns
|
49
|
+
* @param {string | File} file File path or file object
|
50
|
+
* @returns {Promise<IWorkbookData | undefined>} A promise that resolves to the workbook data
|
38
51
|
*
|
39
52
|
* @example
|
40
53
|
* ```typescript
|
54
|
+
* // Accepts a File object
|
41
55
|
* const snapshot = await univerAPI.importXLSXToSnapshotAsync(file);
|
56
|
+
* // Or accepts a URL to a remote file
|
57
|
+
* // const snapshot = await univerAPI.importXLSXToSnapshotAsync('https://example.com/filename.xlsx');
|
58
|
+
* console.log('Snapshot created:', snapshot); // see more: https://docs.univer.ai/en-US/guides/sheets/getting-started/workbook-data
|
59
|
+
*
|
60
|
+
* // Create a new workbook with the snapshot
|
61
|
+
* univerAPI.createWorkbook(snapshot);
|
42
62
|
* ```
|
43
63
|
*/
|
44
64
|
importXLSXToSnapshotAsync(file: string | File): Promise<IWorkbookData | undefined>;
|
@@ -52,12 +72,22 @@ export interface IFUniverExchangeClientMixin {
|
|
52
72
|
exportXLSXByUnitId(unitId: string): Promise<File | undefined>;
|
53
73
|
/**
|
54
74
|
* Export XLSX file by unit id
|
55
|
-
* @param unitId Unit id
|
56
|
-
* @returns XLSX file
|
75
|
+
* @param {string} unitId Unit id
|
76
|
+
* @returns {Promise<File | undefined>} A promise that resolves to the XLSX file
|
57
77
|
*
|
58
78
|
* @example
|
59
79
|
* ```typescript
|
80
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
81
|
+
* const unitId = fWorkbook.getId();
|
60
82
|
* const file = await univerAPI.exportXLSXByUnitIdAsync(unitId);
|
83
|
+
*
|
84
|
+
* // Download the file
|
85
|
+
* const url = URL.createObjectURL(file);
|
86
|
+
* const a = document.createElement('a');
|
87
|
+
* a.href = url;
|
88
|
+
* a.download = 'filename.xlsx';
|
89
|
+
* a.click();
|
90
|
+
* URL.revokeObjectURL(url);
|
61
91
|
* ```
|
62
92
|
*/
|
63
93
|
exportXLSXByUnitIdAsync(unitId: string): Promise<File | undefined>;
|
@@ -71,12 +101,22 @@ export interface IFUniverExchangeClientMixin {
|
|
71
101
|
exportXLSXBySnapshot(snapshot: IWorkbookData): Promise<File | undefined>;
|
72
102
|
/**
|
73
103
|
* Export XLSX file by workbook data
|
74
|
-
* @param snapshot Workbook data
|
75
|
-
* @returns XLSX file
|
104
|
+
* @param {IWorkbookData} snapshot Workbook data
|
105
|
+
* @returns {Promise<File | undefined>} A promise that resolves to the XLSX file
|
76
106
|
*
|
77
107
|
* @example
|
78
108
|
* ```typescript
|
109
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
110
|
+
* const snapshot = fWorkbook.save();
|
79
111
|
* const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot);
|
112
|
+
*
|
113
|
+
* // Download the file
|
114
|
+
* const url = URL.createObjectURL(file);
|
115
|
+
* const a = document.createElement('a');
|
116
|
+
* a.href = url;
|
117
|
+
* a.download = 'filename.xlsx';
|
118
|
+
* a.click();
|
119
|
+
* URL.revokeObjectURL(url);
|
80
120
|
* ```
|
81
121
|
*/
|
82
122
|
exportXLSXBySnapshotAsync(snapshot: IWorkbookData): Promise<File | undefined>;
|
@@ -90,12 +130,23 @@ export interface IFUniverExchangeClientMixin {
|
|
90
130
|
importDOCXToUnitId(file: string | File): Promise<string | undefined>;
|
91
131
|
/**
|
92
132
|
* Import DOCX file to unit id
|
93
|
-
* @param file File path or file object
|
94
|
-
* @returns
|
133
|
+
* @param {string | File} file File path or file object
|
134
|
+
* @returns {Promise<string | undefined>} A promise that resolves to the unit id
|
95
135
|
*
|
96
136
|
* @example
|
97
137
|
* ```typescript
|
138
|
+
* // Accepts a File object
|
98
139
|
* const unitId = await univerAPI.importDOCXToUnitIdAsync(file);
|
140
|
+
* // Or accepts a URL to a remote file
|
141
|
+
* // const unitId = await univerAPI.importDOCXToUnitIdAsync('https://example.com/filename.docx');
|
142
|
+
*
|
143
|
+
* const url = new URL(window.location.href);
|
144
|
+
* const unit = url.searchParams.get('unit');
|
145
|
+
* url.searchParams.set('unit', unitId);
|
146
|
+
* url.searchParams.set('type', "1"); // The meaning of "1" is String(UniverInstanceType.UNIVER_DOC)
|
147
|
+
*
|
148
|
+
* // Open the unit in the new window
|
149
|
+
* window.open(url.toString(), '_blank');
|
99
150
|
* ```
|
100
151
|
*/
|
101
152
|
importDOCXToUnitIdAsync(file: string | File): Promise<string | undefined>;
|
@@ -109,12 +160,16 @@ export interface IFUniverExchangeClientMixin {
|
|
109
160
|
importDOCXToSnapshot(file: string | File): Promise<IDocumentData | undefined>;
|
110
161
|
/**
|
111
162
|
* Import DOCX file to document data
|
112
|
-
* @param file File path or file object
|
113
|
-
* @returns
|
163
|
+
* @param {string | File} file File path or file object
|
164
|
+
* @returns {Promise<IDocumentData | undefined>} A promise that resolves to the document data
|
114
165
|
*
|
115
166
|
* @example
|
116
167
|
* ```typescript
|
168
|
+
* // Accepts a File object
|
117
169
|
* const snapshot = await univerAPI.importDOCXToSnapshotAsync(file);
|
170
|
+
* // Or accepts a URL to a remote file
|
171
|
+
* // const snapshot = await univerAPI.importDOCXToSnapshotAsync('https://example.com/filename.docx');
|
172
|
+
* console.log('Snapshot created:', snapshot);
|
118
173
|
* ```
|
119
174
|
*/
|
120
175
|
importDOCXToSnapshotAsync(file: string | File): Promise<IDocumentData | undefined>;
|
package/lib/umd/facade.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
function _0x342f(_0x2c8e75,_0x3d8bd7){const _0x555fe3=_0x555f();return _0x342f=function(_0x342fe0,_0x4ab823){_0x342fe0=_0x342fe0-0x187;let _0x342ba8=_0x555fe3[_0x342fe0];return _0x342ba8;},_0x342f(_0x2c8e75,_0x3d8bd7);}function _0x555f(){const _0xb387d7=['FUniver','importXLSXToUnitId','exportXLSXBySnapshot','importFileToUnitId','UNIVER_SLIDE','402888EvACEf','function','exportXLSXBySnapshotAsync','10838NSEaeU','UNIVER_DOC','importXLSXToSnapshotAsync','UNIVER_UNKNOWN','UNIVER_SHEET','get','extend','@univerjs-pro/exchange-client','7920432mNyjuU','importXLSXToUnitIdAsync','2081088XCvhXz','35uyzOsv','amd','IExchangeService','importDOCXToSnapshot','_injector','The\x20exchange\x20service\x20is\x20not\x20available','exportXLSXByUnitIdAsync','importDOCXToUnitId','233520vScvcO','UniverCoreFacade','importDOCXToUnitIdAsync','UniverProExchangeClient','@univerjs/core/facade','object','importDOCXToSnapshotAsync','UNRECOGNIZED','importXLSXToSnapshot','2580435CmoFlu','2870070oJKOEN','exportXLSXByUnitId','UNIVER_PROJECT','189RXpEIa','103XewLdr'];_0x555f=function(){return _0xb387d7;};return _0x555f();}(function(_0x4ecb52,_0x148599){const _0x52408e=_0x342f,_0x2900a1=_0x4ecb52();while(!![]){try{const _0xba5d32=parseInt(_0x52408e(0x1aa))/0x1*(-parseInt(_0x52408e(0x189))/0x2)+-parseInt(_0x52408e(0x1a5))/0x3+parseInt(_0x52408e(0x193))/0x4+parseInt(_0x52408e(0x1a6))/0x5+-parseInt(_0x52408e(0x1b0))/0x6*(-parseInt(_0x52408e(0x194))/0x7)+parseInt(_0x52408e(0x191))/0x8+-parseInt(_0x52408e(0x1a9))/0x9*(parseInt(_0x52408e(0x19c))/0xa);if(_0xba5d32===_0x148599)break;else _0x2900a1['push'](_0x2900a1['shift']());}catch(_0x341451){_0x2900a1['push'](_0x2900a1['shift']());}}}(_0x555f,0x7cd9a),function(_0x30ed6f,_0x25a04b){const _0x28b948=_0x342f;typeof exports==_0x28b948(0x1a1)&&typeof module<'u'?_0x25a04b(require(_0x28b948(0x190)),require(_0x28b948(0x1a0))):typeof define==_0x28b948(0x187)&&define[_0x28b948(0x195)]?define(['@univerjs-pro/exchange-client',_0x28b948(0x1a0)],_0x25a04b):(_0x30ed6f=typeof globalThis<'u'?globalThis:_0x30ed6f||self,_0x25a04b(_0x30ed6f[_0x28b948(0x19f)],_0x30ed6f[_0x28b948(0x19d)]));}(this,function(_0x2046a7,_0x5904ff){'use strict';const _0xe659b0=_0x342f;var _0x5dd0b5=(_0xf4f358=>(_0xf4f358[_0xf4f358[_0xe659b0(0x18c)]=0x0]='UNIVER_UNKNOWN',_0xf4f358[_0xf4f358[_0xe659b0(0x18a)]=0x1]=_0xe659b0(0x18a),_0xf4f358[_0xf4f358[_0xe659b0(0x18d)]=0x2]=_0xe659b0(0x18d),_0xf4f358[_0xf4f358[_0xe659b0(0x1af)]=0x3]=_0xe659b0(0x1af),_0xf4f358[_0xf4f358[_0xe659b0(0x1a8)]=0x4]=_0xe659b0(0x1a8),_0xf4f358[_0xf4f358[_0xe659b0(0x1a3)]=-0x1]='UNRECOGNIZED',_0xf4f358))(_0x5dd0b5||{});class _0x140d55 extends _0x5904ff[_0xe659b0(0x1ab)]{async[_0xe659b0(0x1ac)](_0x54b0f4){const _0x33d92b=_0xe659b0;return this[_0x33d92b(0x192)](_0x54b0f4);}async[_0xe659b0(0x192)](_0x1c6cd7){const _0xb6810b=_0xe659b0,_0x595980=this[_0xb6810b(0x198)][_0xb6810b(0x18e)](_0x2046a7[_0xb6810b(0x196)]);if(!_0x595980)throw new Error('The\x20exchange\x20service\x20is\x20not\x20available');return _0x595980[_0xb6810b(0x1ae)](_0x1c6cd7,_0x5dd0b5[_0xb6810b(0x18d)]);}async[_0xe659b0(0x1a4)](_0x323d4c){return this['importXLSXToSnapshotAsync'](_0x323d4c);}async[_0xe659b0(0x18b)](_0x489903){const _0x23bd62=_0xe659b0,_0x451e00=this['_injector']['get'](_0x2046a7['IExchangeService']);if(!_0x451e00)throw new Error(_0x23bd62(0x199));return _0x451e00['importXLSXToSnapshot'](_0x489903);}async[_0xe659b0(0x1a7)](_0x4a38d9){const _0x292af5=_0xe659b0;return this[_0x292af5(0x19a)](_0x4a38d9);}async['exportXLSXByUnitIdAsync'](_0x482359){const _0x16c862=_0xe659b0,_0x599a7e=this[_0x16c862(0x198)][_0x16c862(0x18e)](_0x2046a7['IExchangeService']);if(!_0x599a7e)throw new Error(_0x16c862(0x199));return _0x599a7e[_0x16c862(0x1a7)](_0x482359);}async[_0xe659b0(0x1ad)](_0x12d15f){const _0x342557=_0xe659b0;return this[_0x342557(0x188)](_0x12d15f);}async[_0xe659b0(0x188)](_0x255a72){const _0x208c07=_0xe659b0,_0x323cc7=this[_0x208c07(0x198)]['get'](_0x2046a7['IExchangeService']);if(!_0x323cc7)throw new Error(_0x208c07(0x199));return _0x323cc7['exportXLSXBySnapshot'](_0x255a72);}async[_0xe659b0(0x19b)](_0x18a218){const _0x37b6d3=_0xe659b0;return this[_0x37b6d3(0x19e)](_0x18a218);}async[_0xe659b0(0x19e)](_0x1a2fe6){const _0x42da20=_0xe659b0,_0x36a107=this[_0x42da20(0x198)][_0x42da20(0x18e)](_0x2046a7[_0x42da20(0x196)]);if(!_0x36a107)throw new Error(_0x42da20(0x199));return _0x36a107[_0x42da20(0x1ae)](_0x1a2fe6,_0x5dd0b5[_0x42da20(0x18a)]);}async[_0xe659b0(0x197)](_0x45c5cf){const _0x23bf1d=_0xe659b0;return this[_0x23bf1d(0x1a2)](_0x45c5cf);}async[_0xe659b0(0x1a2)](_0x50db35){const _0x14513d=_0xe659b0,_0x3e6e51=this[_0x14513d(0x198)]['get'](_0x2046a7['IExchangeService']);if(!_0x3e6e51)throw new Error(_0x14513d(0x199));return _0x3e6e51[_0x14513d(0x197)](_0x50db35);}}_0x5904ff[_0xe659b0(0x1ab)][_0xe659b0(0x18f)](_0x140d55);}));
|