@officesdk/editor-sdk-core 0.0.0-22 → 0.0.0-23
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/cjs/docs/sdk.js +1 -1
- package/cjs/docx/index.js +1 -1
- package/cjs/docx/menu.js +1 -1
- package/cjs/docx/outline.js +1 -1
- package/cjs/docx/pages.js +17 -1
- package/cjs/docx/paragraphs.js +3 -0
- package/cjs/docx/revisions.js +3 -0
- package/cjs/docx/sdk.js +1 -1
- package/cjs/docx/signature.js +3 -0
- package/cjs/docx/statistic.js +3 -0
- package/cjs/docx/theme.js +1 -1
- package/cjs/docx/ui.js +3 -0
- package/cjs/form/feature.js +3 -0
- package/cjs/form/index.js +21 -0
- package/cjs/form/link.js +3 -0
- package/cjs/form/publish.js +3 -0
- package/cjs/form/sdk.js +28 -0
- package/cjs/form/sheet.js +3 -0
- package/cjs/form/table.js +3 -0
- package/cjs/form/ui.js +3 -0
- package/cjs/pdf/pages.js +1 -1
- package/cjs/presentation/anonymous.js +3 -0
- package/cjs/presentation/assistant.js +3 -0
- package/cjs/presentation/chart.js +3 -0
- package/cjs/presentation/comments.js +3 -0
- package/cjs/presentation/diagram.js +3 -0
- package/cjs/presentation/event-subscription.js +3 -0
- package/cjs/presentation/export.js +1 -1
- package/cjs/presentation/fonts.js +1 -1
- package/cjs/presentation/index.js +1 -1
- package/cjs/presentation/presentation.js +3 -0
- package/cjs/presentation/remote-live.js +3 -0
- package/cjs/presentation/sdk.js +1 -1
- package/cjs/presentation/slides-pane.js +3 -0
- package/cjs/presentation/theme.js +3 -0
- package/cjs/shared/assets.js +1 -1
- package/cjs/shared/attachment.js +1 -1
- package/cjs/shared/brand.js +1 -1
- package/cjs/shared/collaborators.js +1 -1
- package/cjs/shared/comments.js +1 -1
- package/cjs/shared/copy.js +3 -0
- package/cjs/shared/device.js +3 -0
- package/cjs/shared/download.js +1 -2
- package/cjs/shared/drag-n-drop.js +6 -0
- package/cjs/shared/duplicate.js +6 -0
- package/cjs/shared/edit.js +2 -0
- package/cjs/shared/editor.js +1 -1
- package/cjs/shared/export.js +1 -1
- package/cjs/shared/feature.js +1 -1
- package/cjs/shared/file.js +1 -1
- package/cjs/shared/follow-mode.js +1 -1
- package/cjs/shared/fonts.js +1 -1
- package/cjs/shared/guides.js +3 -0
- package/cjs/shared/history.js +1 -1
- package/cjs/shared/import.js +1 -1
- package/cjs/shared/index.js +1 -1
- package/cjs/shared/link.js +1 -1
- package/cjs/shared/logs.js +3 -0
- package/cjs/shared/mention.js +1 -1
- package/cjs/shared/menu.js +1 -1
- package/cjs/shared/mode.js +1 -1
- package/cjs/shared/outline.js +1 -1
- package/cjs/shared/paste.js +3 -0
- package/cjs/shared/presentation.js +3 -0
- package/cjs/shared/render.js +3 -0
- package/cjs/shared/share.js +3 -0
- package/cjs/shared/shortcut.js +3 -0
- package/cjs/shared/socket.js +3 -0
- package/cjs/shared/toolbar.js +1 -1
- package/cjs/shared/ui.js +1 -1
- package/cjs/shared/uploader.js +1 -1
- package/cjs/shared/version.js +1 -1
- package/cjs/shared/watermark.js +1 -1
- package/cjs/sheet/combine-sheets.js +1 -1
- package/cjs/sheet/date-mention.js +3 -0
- package/cjs/sheet/event-subscription.js +3 -0
- package/cjs/sheet/export.js +1 -1
- package/cjs/sheet/follow-selection.js +3 -0
- package/cjs/sheet/form.js +1 -1
- package/cjs/sheet/formula.js +1 -1
- package/cjs/sheet/import-range.js +1 -1
- package/cjs/sheet/import.js +3 -0
- package/cjs/sheet/independent-viewport.js +3 -0
- package/cjs/sheet/index.js +1 -1
- package/cjs/sheet/lock.js +1 -1
- package/cjs/sheet/ole.js +3 -0
- package/cjs/sheet/paste.js +3 -0
- package/cjs/sheet/render.js +1 -1
- package/cjs/sheet/sdk.js +1 -1
- package/cjs/sheet/sheet-tab.js +3 -0
- package/cjs/sheet/ui.js +3 -0
- package/cjs/sheet/worksheet.js +1 -1
- package/cjs/table/combine-tables.js +3 -0
- package/cjs/table/copy.js +3 -0
- package/cjs/table/dashboard.js +3 -0
- package/cjs/table/explain-page.js +3 -0
- package/cjs/table/export.js +3 -0
- package/cjs/table/field.js +3 -0
- package/cjs/table/form.js +3 -0
- package/cjs/table/formula.js +3 -0
- package/cjs/table/history.js +3 -0
- package/cjs/table/import.js +3 -0
- package/cjs/table/index.js +6 -2
- package/cjs/table/list-bar-context-menu.js +3 -0
- package/cjs/table/mention.js +3 -0
- package/cjs/table/motable.js +16 -0
- package/cjs/table/paste.js +3 -0
- package/cjs/table/render.js +3 -0
- package/cjs/table/resource.js +1 -1
- package/cjs/table/sdk.js +1 -1
- package/cjs/table/shortcuts.js +3 -0
- package/cjs/table/snapshot.js +3 -0
- package/cjs/table/subscription.js +25 -0
- package/cjs/table/table.js +1 -1
- package/cjs/table/template.js +3 -0
- package/cjs/table/toolbar.js +1 -1
- package/cjs/table/toolbox.js +3 -0
- package/cjs/table/ui.js +3 -0
- package/cjs/table/version.js +3 -0
- package/cjs/table/view.js +26 -0
- package/cjs/table/window.js +3 -0
- package/esm/docs/sdk.js +1 -1
- package/esm/docx/index.js +1 -1
- package/esm/docx/menu.js +1 -1
- package/esm/docx/outline.js +1 -1
- package/esm/docx/pages.js +15 -2
- package/esm/docx/paragraphs.js +2 -0
- package/esm/docx/revisions.js +2 -0
- package/esm/docx/sdk.js +1 -1
- package/esm/docx/signature.js +2 -0
- package/esm/docx/statistic.js +2 -0
- package/esm/docx/theme.js +1 -1
- package/esm/docx/ui.js +2 -0
- package/esm/form/feature.js +2 -0
- package/esm/form/index.js +3 -0
- package/esm/form/link.js +2 -0
- package/esm/form/publish.js +2 -0
- package/esm/form/sdk.js +25 -0
- package/esm/form/sheet.js +2 -0
- package/esm/form/table.js +2 -0
- package/esm/form/ui.js +2 -0
- package/esm/pdf/pages.js +1 -1
- package/esm/presentation/anonymous.js +2 -0
- package/esm/presentation/assistant.js +2 -0
- package/esm/presentation/chart.js +2 -0
- package/esm/presentation/comments.js +2 -0
- package/esm/presentation/diagram.js +2 -0
- package/esm/presentation/event-subscription.js +2 -0
- package/esm/presentation/export.js +1 -1
- package/esm/presentation/fonts.js +1 -1
- package/esm/presentation/index.js +1 -1
- package/esm/presentation/presentation.js +2 -0
- package/esm/presentation/remote-live.js +2 -0
- package/esm/presentation/sdk.js +1 -1
- package/esm/presentation/slides-pane.js +2 -0
- package/esm/presentation/theme.js +2 -0
- package/esm/shared/assets.js +1 -1
- package/esm/shared/attachment.js +1 -1
- package/esm/shared/brand.js +1 -1
- package/esm/shared/collaborators.js +1 -1
- package/esm/shared/comments.js +1 -1
- package/esm/shared/copy.js +2 -0
- package/esm/shared/device.js +2 -0
- package/esm/shared/download.js +2 -2
- package/esm/shared/drag-n-drop.js +5 -0
- package/esm/shared/duplicate.js +5 -0
- package/esm/shared/edit.js +2 -0
- package/esm/shared/editor.js +1 -1
- package/esm/shared/export.js +1 -1
- package/esm/shared/feature.js +1 -1
- package/esm/shared/file.js +1 -1
- package/esm/shared/follow-mode.js +1 -1
- package/esm/shared/fonts.js +1 -1
- package/esm/shared/guides.js +2 -0
- package/esm/shared/history.js +1 -1
- package/esm/shared/import.js +1 -1
- package/esm/shared/index.js +1 -1
- package/esm/shared/link.js +1 -1
- package/esm/shared/logs.js +2 -0
- package/esm/shared/mention.js +1 -1
- package/esm/shared/menu.js +1 -1
- package/esm/shared/mode.js +1 -1
- package/esm/shared/outline.js +1 -1
- package/esm/shared/paste.js +2 -0
- package/esm/shared/presentation.js +2 -0
- package/esm/shared/render.js +2 -0
- package/esm/shared/share.js +2 -0
- package/esm/shared/shortcut.js +2 -0
- package/esm/shared/socket.js +2 -0
- package/esm/shared/toolbar.js +1 -1
- package/esm/shared/ui.js +1 -1
- package/esm/shared/uploader.js +1 -1
- package/esm/shared/version.js +1 -1
- package/esm/shared/watermark.js +1 -1
- package/esm/sheet/combine-sheets.js +1 -1
- package/esm/sheet/date-mention.js +2 -0
- package/esm/sheet/event-subscription.js +2 -0
- package/esm/sheet/export.js +1 -1
- package/esm/sheet/follow-selection.js +2 -0
- package/esm/sheet/form.js +1 -1
- package/esm/sheet/formula.js +1 -1
- package/esm/sheet/import-range.js +1 -1
- package/esm/sheet/import.js +2 -0
- package/esm/sheet/independent-viewport.js +2 -0
- package/esm/sheet/index.js +1 -1
- package/esm/sheet/lock.js +1 -1
- package/esm/sheet/ole.js +2 -0
- package/esm/sheet/paste.js +2 -0
- package/esm/sheet/render.js +1 -1
- package/esm/sheet/sdk.js +1 -1
- package/esm/sheet/sheet-tab.js +2 -0
- package/esm/sheet/ui.js +2 -0
- package/esm/sheet/worksheet.js +1 -1
- package/esm/table/combine-tables.js +2 -0
- package/esm/table/copy.js +2 -0
- package/esm/table/dashboard.js +2 -0
- package/esm/table/explain-page.js +2 -0
- package/esm/table/export.js +2 -0
- package/esm/table/field.js +2 -0
- package/esm/table/form.js +2 -0
- package/esm/table/formula.js +2 -0
- package/esm/table/history.js +2 -0
- package/esm/table/import.js +2 -0
- package/esm/table/index.js +3 -1
- package/esm/table/list-bar-context-menu.js +2 -0
- package/esm/table/mention.js +2 -0
- package/esm/table/motable.js +13 -0
- package/esm/table/paste.js +2 -0
- package/esm/table/render.js +2 -0
- package/esm/table/resource.js +1 -1
- package/esm/table/sdk.js +1 -1
- package/esm/table/shortcuts.js +2 -0
- package/esm/table/snapshot.js +2 -0
- package/esm/table/subscription.js +22 -0
- package/esm/table/table.js +1 -1
- package/esm/table/template.js +2 -0
- package/esm/table/toolbar.js +1 -1
- package/esm/table/toolbox.js +2 -0
- package/esm/table/ui.js +2 -0
- package/esm/table/version.js +2 -0
- package/esm/table/view.js +23 -0
- package/esm/table/window.js +2 -0
- package/package.json +1 -1
- package/types/combine.d.ts +2985 -265
- package/types/diagram.d.ts +823 -115
- package/types/docs.d.ts +850 -115
- package/types/docx.d.ts +1096 -119
- package/types/form.d.ts +3027 -0
- package/types/pdf.d.ts +829 -115
- package/types/presentation.d.ts +1088 -129
- package/types/shared.d.ts +823 -115
- package/types/sheet.d.ts +1112 -161
- package/types/table.d.ts +2097 -173
- package/cjs/shared/checkpoints.js +0 -19
- package/cjs/sheet/comments.js +0 -3
- package/cjs/sheet/font.js +0 -3
- package/esm/shared/checkpoints.js +0 -16
- package/esm/sheet/comments.js +0 -2
- package/esm/sheet/font.js +0 -2
package/types/sheet.d.ts
CHANGED
|
@@ -31,17 +31,22 @@ export declare abstract class AbstractedSheetSDK extends EditorSDK {
|
|
|
31
31
|
*/
|
|
32
32
|
abstract print(): Promise<void>;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* 导出接口
|
|
35
|
+
* @param type 导出类型 image、pdf、或者export options supportedTypes中限定的类型
|
|
35
36
|
*/
|
|
36
|
-
abstract
|
|
37
|
+
abstract export(type: string): Promise<void>;
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
+
* 更新表格runtime env(web worker)
|
|
39
40
|
*/
|
|
40
|
-
abstract
|
|
41
|
+
abstract updateRuntimeEnv(env: Record<string, unknown>): Promise<void>;
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
43
|
+
* 设置表格标题
|
|
43
44
|
*/
|
|
44
|
-
abstract
|
|
45
|
+
abstract setTitle(title: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* 设置表格是否聚焦
|
|
48
|
+
*/
|
|
49
|
+
abstract setFocus(isFocus: boolean): Promise<void>;
|
|
45
50
|
/**
|
|
46
51
|
* 工作簿接口
|
|
47
52
|
*/
|
|
@@ -62,10 +67,6 @@ export declare abstract class AbstractedSheetSDK extends EditorSDK {
|
|
|
62
67
|
* 文本格式接口
|
|
63
68
|
*/
|
|
64
69
|
abstract get text(): SheetText;
|
|
65
|
-
/**
|
|
66
|
-
* 评论接口
|
|
67
|
-
*/
|
|
68
|
-
abstract get comments(): SheetComments | undefined;
|
|
69
70
|
/**
|
|
70
71
|
* 锁定接口
|
|
71
72
|
*/
|
|
@@ -78,6 +79,10 @@ export declare abstract class AbstractedSheetSDK extends EditorSDK {
|
|
|
78
79
|
* 跟随模式接口
|
|
79
80
|
*/
|
|
80
81
|
abstract get followMode(): EditorFollowMode | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* 事件订阅接口
|
|
84
|
+
*/
|
|
85
|
+
abstract get eventSubscription(): SheetEventSubscription;
|
|
81
86
|
}
|
|
82
87
|
|
|
83
88
|
export declare interface AddRangeLockParams {
|
|
@@ -97,16 +102,6 @@ export declare interface AddSheetLockParams {
|
|
|
97
102
|
visitorPermission?: PermissionLevel;
|
|
98
103
|
}
|
|
99
104
|
|
|
100
|
-
export declare type CheckLimitationResult = {
|
|
101
|
-
status: 'limited';
|
|
102
|
-
/**
|
|
103
|
-
* 被限制原因
|
|
104
|
-
*/
|
|
105
|
-
reason?: string;
|
|
106
|
-
} | {
|
|
107
|
-
status: 'unlimited';
|
|
108
|
-
};
|
|
109
|
-
|
|
110
105
|
export declare interface ClipboardPasteParams {
|
|
111
106
|
/**
|
|
112
107
|
* 粘贴的html内容
|
|
@@ -205,7 +200,7 @@ export declare interface EditorAssetsOssImageProcessing {
|
|
|
205
200
|
quality?: number;
|
|
206
201
|
maxWidth?: number;
|
|
207
202
|
maxHeight?: number;
|
|
208
|
-
}) =>
|
|
203
|
+
}) => string;
|
|
209
204
|
/**
|
|
210
205
|
* 裁切图片的方法
|
|
211
206
|
* @param imageUrl 图片的 URL
|
|
@@ -213,12 +208,12 @@ export declare interface EditorAssetsOssImageProcessing {
|
|
|
213
208
|
* @returns 裁切后的图片 URL
|
|
214
209
|
*/
|
|
215
210
|
crop: (imageUrl: string, cropOptions: {
|
|
216
|
-
x
|
|
217
|
-
y
|
|
211
|
+
x: number;
|
|
212
|
+
y: number;
|
|
218
213
|
w: number;
|
|
219
214
|
h: number;
|
|
220
|
-
g
|
|
221
|
-
}) =>
|
|
215
|
+
g: EditorImageCropPoint;
|
|
216
|
+
}) => string;
|
|
222
217
|
}
|
|
223
218
|
|
|
224
219
|
export declare interface EditorAssetsResolver {
|
|
@@ -227,13 +222,13 @@ export declare interface EditorAssetsResolver {
|
|
|
227
222
|
* @param assetId 资源文件 ID
|
|
228
223
|
* @returns 转换后的资源 URL ,如果无法转换则返回 null
|
|
229
224
|
*/
|
|
230
|
-
resolveUrl: (assetId: string) =>
|
|
225
|
+
resolveUrl: (assetId: string) => string | null;
|
|
231
226
|
/**
|
|
232
227
|
* 从 URL 中解析资源文件 ID 的方法
|
|
233
228
|
* @param url 资源 URL
|
|
234
229
|
* @returns 解析出的资源文件 ID
|
|
235
230
|
*/
|
|
236
|
-
parseId: (url: string) =>
|
|
231
|
+
parseId: (url: string) => string | null;
|
|
237
232
|
/**
|
|
238
233
|
* 检查资源文件 ID 对应的文件是否准备就绪,
|
|
239
234
|
* 在部分环境中,资源文件需要异步导入,在编辑器加载的时候可能还未准备就绪
|
|
@@ -243,6 +238,28 @@ export declare interface EditorAssetsResolver {
|
|
|
243
238
|
checkAssetReady: (assetId: string) => Promise<boolean> | boolean;
|
|
244
239
|
}
|
|
245
240
|
|
|
241
|
+
/**
|
|
242
|
+
* 编辑器附件下载配置
|
|
243
|
+
*/
|
|
244
|
+
export declare interface EditorAttachmentDownloadOptions {
|
|
245
|
+
/**
|
|
246
|
+
* 是否禁用下载
|
|
247
|
+
*/
|
|
248
|
+
disabled?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* 是否跳过验证
|
|
251
|
+
*/
|
|
252
|
+
skipValidate?: boolean;
|
|
253
|
+
/**
|
|
254
|
+
* 下载附件
|
|
255
|
+
*/
|
|
256
|
+
download?: (url: string) => void;
|
|
257
|
+
/**
|
|
258
|
+
* 获取附件下载地址
|
|
259
|
+
*/
|
|
260
|
+
getDownloadUrl?: (url: string) => Promise<string>;
|
|
261
|
+
}
|
|
262
|
+
|
|
246
263
|
/**
|
|
247
264
|
* 编辑器附件限制配置,sdk中会使用在不同的场景下使用不同的限制规则组合
|
|
248
265
|
*/
|
|
@@ -252,9 +269,9 @@ export declare interface EditorAttachmentLimitationOptions {
|
|
|
252
269
|
* @param file
|
|
253
270
|
* @returns
|
|
254
271
|
*/
|
|
255
|
-
checkFile
|
|
272
|
+
checkFile?: (params: EditorAttachmentLimitationOptionsCheckFunctionParams) => Promise<{
|
|
256
273
|
limited: true;
|
|
257
|
-
message
|
|
274
|
+
message?: string;
|
|
258
275
|
} | {
|
|
259
276
|
limited: false;
|
|
260
277
|
}>;
|
|
@@ -303,9 +320,24 @@ export declare interface EditorAttachmentMaxSizeOptions {
|
|
|
303
320
|
* 编辑器附件信息
|
|
304
321
|
*/
|
|
305
322
|
export declare interface EditorAttachmentOptions {
|
|
323
|
+
/**
|
|
324
|
+
* 附件选择器
|
|
325
|
+
*/
|
|
306
326
|
picker?: EditorFilePicker;
|
|
327
|
+
/**
|
|
328
|
+
* 附件上传器
|
|
329
|
+
*/
|
|
307
330
|
uploader?: AbstractedEditorFileUploader;
|
|
331
|
+
/**
|
|
332
|
+
* 下载
|
|
333
|
+
* @deprecated, 使用不同类型附件的download配置
|
|
334
|
+
*/
|
|
308
335
|
download?: (url: string) => void;
|
|
336
|
+
/**
|
|
337
|
+
* 预览
|
|
338
|
+
* @deprecated, 使用不同类型附件的preview配置
|
|
339
|
+
*/
|
|
340
|
+
preview?: (url: string) => void;
|
|
309
341
|
/**
|
|
310
342
|
* 图片附件相关配置
|
|
311
343
|
*/
|
|
@@ -323,9 +355,27 @@ export declare interface EditorAttachmentOptions {
|
|
|
323
355
|
* 图片附件的限制配置
|
|
324
356
|
*/
|
|
325
357
|
limitations?: EditorAttachmentLimitationOptions;
|
|
358
|
+
/**
|
|
359
|
+
* 禁止预览
|
|
360
|
+
* @deprecated 使用preview.disabled代替
|
|
361
|
+
*/
|
|
362
|
+
disablePreview?: boolean;
|
|
363
|
+
/**
|
|
364
|
+
* 预览
|
|
365
|
+
*/
|
|
366
|
+
preview?: EditorAttachmentPreviewOptions;
|
|
367
|
+
/**
|
|
368
|
+
* 下载
|
|
369
|
+
*/
|
|
370
|
+
download?: EditorAttachmentDownloadOptions;
|
|
371
|
+
/**
|
|
372
|
+
* 是否禁用缩略图
|
|
373
|
+
* 桌面客户端/极速sdk需要禁用
|
|
374
|
+
*/
|
|
375
|
+
disableThumbnail?: boolean;
|
|
326
376
|
};
|
|
327
377
|
/**
|
|
328
|
-
*
|
|
378
|
+
* 附件相关配置
|
|
329
379
|
*/
|
|
330
380
|
attachment?: {
|
|
331
381
|
/**
|
|
@@ -341,9 +391,94 @@ export declare interface EditorAttachmentOptions {
|
|
|
341
391
|
* 附件的限制配置
|
|
342
392
|
*/
|
|
343
393
|
limitations?: EditorAttachmentLimitationOptions;
|
|
394
|
+
/**
|
|
395
|
+
* 禁止预览
|
|
396
|
+
* @deprecated 使用preview.disabled代替
|
|
397
|
+
*/
|
|
398
|
+
disablePreview?: boolean;
|
|
399
|
+
/**
|
|
400
|
+
* 预览
|
|
401
|
+
*/
|
|
402
|
+
preview?: EditorAttachmentPreviewOptions;
|
|
403
|
+
/**
|
|
404
|
+
* 下载
|
|
405
|
+
*/
|
|
406
|
+
download?: EditorAttachmentDownloadOptions;
|
|
407
|
+
};
|
|
408
|
+
/**
|
|
409
|
+
* 视频相关配置
|
|
410
|
+
*/
|
|
411
|
+
video?: {
|
|
412
|
+
/**
|
|
413
|
+
* 支持的视频格式
|
|
414
|
+
*/
|
|
415
|
+
supportTypes?: string[];
|
|
416
|
+
/**
|
|
417
|
+
* 视频的限制配置
|
|
418
|
+
*/
|
|
419
|
+
limitations?: EditorAttachmentLimitationOptions;
|
|
420
|
+
/**
|
|
421
|
+
* 预览
|
|
422
|
+
*/
|
|
423
|
+
preview?: EditorAttachmentPreviewOptions;
|
|
424
|
+
/**
|
|
425
|
+
* 下载
|
|
426
|
+
*/
|
|
427
|
+
download?: EditorAttachmentDownloadOptions;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* 音频相关配置
|
|
431
|
+
*/
|
|
432
|
+
audio?: {
|
|
433
|
+
/**
|
|
434
|
+
* 支持的音频
|
|
435
|
+
*/
|
|
436
|
+
supportTypes?: string[];
|
|
437
|
+
/**
|
|
438
|
+
* 音频的限制配置
|
|
439
|
+
*/
|
|
440
|
+
limitations?: EditorAttachmentLimitationOptions;
|
|
441
|
+
/**
|
|
442
|
+
* 预览
|
|
443
|
+
*/
|
|
444
|
+
preview?: EditorAttachmentPreviewOptions;
|
|
445
|
+
/**
|
|
446
|
+
* 下载
|
|
447
|
+
*/
|
|
448
|
+
download?: EditorAttachmentDownloadOptions;
|
|
449
|
+
};
|
|
450
|
+
/**
|
|
451
|
+
* 云文件附件相关配置
|
|
452
|
+
*/
|
|
453
|
+
cloudFile?: {
|
|
454
|
+
/**
|
|
455
|
+
* 是否禁用云文件
|
|
456
|
+
*/
|
|
457
|
+
disabled?: boolean;
|
|
344
458
|
};
|
|
345
459
|
}
|
|
346
460
|
|
|
461
|
+
/**
|
|
462
|
+
* 编辑器附件预览配置
|
|
463
|
+
*/
|
|
464
|
+
export declare interface EditorAttachmentPreviewOptions {
|
|
465
|
+
/**
|
|
466
|
+
* 预览附件
|
|
467
|
+
* app, 桌面客户端需提供
|
|
468
|
+
*/
|
|
469
|
+
preview?: (url: string) => void;
|
|
470
|
+
/**
|
|
471
|
+
* 获取附件预览url,saas、sdk、极速sdk需要提供
|
|
472
|
+
* @param id 文件url
|
|
473
|
+
* @returns 预览url
|
|
474
|
+
*/
|
|
475
|
+
getPreviewUrl?: (url: string) => Promise<string>;
|
|
476
|
+
/**
|
|
477
|
+
* 是否禁用预览
|
|
478
|
+
*/
|
|
479
|
+
disabled?: boolean;
|
|
480
|
+
}
|
|
481
|
+
|
|
347
482
|
/**
|
|
348
483
|
* 基础文件属性
|
|
349
484
|
*/
|
|
@@ -354,11 +489,19 @@ export declare interface EditorBaseUploadableFile {
|
|
|
354
489
|
fileGuid: string;
|
|
355
490
|
}
|
|
356
491
|
|
|
492
|
+
/**
|
|
493
|
+
* 品牌设置
|
|
494
|
+
*/
|
|
495
|
+
export declare interface EditorBrandOptions {
|
|
496
|
+
enable: boolean;
|
|
497
|
+
getSettings: () => Promise<EditorBrandSetting | null>;
|
|
498
|
+
}
|
|
499
|
+
|
|
357
500
|
/**
|
|
358
501
|
* 品牌相关设置,
|
|
359
502
|
* 用于在套件中展示品牌外露信息
|
|
360
503
|
*/
|
|
361
|
-
export declare interface
|
|
504
|
+
export declare interface EditorBrandSetting {
|
|
362
505
|
/**
|
|
363
506
|
* 需要显示在品牌展示位的内容,按数组顺序显示
|
|
364
507
|
*/
|
|
@@ -379,24 +522,6 @@ export declare interface EditorBrandOptions {
|
|
|
379
522
|
};
|
|
380
523
|
}
|
|
381
524
|
|
|
382
|
-
export declare interface EditorCheckpointsOptions {
|
|
383
|
-
/**
|
|
384
|
-
* 获取功能卡点限制
|
|
385
|
-
* undefined代表无限制
|
|
386
|
-
*/
|
|
387
|
-
getFeatureLimitation?: (key: string) => Limitation | undefined;
|
|
388
|
-
/**
|
|
389
|
-
* 检查是否超限
|
|
390
|
-
* @param key 功能卡点key
|
|
391
|
-
* @param value 功能卡点检查值,如文件大小/行列数量等
|
|
392
|
-
*/
|
|
393
|
-
checkFeatureLimitation?: (key: string, value: number) => CheckLimitationResult;
|
|
394
|
-
/**
|
|
395
|
-
* 获取功能卡点状态,如某功能入口是否开启
|
|
396
|
-
*/
|
|
397
|
-
getFeatureStatus?: (key: string) => FeatureStatus;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
525
|
export declare interface EditorCollaborationOptions {
|
|
401
526
|
/**
|
|
402
527
|
* 是否允许离线编辑
|
|
@@ -438,32 +563,36 @@ export declare interface EditorCollaborators {
|
|
|
438
563
|
* 停止监听协作者状态变化
|
|
439
564
|
* 调用此方法后,将不再接收协作者进入/离开的事件
|
|
440
565
|
*/
|
|
441
|
-
|
|
566
|
+
quit: () => void;
|
|
442
567
|
/**
|
|
443
|
-
*
|
|
444
|
-
* @param listener - 监听器回调函数,参数如下:
|
|
445
|
-
* - allUsers: 当前所有协作者列表
|
|
446
|
-
* - enteredUsers: 新进入的协作者列表
|
|
447
|
-
* @returns 返回一个函数,调用该函数可以移除监听器
|
|
568
|
+
* 监听事件
|
|
448
569
|
*/
|
|
449
|
-
|
|
570
|
+
on: (event: string, callback: (...args: unknown[]) => void) => unknown;
|
|
450
571
|
/**
|
|
451
|
-
*
|
|
452
|
-
* @param listener - 监听器回调函数
|
|
453
|
-
* - allUsers: 当前所有协作者列表
|
|
454
|
-
* - leftUsers: 离开的协作者列表
|
|
455
|
-
* @returns 返回一个函数,调用该函数可以移除监听器
|
|
572
|
+
* 监听事件, 只监听一次
|
|
456
573
|
*/
|
|
457
|
-
|
|
574
|
+
once: (event: string, callback: (...args: unknown[]) => void) => unknown;
|
|
575
|
+
/**
|
|
576
|
+
* 移除事件
|
|
577
|
+
*/
|
|
578
|
+
off: (event: string, callback: (...args: unknown[]) => void) => unknown;
|
|
579
|
+
/**
|
|
580
|
+
* 发送事件
|
|
581
|
+
*/
|
|
582
|
+
emit: (event: string, ...args: unknown[]) => unknown;
|
|
458
583
|
}
|
|
459
584
|
|
|
460
585
|
export declare interface EditorCollaboratorsOptions {
|
|
586
|
+
/**
|
|
587
|
+
* 是否禁用
|
|
588
|
+
*/
|
|
589
|
+
disabled?: boolean;
|
|
461
590
|
/**
|
|
462
591
|
* 推送协作者socket 对象
|
|
463
592
|
* 实际类型为socketIO.client
|
|
464
593
|
* TODO: 抽象为接口
|
|
465
594
|
*/
|
|
466
|
-
socket?:
|
|
595
|
+
socket?: EditorSocket;
|
|
467
596
|
}
|
|
468
597
|
|
|
469
598
|
/**
|
|
@@ -527,6 +656,14 @@ export declare interface EditorComments {
|
|
|
527
656
|
* 删除单条评论
|
|
528
657
|
*/
|
|
529
658
|
deleteOne: (commentId: string) => Promise<boolean>;
|
|
659
|
+
/**
|
|
660
|
+
* 显示评论(侧边栏或其他形式)
|
|
661
|
+
*/
|
|
662
|
+
show?: () => void;
|
|
663
|
+
/**
|
|
664
|
+
* 隐藏评论(侧边栏或其他形式)
|
|
665
|
+
*/
|
|
666
|
+
hide?: () => void;
|
|
530
667
|
}
|
|
531
668
|
|
|
532
669
|
/**
|
|
@@ -562,11 +699,22 @@ export declare interface EditorCommentsOptions extends EditorFeatureConfig {
|
|
|
562
699
|
mode: 'none' | 'card';
|
|
563
700
|
};
|
|
564
701
|
/**
|
|
565
|
-
*
|
|
566
|
-
|
|
567
|
-
|
|
702
|
+
* 推送评论的 socket 对象
|
|
703
|
+
*/
|
|
704
|
+
socket?: EditorSocket;
|
|
705
|
+
/**
|
|
706
|
+
* 评论相关功能配置
|
|
568
707
|
*/
|
|
569
|
-
|
|
708
|
+
features?: {
|
|
709
|
+
/**
|
|
710
|
+
* 添加评论
|
|
711
|
+
*/
|
|
712
|
+
addComment?: EditorFeatureConfig;
|
|
713
|
+
/**
|
|
714
|
+
* 评论列表
|
|
715
|
+
*/
|
|
716
|
+
commentList?: EditorFeatureConfig;
|
|
717
|
+
};
|
|
570
718
|
}
|
|
571
719
|
|
|
572
720
|
export declare interface EditorContent<Delta = EditorDelta> {
|
|
@@ -592,6 +740,11 @@ export declare interface EditorContent<Delta = EditorDelta> {
|
|
|
592
740
|
*/
|
|
593
741
|
export declare type EditorContextMenuOptions<TName extends string> = EditorMenuOptions<TName>;
|
|
594
742
|
|
|
743
|
+
/**
|
|
744
|
+
* 粘贴相关设置
|
|
745
|
+
*/
|
|
746
|
+
export declare type EditorCopyOptions = EditorLogicFeatureConfig;
|
|
747
|
+
|
|
595
748
|
/**
|
|
596
749
|
* 编辑器解密选项接口
|
|
597
750
|
* 用于配置编辑器中需要解密的内容的相关选项
|
|
@@ -612,6 +765,28 @@ export declare interface EditorDelta {
|
|
|
612
765
|
length: number;
|
|
613
766
|
}
|
|
614
767
|
|
|
768
|
+
export declare type EditorDeviceMode = 'desktop' | 'mobile' | 'tablet';
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* 编辑器设备相关设置
|
|
772
|
+
*/
|
|
773
|
+
export declare interface EditorDeviceOptions {
|
|
774
|
+
/**
|
|
775
|
+
* 设备模式
|
|
776
|
+
*/
|
|
777
|
+
mode?: EditorDeviceMode;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* 编辑器拖放配置
|
|
782
|
+
*/
|
|
783
|
+
export declare type EditorDragNDropOptions = EditorFeatureConfig;
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* 编辑器创建副本配置
|
|
787
|
+
*/
|
|
788
|
+
export declare type EditorDuplicateOptions = EditorFeatureConfig;
|
|
789
|
+
|
|
615
790
|
/**
|
|
616
791
|
* 编辑器嵌入对象
|
|
617
792
|
*/
|
|
@@ -661,15 +836,20 @@ export declare interface EditorEmbeddedObjectOptions {
|
|
|
661
836
|
};
|
|
662
837
|
}
|
|
663
838
|
|
|
664
|
-
export declare interface EditorExportOptions {
|
|
839
|
+
export declare interface EditorExportOptions extends EditorFeatureConfig {
|
|
840
|
+
/**
|
|
841
|
+
* 可导出类型, undefined 表示对可导出类型无限制
|
|
842
|
+
* 导出由接口 + 本地实现
|
|
843
|
+
*/
|
|
844
|
+
types?: string[];
|
|
665
845
|
/**
|
|
666
|
-
*
|
|
846
|
+
* 接口支持的导出类型
|
|
667
847
|
*/
|
|
668
848
|
supportedTypes?: string[];
|
|
669
849
|
/**
|
|
670
|
-
*
|
|
850
|
+
* 导出文件,调用接口实现
|
|
671
851
|
*/
|
|
672
|
-
exportFile
|
|
852
|
+
exportFile?: (type: string) => Promise<void>;
|
|
673
853
|
}
|
|
674
854
|
|
|
675
855
|
export declare interface EditorFeatureConfig {
|
|
@@ -683,6 +863,28 @@ export declare interface EditorFeatureConfig {
|
|
|
683
863
|
hidden?: boolean;
|
|
684
864
|
}
|
|
685
865
|
|
|
866
|
+
export declare interface EditorFeaturesOptions {
|
|
867
|
+
/**
|
|
868
|
+
* 禁用特性入口
|
|
869
|
+
*/
|
|
870
|
+
disabled?: boolean;
|
|
871
|
+
/**
|
|
872
|
+
* 对应/features接口,返回所有功能key
|
|
873
|
+
*/
|
|
874
|
+
getFeatures?: () => Promise<string[]>;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* 文件限制
|
|
879
|
+
*/
|
|
880
|
+
export declare interface EditorFileLimitationOptions {
|
|
881
|
+
/**
|
|
882
|
+
* 获取最大文件大小,单位为MB
|
|
883
|
+
* 超过该上限后禁止编辑
|
|
884
|
+
*/
|
|
885
|
+
getMaxFileSize?: () => number | undefined;
|
|
886
|
+
}
|
|
887
|
+
|
|
686
888
|
export declare interface EditorFileOptions {
|
|
687
889
|
/**
|
|
688
890
|
* 文件guid
|
|
@@ -692,6 +894,18 @@ export declare interface EditorFileOptions {
|
|
|
692
894
|
* 文件名
|
|
693
895
|
*/
|
|
694
896
|
name?: string;
|
|
897
|
+
/**
|
|
898
|
+
* 创建者,以id标识
|
|
899
|
+
*/
|
|
900
|
+
creator?: number;
|
|
901
|
+
/**
|
|
902
|
+
* 创建时间, 毫秒级时间戳
|
|
903
|
+
*/
|
|
904
|
+
createdAt?: number;
|
|
905
|
+
/**
|
|
906
|
+
* 文件限制
|
|
907
|
+
*/
|
|
908
|
+
limitations?: EditorFileLimitationOptions;
|
|
695
909
|
}
|
|
696
910
|
|
|
697
911
|
export declare interface EditorFilePicker {
|
|
@@ -721,7 +935,7 @@ export declare interface EditorFollowMode {
|
|
|
721
935
|
* 获取当前演讲者信息
|
|
722
936
|
* @returns 返回包含演讲者ID、姓名和头像信息的对象
|
|
723
937
|
*/
|
|
724
|
-
getSpeaker: () => Speaker;
|
|
938
|
+
getSpeaker: () => Speaker | undefined;
|
|
725
939
|
/**
|
|
726
940
|
* 添加跟随状态变化的监听器
|
|
727
941
|
* @param listener 状态变化时的回调函数
|
|
@@ -736,7 +950,7 @@ export declare interface EditorFollowModeOptions extends EditorFeatureConfig {
|
|
|
736
950
|
* 实际类型为socketIO.client
|
|
737
951
|
* TODO: 抽象为接口
|
|
738
952
|
*/
|
|
739
|
-
socket?:
|
|
953
|
+
socket?: EditorSocket;
|
|
740
954
|
}
|
|
741
955
|
|
|
742
956
|
export declare interface EditorFontFace {
|
|
@@ -815,17 +1029,35 @@ export declare interface EditorFontsOptions {
|
|
|
815
1029
|
* 并提供可用于字体的加载 URL 和字体元数据。
|
|
816
1030
|
*/
|
|
817
1031
|
list: EditorFontsList;
|
|
1032
|
+
/**
|
|
1033
|
+
* 是否只使用本地字体,如果为 true,则不会从服务器获取字体列表。
|
|
1034
|
+
*/
|
|
1035
|
+
useLocalFontsOnly?: boolean;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* 功能引导设置
|
|
1040
|
+
*/
|
|
1041
|
+
export declare interface EditorGuidesOptions {
|
|
1042
|
+
/**
|
|
1043
|
+
* 是否禁用
|
|
1044
|
+
*/
|
|
1045
|
+
disabled?: boolean;
|
|
1046
|
+
/**
|
|
1047
|
+
* 获取引导数据
|
|
1048
|
+
*/
|
|
1049
|
+
data?: <T = GuideData>() => Promise<T>;
|
|
818
1050
|
}
|
|
819
1051
|
|
|
820
1052
|
export declare interface EditorHistory {
|
|
821
1053
|
/**
|
|
822
|
-
*
|
|
1054
|
+
* 显示历史记录(侧边栏或其他形式)
|
|
823
1055
|
*/
|
|
824
|
-
|
|
1056
|
+
show: () => void;
|
|
825
1057
|
/**
|
|
826
|
-
*
|
|
1058
|
+
* 隐藏历史记录(侧边栏或其他形式)
|
|
827
1059
|
*/
|
|
828
|
-
|
|
1060
|
+
hide: () => void;
|
|
829
1061
|
}
|
|
830
1062
|
|
|
831
1063
|
export declare type EditorHistoryOptions = EditorFeatureConfig;
|
|
@@ -848,7 +1080,12 @@ export declare type EditorImageCropPoint = 'nw' | 'north' | 'ne' | 'west' | 'cen
|
|
|
848
1080
|
|
|
849
1081
|
export declare interface EditorImportOptions {
|
|
850
1082
|
/**
|
|
851
|
-
*
|
|
1083
|
+
* 当前文件是否正在导入中
|
|
1084
|
+
* 用于初始化时判断是否需要显示导入进度
|
|
1085
|
+
*/
|
|
1086
|
+
isImporting?: boolean;
|
|
1087
|
+
/**
|
|
1088
|
+
* 获取当前文件导入状态,没有contentUrl时需要显示导入进度
|
|
852
1089
|
* 待导入完成后再渲染
|
|
853
1090
|
*/
|
|
854
1091
|
getImportStatus?: () => Promise<{
|
|
@@ -865,15 +1102,19 @@ export declare interface EditorImportOptions {
|
|
|
865
1102
|
* 导入完成
|
|
866
1103
|
*/
|
|
867
1104
|
status: 'completed';
|
|
1105
|
+
/**
|
|
1106
|
+
* 导入完成后的内容URL
|
|
1107
|
+
*/
|
|
1108
|
+
contentUrl: string;
|
|
868
1109
|
} | {
|
|
869
1110
|
/**
|
|
870
1111
|
* 导入失败
|
|
871
1112
|
*/
|
|
872
1113
|
status: 'failed';
|
|
873
1114
|
/**
|
|
874
|
-
*
|
|
1115
|
+
* 导入失败报错
|
|
875
1116
|
*/
|
|
876
|
-
|
|
1117
|
+
error?: unknown;
|
|
877
1118
|
}>;
|
|
878
1119
|
}
|
|
879
1120
|
|
|
@@ -926,6 +1167,74 @@ export declare interface EditorLocalUploadableFile extends EditorBaseUploadableF
|
|
|
926
1167
|
raw: File;
|
|
927
1168
|
}
|
|
928
1169
|
|
|
1170
|
+
/**
|
|
1171
|
+
* 纯逻辑功能配置。
|
|
1172
|
+
* 不包含 UI 相关配置,仅用于逻辑判断。
|
|
1173
|
+
* 如:权限判断、功能开关等。
|
|
1174
|
+
* 所以不需要hidden,只使用disabled来判断
|
|
1175
|
+
*/
|
|
1176
|
+
export declare type EditorLogicFeatureConfig = Omit<EditorFeatureConfig, 'hidden'>;
|
|
1177
|
+
|
|
1178
|
+
export declare interface EditorLogsOptions {
|
|
1179
|
+
/**
|
|
1180
|
+
* 是否禁用审计日志
|
|
1181
|
+
* sdk2.0需要禁用
|
|
1182
|
+
*/
|
|
1183
|
+
isAuditLogDisabled?: boolean;
|
|
1184
|
+
/**
|
|
1185
|
+
* 是否禁用日志
|
|
1186
|
+
*/
|
|
1187
|
+
disabled?: boolean;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
export declare interface EditorMentionOptions extends EditorFeatureConfig {
|
|
1191
|
+
/**
|
|
1192
|
+
* mention api url前缀
|
|
1193
|
+
* @shimo/mention-suggestion 需要用到
|
|
1194
|
+
* 对应环境变量 SDK_V2_PATH_PREFIX
|
|
1195
|
+
*/
|
|
1196
|
+
apiUrlPrefix?: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* mention文件卡片禁用设置
|
|
1199
|
+
*/
|
|
1200
|
+
disableFileCard?: boolean;
|
|
1201
|
+
/**
|
|
1202
|
+
* mention日期卡片禁用设置
|
|
1203
|
+
*/
|
|
1204
|
+
disableDateCard?: boolean;
|
|
1205
|
+
/**
|
|
1206
|
+
* mention用户卡片禁用设置
|
|
1207
|
+
*/
|
|
1208
|
+
disableUserCard?: boolean;
|
|
1209
|
+
/**
|
|
1210
|
+
* mention点击回调
|
|
1211
|
+
*/
|
|
1212
|
+
onMentionClick?: (payload: MentionEventPayload) => void;
|
|
1213
|
+
/**
|
|
1214
|
+
* mention文件选择弹窗支持的tab类型
|
|
1215
|
+
*/
|
|
1216
|
+
mentionFilePanelTabs?: ('mine' | 'recent' | 'space')[];
|
|
1217
|
+
/**
|
|
1218
|
+
* mention弹窗底部支持的tab类型
|
|
1219
|
+
*/
|
|
1220
|
+
mentionPopoverTabs?: ('contacts' | 'file' | 'calendar')[];
|
|
1221
|
+
/**
|
|
1222
|
+
* 是否禁止检查组织架构成员可见性
|
|
1223
|
+
* 该属性需要各套件对接最新版本@shimo/mention-suggestion(没用到的话可忽略)
|
|
1224
|
+
*/
|
|
1225
|
+
disableCheckStaffVisibility?: boolean;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* 编辑器菜单api
|
|
1230
|
+
*/
|
|
1231
|
+
export declare interface EditorMenu {
|
|
1232
|
+
/**
|
|
1233
|
+
* 菜单功能api
|
|
1234
|
+
*/
|
|
1235
|
+
features: EditorMenuFeatures;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
929
1238
|
/**
|
|
930
1239
|
* 基础菜单项配置,所有菜单项类型都包含这些属性
|
|
931
1240
|
*/
|
|
@@ -1026,6 +1335,38 @@ export declare interface EditorMenuFeatureConfig extends EditorFeatureConfig {
|
|
|
1026
1335
|
index?: number;
|
|
1027
1336
|
}
|
|
1028
1337
|
|
|
1338
|
+
/**
|
|
1339
|
+
* 编辑器菜单功能api
|
|
1340
|
+
*
|
|
1341
|
+
* 提供对菜单项的显示、隐藏、启用和禁用等操作
|
|
1342
|
+
*/
|
|
1343
|
+
export declare interface EditorMenuFeatures {
|
|
1344
|
+
/**
|
|
1345
|
+
* 显示菜单项
|
|
1346
|
+
* @param name 菜单项名称
|
|
1347
|
+
*/
|
|
1348
|
+
showFeature: (name: string) => void;
|
|
1349
|
+
/**
|
|
1350
|
+
* 隐藏菜单项
|
|
1351
|
+
* @param name 菜单项名称
|
|
1352
|
+
*/
|
|
1353
|
+
hideFeature: (name: string) => void;
|
|
1354
|
+
/**
|
|
1355
|
+
* 启用菜单项
|
|
1356
|
+
* @param name 菜单项名称
|
|
1357
|
+
*/
|
|
1358
|
+
enableFeature: (name: string) => void;
|
|
1359
|
+
/**
|
|
1360
|
+
* 禁用菜单项
|
|
1361
|
+
* @param name 菜单项名称
|
|
1362
|
+
*/
|
|
1363
|
+
disableFeature: (name: string) => void;
|
|
1364
|
+
/**
|
|
1365
|
+
* 恢复菜单项到默认状态,即根据配置项确定如何渲染菜单项。
|
|
1366
|
+
*/
|
|
1367
|
+
resetFeature: (name: string) => void;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1029
1370
|
/**
|
|
1030
1371
|
* 隐藏菜单项配置
|
|
1031
1372
|
*/
|
|
@@ -1092,7 +1433,7 @@ export declare interface EditorMenuOptions<TName extends EditorMenuName> {
|
|
|
1092
1433
|
* 更加间接的配置项
|
|
1093
1434
|
* 仅在 TName 为字符串类型时有效
|
|
1094
1435
|
*/
|
|
1095
|
-
features?: TName extends string ? Partial<Record<TName, EditorMenuFeatureConfig>> : never;
|
|
1436
|
+
features?: [TName] extends [string] ? Partial<Record<TName, EditorMenuFeatureConfig>> : never;
|
|
1096
1437
|
/**
|
|
1097
1438
|
* 自定义按钮配置
|
|
1098
1439
|
*/
|
|
@@ -1128,9 +1469,25 @@ export declare type EditorModeOptions = {
|
|
|
1128
1469
|
*/
|
|
1129
1470
|
role?: EditorStandardRole;
|
|
1130
1471
|
} | {
|
|
1472
|
+
/**
|
|
1473
|
+
* 预览模式
|
|
1474
|
+
*/
|
|
1131
1475
|
type: 'preview';
|
|
1132
1476
|
} | {
|
|
1477
|
+
/**
|
|
1478
|
+
* 演示模式
|
|
1479
|
+
*/
|
|
1133
1480
|
type: 'presentation';
|
|
1481
|
+
} | {
|
|
1482
|
+
/**
|
|
1483
|
+
* 历史模式
|
|
1484
|
+
*/
|
|
1485
|
+
type: 'history';
|
|
1486
|
+
} | {
|
|
1487
|
+
/**
|
|
1488
|
+
* 嵌入模式
|
|
1489
|
+
*/
|
|
1490
|
+
type: 'embedded';
|
|
1134
1491
|
};
|
|
1135
1492
|
|
|
1136
1493
|
/**
|
|
@@ -1138,8 +1495,9 @@ export declare type EditorModeOptions = {
|
|
|
1138
1495
|
* - `standard` 标准模式,会根据用户权限配置不同的功能
|
|
1139
1496
|
* - `preview` 预览模式,只能查看内容
|
|
1140
1497
|
* - `presentation` 演示模式,用作演示场景,演示模式下部分套件可以进行一些简单的编辑操作
|
|
1498
|
+
* - `history` 历史模式,用作查看历史版本场景
|
|
1141
1499
|
*/
|
|
1142
|
-
export declare type EditorModeType = 'standard' | 'preview' | 'presentation';
|
|
1500
|
+
export declare type EditorModeType = 'standard' | 'preview' | 'presentation' | 'history' | 'embedded';
|
|
1143
1501
|
|
|
1144
1502
|
/**
|
|
1145
1503
|
* 编辑器初始化通用参数
|
|
@@ -1163,7 +1521,7 @@ export declare interface EditorOptions {
|
|
|
1163
1521
|
*/
|
|
1164
1522
|
anonymous?: EditorAnonymousOptions;
|
|
1165
1523
|
/**
|
|
1166
|
-
* 当前文件信息
|
|
1524
|
+
* 当前文件信息 & 配置
|
|
1167
1525
|
*/
|
|
1168
1526
|
file?: EditorFileOptions;
|
|
1169
1527
|
/**
|
|
@@ -1173,7 +1531,7 @@ export declare interface EditorOptions {
|
|
|
1173
1531
|
/**
|
|
1174
1532
|
* 品牌相关设置
|
|
1175
1533
|
*/
|
|
1176
|
-
brand?:
|
|
1534
|
+
brand?: EditorBrandOptions;
|
|
1177
1535
|
/**
|
|
1178
1536
|
* 编辑器内部资源请求配置
|
|
1179
1537
|
*/
|
|
@@ -1222,10 +1580,6 @@ export declare interface EditorOptions {
|
|
|
1222
1580
|
* 编辑器 UI 相关
|
|
1223
1581
|
*/
|
|
1224
1582
|
ui?: EditorUiOptions;
|
|
1225
|
-
/**
|
|
1226
|
-
* 编辑器卡点限制
|
|
1227
|
-
*/
|
|
1228
|
-
checkpoints?: EditorCheckpointsOptions;
|
|
1229
1583
|
/**
|
|
1230
1584
|
* 编辑器工具箱设置
|
|
1231
1585
|
*/
|
|
@@ -1238,6 +1592,54 @@ export declare interface EditorOptions {
|
|
|
1238
1592
|
* 编辑器协作相关
|
|
1239
1593
|
*/
|
|
1240
1594
|
collaboration?: EditorCollaborationOptions;
|
|
1595
|
+
/**
|
|
1596
|
+
* 编辑器功能相关设置
|
|
1597
|
+
*/
|
|
1598
|
+
features?: EditorFeaturesOptions;
|
|
1599
|
+
/**
|
|
1600
|
+
* 编辑器版本相关设置
|
|
1601
|
+
*/
|
|
1602
|
+
version?: EditorVersionOptions;
|
|
1603
|
+
/**
|
|
1604
|
+
* 编辑器日志相关设置
|
|
1605
|
+
*/
|
|
1606
|
+
logs?: EditorLogsOptions;
|
|
1607
|
+
/**
|
|
1608
|
+
* 编辑器快捷键相关设置
|
|
1609
|
+
*/
|
|
1610
|
+
shortcuts?: EditorShortcutOptions;
|
|
1611
|
+
/**
|
|
1612
|
+
* 提及相关设置
|
|
1613
|
+
*/
|
|
1614
|
+
mention?: EditorMentionOptions;
|
|
1615
|
+
/**
|
|
1616
|
+
* 编辑器拖放相关配置
|
|
1617
|
+
*/
|
|
1618
|
+
dragNDrop?: EditorDragNDropOptions;
|
|
1619
|
+
/**
|
|
1620
|
+
* 编辑器引导相关设置
|
|
1621
|
+
*/
|
|
1622
|
+
guides?: EditorGuidesOptions;
|
|
1623
|
+
/**
|
|
1624
|
+
* 编辑器复制相关设置
|
|
1625
|
+
*/
|
|
1626
|
+
copy?: EditorCopyOptions;
|
|
1627
|
+
/**
|
|
1628
|
+
* 编辑器粘贴相关设置
|
|
1629
|
+
*/
|
|
1630
|
+
paste?: EditorPasteOptions;
|
|
1631
|
+
/**
|
|
1632
|
+
* 编辑器设备信息相关设置
|
|
1633
|
+
*/
|
|
1634
|
+
device?: EditorDeviceOptions;
|
|
1635
|
+
/**
|
|
1636
|
+
* 编辑器副本相关配置
|
|
1637
|
+
*/
|
|
1638
|
+
duplicate?: EditorDuplicateOptions;
|
|
1639
|
+
/**
|
|
1640
|
+
* 分享相关接口
|
|
1641
|
+
*/
|
|
1642
|
+
share?: EditorShareOptions;
|
|
1241
1643
|
}
|
|
1242
1644
|
|
|
1243
1645
|
/**
|
|
@@ -1290,7 +1692,7 @@ export declare interface EditorOutlineItem<Content = unknown> {
|
|
|
1290
1692
|
* 大纲目录初始化参数,
|
|
1291
1693
|
* 用于配置大纲目录的行为和外观。
|
|
1292
1694
|
*/
|
|
1293
|
-
export declare interface EditorOutlineOptions {
|
|
1695
|
+
export declare interface EditorOutlineOptions extends EditorLogicFeatureConfig {
|
|
1294
1696
|
/**
|
|
1295
1697
|
* 初始化编辑器时是否显示大纲目录,
|
|
1296
1698
|
* 默认为 false。
|
|
@@ -1298,6 +1700,42 @@ export declare interface EditorOutlineOptions {
|
|
|
1298
1700
|
visible?: boolean;
|
|
1299
1701
|
}
|
|
1300
1702
|
|
|
1703
|
+
export declare interface EditorPasteLimitationOptions {
|
|
1704
|
+
/**
|
|
1705
|
+
* 检查粘贴内容的规则
|
|
1706
|
+
* @param content
|
|
1707
|
+
* @returns
|
|
1708
|
+
*/
|
|
1709
|
+
checkContent?: (params: EditorPasteLimitationOptionsCheckFunctionParams) => Promise<{
|
|
1710
|
+
limited: true;
|
|
1711
|
+
message: string;
|
|
1712
|
+
} | {
|
|
1713
|
+
limited: false;
|
|
1714
|
+
}>;
|
|
1715
|
+
/**
|
|
1716
|
+
* 获取最大粘贴数据大小,单位为MB
|
|
1717
|
+
*/
|
|
1718
|
+
getMaxDataSize?: () => Promise<number | undefined>;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
export declare interface EditorPasteLimitationOptionsCheckFunctionParams {
|
|
1722
|
+
content: string;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
/**
|
|
1726
|
+
* 粘贴相关设置
|
|
1727
|
+
*/
|
|
1728
|
+
export declare interface EditorPasteOptions extends EditorFeatureConfig {
|
|
1729
|
+
/**
|
|
1730
|
+
* 是否禁用远程图片粘贴, turbo暂时不支持远程图片粘贴
|
|
1731
|
+
*/
|
|
1732
|
+
isRemoteImgDisabled?: boolean;
|
|
1733
|
+
/**
|
|
1734
|
+
* 粘贴内容限制规则
|
|
1735
|
+
*/
|
|
1736
|
+
limitations?: EditorPasteLimitationOptions;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1301
1739
|
export declare interface EditorPerformanceOptions {
|
|
1302
1740
|
/**
|
|
1303
1741
|
* 记录性能指标
|
|
@@ -1329,6 +1767,17 @@ export declare interface EditorPickedFile {
|
|
|
1329
1767
|
raw: File;
|
|
1330
1768
|
}
|
|
1331
1769
|
|
|
1770
|
+
export declare interface EditorPresentation {
|
|
1771
|
+
/**
|
|
1772
|
+
* 进入演示模式
|
|
1773
|
+
*/
|
|
1774
|
+
start: () => Promise<void>;
|
|
1775
|
+
/**
|
|
1776
|
+
* 退出演示模式
|
|
1777
|
+
*/
|
|
1778
|
+
quit: () => Promise<void>;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1332
1781
|
/**
|
|
1333
1782
|
* 编辑器打印设置
|
|
1334
1783
|
*/
|
|
@@ -1353,6 +1802,13 @@ export declare interface EditorRemoteUploadableFile extends EditorBaseUploadable
|
|
|
1353
1802
|
raw?: never;
|
|
1354
1803
|
}
|
|
1355
1804
|
|
|
1805
|
+
export declare interface EditorRenderOptions {
|
|
1806
|
+
/**
|
|
1807
|
+
* 用于定位的锚点
|
|
1808
|
+
*/
|
|
1809
|
+
hash?: string;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1356
1812
|
/**
|
|
1357
1813
|
* 编辑器通用接口
|
|
1358
1814
|
*/
|
|
@@ -1389,22 +1845,78 @@ export declare abstract class EditorSDK {
|
|
|
1389
1845
|
* 编辑器评论相关接口
|
|
1390
1846
|
* 部分环境不存在,如离线客户端
|
|
1391
1847
|
*/
|
|
1392
|
-
abstract get comments(): EditorComments | undefined;
|
|
1848
|
+
abstract get comments(): EditorComments | undefined;
|
|
1849
|
+
/**
|
|
1850
|
+
* 编辑器协作者相关接口
|
|
1851
|
+
* 部分环境不存在,如离线客户端
|
|
1852
|
+
*/
|
|
1853
|
+
abstract get collaborators(): EditorCollaborators | undefined;
|
|
1854
|
+
/**
|
|
1855
|
+
* 编辑器历史相关接口
|
|
1856
|
+
* 部分环境不存在,如离线客户端
|
|
1857
|
+
*/
|
|
1858
|
+
abstract get history(): EditorHistory | undefined;
|
|
1859
|
+
/**
|
|
1860
|
+
* 编辑器版本相关接口
|
|
1861
|
+
* 部分环境不存在,如离线客户端
|
|
1862
|
+
*/
|
|
1863
|
+
abstract get version(): EditorVersion | undefined;
|
|
1864
|
+
/**
|
|
1865
|
+
* 编辑器菜单栏相关接口
|
|
1866
|
+
*/
|
|
1867
|
+
abstract get menu(): EditorMenu | undefined;
|
|
1868
|
+
/**
|
|
1869
|
+
* 编辑器演示模式相关接口
|
|
1870
|
+
*/
|
|
1871
|
+
abstract get presentation(): EditorPresentation | undefined;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
export declare interface EditorShareOptions extends EditorLogicFeatureConfig {
|
|
1875
|
+
/**
|
|
1876
|
+
* 当前文件是否为共享文件
|
|
1877
|
+
*/
|
|
1878
|
+
isShared?: boolean;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
export declare interface EditorShortcutOptions {
|
|
1882
|
+
/**
|
|
1883
|
+
* 自定义快捷键
|
|
1884
|
+
*/
|
|
1885
|
+
customShortcuts?: ShortcutConfig[];
|
|
1886
|
+
/**
|
|
1887
|
+
* 禁用的快捷键
|
|
1888
|
+
* 桌面客户端需要禁用ctrl+s,ctrl+shift+s
|
|
1889
|
+
* 极速sdk需要禁用ctrl+s
|
|
1890
|
+
* sdk2.0需要禁用ctrl+shift+e
|
|
1891
|
+
*/
|
|
1892
|
+
disabledShortcuts?: string[];
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* 编辑器 socket 接口, 用于评论、跟随模式、远程演示等场景
|
|
1897
|
+
* 实际类型为 socketIO.client
|
|
1898
|
+
*/
|
|
1899
|
+
export declare interface EditorSocket {
|
|
1900
|
+
/**
|
|
1901
|
+
* 监听事件
|
|
1902
|
+
*/
|
|
1903
|
+
on: (event: string, callback: (...args: unknown[]) => void) => unknown;
|
|
1904
|
+
/**
|
|
1905
|
+
* 监听事件, 只监听一次
|
|
1906
|
+
*/
|
|
1907
|
+
once: (event: string, callback: (...args: unknown[]) => void) => unknown;
|
|
1393
1908
|
/**
|
|
1394
|
-
*
|
|
1395
|
-
* 部分环境不存在,如离线客户端
|
|
1909
|
+
* 移除事件
|
|
1396
1910
|
*/
|
|
1397
|
-
|
|
1911
|
+
off: (event: string, callback: (...args: unknown[]) => void) => unknown;
|
|
1398
1912
|
/**
|
|
1399
|
-
*
|
|
1400
|
-
* 部分环境不存在,如离线客户端
|
|
1913
|
+
* 发送事件
|
|
1401
1914
|
*/
|
|
1402
|
-
|
|
1915
|
+
emit: (event: string, ...args: unknown[]) => unknown;
|
|
1403
1916
|
/**
|
|
1404
|
-
*
|
|
1405
|
-
* 部分环境不存在,如离线客户端
|
|
1917
|
+
* 断开连接
|
|
1406
1918
|
*/
|
|
1407
|
-
|
|
1919
|
+
disconnect: () => unknown;
|
|
1408
1920
|
}
|
|
1409
1921
|
|
|
1410
1922
|
/**
|
|
@@ -1594,6 +2106,12 @@ export declare interface EditorToolbarOptions<TName extends string> {
|
|
|
1594
2106
|
* 自定义按钮
|
|
1595
2107
|
*/
|
|
1596
2108
|
custom?: EditorToolbarFeatureButtonConfig<string>;
|
|
2109
|
+
/**
|
|
2110
|
+
* 工具栏挂载的容器dom,配置后则挂载到指定的容器上
|
|
2111
|
+
*
|
|
2112
|
+
* 如果不配置则按照套件的默认方式挂载。
|
|
2113
|
+
*/
|
|
2114
|
+
container?: HTMLElement;
|
|
1597
2115
|
}
|
|
1598
2116
|
|
|
1599
2117
|
/**
|
|
@@ -1631,13 +2149,17 @@ export declare interface EditorUiOptions {
|
|
|
1631
2149
|
/**
|
|
1632
2150
|
* 显示升级弹窗
|
|
1633
2151
|
*/
|
|
1634
|
-
showModal?: (options: ShowUpgradeModalProps) => Promise<ShowUpgradeModalResponse>;
|
|
2152
|
+
showModal?: (options: ShowUpgradeModalProps) => Promise<ShowUpgradeModalResponse | undefined>;
|
|
1635
2153
|
};
|
|
1636
2154
|
notification?: {
|
|
1637
2155
|
/**
|
|
1638
2156
|
* 渲染通知条
|
|
1639
2157
|
*/
|
|
1640
2158
|
render?: (params: RenderNotificationProps) => void;
|
|
2159
|
+
/**
|
|
2160
|
+
* 是否禁用通知条
|
|
2161
|
+
*/
|
|
2162
|
+
disabled?: boolean;
|
|
1641
2163
|
};
|
|
1642
2164
|
/**
|
|
1643
2165
|
* 用户名片
|
|
@@ -1651,6 +2173,20 @@ export declare interface EditorUiOptions {
|
|
|
1651
2173
|
* 渲染用户卡片
|
|
1652
2174
|
*/
|
|
1653
2175
|
render?: (params: RenderUserCardProps) => RenderUserCardResult;
|
|
2176
|
+
/**
|
|
2177
|
+
* 是否禁用用户卡片
|
|
2178
|
+
* jd需要禁用
|
|
2179
|
+
*/
|
|
2180
|
+
disabled?: boolean;
|
|
2181
|
+
};
|
|
2182
|
+
/**
|
|
2183
|
+
* 登录提示
|
|
2184
|
+
*/
|
|
2185
|
+
loginNotice?: {
|
|
2186
|
+
/**
|
|
2187
|
+
* 显示登录提示
|
|
2188
|
+
*/
|
|
2189
|
+
show?: () => void;
|
|
1654
2190
|
};
|
|
1655
2191
|
/**
|
|
1656
2192
|
* toast
|
|
@@ -1664,6 +2200,10 @@ export declare interface EditorUiOptions {
|
|
|
1664
2200
|
* 是否禁用toast
|
|
1665
2201
|
*/
|
|
1666
2202
|
disabled?: boolean;
|
|
2203
|
+
/**
|
|
2204
|
+
* 自定义toast提示文本配置
|
|
2205
|
+
*/
|
|
2206
|
+
tips?: ToastTipsConfig;
|
|
1667
2207
|
};
|
|
1668
2208
|
/**
|
|
1669
2209
|
* confirm
|
|
@@ -1678,9 +2218,48 @@ export declare interface EditorUiOptions {
|
|
|
1678
2218
|
*/
|
|
1679
2219
|
disabled?: boolean;
|
|
1680
2220
|
};
|
|
2221
|
+
/**
|
|
2222
|
+
* 全屏配置
|
|
2223
|
+
*/
|
|
2224
|
+
fullscreen?: EditorFeatureConfig;
|
|
2225
|
+
/**
|
|
2226
|
+
* 演示模式配置
|
|
2227
|
+
*/
|
|
2228
|
+
presentation?: EditorFeatureConfig;
|
|
2229
|
+
/**
|
|
2230
|
+
* 帮助中心配置
|
|
2231
|
+
*/
|
|
2232
|
+
helpCenter?: EditorFeatureConfig;
|
|
2233
|
+
/**
|
|
2234
|
+
* 新功能提醒相关配置
|
|
2235
|
+
*/
|
|
2236
|
+
newFeature?: {
|
|
2237
|
+
/**
|
|
2238
|
+
* 是否不展示新功能提醒(包括任何形式的)
|
|
2239
|
+
*/
|
|
2240
|
+
hidden?: boolean;
|
|
2241
|
+
};
|
|
2242
|
+
/**
|
|
2243
|
+
* 图片查看器配置
|
|
2244
|
+
*/
|
|
2245
|
+
imageViewer?: {
|
|
2246
|
+
/**
|
|
2247
|
+
* 右键菜单配置
|
|
2248
|
+
*/
|
|
2249
|
+
contextMenu?: EditorMenuOptions<'copy' | 'download'>;
|
|
2250
|
+
/**
|
|
2251
|
+
* 操作配置
|
|
2252
|
+
*/
|
|
2253
|
+
operations?: {
|
|
2254
|
+
/**
|
|
2255
|
+
* 下载图片
|
|
2256
|
+
*/
|
|
2257
|
+
download: EditorFeatureConfig;
|
|
2258
|
+
};
|
|
2259
|
+
};
|
|
1681
2260
|
}
|
|
1682
2261
|
|
|
1683
|
-
export declare type EditorUploadableFile = EditorLocalUploadableFile;
|
|
2262
|
+
export declare type EditorUploadableFile = EditorLocalUploadableFile | EditorRemoteUploadableFile;
|
|
1684
2263
|
|
|
1685
2264
|
/**
|
|
1686
2265
|
* 文件开始上传入参
|
|
@@ -1746,10 +2325,23 @@ export declare interface EditorUserOptions {
|
|
|
1746
2325
|
export declare interface EditorVersion {
|
|
1747
2326
|
/**
|
|
1748
2327
|
* 保存版本
|
|
2328
|
+
* @param name 版本名称
|
|
2329
|
+
*/
|
|
2330
|
+
createRevision: (name?: string) => void;
|
|
2331
|
+
/**
|
|
2332
|
+
* 显示版本(侧边栏或其他形式)
|
|
2333
|
+
* 区别于历史侧边栏,在应用表格里表现为打开历史侧边栏切换到版本 tab
|
|
2334
|
+
*/
|
|
2335
|
+
show?: () => void;
|
|
2336
|
+
/**
|
|
2337
|
+
* 隐藏版本(侧边栏或其他形式)
|
|
2338
|
+
* 区别于历史侧边栏,在应用表格里表现为打开历史侧边栏切换到版本 tab
|
|
1749
2339
|
*/
|
|
1750
|
-
|
|
2340
|
+
hide?: () => void;
|
|
1751
2341
|
}
|
|
1752
2342
|
|
|
2343
|
+
export declare type EditorVersionOptions = EditorFeatureConfig;
|
|
2344
|
+
|
|
1753
2345
|
/**
|
|
1754
2346
|
* 编辑器外部水印信息
|
|
1755
2347
|
*/
|
|
@@ -1757,7 +2349,12 @@ export declare interface EditorWatermarkOptions {
|
|
|
1757
2349
|
/**
|
|
1758
2350
|
* 获取用作初始化使用的默认水印
|
|
1759
2351
|
*/
|
|
1760
|
-
getWatermark
|
|
2352
|
+
getWatermark?: () => MaybePromiseValue<EditorWatermarkResource | null>;
|
|
2353
|
+
/**
|
|
2354
|
+
* 获取文件导出水印
|
|
2355
|
+
* @param exportType 导出类型 图片/pdf/纯图pdf
|
|
2356
|
+
*/
|
|
2357
|
+
getExportWatermark?: (exportType: 'image' | 'pdf' | 'image_pdf') => Promise<string[] | undefined>;
|
|
1761
2358
|
/**
|
|
1762
2359
|
* 是否必须,如果为 true,编辑器将在初始化时强制渲染水印,
|
|
1763
2360
|
* 水印配置信息加载失败将导致编辑器初始化失败
|
|
@@ -1773,28 +2370,13 @@ export declare type EditorWatermarkResource = {
|
|
|
1773
2370
|
url: string;
|
|
1774
2371
|
};
|
|
1775
2372
|
|
|
1776
|
-
export declare enum FeatureStatus {
|
|
1777
|
-
/**
|
|
1778
|
-
* 隐藏
|
|
1779
|
-
*/
|
|
1780
|
-
Hidden = 0,
|
|
1781
|
-
/**
|
|
1782
|
-
* 正常
|
|
1783
|
-
*/
|
|
1784
|
-
Normal = 1,
|
|
1785
|
-
/**
|
|
1786
|
-
* 禁用
|
|
1787
|
-
*/
|
|
1788
|
-
Disabled = 2
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
2373
|
export declare interface FileLinkParams {
|
|
1792
2374
|
/**
|
|
1793
2375
|
* 文件guid
|
|
1794
2376
|
*/
|
|
1795
2377
|
fileGuid: string;
|
|
1796
2378
|
/**
|
|
1797
|
-
*
|
|
2379
|
+
* 文件类型
|
|
1798
2380
|
*/
|
|
1799
2381
|
type: string;
|
|
1800
2382
|
/**
|
|
@@ -1880,6 +2462,14 @@ export declare enum FormatCategory {
|
|
|
1880
2462
|
Custom = "custom"
|
|
1881
2463
|
}
|
|
1882
2464
|
|
|
2465
|
+
/**
|
|
2466
|
+
* 引导数据
|
|
2467
|
+
*/
|
|
2468
|
+
export declare interface GuideData {
|
|
2469
|
+
type: number;
|
|
2470
|
+
id: number;
|
|
2471
|
+
}
|
|
2472
|
+
|
|
1883
2473
|
/**
|
|
1884
2474
|
* 请求、响应头
|
|
1885
2475
|
*/
|
|
@@ -1987,29 +2577,46 @@ export declare interface HTTPResponse<Data = unknown> {
|
|
|
1987
2577
|
*/
|
|
1988
2578
|
export declare type HTTPResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
|
|
1989
2579
|
|
|
1990
|
-
export declare
|
|
2580
|
+
export declare type MaybePromiseValue<T> = T | Promise<T>;
|
|
2581
|
+
|
|
2582
|
+
export declare interface MentionEventPayload {
|
|
2583
|
+
/**
|
|
2584
|
+
* 距离页面左边的距离
|
|
2585
|
+
*/
|
|
2586
|
+
x: number;
|
|
2587
|
+
/**
|
|
2588
|
+
* 距离页面顶部的距离
|
|
2589
|
+
*/
|
|
2590
|
+
y: number;
|
|
2591
|
+
/**
|
|
2592
|
+
* mention信息
|
|
2593
|
+
*/
|
|
2594
|
+
mentionInfo: MentionInfo;
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
export declare interface MentionInfo {
|
|
2598
|
+
/** 用户 Id */
|
|
2599
|
+
userId?: number;
|
|
2600
|
+
/** 文件 Id */
|
|
2601
|
+
fileId?: string;
|
|
1991
2602
|
/**
|
|
1992
|
-
*
|
|
2603
|
+
* mention区域宽度
|
|
1993
2604
|
*/
|
|
1994
|
-
|
|
2605
|
+
width?: number;
|
|
1995
2606
|
/**
|
|
1996
|
-
*
|
|
1997
|
-
* minutes、MB
|
|
2607
|
+
* mention区域高度
|
|
1998
2608
|
*/
|
|
1999
|
-
|
|
2609
|
+
height?: number;
|
|
2000
2610
|
/**
|
|
2001
|
-
*
|
|
2611
|
+
* mention区域左上角距离页面左边的距离
|
|
2002
2612
|
*/
|
|
2003
|
-
|
|
2613
|
+
left?: number;
|
|
2004
2614
|
/**
|
|
2005
|
-
*
|
|
2615
|
+
* mention区域左上角距离页面顶部的距离
|
|
2006
2616
|
*/
|
|
2007
|
-
|
|
2008
|
-
min?: number;
|
|
2617
|
+
top?: number;
|
|
2009
2618
|
}
|
|
2010
2619
|
|
|
2011
|
-
export declare type MaybePromiseValue<T> = T | Promise<T>;
|
|
2012
|
-
|
|
2013
2620
|
export declare enum MentionTypes {
|
|
2014
2621
|
Comment = "comment",
|
|
2015
2622
|
Mention = "mention_at",
|
|
@@ -2020,7 +2627,23 @@ export declare enum MentionTypes {
|
|
|
2020
2627
|
* 升级弹窗类型
|
|
2021
2628
|
* 个人版或企业版
|
|
2022
2629
|
*/
|
|
2023
|
-
export declare type OpenType = 'personal' | 'enterprise';
|
|
2630
|
+
export declare type OpenType = 'personal' | 'enterprise' | 'pendingOrder';
|
|
2631
|
+
|
|
2632
|
+
export declare interface OperationToastConfig {
|
|
2633
|
+
/**
|
|
2634
|
+
* 成功提示文本
|
|
2635
|
+
*/
|
|
2636
|
+
success?: string;
|
|
2637
|
+
/**
|
|
2638
|
+
* 失败提示文本
|
|
2639
|
+
*/
|
|
2640
|
+
failed?: string;
|
|
2641
|
+
/**
|
|
2642
|
+
* 权限不足提示文本
|
|
2643
|
+
* 桌面客户端安全模式下需要提供【当前账号未获得此项能力授权。】
|
|
2644
|
+
*/
|
|
2645
|
+
noPermission?: string;
|
|
2646
|
+
}
|
|
2024
2647
|
|
|
2025
2648
|
export declare interface PermissionDict {
|
|
2026
2649
|
[id: number]: PermissionLevel;
|
|
@@ -2065,15 +2688,15 @@ export declare interface RenderUserCardProps {
|
|
|
2065
2688
|
height: number;
|
|
2066
2689
|
hasReducedHeaderHeight?: boolean;
|
|
2067
2690
|
};
|
|
2068
|
-
position?: 'top' | 'left' | 'right' | 'bottom' | 'left_top' | 'left_bottom' | 'right_top' | '
|
|
2069
|
-
trigger
|
|
2691
|
+
position?: 'top' | 'left' | 'right' | 'bottom' | 'left_top' | 'left_bottom' | 'right_top' | 'right_bottom' | 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right';
|
|
2692
|
+
trigger?: 'hover' | 'click';
|
|
2070
2693
|
}
|
|
2071
2694
|
|
|
2072
2695
|
export declare interface RenderUserCardResult {
|
|
2073
2696
|
/**
|
|
2074
2697
|
* 关闭用户卡片
|
|
2075
2698
|
*/
|
|
2076
|
-
close
|
|
2699
|
+
close?: (force?: boolean) => void;
|
|
2077
2700
|
}
|
|
2078
2701
|
|
|
2079
2702
|
/**
|
|
@@ -2245,23 +2868,93 @@ export declare type SheetChecklistOptions = EditorFeatureConfig;
|
|
|
2245
2868
|
export declare interface SheetCombineSheetsOptions extends EditorFeatureConfig {
|
|
2246
2869
|
/**
|
|
2247
2870
|
* 是否隐藏通过链接进行合并的入口
|
|
2871
|
+
* sdk2.0需要禁用
|
|
2248
2872
|
*/
|
|
2249
2873
|
isCombineByUrlHidden?: boolean;
|
|
2250
2874
|
/**
|
|
2251
2875
|
* 是否隐藏生成合并工作表的位置配置入口
|
|
2876
|
+
* sdk2.0需要禁用
|
|
2252
2877
|
*/
|
|
2253
2878
|
isCombinedLocationHidden?: boolean;
|
|
2254
2879
|
}
|
|
2255
2880
|
|
|
2256
|
-
export declare interface
|
|
2881
|
+
export declare interface SheetDateMentionOptions extends EditorFeatureConfig {
|
|
2882
|
+
/**
|
|
2883
|
+
* 是否禁用日期提醒规则设置
|
|
2884
|
+
* 桌面客户端需要禁止
|
|
2885
|
+
*/
|
|
2886
|
+
disableRuleSetting?: boolean;
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
export declare interface SheetEventSubscription {
|
|
2890
|
+
/**
|
|
2891
|
+
* 添加视图区域大小变化监听器
|
|
2892
|
+
*/
|
|
2893
|
+
addViewportSizeChangedListener: (listener: (size: {
|
|
2894
|
+
width: number;
|
|
2895
|
+
height: number;
|
|
2896
|
+
}) => void) => () => void;
|
|
2897
|
+
/**
|
|
2898
|
+
* 添加保存状态变化监听器
|
|
2899
|
+
*/
|
|
2900
|
+
addSaveStatusChangedListener: (listener: (status: string) => void) => () => void;
|
|
2901
|
+
/**
|
|
2902
|
+
* 添加错误事件监听器
|
|
2903
|
+
*/
|
|
2904
|
+
addErrorListener: (listener: (error: {
|
|
2905
|
+
code: number | string;
|
|
2906
|
+
message?: string;
|
|
2907
|
+
}) => void) => () => void;
|
|
2908
|
+
/**
|
|
2909
|
+
* 添加URL变化监听器
|
|
2910
|
+
*/
|
|
2911
|
+
addUrlChangedListener: (listener: (params: FileLinkParams & {
|
|
2912
|
+
sheetId: string;
|
|
2913
|
+
}) => void) => () => void;
|
|
2914
|
+
/**
|
|
2915
|
+
* 添加鼠标移动监听器
|
|
2916
|
+
*/
|
|
2917
|
+
addMouseMoveListener: (listener: (params: {
|
|
2918
|
+
x: number;
|
|
2919
|
+
y: number;
|
|
2920
|
+
mentionInfo?: MentionInfo;
|
|
2921
|
+
}) => void) => () => void;
|
|
2922
|
+
/**
|
|
2923
|
+
* 添加鼠标点击监听器
|
|
2924
|
+
*/
|
|
2925
|
+
addHorizontalScrollListener: (listener: () => void) => () => void;
|
|
2926
|
+
/**
|
|
2927
|
+
* 添加垂直滚动监听器
|
|
2928
|
+
*/
|
|
2929
|
+
addVerticalScrollListener: (listener: () => void) => () => void;
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
/**
|
|
2933
|
+
* 导出回调接口
|
|
2934
|
+
*/
|
|
2935
|
+
export declare interface SheetExportCallbacks {
|
|
2936
|
+
/**
|
|
2937
|
+
* 导出开始时的回调
|
|
2938
|
+
*/
|
|
2939
|
+
onStart: () => void;
|
|
2940
|
+
/**
|
|
2941
|
+
* 公式计算超时时的回调
|
|
2942
|
+
* @param downloadUrl - 下载链接
|
|
2943
|
+
* @param message - 超时的提示信息
|
|
2944
|
+
* @returns 是否继续导出
|
|
2945
|
+
*/
|
|
2946
|
+
onFormulaCalculateTimeout: (downloadUrl: string, message: string) => Promise<boolean>;
|
|
2257
2947
|
/**
|
|
2258
|
-
*
|
|
2948
|
+
* 导出成功时的回调
|
|
2949
|
+
* @param downloadUrl - 下载链接
|
|
2950
|
+
* @param message - 导出的提示信息
|
|
2259
2951
|
*/
|
|
2260
|
-
|
|
2952
|
+
onSuccess: (downloadUrl: string, message?: string) => void;
|
|
2261
2953
|
/**
|
|
2262
|
-
*
|
|
2954
|
+
* 导出失败时的回调
|
|
2955
|
+
* @param error - 错误信息
|
|
2263
2956
|
*/
|
|
2264
|
-
|
|
2957
|
+
onError: (error?: unknown) => void;
|
|
2265
2958
|
}
|
|
2266
2959
|
|
|
2267
2960
|
export declare interface SheetExportOptions extends EditorExportOptions {
|
|
@@ -2269,43 +2962,110 @@ export declare interface SheetExportOptions extends EditorExportOptions {
|
|
|
2269
2962
|
* 导出单个sheet的方法
|
|
2270
2963
|
* @param type - 导出类型,支持 'csv' 或 'xlsx' 格式
|
|
2271
2964
|
* @param sheetId - 表格ID,用于指定要导出的特定表格
|
|
2965
|
+
* @param options - 导出回调选项
|
|
2272
2966
|
*/
|
|
2273
|
-
exportSheet?: (type: 'csv' | 'xlsx', sheetId: string) => Promise<void>;
|
|
2967
|
+
exportSheet?: (type: 'csv' | 'xlsx', sheetId: string, callbacks: SheetExportCallbacks) => Promise<void>;
|
|
2274
2968
|
}
|
|
2275
2969
|
|
|
2276
|
-
|
|
2970
|
+
/**
|
|
2971
|
+
* 关注选区配置
|
|
2972
|
+
*/
|
|
2973
|
+
export declare type SheetFollowSelectionOptions = EditorFeatureConfig;
|
|
2974
|
+
|
|
2975
|
+
export declare interface SheetFormOptions extends EditorFeatureConfig {
|
|
2976
|
+
/**
|
|
2977
|
+
* 填写页相关配置
|
|
2978
|
+
*/
|
|
2979
|
+
fill?: {
|
|
2980
|
+
/**
|
|
2981
|
+
* 是否禁止填写
|
|
2982
|
+
*/
|
|
2983
|
+
disabled?: boolean;
|
|
2984
|
+
};
|
|
2985
|
+
/**
|
|
2986
|
+
* 创建表单文件
|
|
2987
|
+
* 有guid的是sdk2.0的接口,没有guid的是sass的接口
|
|
2988
|
+
*/
|
|
2989
|
+
createFile: (params: {
|
|
2990
|
+
content: string;
|
|
2991
|
+
name: string;
|
|
2992
|
+
guid: string;
|
|
2993
|
+
folder?: string;
|
|
2994
|
+
}) => Promise<{
|
|
2995
|
+
guid: string;
|
|
2996
|
+
id: number;
|
|
2997
|
+
}>;
|
|
2277
2998
|
/**
|
|
2278
|
-
*
|
|
2999
|
+
* 获取表单文件的父级文件
|
|
3000
|
+
* sass需要提供
|
|
2279
3001
|
*/
|
|
2280
|
-
|
|
3002
|
+
getFileAncestors?: (fileGuid: string) => Promise<EditorFileOptions[]>;
|
|
2281
3003
|
}
|
|
2282
3004
|
|
|
2283
|
-
export declare interface
|
|
3005
|
+
export declare interface SheetFormulaOptions {
|
|
2284
3006
|
/**
|
|
2285
|
-
*
|
|
3007
|
+
* 公式缓存设置
|
|
2286
3008
|
*/
|
|
2287
|
-
|
|
3009
|
+
cache?: {
|
|
3010
|
+
/**
|
|
3011
|
+
* 禁用公式缓存
|
|
3012
|
+
*/
|
|
3013
|
+
disabled?: boolean;
|
|
3014
|
+
/**
|
|
3015
|
+
* 是否公式缓存, 需通过内容接口response header获取
|
|
3016
|
+
*/
|
|
3017
|
+
hasFormulaCache?: MaybePromiseValue<boolean>;
|
|
3018
|
+
};
|
|
2288
3019
|
}
|
|
2289
3020
|
|
|
2290
|
-
export declare interface
|
|
3021
|
+
export declare interface SheetImportOptions extends EditorImportOptions {
|
|
2291
3022
|
/**
|
|
2292
|
-
*
|
|
3023
|
+
* 获取图片导入状态
|
|
3024
|
+
* 导入包含大量图片的sheet时,导入成功状态将不再包含图片上传的状态
|
|
3025
|
+
* 第一次打开导入的表格时,图片有可能是没有上传到服务器,为了避免发送不必要的图片请求,需要将图片地址替换成loading状态图标
|
|
2293
3026
|
*/
|
|
2294
|
-
|
|
3027
|
+
getImageImportStatus?: () => Promise<{
|
|
3028
|
+
pending: string[];
|
|
3029
|
+
failed: string[];
|
|
3030
|
+
}>;
|
|
2295
3031
|
}
|
|
2296
3032
|
|
|
2297
3033
|
export declare interface SheetImportRangeOptions extends EditorFeatureConfig {
|
|
2298
3034
|
/**
|
|
2299
|
-
*
|
|
2300
|
-
* @param listener - 回调函数,参数 guidList 表示发生变化的 guid 列表,可以是字符串或字符串数组。
|
|
2301
|
-
* @returns 一个函数,用于移除当前注册的监听器。
|
|
3035
|
+
* 是否正在进行引用范围选择
|
|
2302
3036
|
*/
|
|
2303
|
-
|
|
3037
|
+
isSelectingRange?: boolean;
|
|
3038
|
+
/**
|
|
3039
|
+
* 跨表格引用限制
|
|
3040
|
+
*/
|
|
3041
|
+
limitations?: {
|
|
3042
|
+
/**
|
|
3043
|
+
* 是否检查跨表引用文件信息是否超限
|
|
3044
|
+
* 私有部署环境需要开启
|
|
3045
|
+
*/
|
|
3046
|
+
enableFileStatsCheck?: boolean;
|
|
3047
|
+
/**
|
|
3048
|
+
* 获取最大引用数量
|
|
3049
|
+
*/
|
|
3050
|
+
getMaxReferencesCount?: () => Promise<number | undefined>;
|
|
3051
|
+
};
|
|
3052
|
+
/**
|
|
3053
|
+
* 推送跨表格引用更新事件的 socket 对象
|
|
3054
|
+
*/
|
|
3055
|
+
socket?: EditorSocket;
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
export declare interface SheetIndependentViewportOptions extends EditorFeatureConfig {
|
|
3059
|
+
/**
|
|
3060
|
+
* 是否禁用复制独立视图链接
|
|
3061
|
+
*/
|
|
3062
|
+
isCopyViewportLinkDisabled?: boolean;
|
|
2304
3063
|
}
|
|
2305
3064
|
|
|
2306
3065
|
export declare interface SheetLockOptions extends EditorFeatureConfig {
|
|
2307
3066
|
/**
|
|
2308
3067
|
* 添加锁定列表的占位文案
|
|
3068
|
+
* 部分客户需要自定义
|
|
2309
3069
|
*/
|
|
2310
3070
|
lockListInputPlaceholder?: string;
|
|
2311
3071
|
/**
|
|
@@ -2314,6 +3074,7 @@ export declare interface SheetLockOptions extends EditorFeatureConfig {
|
|
|
2314
3074
|
isBatchLockHidden?: boolean;
|
|
2315
3075
|
/**
|
|
2316
3076
|
* 是否禁止通过手机号查找锁定名单
|
|
3077
|
+
* sdk2.0需要禁用
|
|
2317
3078
|
*/
|
|
2318
3079
|
isSearchByPhoneNumberDisabled?: boolean;
|
|
2319
3080
|
/**
|
|
@@ -2324,13 +3085,13 @@ export declare interface SheetLockOptions extends EditorFeatureConfig {
|
|
|
2324
3085
|
|
|
2325
3086
|
export declare interface SheetLocks {
|
|
2326
3087
|
/**
|
|
2327
|
-
*
|
|
3088
|
+
* 显示锁定(侧边栏或其他形式)
|
|
2328
3089
|
*/
|
|
2329
|
-
|
|
3090
|
+
show: () => void;
|
|
2330
3091
|
/**
|
|
2331
|
-
*
|
|
3092
|
+
* 隐藏锁定(侧边栏或其他形式)
|
|
2332
3093
|
*/
|
|
2333
|
-
|
|
3094
|
+
hide: () => void;
|
|
2334
3095
|
/**
|
|
2335
3096
|
* 添加单元格锁定
|
|
2336
3097
|
*/
|
|
@@ -2347,6 +3108,10 @@ export declare interface SheetLocks {
|
|
|
2347
3108
|
* 移除工作表锁定
|
|
2348
3109
|
*/
|
|
2349
3110
|
removeSheetLock: (params: RemoveSheetLockParams) => void;
|
|
3111
|
+
/**
|
|
3112
|
+
* 是否包含不可见锁定
|
|
3113
|
+
*/
|
|
3114
|
+
containsPrivateLock: () => boolean;
|
|
2350
3115
|
}
|
|
2351
3116
|
|
|
2352
3117
|
export declare interface SheetMention {
|
|
@@ -2375,6 +3140,28 @@ export declare type SheetMenuFeatureButtonName = 'edit' | 'insert' | 'format' |
|
|
|
2375
3140
|
|
|
2376
3141
|
export declare type SheetMenuOptions = EditorMenuOptions<SheetMenuFeatureButtonName>;
|
|
2377
3142
|
|
|
3143
|
+
export declare interface SheetOleOptions extends EditorFeatureConfig {
|
|
3144
|
+
/**
|
|
3145
|
+
* 预览按钮提示文本
|
|
3146
|
+
* 桌面客户端需要提供
|
|
3147
|
+
*/
|
|
3148
|
+
previewTooltip?: string;
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
export declare interface SheetPasteLimitationOptions extends EditorPasteLimitationOptions {
|
|
3152
|
+
/**
|
|
3153
|
+
* 获取允许粘贴的最大单元格数量
|
|
3154
|
+
*/
|
|
3155
|
+
getMaxCellsCount?: () => Promise<number | undefined>;
|
|
3156
|
+
}
|
|
3157
|
+
|
|
3158
|
+
export declare interface SheetPasteOptions extends EditorPasteOptions {
|
|
3159
|
+
/**
|
|
3160
|
+
* 粘贴限制
|
|
3161
|
+
*/
|
|
3162
|
+
limitations?: SheetPasteLimitationOptions;
|
|
3163
|
+
}
|
|
3164
|
+
|
|
2378
3165
|
/**
|
|
2379
3166
|
* 表格区域对象,
|
|
2380
3167
|
* 用于表示表格中被选中的单元格区域,
|
|
@@ -2506,7 +3293,7 @@ export declare type SheetRangeValue = {
|
|
|
2506
3293
|
type: `${SheetRangeType.Sheet}`;
|
|
2507
3294
|
};
|
|
2508
3295
|
|
|
2509
|
-
export declare interface SheetRenderOptions {
|
|
3296
|
+
export declare interface SheetRenderOptions extends EditorRenderOptions {
|
|
2510
3297
|
/**
|
|
2511
3298
|
* 激活的工作表 ID
|
|
2512
3299
|
*/
|
|
@@ -2515,13 +3302,18 @@ export declare interface SheetRenderOptions {
|
|
|
2515
3302
|
* 是否显示表格标题(oppo tt移动端专用)
|
|
2516
3303
|
*/
|
|
2517
3304
|
showSheetTitle?: boolean;
|
|
3305
|
+
/**
|
|
3306
|
+
* 是否禁止自动聚焦
|
|
3307
|
+
* 不自动聚焦需要用鼠标单击选中单元格后才能使用键盘编辑
|
|
3308
|
+
*/
|
|
3309
|
+
disableAutoFocus?: boolean;
|
|
2518
3310
|
}
|
|
2519
3311
|
|
|
2520
3312
|
export declare interface SheetSDKOptions extends EditorOptions {
|
|
2521
3313
|
/**
|
|
2522
3314
|
* 字体配置
|
|
2523
3315
|
*/
|
|
2524
|
-
fonts?:
|
|
3316
|
+
fonts?: EditorFontsOptions;
|
|
2525
3317
|
/**
|
|
2526
3318
|
* 菜单栏相关设置
|
|
2527
3319
|
*/
|
|
@@ -2592,6 +3384,38 @@ export declare interface SheetSDKOptions extends EditorOptions {
|
|
|
2592
3384
|
* 公式
|
|
2593
3385
|
*/
|
|
2594
3386
|
formula?: SheetFormulaOptions;
|
|
3387
|
+
/**
|
|
3388
|
+
* 表格UI相关设置
|
|
3389
|
+
*/
|
|
3390
|
+
ui?: SheetUiOptions;
|
|
3391
|
+
/**
|
|
3392
|
+
* 独立视图相关设置
|
|
3393
|
+
*/
|
|
3394
|
+
independentViewport?: SheetIndependentViewportOptions;
|
|
3395
|
+
/**
|
|
3396
|
+
* 关注选区相关设置
|
|
3397
|
+
*/
|
|
3398
|
+
followSelection?: SheetFollowSelectionOptions;
|
|
3399
|
+
/**
|
|
3400
|
+
* 导入设置
|
|
3401
|
+
*/
|
|
3402
|
+
import?: SheetImportOptions;
|
|
3403
|
+
/**
|
|
3404
|
+
* 表格sheet栏相关设置
|
|
3405
|
+
*/
|
|
3406
|
+
sheetTab?: SheetTabOptions;
|
|
3407
|
+
/**
|
|
3408
|
+
* 日期提醒设置
|
|
3409
|
+
*/
|
|
3410
|
+
dateMention?: SheetDateMentionOptions;
|
|
3411
|
+
/**
|
|
3412
|
+
* OLE对象设置
|
|
3413
|
+
*/
|
|
3414
|
+
ole?: SheetOleOptions;
|
|
3415
|
+
/**
|
|
3416
|
+
* 粘贴设置
|
|
3417
|
+
*/
|
|
3418
|
+
paste?: SheetPasteOptions;
|
|
2595
3419
|
}
|
|
2596
3420
|
|
|
2597
3421
|
/**
|
|
@@ -2622,6 +3446,16 @@ export declare interface SheetSensitizationOptions extends EditorFeatureConfig {
|
|
|
2622
3446
|
isLowestPermissionMode?: boolean;
|
|
2623
3447
|
}
|
|
2624
3448
|
|
|
3449
|
+
/**
|
|
3450
|
+
* 表格底部sheet栏配置
|
|
3451
|
+
*/
|
|
3452
|
+
export declare interface SheetTabOptions extends EditorFeatureConfig {
|
|
3453
|
+
/**
|
|
3454
|
+
* 是否显示演示按钮
|
|
3455
|
+
*/
|
|
3456
|
+
showPresentationButton?: boolean;
|
|
3457
|
+
}
|
|
3458
|
+
|
|
2625
3459
|
/**
|
|
2626
3460
|
* 电子表格文本接口
|
|
2627
3461
|
*/
|
|
@@ -2659,6 +3493,46 @@ export declare type SheetToolbarOptions = EditorToolbarOptions<SheetToolbarFeatu
|
|
|
2659
3493
|
|
|
2660
3494
|
export declare type SheetToTableOptions = EditorFeatureConfig;
|
|
2661
3495
|
|
|
3496
|
+
export declare interface SheetUiOptions extends EditorUiOptions {
|
|
3497
|
+
/**
|
|
3498
|
+
* 移动端顶部栏配置
|
|
3499
|
+
*/
|
|
3500
|
+
mobileHeaderBar?: {
|
|
3501
|
+
/**
|
|
3502
|
+
* 是否固定移动端顶部栏
|
|
3503
|
+
* sdk2.0需要固定
|
|
3504
|
+
*/
|
|
3505
|
+
isFixed?: boolean;
|
|
3506
|
+
};
|
|
3507
|
+
/**
|
|
3508
|
+
* 表格fx栏配置
|
|
3509
|
+
*/
|
|
3510
|
+
fxEditor?: EditorFeatureConfig;
|
|
3511
|
+
/**
|
|
3512
|
+
* 表格右键菜单配置
|
|
3513
|
+
*/
|
|
3514
|
+
contextMenu?: {
|
|
3515
|
+
/**
|
|
3516
|
+
* 复制范围链接配置
|
|
3517
|
+
* 桌面客户端需要禁用
|
|
3518
|
+
*/
|
|
3519
|
+
copyRangeLink?: EditorFeatureConfig;
|
|
3520
|
+
};
|
|
3521
|
+
/**
|
|
3522
|
+
* 工作表菜单配置
|
|
3523
|
+
*/
|
|
3524
|
+
sheetMenu?: {
|
|
3525
|
+
/**
|
|
3526
|
+
* 下载工作表配置
|
|
3527
|
+
*/
|
|
3528
|
+
downloadSheet?: EditorFeatureConfig;
|
|
3529
|
+
/**
|
|
3530
|
+
* 移动工作表配置
|
|
3531
|
+
*/
|
|
3532
|
+
moveSheet?: EditorFeatureConfig;
|
|
3533
|
+
};
|
|
3534
|
+
}
|
|
3535
|
+
|
|
2662
3536
|
/**
|
|
2663
3537
|
* 工作表集合对象
|
|
2664
3538
|
*/
|
|
@@ -2788,6 +3662,22 @@ export declare interface SheetWorksheet {
|
|
|
2788
3662
|
* 粘贴
|
|
2789
3663
|
*/
|
|
2790
3664
|
paste: (params: ClipboardPasteParams) => void;
|
|
3665
|
+
/**
|
|
3666
|
+
* 结束编辑
|
|
3667
|
+
*/
|
|
3668
|
+
endEdit: () => void;
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3671
|
+
export declare interface ShortcutConfig {
|
|
3672
|
+
/**
|
|
3673
|
+
* 快捷键,例如保存快捷键windows为ctrl+s, mac系统则为meta+s
|
|
3674
|
+
* 如果不想区分系统则为mod+s
|
|
3675
|
+
*/
|
|
3676
|
+
key: string;
|
|
3677
|
+
/**
|
|
3678
|
+
* 快捷键回调
|
|
3679
|
+
*/
|
|
3680
|
+
callback: () => void;
|
|
2791
3681
|
}
|
|
2792
3682
|
|
|
2793
3683
|
export declare interface ShowConfirmOptions {
|
|
@@ -2889,6 +3779,67 @@ export declare interface SyncStatusDelegation {
|
|
|
2889
3779
|
onError: (error: unknown, context: SyncContext) => void;
|
|
2890
3780
|
}
|
|
2891
3781
|
|
|
3782
|
+
/**
|
|
3783
|
+
* Toast提示文本配置接口
|
|
3784
|
+
*/
|
|
3785
|
+
export declare interface ToastTipsConfig {
|
|
3786
|
+
/**
|
|
3787
|
+
* 复制相关提示文本
|
|
3788
|
+
*/
|
|
3789
|
+
copy?: OperationToastConfig;
|
|
3790
|
+
/**
|
|
3791
|
+
* 粘贴相关提示文本
|
|
3792
|
+
*/
|
|
3793
|
+
paste?: OperationToastConfig;
|
|
3794
|
+
/**
|
|
3795
|
+
* 剪切相关提示文本
|
|
3796
|
+
*/
|
|
3797
|
+
cut?: OperationToastConfig;
|
|
3798
|
+
/**
|
|
3799
|
+
* 打印相关提示文本
|
|
3800
|
+
*/
|
|
3801
|
+
print?: OperationToastConfig;
|
|
3802
|
+
/**
|
|
3803
|
+
* 导出相关提示文本
|
|
3804
|
+
*/
|
|
3805
|
+
export?: OperationToastConfig;
|
|
3806
|
+
/**
|
|
3807
|
+
* 编辑相关提示文本
|
|
3808
|
+
*/
|
|
3809
|
+
edit?: OperationToastConfig;
|
|
3810
|
+
/**
|
|
3811
|
+
* 下载相关提示文本
|
|
3812
|
+
*/
|
|
3813
|
+
download?: {
|
|
3814
|
+
/**
|
|
3815
|
+
* 图片下载提示文本
|
|
3816
|
+
*/
|
|
3817
|
+
image?: OperationToastConfig;
|
|
3818
|
+
/**
|
|
3819
|
+
* 附件下载提示文本
|
|
3820
|
+
*/
|
|
3821
|
+
attachment?: OperationToastConfig;
|
|
3822
|
+
};
|
|
3823
|
+
/**
|
|
3824
|
+
* 预览相关提示文本
|
|
3825
|
+
*/
|
|
3826
|
+
preview?: {
|
|
3827
|
+
/**
|
|
3828
|
+
* 图片预览提示文本
|
|
3829
|
+
*/
|
|
3830
|
+
image?: OperationToastConfig;
|
|
3831
|
+
/**
|
|
3832
|
+
* 附件预览提示文本
|
|
3833
|
+
*/
|
|
3834
|
+
attachment?: OperationToastConfig;
|
|
3835
|
+
};
|
|
3836
|
+
/**
|
|
3837
|
+
* 创建版本相关提示文本
|
|
3838
|
+
* sdk2.0需要提供
|
|
3839
|
+
*/
|
|
3840
|
+
createVersion?: OperationToastConfig;
|
|
3841
|
+
}
|
|
3842
|
+
|
|
2892
3843
|
/**
|
|
2893
3844
|
* 工具箱工具项接口
|
|
2894
3845
|
*/
|