@univerjs-pro/exchange-client 1.0.0-alpha.2 → 1.0.0-alpha.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/README.md +9 -2
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.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/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.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-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.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/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.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-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.css +0 -4
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/config/config.d.ts +0 -4
- package/lib/types/controllers/components.controller.d.ts +7 -0
- package/lib/types/controllers/exchange.controller.d.ts +3 -5
- package/lib/types/facade/f-univer.d.ts +45 -16
- package/lib/types/index.d.ts +5 -10
- package/lib/types/services/exchange.service.d.ts +24 -3
- package/lib/types/services/request.service.d.ts +0 -2
- package/lib/types/services/utils/content-type.d.ts +1 -0
- package/lib/types/services/utils/snapshot.d.ts +8 -3
- package/lib/types/services/utils/tool.d.ts +1 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.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/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.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-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +14 -13
|
@@ -4,6 +4,7 @@ export declare const XLSX = "application/vnd.openxmlformats-officedocument.sprea
|
|
|
4
4
|
export declare const XLSM = "application/vnd.ms-excel.sheet.macroEnabled.12";
|
|
5
5
|
export declare const XLTX = "application/vnd.openxmlformats-officedocument.spreadsheetml.template";
|
|
6
6
|
export declare const PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
7
|
+
export declare const PDF = "application/pdf";
|
|
7
8
|
export declare const UNIT_CONTENT_TYPE: Record<UniverInstanceType, string[]>;
|
|
8
9
|
export declare const CONTENT_TYPE_EXTNAME: {
|
|
9
10
|
[key: string]: string;
|
|
@@ -18,10 +18,11 @@ export type IExchangeSlideDocumentData = ReturnType<typeof transformSnapshotToSl
|
|
|
18
18
|
export interface ISlideMetaJson extends Omit<ISlideMeta, 'originalMeta'> {
|
|
19
19
|
originalMeta: string;
|
|
20
20
|
}
|
|
21
|
-
export interface ISnapshotJson extends Omit<ISnapshot, 'workbook' | 'doc' | 'slide'> {
|
|
21
|
+
export interface ISnapshotJson extends Omit<ISnapshot, 'workbook' | 'doc' | 'slide' | 'board'> {
|
|
22
22
|
workbook: Partial<IWorkbookMetaJson>;
|
|
23
23
|
doc: Partial<IDocumentMetaJson>;
|
|
24
24
|
slide?: Partial<ISlideMetaJson>;
|
|
25
|
+
board?: undefined;
|
|
25
26
|
}
|
|
26
27
|
export interface ISheetBlockData extends Omit<ISheetBlock, 'data'> {
|
|
27
28
|
data: string;
|
|
@@ -60,7 +61,9 @@ export declare function transformSlideSnapshotMetaToString(snapshot: ISnapshot):
|
|
|
60
61
|
*/
|
|
61
62
|
export declare function transformSheetBlockMetaToString(sheetBlocks: ISheetBlock[]): ISheetBlockJson;
|
|
62
63
|
/**
|
|
63
|
-
* Convert the workbook data to snapshot data
|
|
64
|
+
* Convert the workbook data to snapshot data.
|
|
65
|
+
*
|
|
66
|
+
* @deprecated Use `univerAPI.transformWorkbookDataToSnapshotJsonAsync(...)` instead. Planned for removal in v1.1.0.
|
|
64
67
|
*/
|
|
65
68
|
export declare function transformWorkbookDataToSnapshotJson(workbookData: IWorkbookData): Promise<ISnapshotBlockJson>;
|
|
66
69
|
/**
|
|
@@ -73,7 +76,9 @@ export declare function transformDocumentDataToSnapshotJson(documentData: IDocum
|
|
|
73
76
|
*/
|
|
74
77
|
export declare function transformSlideDataToSnapshotJson(slideData: IExchangeSlideDocumentData): Promise<ISnapshotBlockJson>;
|
|
75
78
|
/**
|
|
76
|
-
* Convert the Snapshot data to workbook data
|
|
79
|
+
* Convert the Snapshot data to workbook data.
|
|
80
|
+
*
|
|
81
|
+
* @deprecated Use `univerAPI.transformSnapshotJsonToWorkbookDataAsync(...)` instead. Planned for removal in v1.1.0.
|
|
77
82
|
*/
|
|
78
83
|
export declare function transformSnapshotJsonToWorkbookData(json: ISnapshotBlockJsonResponse): Promise<IWorkbookData>;
|
|
79
84
|
/**
|
|
@@ -4,6 +4,7 @@ export declare function downloadFileByURL(url: string, filename: string, fileExt
|
|
|
4
4
|
/**
|
|
5
5
|
* Triggers a download of a given File object.
|
|
6
6
|
*
|
|
7
|
+
* @deprecated Use `univerAPI.downloadFile(...)` instead. Planned for removal in v1.1.0.
|
|
7
8
|
* @param {File} file - The File object to be downloaded.
|
|
8
9
|
*/
|
|
9
10
|
export declare function downloadFile(file: File | Blob, filename: string, fileExt: string): void;
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x2d60(_0x46a8a0,_0x212e14){_0x46a8a0=_0x46a8a0-0x145;var _0x213fc4=_0x213f();var _0x2d60f2=_0x213fc4[_0x46a8a0];return _0x2d60f2;}function _0x213f(){var _0x2b2404=['UNIVER_SLIDE','importDOCXToUnitIdAsync','importXLSXToUnitIdAsync','importFileToUnitId','UniverCoreFacade','exportXLSXByUnitIdAsync','transformSnapshotJsonToWorkbookData','FUniver','exportPPTXBySnapshotAsync','UniverProExchangeClient','importXLSXToSnapshotAsync','downloadFile','3185duKnJs','exportPPTXBySnapshot','get','object','transformWorkbookDataToSnapshotJson','349230inXyuh','10506cVKGtB','@univerjs/core','UNIVER_DOC','importPPTXToSnapshotAsync','UniverInstanceType','exportXLSXBySnapshotAsync','exportDOCXByUnitId','extend','exportDOCXBySnapshotAsync','3582712pwonqD','importDOCXToSnapshot','importXLSXToSnapshot','7545033kWxfuv','5NwhYHQ','_injector','transformWorkbookDataToSnapshotJsonAsync','UNIVER_SHEET','998804KgxJrb','exportXLSXBySnapshot','333070kEZyHN','1617720JzpEAB','importPPTXToUnitIdAsync','@univerjs-pro/exchange-client','exportXLSXByUnitId','IExchangeService','function'];_0x213f=function(){return _0x2b2404;};return _0x213f();}(function(_0x1c7e0f,_0x1f502b){var _0x37e257=_0x2d60,_0xbda3cf=_0x1c7e0f();while(!![]){try{var _0x457bbb=-parseInt(_0x37e257(0x159))/0x1+parseInt(_0x37e257(0x15a))/0x2+-parseInt(_0x37e257(0x145))/0x3+-parseInt(_0x37e257(0x157))/0x4*(parseInt(_0x37e257(0x153))/0x5)+parseInt(_0x37e257(0x146))/0x6*(parseInt(_0x37e257(0x16c))/0x7)+parseInt(_0x37e257(0x14f))/0x8+-parseInt(_0x37e257(0x152))/0x9;if(_0x457bbb===_0x1f502b)break;else _0xbda3cf['push'](_0xbda3cf['shift']());}catch(_0x3ef843){_0xbda3cf['push'](_0xbda3cf['shift']());}}}(_0x213f,0x7df2e),function(_0x3c56bb,_0x2a4f44){var _0x3c9cbb=_0x2d60;typeof exports==_0x3c9cbb(0x16f)&&typeof module<'u'?_0x2a4f44(require('@univerjs-pro/exchange-client'),require('@univerjs/core'),require('@univerjs/core/facade')):typeof define==_0x3c9cbb(0x15f)&&define['amd']?define([_0x3c9cbb(0x15c),_0x3c9cbb(0x147),'@univerjs/core/facade'],_0x2a4f44):(_0x3c56bb=typeof globalThis<'u'?globalThis:_0x3c56bb||self,_0x2a4f44(_0x3c56bb[_0x3c9cbb(0x169)],_0x3c56bb['UniverCore'],_0x3c56bb[_0x3c9cbb(0x164)]));}(this,function(_0x4df775,_0x56ca3c,_0x167bbe){var _0x32b67a=_0x2d60,_0x1789bd=class extends _0x167bbe[_0x32b67a(0x167)]{[_0x32b67a(0x16b)](_0x3ad003,_0x22d131,_0x8eb286){var _0x32c148=_0x32b67a;this[_0x32c148(0x154)][_0x32c148(0x16e)](_0x4df775[_0x32c148(0x15e)])[_0x32c148(0x16b)](_0x3ad003,_0x22d131,_0x8eb286);}async['transformSnapshotJsonToWorkbookDataAsync'](_0x1bcbda){var _0x32a758=_0x32b67a;return this[_0x32a758(0x154)][_0x32a758(0x16e)](_0x4df775[_0x32a758(0x15e)])[_0x32a758(0x166)](_0x1bcbda);}async[_0x32b67a(0x155)](_0x582eee){var _0x3eb14b=_0x32b67a;return this['_injector'][_0x3eb14b(0x16e)](_0x4df775['IExchangeService'])[_0x3eb14b(0x170)](_0x582eee);}async[_0x32b67a(0x162)](_0x1f3ba6){var _0xed08af=_0x32b67a;return this[_0xed08af(0x154)][_0xed08af(0x16e)](_0x4df775[_0xed08af(0x15e)])[_0xed08af(0x163)](_0x1f3ba6,_0x56ca3c[_0xed08af(0x14a)][_0xed08af(0x156)]);}async[_0x32b67a(0x16a)](_0x471267){var _0x1142cc=_0x32b67a;return this[_0x1142cc(0x154)][_0x1142cc(0x16e)](_0x4df775['IExchangeService'])[_0x1142cc(0x151)](_0x471267);}async[_0x32b67a(0x165)](_0x542b94){var _0x14de03=_0x32b67a;return this[_0x14de03(0x154)][_0x14de03(0x16e)](_0x4df775[_0x14de03(0x15e)])[_0x14de03(0x15d)](_0x542b94);}async[_0x32b67a(0x14b)](_0x47647f){var _0x174fd6=_0x32b67a;return this['_injector'][_0x174fd6(0x16e)](_0x4df775[_0x174fd6(0x15e)])[_0x174fd6(0x158)](_0x47647f);}async[_0x32b67a(0x161)](_0x7e8b5d){var _0x4286b8=_0x32b67a;return this[_0x4286b8(0x154)]['get'](_0x4df775[_0x4286b8(0x15e)])['importFileToUnitId'](_0x7e8b5d,_0x56ca3c[_0x4286b8(0x14a)][_0x4286b8(0x148)]);}async['importDOCXToSnapshotAsync'](_0x181515){var _0x1703b8=_0x32b67a;return this['_injector'][_0x1703b8(0x16e)](_0x4df775[_0x1703b8(0x15e)])[_0x1703b8(0x150)](_0x181515);}async[_0x32b67a(0x14e)](_0x1a1706){var _0x2dc9aa=_0x32b67a;return this[_0x2dc9aa(0x154)][_0x2dc9aa(0x16e)](_0x4df775['IExchangeService'])['exportDOCXBySnapshot'](_0x1a1706);}async['exportDOCXByUnitIdAsync'](_0x50c9ac){var _0x2f656c=_0x32b67a;return this['_injector'][_0x2f656c(0x16e)](_0x4df775[_0x2f656c(0x15e)])[_0x2f656c(0x14c)](_0x50c9ac);}async[_0x32b67a(0x15b)](_0x309b50){var _0x143959=_0x32b67a;return this['_injector'][_0x143959(0x16e)](_0x4df775[_0x143959(0x15e)])[_0x143959(0x163)](_0x309b50,_0x56ca3c[_0x143959(0x14a)][_0x143959(0x160)]);}async[_0x32b67a(0x149)](_0xde913){var _0x248de2=_0x32b67a;return this[_0x248de2(0x154)][_0x248de2(0x16e)](_0x4df775[_0x248de2(0x15e)])['importPPTXToSnapshot'](_0xde913);}async['exportPPTXByUnitIdAsync'](_0x1d95ee){var _0x39824b=_0x32b67a;return this[_0x39824b(0x154)]['get'](_0x4df775[_0x39824b(0x15e)])['exportPPTXByUnitId'](_0x1d95ee);}async[_0x32b67a(0x168)](_0xf9b283){var _0x72f373=_0x32b67a;return this[_0x72f373(0x154)][_0x72f373(0x16e)](_0x4df775[_0x72f373(0x15e)])[_0x72f373(0x16d)](_0xf9b283);}};_0x167bbe[_0x32b67a(0x167)][_0x32b67a(0x14d)](_0x1789bd);}));
|