weboffice-js-sdk 2.0.2
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/OfficeSDK.d.ts +338 -0
- package/assert.d.ts +1 -0
- package/assets/loading.d.ts +1 -0
- package/connect.d.ts +10 -0
- package/index.d.ts +13 -0
- package/index.js +1 -0
- package/package.json +26 -0
- package/types/BaseEditor.d.ts +76 -0
- package/types/Document.d.ts +168 -0
- package/types/DocumentPro.d.ts +389 -0
- package/types/FlowChart.d.ts +11 -0
- package/types/Form.d.ts +15 -0
- package/types/Presentation.d.ts +49 -0
- package/types/Spreadsheet.d.ts +537 -0
- package/types/Table.d.ts +40 -0
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
import { MouseMovePayload } from 'weboffice-js-sdk-shared';
|
|
2
|
+
import { BaseEditor, EventMap as BaseEventMap } from './BaseEditor';
|
|
3
|
+
/** 表格范围 */
|
|
4
|
+
export interface Range {
|
|
5
|
+
row: number;
|
|
6
|
+
column: number;
|
|
7
|
+
rowCount: number;
|
|
8
|
+
columnCount: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 锁定权限等级
|
|
12
|
+
* 0 - 可编辑
|
|
13
|
+
* 1 - 只能查看
|
|
14
|
+
* 2 - 禁止查看
|
|
15
|
+
*/
|
|
16
|
+
export type PermissionLevel = 0 | 1 | 2;
|
|
17
|
+
/** 用户ID对应的权限等级 */
|
|
18
|
+
export interface UserPermission {
|
|
19
|
+
[userId: number]: PermissionLevel;
|
|
20
|
+
}
|
|
21
|
+
/** 部门ID对应的权限等级 */
|
|
22
|
+
export interface DepartmentPermission {
|
|
23
|
+
[departmentId: number]: PermissionLevel;
|
|
24
|
+
}
|
|
25
|
+
export interface EventMap extends BaseEventMap {
|
|
26
|
+
error: {
|
|
27
|
+
/** 错误信息 */
|
|
28
|
+
data?: any;
|
|
29
|
+
/** 错误码 */
|
|
30
|
+
code: number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* 鼠标移动事件
|
|
34
|
+
*/
|
|
35
|
+
MouseMove: MouseMovePayload;
|
|
36
|
+
/**
|
|
37
|
+
* 垂直滚动事件
|
|
38
|
+
*/
|
|
39
|
+
VerticalScroll: MouseMovePayload;
|
|
40
|
+
/**
|
|
41
|
+
* 水平滚动事件
|
|
42
|
+
*/
|
|
43
|
+
HorizontalScroll: MouseMovePayload;
|
|
44
|
+
}
|
|
45
|
+
/** 查找结果 */
|
|
46
|
+
export type SearchMatch = {
|
|
47
|
+
/**
|
|
48
|
+
* 单元格所在行号
|
|
49
|
+
*/
|
|
50
|
+
row: number;
|
|
51
|
+
/**
|
|
52
|
+
* 单元格所在列号
|
|
53
|
+
*/
|
|
54
|
+
column: number;
|
|
55
|
+
/**
|
|
56
|
+
* 单元格的text
|
|
57
|
+
*/
|
|
58
|
+
text: string;
|
|
59
|
+
/**
|
|
60
|
+
* 是否是链接单元格
|
|
61
|
+
*/
|
|
62
|
+
isLinkCell?: boolean;
|
|
63
|
+
};
|
|
64
|
+
/** 通知类型,由服务端事件推送 */
|
|
65
|
+
/**
|
|
66
|
+
* comment - 评论
|
|
67
|
+
* mention_at - 提及
|
|
68
|
+
* date_mention - 日期提醒
|
|
69
|
+
*/
|
|
70
|
+
export type NotificationType = 'comment' | 'mention_at' | 'date_mention';
|
|
71
|
+
/** 单元格数据信息 */
|
|
72
|
+
export type RangeData = {
|
|
73
|
+
/**
|
|
74
|
+
* 单元格数据
|
|
75
|
+
*/
|
|
76
|
+
value: CellValue;
|
|
77
|
+
/**
|
|
78
|
+
* 单元格格式
|
|
79
|
+
*/
|
|
80
|
+
format: string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* 合并单元格范围
|
|
83
|
+
*/
|
|
84
|
+
span: Range | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* 单元格格式类型
|
|
87
|
+
*/
|
|
88
|
+
formatCategory: FormatCategory;
|
|
89
|
+
/**
|
|
90
|
+
* 单元格数字精度
|
|
91
|
+
*/
|
|
92
|
+
precision: number | undefined;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* 单元格格式类型
|
|
96
|
+
* auto - 常规
|
|
97
|
+
* text - 纯文本
|
|
98
|
+
* number - 数字
|
|
99
|
+
* percent - 百分比
|
|
100
|
+
* currency - 货币
|
|
101
|
+
* accounting - 会计
|
|
102
|
+
* date - 日期
|
|
103
|
+
* time - 时间
|
|
104
|
+
* fraction - 分数
|
|
105
|
+
* scientific - 科学计数
|
|
106
|
+
* special - 特殊
|
|
107
|
+
* custom - 自定义
|
|
108
|
+
*/
|
|
109
|
+
export type FormatCategory = 'auto' /** 常规 */ | 'text' /** 纯文本 */ | 'number' /** 数字 */ | 'percent' /** 百分比 */ | 'currency' /** 货币 */ | 'accounting' /** 会计 */ | 'date' /** 日期 */ | 'time' /** 时间 */ | 'fraction' /** 分数 */ | 'scientific' /** 科学计数 */ | 'special' /** 特殊 */ | 'custom'; /** 自定义 */
|
|
110
|
+
/** 单元格值类型 */
|
|
111
|
+
export type CellValue = string | number | boolean | null;
|
|
112
|
+
export interface Editor extends BaseEditor<EventMap> {
|
|
113
|
+
/**
|
|
114
|
+
* 展示评论侧边栏
|
|
115
|
+
* @since PD2.10
|
|
116
|
+
*/
|
|
117
|
+
showComments(this: Editor): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* 关闭评论侧边栏
|
|
120
|
+
* @since PD2.10
|
|
121
|
+
*/
|
|
122
|
+
hideComments(this: Editor): Promise<void>;
|
|
123
|
+
/**
|
|
124
|
+
* 展示历史侧边栏
|
|
125
|
+
* @since PD2.10
|
|
126
|
+
*/
|
|
127
|
+
showHistory(this: Editor): Promise<void>;
|
|
128
|
+
/**
|
|
129
|
+
* 关闭历史侧边栏
|
|
130
|
+
* @since PD2.10
|
|
131
|
+
*/
|
|
132
|
+
hideHistory(this: Editor): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* 展示锁定侧边栏
|
|
135
|
+
* @since PD2.10
|
|
136
|
+
*/
|
|
137
|
+
showLocks(this: Editor): Promise<void>;
|
|
138
|
+
/**
|
|
139
|
+
* 关闭锁定侧边栏
|
|
140
|
+
* @since PD2.10
|
|
141
|
+
*/
|
|
142
|
+
hideLocks(this: Editor): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* 创建版本
|
|
145
|
+
* @since PD2.10
|
|
146
|
+
* @param options.name 版本名称,since co-1.6
|
|
147
|
+
*/
|
|
148
|
+
createRevision(this: Editor, options?: {
|
|
149
|
+
name?: string;
|
|
150
|
+
}): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* 进入演示模式
|
|
153
|
+
* @since PD2.10
|
|
154
|
+
*/
|
|
155
|
+
startDemonstration(this: Editor): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* 离开演示模式
|
|
158
|
+
* @since PD2.10
|
|
159
|
+
*/
|
|
160
|
+
endDemonstration(this: Editor): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* 打印
|
|
163
|
+
* @since PD2.10
|
|
164
|
+
*/
|
|
165
|
+
print(this: Editor): Promise<void>;
|
|
166
|
+
/**
|
|
167
|
+
* 创建单元格锁定
|
|
168
|
+
* @since PD2.10
|
|
169
|
+
*/
|
|
170
|
+
addRangeLock(this: Editor, options: {
|
|
171
|
+
/** 用户id对应的权限 */
|
|
172
|
+
userPermissions: UserPermission;
|
|
173
|
+
/**
|
|
174
|
+
* 单元格范围
|
|
175
|
+
* @default 默认当前选中区域范围
|
|
176
|
+
*/
|
|
177
|
+
ranges?: Range[];
|
|
178
|
+
/**
|
|
179
|
+
* 工作表id
|
|
180
|
+
* @default 默认当前工作表id
|
|
181
|
+
*/
|
|
182
|
+
sheetId?: string;
|
|
183
|
+
/** 对该锁定的描述 */
|
|
184
|
+
description?: string;
|
|
185
|
+
/** 部门id对应的权限 */
|
|
186
|
+
departmentPermissions?: DepartmentPermission;
|
|
187
|
+
/**
|
|
188
|
+
* 其他访问者的权限
|
|
189
|
+
* @default 1
|
|
190
|
+
*/
|
|
191
|
+
visitorPermission?: PermissionLevel;
|
|
192
|
+
}): Promise<void>;
|
|
193
|
+
/**
|
|
194
|
+
* 创建工作表锁定
|
|
195
|
+
* @since PD2.10
|
|
196
|
+
*/
|
|
197
|
+
addSheetLock(this: Editor, options: {
|
|
198
|
+
/** 用户id对应的权限 */
|
|
199
|
+
userPermissions: UserPermission;
|
|
200
|
+
/**
|
|
201
|
+
* 工作表id
|
|
202
|
+
* @default 默认当前工作表id
|
|
203
|
+
*/
|
|
204
|
+
sheetId?: string;
|
|
205
|
+
/** 对该锁定的描述 */
|
|
206
|
+
description?: string;
|
|
207
|
+
/** 部门id对应的权限 */
|
|
208
|
+
departmentPermissions?: DepartmentPermission;
|
|
209
|
+
/**
|
|
210
|
+
* 其他访问者的权限
|
|
211
|
+
* @default 1
|
|
212
|
+
*/
|
|
213
|
+
visitorPermission?: PermissionLevel;
|
|
214
|
+
}): Promise<void>;
|
|
215
|
+
/**
|
|
216
|
+
* 删除指定范围内的所有单元格锁定
|
|
217
|
+
* @since PD2.10
|
|
218
|
+
*/
|
|
219
|
+
removeRangeLocksInRanges(this: Editor, options: {
|
|
220
|
+
/**
|
|
221
|
+
* 工作表id
|
|
222
|
+
* @default 默认当前工作表id
|
|
223
|
+
*/
|
|
224
|
+
sheetId?: string;
|
|
225
|
+
/**
|
|
226
|
+
* 单元格范围
|
|
227
|
+
* @default 默认当前选中区域范围
|
|
228
|
+
*/
|
|
229
|
+
ranges?: Range[];
|
|
230
|
+
}): Promise<void>;
|
|
231
|
+
/**
|
|
232
|
+
* 删除工作表锁定
|
|
233
|
+
* @since PD2.10
|
|
234
|
+
*/
|
|
235
|
+
removeSheetLock(this: Editor, options: {
|
|
236
|
+
/**
|
|
237
|
+
* 工作表id
|
|
238
|
+
* @default 默认当前工作表id
|
|
239
|
+
*/
|
|
240
|
+
sheetId?: string;
|
|
241
|
+
preview?: undefined;
|
|
242
|
+
}): Promise<void>;
|
|
243
|
+
/**
|
|
244
|
+
* 获取当前激活sheet的id
|
|
245
|
+
* @since PD2.10
|
|
246
|
+
*/
|
|
247
|
+
getActiveSheetId(this: Editor): Promise<string>;
|
|
248
|
+
/**
|
|
249
|
+
* 获取所有工作表的id
|
|
250
|
+
* @since PD2.10
|
|
251
|
+
*/
|
|
252
|
+
getSheetIds(this: Editor): Promise<string[]>;
|
|
253
|
+
/**
|
|
254
|
+
* 根据工作表index获取工作表id
|
|
255
|
+
* @since PD2.10
|
|
256
|
+
*/
|
|
257
|
+
getSheetIdByIndex(this: Editor, options: {
|
|
258
|
+
/** 工作表index(从0开始) */
|
|
259
|
+
index: number;
|
|
260
|
+
}): Promise<string>;
|
|
261
|
+
/**
|
|
262
|
+
* 获取工作表指定范围内的单元格的值
|
|
263
|
+
* @since PD2.10
|
|
264
|
+
*/
|
|
265
|
+
getRangeValues(this: Editor, options: {
|
|
266
|
+
/**
|
|
267
|
+
* 工作表id
|
|
268
|
+
* @default 默认当前工作表id
|
|
269
|
+
*/
|
|
270
|
+
sheetId?: string;
|
|
271
|
+
/**
|
|
272
|
+
* 单元格范围
|
|
273
|
+
* @default 默认当前选中范围
|
|
274
|
+
*/
|
|
275
|
+
range?: Range[];
|
|
276
|
+
}): Promise<CellValue[][]>;
|
|
277
|
+
/**
|
|
278
|
+
* 获取指定单元格的值
|
|
279
|
+
* @since PD2.10
|
|
280
|
+
*/
|
|
281
|
+
getCellValue(this: Editor, options: {
|
|
282
|
+
/**
|
|
283
|
+
* 工作表id
|
|
284
|
+
* @default 默认当前工作表id
|
|
285
|
+
*/
|
|
286
|
+
sheetId?: string;
|
|
287
|
+
/** 行index(从0开始) */
|
|
288
|
+
row: number;
|
|
289
|
+
/** 列index(从0开始) */
|
|
290
|
+
column: number;
|
|
291
|
+
}): Promise<CellValue>;
|
|
292
|
+
/**
|
|
293
|
+
* 获取指定工作表行数量
|
|
294
|
+
* @since PD2.10
|
|
295
|
+
*/
|
|
296
|
+
getRowCount(this: Editor, options: {
|
|
297
|
+
/**
|
|
298
|
+
* 工作表id
|
|
299
|
+
* @default 默认当前工作表id
|
|
300
|
+
*/
|
|
301
|
+
sheetId?: string;
|
|
302
|
+
}): Promise<number>;
|
|
303
|
+
/**
|
|
304
|
+
* 获取指定工作表列数量
|
|
305
|
+
* @since PD2.10
|
|
306
|
+
*/
|
|
307
|
+
getColumnCount(this: Editor, options: {
|
|
308
|
+
/**
|
|
309
|
+
* 工作表id
|
|
310
|
+
* @default 默认当前工作表id
|
|
311
|
+
*/
|
|
312
|
+
sheetId?: string;
|
|
313
|
+
}): Promise<number>;
|
|
314
|
+
/**
|
|
315
|
+
* 获取指定工作表是否可见
|
|
316
|
+
* @since PD2.10
|
|
317
|
+
*/
|
|
318
|
+
isSheetVisible(this: Editor, options: {
|
|
319
|
+
/**
|
|
320
|
+
* 工作表id
|
|
321
|
+
* @default 默认当前工作表id
|
|
322
|
+
*/
|
|
323
|
+
sheetId?: string;
|
|
324
|
+
}): Promise<boolean>;
|
|
325
|
+
/**
|
|
326
|
+
* 更新环境变量
|
|
327
|
+
* @since PD3.4
|
|
328
|
+
*/
|
|
329
|
+
updateRuntimeEnv(this: Editor, options: {
|
|
330
|
+
/** 要更新的环境变量 */
|
|
331
|
+
env: {
|
|
332
|
+
[key: string]: any;
|
|
333
|
+
};
|
|
334
|
+
}): Promise<void>;
|
|
335
|
+
/**
|
|
336
|
+
* 设置文件内容
|
|
337
|
+
* @since PD3.4
|
|
338
|
+
*/
|
|
339
|
+
setContent(this: Editor, options: {
|
|
340
|
+
/** 要设置的文件内容,会替换当前内容,实际类型接受 string | Delta */
|
|
341
|
+
content: any;
|
|
342
|
+
}): Promise<void>;
|
|
343
|
+
/**
|
|
344
|
+
* 设置聚焦状态
|
|
345
|
+
* @since PD3.4
|
|
346
|
+
*/
|
|
347
|
+
setFocus(this: Editor, options: {
|
|
348
|
+
/**
|
|
349
|
+
* 设置表格聚焦状态
|
|
350
|
+
* @default true
|
|
351
|
+
*/
|
|
352
|
+
isFocus?: boolean;
|
|
353
|
+
}): Promise<void>;
|
|
354
|
+
/**
|
|
355
|
+
* 导出csv
|
|
356
|
+
* @since pd-3.12
|
|
357
|
+
*/
|
|
358
|
+
exportCsv(this: Editor): Promise<void>;
|
|
359
|
+
/**
|
|
360
|
+
* 查找表格内容并高亮
|
|
361
|
+
* @since co-1.0
|
|
362
|
+
*/
|
|
363
|
+
search(this: Editor, options: {
|
|
364
|
+
/** 要查找的内容 */
|
|
365
|
+
text: string;
|
|
366
|
+
/**
|
|
367
|
+
* 查找的范围
|
|
368
|
+
* @default 默认当前选中的范围
|
|
369
|
+
*/
|
|
370
|
+
range?: Range | Range[];
|
|
371
|
+
}): Promise<SearchMatch[]>;
|
|
372
|
+
/**
|
|
373
|
+
* 定位单元格
|
|
374
|
+
* @since co-1.0
|
|
375
|
+
*/
|
|
376
|
+
locateCell(this: Editor, options: {
|
|
377
|
+
/** 要定位的单元格行坐标 */
|
|
378
|
+
row: number;
|
|
379
|
+
/** 要定位的单元格列坐标 */
|
|
380
|
+
column: number;
|
|
381
|
+
/**
|
|
382
|
+
* 要定位的工作表id
|
|
383
|
+
* @default 默认当前激活工作表id
|
|
384
|
+
*/
|
|
385
|
+
sheetId?: string;
|
|
386
|
+
}): Promise<void>;
|
|
387
|
+
/**
|
|
388
|
+
* 取消搜索高亮
|
|
389
|
+
* @since co-1.0
|
|
390
|
+
*/
|
|
391
|
+
cancelSearchHighlights(this: Editor): Promise<void>;
|
|
392
|
+
/**
|
|
393
|
+
* 通过通知的guid定位单元格
|
|
394
|
+
* @since co-1.0
|
|
395
|
+
*/
|
|
396
|
+
locateCellByGuid(this: Editor, options: {
|
|
397
|
+
/** 通知类型 */
|
|
398
|
+
notificationType: NotificationType;
|
|
399
|
+
/** 锚点guid */
|
|
400
|
+
guid: string;
|
|
401
|
+
}): Promise<void>;
|
|
402
|
+
/**
|
|
403
|
+
* 设置激活工作表
|
|
404
|
+
* @since co-1.0
|
|
405
|
+
*/
|
|
406
|
+
setActiveSheet(this: Editor, options: {
|
|
407
|
+
/** 要激活的工作表id */
|
|
408
|
+
sheetId: string;
|
|
409
|
+
}): Promise<void>;
|
|
410
|
+
/**
|
|
411
|
+
* 获取工作表列表信息
|
|
412
|
+
* @since co-1.0
|
|
413
|
+
*/
|
|
414
|
+
getSheetList(this: Editor): Promise<{
|
|
415
|
+
name: string;
|
|
416
|
+
id: string;
|
|
417
|
+
}[]>;
|
|
418
|
+
/**
|
|
419
|
+
* 获取当前表格选中的范围
|
|
420
|
+
* @since co-1.0
|
|
421
|
+
*/
|
|
422
|
+
getSelections(this: Editor): Promise<Range[]>;
|
|
423
|
+
/**
|
|
424
|
+
* 获取工作表指定范围内的单元格的数据
|
|
425
|
+
* @since co-1.0
|
|
426
|
+
*/
|
|
427
|
+
getRangeData(this: Editor, options: {
|
|
428
|
+
/**
|
|
429
|
+
* 范围
|
|
430
|
+
* @default 默认当前选中的范围
|
|
431
|
+
*/
|
|
432
|
+
range?: Range;
|
|
433
|
+
}): Promise<RangeData[][]>;
|
|
434
|
+
/**
|
|
435
|
+
* 粘贴内容
|
|
436
|
+
* @since co-1.0
|
|
437
|
+
*/
|
|
438
|
+
paste(this: Editor, options: {
|
|
439
|
+
/** 从剪切板获取的text/html */
|
|
440
|
+
html: string;
|
|
441
|
+
/** 从剪切板获取的text/plain */
|
|
442
|
+
text: string;
|
|
443
|
+
/** 从剪切板获取的file, 由于postMessage传输的限制,File对象需转成base64 */
|
|
444
|
+
base64File?: string;
|
|
445
|
+
/** 是否删除末尾空白行 */
|
|
446
|
+
removeTrailingEmptyRows?: boolean;
|
|
447
|
+
/** 是否删除末尾空白列 */
|
|
448
|
+
removeTrailingEmptyCols?: boolean;
|
|
449
|
+
}): Promise<void>;
|
|
450
|
+
/**
|
|
451
|
+
* 获取表格视图区域大小
|
|
452
|
+
* @since co-1.0
|
|
453
|
+
*/
|
|
454
|
+
getViewportSize(this: Editor): Promise<{
|
|
455
|
+
width: number;
|
|
456
|
+
height: number;
|
|
457
|
+
}>;
|
|
458
|
+
/**
|
|
459
|
+
* 导出
|
|
460
|
+
* @since co-1.5
|
|
461
|
+
*/
|
|
462
|
+
export(type: 'image' | 'imagePdf'): Promise<void>;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* 控制插件是否开启,无特殊说明默认都是 true。某些插件设置为 false 后,可能影响数据呈现。
|
|
466
|
+
* 受后端服务版本影响,不是所有插件都可用,请以实际部署版本为准。
|
|
467
|
+
*/
|
|
468
|
+
export interface PluginOptions {
|
|
469
|
+
/**
|
|
470
|
+
* 附件 (附件 / 云文件)
|
|
471
|
+
*/
|
|
472
|
+
Attachment?: boolean;
|
|
473
|
+
/**
|
|
474
|
+
* 高亮行列
|
|
475
|
+
*/
|
|
476
|
+
HighlightPosition?: boolean;
|
|
477
|
+
/**
|
|
478
|
+
* 计算选项
|
|
479
|
+
*/
|
|
480
|
+
CalcOption?: boolean;
|
|
481
|
+
/**
|
|
482
|
+
* 单元格历史
|
|
483
|
+
*/
|
|
484
|
+
CellHistory?: boolean;
|
|
485
|
+
/**
|
|
486
|
+
* 图表
|
|
487
|
+
*/
|
|
488
|
+
ChartV2?: boolean;
|
|
489
|
+
/**
|
|
490
|
+
* 任务清单
|
|
491
|
+
*/
|
|
492
|
+
CheckList?: boolean;
|
|
493
|
+
/**
|
|
494
|
+
* 清除重复项
|
|
495
|
+
*/
|
|
496
|
+
ClearRepeat?: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* 合并工作表 (合并工作表依赖跨表格引用,如果跨表格引用设置为不可见,合并工作表也会不可见)
|
|
499
|
+
*/
|
|
500
|
+
CombineSheets?: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* 评论
|
|
503
|
+
*/
|
|
504
|
+
Comment?: boolean;
|
|
505
|
+
/**
|
|
506
|
+
* 条件格式
|
|
507
|
+
*/
|
|
508
|
+
ConditionalFormat?: boolean;
|
|
509
|
+
/**
|
|
510
|
+
* 复制为图片
|
|
511
|
+
*/
|
|
512
|
+
CopyAsImage?: boolean;
|
|
513
|
+
CustomNames?: boolean;
|
|
514
|
+
DataValidation?: boolean;
|
|
515
|
+
FileSlimming?: boolean;
|
|
516
|
+
HistorySidebar?: boolean;
|
|
517
|
+
IndependentViewport?: boolean;
|
|
518
|
+
Outline?: boolean;
|
|
519
|
+
PivotTable?: boolean;
|
|
520
|
+
Remarks?: boolean;
|
|
521
|
+
SheetStyles?: boolean;
|
|
522
|
+
Slicer?: boolean;
|
|
523
|
+
SplitColumns?: boolean;
|
|
524
|
+
ImagePermission?: boolean;
|
|
525
|
+
CopyRangeLink?: boolean;
|
|
526
|
+
CopyViewportLink?: boolean;
|
|
527
|
+
ImportFormula?: boolean;
|
|
528
|
+
BatchLock?: boolean;
|
|
529
|
+
Mention?: boolean;
|
|
530
|
+
DateMention?: boolean;
|
|
531
|
+
Lock?: boolean;
|
|
532
|
+
SheetTab?: boolean;
|
|
533
|
+
MobileSheetTab?: boolean;
|
|
534
|
+
Toolbar?: boolean;
|
|
535
|
+
MobileToolbar?: boolean;
|
|
536
|
+
FxEditor?: boolean;
|
|
537
|
+
}
|
package/types/Table.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseEditor } from './BaseEditor';
|
|
2
|
+
export interface EventMap {
|
|
3
|
+
error: {
|
|
4
|
+
/** 错误信息 */
|
|
5
|
+
data?: unknown;
|
|
6
|
+
/** 错误码 */
|
|
7
|
+
code: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface Editor extends BaseEditor<EventMap> {
|
|
11
|
+
/**
|
|
12
|
+
* 显示版本侧边栏
|
|
13
|
+
*/
|
|
14
|
+
showRevision: (options?: {}) => Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* 隐藏版本侧边栏
|
|
17
|
+
*/
|
|
18
|
+
hideRevision: (options?: {}) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* 创建版本
|
|
21
|
+
*/
|
|
22
|
+
createRevision: (options?: {}) => Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export interface PluginOptions {
|
|
25
|
+
CombineTables?: boolean;
|
|
26
|
+
BaseVersion?: {
|
|
27
|
+
shareVersion?: boolean;
|
|
28
|
+
};
|
|
29
|
+
FieldOptions?: {
|
|
30
|
+
disableRefField?: boolean;
|
|
31
|
+
disableExternalRefTable?: boolean;
|
|
32
|
+
};
|
|
33
|
+
Collaboration?: {
|
|
34
|
+
customNoAccessTips?: boolean;
|
|
35
|
+
};
|
|
36
|
+
ShareView?: boolean;
|
|
37
|
+
Description?: {
|
|
38
|
+
disableGuidePage: boolean;
|
|
39
|
+
};
|
|
40
|
+
}
|