@univerjs-pro/exchange-client 0.6.2 → 0.6.3-nightly.202503051607
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 +8 -8
package/lib/es/locale/en-US.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x85e716=_0x18d6;(function(_0x8d9bae,_0x53d4ee){const _0x40681e=_0x18d6,_0x3cbf9e=_0x8d9bae();while(!![]){try{const _0x1b2d7b=-parseInt(_0x40681e(0xfb))/0x1+parseInt(_0x40681e(0xfd))/0x2*(parseInt(_0x40681e(0xfa))/0x3)+parseInt(_0x40681e(0x101))/0x4*(-parseInt(_0x40681e(0xff))/0x5)+-parseInt(_0x40681e(0x106))/0x6+parseInt(_0x40681e(0x108))/0x7*(-parseInt(_0x40681e(0xfe))/0x8)+-parseInt(_0x40681e(0x105))/0x9*(-parseInt(_0x40681e(0x104))/0xa)+parseInt(_0x40681e(0x10a))/0xb*(parseInt(_0x40681e(0xf9))/0xc);if(_0x1b2d7b===_0x53d4ee)break;else _0x3cbf9e['push'](_0x3cbf9e['shift']());}catch(_0x2ab3eb){_0x3cbf9e['push'](_0x3cbf9e['shift']());}}}(_0x31b6,0xa9412));function _0x18d6(_0x32da20,_0x296a4f){const _0x31b6b0=_0x31b6();return _0x18d6=function(_0x18d6fd,_0x3a0105){_0x18d6fd=_0x18d6fd-0xf7;let _0x59d631=_0x31b6b0[_0x18d6fd];return _0x59d631;},_0x18d6(_0x32da20,_0x296a4f);}function _0x31b6(){const _0x28191d=['30DNHWcz','6471YYYOkB','6192996riVaxH','Downloading','3679179IwSsWE','Data\x20is\x20too\x20large','22542069mPLqeX','The\x20network\x20connection\x20was\x20interrupted\x20and\x20the\x20file\x20upload\x20failed','File\x20uploaded\x20successfully','Open(File)','Network\x20error','12jtoZlV','1465257xIvVIK','369421FJkEio','Download\x20success','4BKVNiI','8GfpOGB','20GpIght','Internal\x20unknown\x20error','407824aiDOtz','Save\x20As','Unknown\x20mistake'];_0x31b6=function(){return _0x28191d;};return _0x31b6();}const e={'exchange':{'file':'File','upload':_0x85e716(0xf7),'download':_0x85e716(0x102),'uploading':'Uploading','uploadSuccess':_0x85e716(0x10c),'uploadSuccessTip':'{0}\x20file(s)\x20uploaded\x20successfully','downloading':_0x85e716(0x107),'downloadSuccess':_0x85e716(0xfc),'unknownMistake':_0x85e716(0x103),'networkError':_0x85e716(0xf8),'tooLarge':_0x85e716(0x109),'internalError':_0x85e716(0x100),'interrupt':_0x85e716(0x10b),'fileTypeError':'Selected\x20file\x20[{0}]\x20is\x20not\x20supported\x20for\x20upload','wait':'Please\x20wait...','cancel':'Cancel','uploadAgain':'Upload\x20again'}};export{e as default};
|
package/lib/es/locale/fa-IR.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
const _0x2f5744=_0x5397;(function(_0x20a497,_0x39f066){const _0x5be857=_0x5397,_0x1c2cf9=_0x20a497();while(!![]){try{const _0x2258f2=-parseInt(_0x5be857(0x1ea))/0x1*(parseInt(_0x5be857(0x1d7))/0x2)+parseInt(_0x5be857(0x1e3))/0x3*(-parseInt(_0x5be857(0x1e6))/0x4)+-parseInt(_0x5be857(0x1d6))/0x5*(parseInt(_0x5be857(0x1e1))/0x6)+-parseInt(_0x5be857(0x1db))/0x7+parseInt(_0x5be857(0x1e7))/0x8+-parseInt(_0x5be857(0x1ed))/0x9+-parseInt(_0x5be857(0x1e4))/0xa*(-parseInt(_0x5be857(0x1e9))/0xb);if(_0x2258f2===_0x39f066)break;else _0x1c2cf9['push'](_0x1c2cf9['shift']());}catch(_0x1e927c){_0x1c2cf9['push'](_0x1c2cf9['shift']());}}}(_0x5bac,0xebfb0));const o={'exchange':{'file':_0x2f5744(0x1e2),'upload':_0x2f5744(0x1d9),'download':_0x2f5744(0x1e5),'uploading':_0x2f5744(0x1ec),'uploadSuccess':_0x2f5744(0x1e0),'uploadSuccessTip':_0x2f5744(0x1e8),'downloading':_0x2f5744(0x1eb),'downloadSuccess':_0x2f5744(0x1dc),'unknownMistake':'خطای\x20ناشناخته','networkError':_0x2f5744(0x1da),'tooLarge':_0x2f5744(0x1dd),'internalError':'خطای\x20داخلی\x20ناشناخته','interrupt':_0x2f5744(0x1ee),'fileTypeError':_0x2f5744(0x1df),'wait':_0x2f5744(0x1d8),'cancel':_0x2f5744(0x1de),'uploadAgain':'بارگذاری\x20مجدد'}};function _0x5bac(){const _0x3c69b4=['فایل','42792zIprdk','20KOntzv','ذخیره\x20به\x20عنوان','356bQvDGT','12631120sdEaDF','{0}\x20فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','13694879sgpUOE','172151NJUaio','در\x20حال\x20دانلود','در\x20حال\x20بارگذاری','125955FISene','اتصال\x20شبکه\x20قطع\x20شد\x20و\x20بارگذاری\x20فایل\x20ناموفق\x20بود.','5jRzPlY','4oZHxhv','لطفا\x20صبر\x20کنید...','بازکردن(فایل)','خطای\x20شبکه','4836930aFKrMl','دانلود\x20موفقیت\x20آمیز','داده\x20خیلی\x20بزرگ\x20است','لغو','فایل\x20انتخاب\x20شده\x20[{0}]\x20برای\x20بارگذاری\x20پشتیبانی\x20نمیشود','فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','4701054HRpCgq'];_0x5bac=function(){return _0x3c69b4;};return _0x5bac();}function _0x5397(_0x4cb19f,_0x557d11){const _0x5bacc8=_0x5bac();return _0x5397=function(_0x539765,_0x25d318){_0x539765=_0x539765-0x1d6;let _0x1f63fc=_0x5bacc8[_0x539765];return _0x1f63fc;},_0x5397(_0x4cb19f,_0x557d11);}export{o as default};
|
package/lib/es/locale/fr-FR.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
function _0x176a(_0x19a798,_0xf83048){const _0x1f7b36=_0x1f7b();return _0x176a=function(_0x176a60,_0x1d98be){_0x176a60=_0x176a60-0x1a3;let _0x19b584=_0x1f7b36[_0x176a60];return _0x19b584;},_0x176a(_0x19a798,_0xf83048);}const _0x1dd1db=_0x176a;function _0x1f7b(){const _0xab7bfb=['5150310vIawHO','30xTiFiV','Erreur\x20réseau','1991355bMgAQb','9QqrZqw','Erreur\x20inconnue','7CtkDgR','Veuillez\x20patienter...','17828180dycKll','732376PxAPKL','Fichier\x20téléchargé\x20avec\x20succès','Télécharger\x20à\x20nouveau','Erreur\x20interne\x20inconnue','Enregistrer\x20sous','{0}\x20fichier(s)\x20téléchargé(s)\x20avec\x20succès','1274168wseQUU','Fichier','466876FmPZRm','2660536MopAve','Téléchargement\x20en\x20cours','Téléchargement\x20réussi'];_0x1f7b=function(){return _0xab7bfb;};return _0x1f7b();}(function(_0x263086,_0x29cb57){const _0x57fa72=_0x176a,_0x4db3f8=_0x263086();while(!![]){try{const _0x4615bd=-parseInt(_0x57fa72(0x1b3))/0x1+parseInt(_0x57fa72(0x1b5))/0x2+-parseInt(_0x57fa72(0x1a7))/0x3+parseInt(_0x57fa72(0x1ad))/0x4*(parseInt(_0x57fa72(0x1a5))/0x5)+-parseInt(_0x57fa72(0x1a4))/0x6*(parseInt(_0x57fa72(0x1aa))/0x7)+-parseInt(_0x57fa72(0x1b6))/0x8*(-parseInt(_0x57fa72(0x1a8))/0x9)+parseInt(_0x57fa72(0x1ac))/0xa;if(_0x4615bd===_0x29cb57)break;else _0x4db3f8['push'](_0x4db3f8['shift']());}catch(_0x46b899){_0x4db3f8['push'](_0x4db3f8['shift']());}}}(_0x1f7b,0x9ef29));const e={'exchange':{'file':_0x1dd1db(0x1b4),'upload':'Ouvrir\x20(Fichier)','download':_0x1dd1db(0x1b1),'uploading':_0x1dd1db(0x1b7),'uploadSuccess':_0x1dd1db(0x1ae),'uploadSuccessTip':_0x1dd1db(0x1b2),'downloading':'Téléchargement','downloadSuccess':_0x1dd1db(0x1a3),'unknownMistake':_0x1dd1db(0x1a9),'networkError':_0x1dd1db(0x1a6),'tooLarge':'Les\x20données\x20sont\x20trop\x20volumineuses','internalError':_0x1dd1db(0x1b0),'interrupt':'La\x20connexion\x20réseau\x20a\x20été\x20interrompue\x20et\x20le\x20téléchargement\x20du\x20fichier\x20a\x20échoué','fileTypeError':'Le\x20fichier\x20sélectionné\x20[{0}]\x20n\x27est\x20pas\x20pris\x20en\x20charge\x20pour\x20le\x20téléchargement','wait':_0x1dd1db(0x1ab),'cancel':'Annuler','uploadAgain':_0x1dd1db(0x1af)}};export{e as default};
|
package/lib/es/locale/ru-RU.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
const _0x3068f9=_0x1e98;(function(_0x673fca,_0x5deb88){const _0x5a0dfe=_0x1e98,_0x3e6bc4=_0x673fca();while(!![]){try{const _0x2388b6=parseInt(_0x5a0dfe(0x1e3))/0x1+parseInt(_0x5a0dfe(0x1f0))/0x2+parseInt(_0x5a0dfe(0x1e6))/0x3*(parseInt(_0x5a0dfe(0x1db))/0x4)+parseInt(_0x5a0dfe(0x1e5))/0x5+parseInt(_0x5a0dfe(0x1ee))/0x6*(-parseInt(_0x5a0dfe(0x1df))/0x7)+parseInt(_0x5a0dfe(0x1eb))/0x8*(parseInt(_0x5a0dfe(0x1ef))/0x9)+parseInt(_0x5a0dfe(0x1da))/0xa*(-parseInt(_0x5a0dfe(0x1ea))/0xb);if(_0x2388b6===_0x5deb88)break;else _0x3e6bc4['push'](_0x3e6bc4['shift']());}catch(_0x18f268){_0x3e6bc4['push'](_0x3e6bc4['shift']());}}}(_0x569e,0x34f0a));function _0x569e(){const _0x57d557=['Загрузить\x20снова','Скачивание','7672klXXKQ','Внутренняя\x20неизвестная\x20ошибка','Выбранный\x20файл\x20[{0}]\x20не\x20поддерживается\x20для\x20загрузки','Неизвестная\x20ошибка','55899tJsXOh','{0}\x20файл(ов)\x20успешно\x20загружен(о)','1143410GYErEF','197499GJvNjQ','Отмена','Файл\x20успешно\x20загружен','Данные\x20слишком\x20большие','8151LIpdKg','312FYuuGy','Скачивание\x20успешно','Загрузка','1188UpIMVf','49158UrTzKH','19916NuqmSr','Сетевое\x20соединение\x20было\x20прервано,\x20и\x20загрузка\x20файла\x20не\x20удалась','Сохранить\x20как','Сетевая\x20ошибка','3660rDBhev','12zcOhjr','Пожалуйста,\x20подождите...'];_0x569e=function(){return _0x57d557;};return _0x569e();}const o={'exchange':{'file':'Файл','upload':'Открыть(Файл)','download':_0x3068f9(0x1d8),'uploading':_0x3068f9(0x1ed),'uploadSuccess':_0x3068f9(0x1e8),'uploadSuccessTip':_0x3068f9(0x1e4),'downloading':_0x3068f9(0x1de),'downloadSuccess':_0x3068f9(0x1ec),'unknownMistake':_0x3068f9(0x1e2),'networkError':_0x3068f9(0x1d9),'tooLarge':_0x3068f9(0x1e9),'internalError':_0x3068f9(0x1e0),'interrupt':_0x3068f9(0x1d7),'fileTypeError':_0x3068f9(0x1e1),'wait':_0x3068f9(0x1dc),'cancel':_0x3068f9(0x1e7),'uploadAgain':_0x3068f9(0x1dd)}};function _0x1e98(_0x38e563,_0x2ecae1){const _0x569eb1=_0x569e();return _0x1e98=function(_0x1e9841,_0x5a27a2){_0x1e9841=_0x1e9841-0x1d7;let _0x53a57e=_0x569eb1[_0x1e9841];return _0x53a57e;},_0x1e98(_0x38e563,_0x2ecae1);}export{o as default};
|
package/lib/es/locale/vi-VN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
const _0x4e7d39=_0x1c21;(function(_0x36cc54,_0xbe0913){const _0x4d33fa=_0x1c21,_0x56557b=_0x36cc54();while(!![]){try{const _0x24c929=parseInt(_0x4d33fa(0x124))/0x1*(-parseInt(_0x4d33fa(0x113))/0x2)+parseInt(_0x4d33fa(0x11d))/0x3+parseInt(_0x4d33fa(0x11c))/0x4+parseInt(_0x4d33fa(0x119))/0x5*(-parseInt(_0x4d33fa(0x11e))/0x6)+parseInt(_0x4d33fa(0x122))/0x7+parseInt(_0x4d33fa(0x112))/0x8*(parseInt(_0x4d33fa(0x11f))/0x9)+-parseInt(_0x4d33fa(0x114))/0xa;if(_0x24c929===_0xbe0913)break;else _0x56557b['push'](_0x56557b['shift']());}catch(_0x35ec5a){_0x56557b['push'](_0x56557b['shift']());}}}(_0x5b42,0xbbcc7));function _0x5b42(){const _0x5e2c94=['Lưu\x20dưới\x20dạng','Lỗi\x20không\x20xác\x20định','Tải\x20lên\x20tệp\x20thành\x20công','Kết\x20nối\x20mạng\x20bị\x20gián\x20đoạn,\x20tải\x20lên\x20tệp\x20thất\x20bại','72YEipZb','590EhlrFj','7465580OjkcoA','Tệp','Hủy\x20bỏ','Đang\x20tải\x20xuống','Lỗi\x20mạng','11295iuHVlO','Đang\x20tải\x20lên','Vui\x20lòng\x20đợi...','2427892elJoMp','631512LwNsVT','2946hVbTlX','613917ayVihc','Luồng\x20dữ\x20liệu\x20quá\x20lớn','Mở\x20(Tệp)','9546397kIKLuw','Tải\x20lên\x20lại','577YtlLXr','Tải\x20xuống\x20thành\x20công','Lỗi\x20không\x20xác\x20định\x20bên\x20trong'];_0x5b42=function(){return _0x5e2c94;};return _0x5b42();}function _0x1c21(_0x178be4,_0x1bd407){const _0x5b42de=_0x5b42();return _0x1c21=function(_0x1c217f,_0x70b8f4){_0x1c217f=_0x1c217f-0x10e;let _0x3228e6=_0x5b42de[_0x1c217f];return _0x3228e6;},_0x1c21(_0x178be4,_0x1bd407);}const n={'exchange':{'file':_0x4e7d39(0x115),'upload':_0x4e7d39(0x121),'download':_0x4e7d39(0x10e),'uploading':_0x4e7d39(0x11a),'uploadSuccess':_0x4e7d39(0x110),'uploadSuccessTip':'{0}\x20tệp\x20đã\x20được\x20tải\x20lên\x20thành\x20công','downloading':_0x4e7d39(0x117),'downloadSuccess':_0x4e7d39(0x125),'unknownMistake':_0x4e7d39(0x10f),'networkError':_0x4e7d39(0x118),'tooLarge':_0x4e7d39(0x120),'internalError':_0x4e7d39(0x126),'interrupt':_0x4e7d39(0x111),'fileTypeError':'Tệp\x20được\x20chọn\x20[{0}]\x20không\x20được\x20hỗ\x20trợ\x20để\x20tải\x20lên','wait':_0x4e7d39(0x11b),'cancel':_0x4e7d39(0x116),'uploadAgain':_0x4e7d39(0x123)}};export{n as default};
|
package/lib/es/locale/zh-CN.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
function _0x5d99(_0x543b46,_0x22e2f2){const _0x3c05da=_0x3c05();return _0x5d99=function(_0x5d9964,_0x19c4e2){_0x5d9964=_0x5d9964-0x16d;let _0x4940cd=_0x3c05da[_0x5d9964];return _0x4940cd;},_0x5d99(_0x543b46,_0x22e2f2);}function _0x3c05(){const _0x1656d4=['1956690CPiQBy','56JDJHRe','上传中','119325aDyCml','网络连接中断,文件上传失败','数据流过大','所选文件\x20[{0}]\x20不支持上传','打开(文件)','2321816HBKuxY','1141920pJfmKY','8Tfgpdy','未知错误','8XDRVoS','1209975tHevUM','{0}个文件上传成功','76520USJTrz','再次上传','408357RTzOCX','内部未知错误','网络异常'];_0x3c05=function(){return _0x1656d4;};return _0x3c05();}const _0x566d5c=_0x5d99;(function(_0x10899a,_0x141843){const _0x100f72=_0x5d99,_0x2d3ed4=_0x10899a();while(!![]){try{const _0x49b260=parseInt(_0x100f72(0x171))/0x1*(parseInt(_0x100f72(0x174))/0x2)+-parseInt(_0x100f72(0x17c))/0x3*(parseInt(_0x100f72(0x16f))/0x4)+parseInt(_0x100f72(0x172))/0x5+-parseInt(_0x100f72(0x179))/0x6+-parseInt(_0x100f72(0x16d))/0x7+parseInt(_0x100f72(0x17a))/0x8*(parseInt(_0x100f72(0x176))/0x9)+parseInt(_0x100f72(0x16e))/0xa;if(_0x49b260===_0x141843)break;else _0x2d3ed4['push'](_0x2d3ed4['shift']());}catch(_0x38492e){_0x2d3ed4['push'](_0x2d3ed4['shift']());}}}(_0x3c05,0x3b35d));const o={'exchange':{'file':'文件','upload':_0x566d5c(0x180),'download':'另存为','uploading':_0x566d5c(0x17b),'uploadSuccess':'文件上传成功','uploadSuccessTip':_0x566d5c(0x173),'downloading':'下载中','downloadSuccess':'下载成功','unknownMistake':_0x566d5c(0x170),'networkError':_0x566d5c(0x178),'tooLarge':_0x566d5c(0x17e),'internalError':_0x566d5c(0x177),'interrupt':_0x566d5c(0x17d),'fileTypeError':_0x566d5c(0x17f),'wait':'请稍等...','cancel':'取消','uploadAgain':_0x566d5c(0x175)}};export{o as default};
|
package/lib/es/locale/zh-TW.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const _0x9b1bb5=_0x520d;function _0x520d(_0x57e426,_0x26d9aa){const _0x230b01=_0x230b();return _0x520d=function(_0x520d1f,_0x46c36c){_0x520d1f=_0x520d1f-0x163;let _0x503d2d=_0x230b01[_0x520d1f];return _0x503d2d;},_0x520d(_0x57e426,_0x26d9aa);}(function(_0x70a2b1,_0x1a238d){const _0x935dbf=_0x520d,_0x1e9c65=_0x70a2b1();while(!![]){try{const _0x3e8476=parseInt(_0x935dbf(0x165))/0x1+parseInt(_0x935dbf(0x164))/0x2*(parseInt(_0x935dbf(0x172))/0x3)+parseInt(_0x935dbf(0x173))/0x4+-parseInt(_0x935dbf(0x166))/0x5+-parseInt(_0x935dbf(0x168))/0x6+-parseInt(_0x935dbf(0x16d))/0x7+parseInt(_0x935dbf(0x16f))/0x8;if(_0x3e8476===_0x1a238d)break;else _0x1e9c65['push'](_0x1e9c65['shift']());}catch(_0x116036){_0x1e9c65['push'](_0x1e9c65['shift']());}}}(_0x230b,0xc1fb2));const o={'exchange':{'file':'檔案','upload':'開啟(檔案)','download':'另存為','uploading':_0x9b1bb5(0x171),'uploadSuccess':_0x9b1bb5(0x163),'uploadSuccessTip':'{0}個檔案上傳成功','downloading':_0x9b1bb5(0x16e),'downloadSuccess':'下載成功','unknownMistake':_0x9b1bb5(0x167),'networkError':_0x9b1bb5(0x16c),'tooLarge':_0x9b1bb5(0x16b),'internalError':'內部未知錯誤','interrupt':_0x9b1bb5(0x170),'fileTypeError':'所選檔案\x20[{0}]\x20不支援上傳','wait':_0x9b1bb5(0x16a),'cancel':'取消','uploadAgain':_0x9b1bb5(0x169)}};export{o as default};function _0x230b(){const _0x30a78b=['資料流過大','網路異常','3574725IfipUl','下載中','8582384bqnoUV','網路連線中斷,檔案上傳失敗','上傳中','1835721uSrABw','1085052tOsMpu','檔案上傳成功','2ovkRGb','807798KALhzB','3086890NDYdym','未知錯誤','5047002ryJula','再次上傳','請稍等...'];_0x230b=function(){return _0x30a78b;};return _0x230b();}
|
@@ -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 _0x3b2f(){const _0x3a5048=['@univerjs/core/facade','function','_injector','The\x20exchange\x20service\x20is\x20not\x20available','@univerjs-pro/exchange-client','UNIVER_PROJECT','extend','3455qNjOtm','UNRECOGNIZED','FUniver','object','2AndInW','amd','importDOCXToSnapshot','importXLSXToUnitIdAsync','UniverCoreFacade','importDOCXToUnitId','importDOCXToSnapshotAsync','39417Ffvnce','importXLSXToSnapshotAsync','UNIVER_UNKNOWN','375810JSpqfV','3489498NNxIKV','exportXLSXByUnitId','exportXLSXByUnitIdAsync','4xSXYta','importFileToUnitId','get','10iDlUJd','168yyTFQT','UNIVER_SLIDE','6984732PsCxiy','importDOCXToUnitIdAsync','IExchangeService','UNIVER_SHEET','120MoTXZO','7272OlSieJ','exportXLSXBySnapshot','importXLSXToSnapshot','UniverProExchangeClient','1046793YDjVYE','UNIVER_DOC','exportXLSXBySnapshotAsync'];_0x3b2f=function(){return _0x3a5048;};return _0x3b2f();}function _0x31f8(_0x5a3b5c,_0x38d5b9){const _0x3b2ff8=_0x3b2f();return _0x31f8=function(_0x31f8a0,_0x46daed){_0x31f8a0=_0x31f8a0-0x1d2;let _0x3e1042=_0x3b2ff8[_0x31f8a0];return _0x3e1042;},_0x31f8(_0x5a3b5c,_0x38d5b9);}(function(_0x386140,_0x145a5d){const _0x307335=_0x31f8,_0xf2d213=_0x386140();while(!![]){try{const _0x25441d=-parseInt(_0x307335(0x1e4))/0x1*(-parseInt(_0x307335(0x1f6))/0x2)+-parseInt(_0x307335(0x1d5))/0x3*(parseInt(_0x307335(0x1d9))/0x4)+parseInt(_0x307335(0x1f2))/0x5*(-parseInt(_0x307335(0x1dd))/0x6)+-parseInt(_0x307335(0x1d2))/0x7*(-parseInt(_0x307335(0x1e3))/0x8)+parseInt(_0x307335(0x1d6))/0x9*(-parseInt(_0x307335(0x1dc))/0xa)+parseInt(_0x307335(0x1e8))/0xb+parseInt(_0x307335(0x1df))/0xc;if(_0x25441d===_0x145a5d)break;else _0xf2d213['push'](_0xf2d213['shift']());}catch(_0x3fc616){_0xf2d213['push'](_0xf2d213['shift']());}}}(_0x3b2f,0x39c4d),function(_0x33ec65,_0x422bac){const _0x35234c=_0x31f8;typeof exports==_0x35234c(0x1f5)&&typeof module<'u'?_0x422bac(require(_0x35234c(0x1ef)),require('@univerjs/core/facade')):typeof define==_0x35234c(0x1ec)&&define[_0x35234c(0x1f7)]?define([_0x35234c(0x1ef),_0x35234c(0x1eb)],_0x422bac):(_0x33ec65=typeof globalThis<'u'?globalThis:_0x33ec65||self,_0x422bac(_0x33ec65[_0x35234c(0x1e7)],_0x33ec65[_0x35234c(0x1fa)]));}(this,function(_0x548181,_0x1d506f){'use strict';const _0x5adbbf=_0x31f8;var _0x49ddb9=(_0x501892=>(_0x501892[_0x501892[_0x5adbbf(0x1d4)]=0x0]=_0x5adbbf(0x1d4),_0x501892[_0x501892[_0x5adbbf(0x1e9)]=0x1]=_0x5adbbf(0x1e9),_0x501892[_0x501892[_0x5adbbf(0x1e2)]=0x2]=_0x5adbbf(0x1e2),_0x501892[_0x501892[_0x5adbbf(0x1de)]=0x3]='UNIVER_SLIDE',_0x501892[_0x501892[_0x5adbbf(0x1f0)]=0x4]='UNIVER_PROJECT',_0x501892[_0x501892[_0x5adbbf(0x1f3)]=-0x1]=_0x5adbbf(0x1f3),_0x501892))(_0x49ddb9||{});class _0x433df3 extends _0x1d506f['FUniver']{async['importXLSXToUnitId'](_0x93b9ce){const _0x5de07d=_0x5adbbf;return this[_0x5de07d(0x1f9)](_0x93b9ce);}async['importXLSXToUnitIdAsync'](_0x193bac){const _0x3aaa6a=_0x5adbbf,_0x23c4f4=this[_0x3aaa6a(0x1ed)][_0x3aaa6a(0x1db)](_0x548181[_0x3aaa6a(0x1e1)]);if(!_0x23c4f4)throw new Error(_0x3aaa6a(0x1ee));return _0x23c4f4[_0x3aaa6a(0x1da)](_0x193bac,_0x49ddb9['UNIVER_SHEET']);}async[_0x5adbbf(0x1e6)](_0x4a2b23){const _0x2aa747=_0x5adbbf;return this[_0x2aa747(0x1d3)](_0x4a2b23);}async[_0x5adbbf(0x1d3)](_0x3ed00d){const _0xc35a08=_0x5adbbf,_0x51a221=this[_0xc35a08(0x1ed)][_0xc35a08(0x1db)](_0x548181[_0xc35a08(0x1e1)]);if(!_0x51a221)throw new Error(_0xc35a08(0x1ee));return _0x51a221[_0xc35a08(0x1e6)](_0x3ed00d);}async['exportXLSXByUnitId'](_0x44c180){const _0x305c27=_0x5adbbf;return this[_0x305c27(0x1d8)](_0x44c180);}async['exportXLSXByUnitIdAsync'](_0x386dd6){const _0x477c85=_0x5adbbf,_0x16be81=this[_0x477c85(0x1ed)][_0x477c85(0x1db)](_0x548181[_0x477c85(0x1e1)]);if(!_0x16be81)throw new Error('The\x20exchange\x20service\x20is\x20not\x20available');return _0x16be81[_0x477c85(0x1d7)](_0x386dd6);}async[_0x5adbbf(0x1e5)](_0x31e205){const _0x4d959a=_0x5adbbf;return this[_0x4d959a(0x1ea)](_0x31e205);}async[_0x5adbbf(0x1ea)](_0x43229b){const _0x263c98=_0x5adbbf,_0x2f75b6=this[_0x263c98(0x1ed)][_0x263c98(0x1db)](_0x548181['IExchangeService']);if(!_0x2f75b6)throw new Error('The\x20exchange\x20service\x20is\x20not\x20available');return _0x2f75b6['exportXLSXBySnapshot'](_0x43229b);}async[_0x5adbbf(0x1fb)](_0x3becac){const _0x2def48=_0x5adbbf;return this[_0x2def48(0x1e0)](_0x3becac);}async[_0x5adbbf(0x1e0)](_0x5b8e1c){const _0x2b1bb4=_0x5adbbf,_0x656ef4=this[_0x2b1bb4(0x1ed)][_0x2b1bb4(0x1db)](_0x548181[_0x2b1bb4(0x1e1)]);if(!_0x656ef4)throw new Error(_0x2b1bb4(0x1ee));return _0x656ef4[_0x2b1bb4(0x1da)](_0x5b8e1c,_0x49ddb9['UNIVER_DOC']);}async[_0x5adbbf(0x1f8)](_0x37a789){const _0x44d5c4=_0x5adbbf;return this[_0x44d5c4(0x1fc)](_0x37a789);}async[_0x5adbbf(0x1fc)](_0x51a74a){const _0x1566a0=_0x5adbbf,_0x5e8190=this[_0x1566a0(0x1ed)]['get'](_0x548181['IExchangeService']);if(!_0x5e8190)throw new Error(_0x1566a0(0x1ee));return _0x5e8190[_0x1566a0(0x1f8)](_0x51a74a);}}_0x1d506f[_0x5adbbf(0x1f4)][_0x5adbbf(0x1f1)](_0x433df3);}));
|