@vervedoc/docx-editor-view 1.0.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/dist/docx-editor-view.js +13237 -0
- package/dist/docx-editor-view.js.map +1 -0
- package/dist/docx-editor-view.umd.cjs +113 -0
- package/dist/docx-editor-view.umd.cjs.map +1 -0
- package/dist/index.d.ts +1509 -0
- package/package.json +59 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1509 @@
|
|
|
1
|
+
import { Command } from '@vervedoc/docx-editor-transform';
|
|
2
|
+
import { ControlState } from '@vervedoc/docx-editor-schema';
|
|
3
|
+
import { DeepPartial } from '@vervedoc/docx-editor-schema';
|
|
4
|
+
import { DeepRequired } from '@vervedoc/docx-editor-schema';
|
|
5
|
+
import { EditorMode } from '@vervedoc/docx-editor-schema';
|
|
6
|
+
import { EditorZone } from '@vervedoc/docx-editor-schema';
|
|
7
|
+
import { EventBus } from '@vervedoc/docx-editor-state';
|
|
8
|
+
import { EventBusMap } from '@vervedoc/docx-editor-schema';
|
|
9
|
+
import { IAppendElementListOption } from '@vervedoc/docx-editor-schema';
|
|
10
|
+
import { IAreaBadge } from '@vervedoc/docx-editor-schema';
|
|
11
|
+
import { IAreaInfo } from '@vervedoc/docx-editor-schema';
|
|
12
|
+
import { IBadge } from '@vervedoc/docx-editor-schema';
|
|
13
|
+
import { IChartRenderer } from '@vervedoc/docx-editor-schema';
|
|
14
|
+
import { IComputePageRowPositionPayload } from '@vervedoc/docx-editor-schema';
|
|
15
|
+
import { IComputePageRowPositionResult } from '@vervedoc/docx-editor-schema';
|
|
16
|
+
import { IComputeRowListPayload } from '@vervedoc/docx-editor-schema';
|
|
17
|
+
import { IComputeRowPositionPayload } from '@vervedoc/docx-editor-schema';
|
|
18
|
+
import { IControl } from '@vervedoc/docx-editor-schema';
|
|
19
|
+
import { IControlChangeOption } from '@vervedoc/docx-editor-schema';
|
|
20
|
+
import { IControlContext } from '@vervedoc/docx-editor-schema';
|
|
21
|
+
import { IControlHighlight } from '@vervedoc/docx-editor-schema';
|
|
22
|
+
import { IControlHighlightRule } from '@vervedoc/docx-editor-schema';
|
|
23
|
+
import { IControlInitOption } from '@vervedoc/docx-editor-schema';
|
|
24
|
+
import { IControlInstance } from '@vervedoc/docx-editor-schema';
|
|
25
|
+
import { IControlRuleOption } from '@vervedoc/docx-editor-schema';
|
|
26
|
+
import { ICopyOption } from '@vervedoc/docx-editor-schema';
|
|
27
|
+
import { ICurrentPosition } from '@vervedoc/docx-editor-schema';
|
|
28
|
+
import { ICursorOption } from '@vervedoc/docx-editor-schema';
|
|
29
|
+
import { IDestroyControlOption } from '@vervedoc/docx-editor-schema';
|
|
30
|
+
import { IDrawOption } from '@vervedoc/docx-editor-schema';
|
|
31
|
+
import { IDrawRowPayload } from '@vervedoc/docx-editor-schema';
|
|
32
|
+
import { IEditorData } from '@vervedoc/docx-editor-schema';
|
|
33
|
+
import { IEditorOption } from '@vervedoc/docx-editor-schema';
|
|
34
|
+
import { IEditorResult } from '@vervedoc/docx-editor-schema';
|
|
35
|
+
import { IElement } from '@vervedoc/docx-editor-schema';
|
|
36
|
+
import { IElementFillRect } from '@vervedoc/docx-editor-schema';
|
|
37
|
+
import { IElementPosition } from '@vervedoc/docx-editor-schema';
|
|
38
|
+
import { IElementStyle } from '@vervedoc/docx-editor-schema';
|
|
39
|
+
import { IFloatPosition } from '@vervedoc/docx-editor-schema';
|
|
40
|
+
import { IGetAreaValueOption } from '@vervedoc/docx-editor-schema';
|
|
41
|
+
import { IGetAreaValueResult } from '@vervedoc/docx-editor-schema';
|
|
42
|
+
import { IGetControlValueOption } from '@vervedoc/docx-editor-schema';
|
|
43
|
+
import { IGetControlValueResult } from '@vervedoc/docx-editor-schema';
|
|
44
|
+
import { IGetFloatPositionByXYPayload } from '@vervedoc/docx-editor-schema';
|
|
45
|
+
import { IGetImageOption } from '@vervedoc/docx-editor-schema';
|
|
46
|
+
import { IGetOriginValueOption } from '@vervedoc/docx-editor-schema';
|
|
47
|
+
import { IGetPositionByXYPayload } from '@vervedoc/docx-editor-schema';
|
|
48
|
+
import { IGetValueOption } from '@vervedoc/docx-editor-schema';
|
|
49
|
+
import { IInitNextControlOption } from '@vervedoc/docx-editor-schema';
|
|
50
|
+
import { IInsertAreaOption } from '@vervedoc/docx-editor-schema';
|
|
51
|
+
import { IInsertElementListOption } from '@vervedoc/docx-editor-schema';
|
|
52
|
+
import { ILang } from '@vervedoc/docx-editor-schema';
|
|
53
|
+
import { ILocationAreaOption } from '@vervedoc/docx-editor-schema';
|
|
54
|
+
import { IMargin } from '@vervedoc/docx-editor-schema';
|
|
55
|
+
import { INextControlContext } from '@vervedoc/docx-editor-schema';
|
|
56
|
+
import { IPadding } from '@vervedoc/docx-editor-schema';
|
|
57
|
+
import { IPainterOption } from '@vervedoc/docx-editor-schema';
|
|
58
|
+
import { IPasteOption } from '@vervedoc/docx-editor-schema';
|
|
59
|
+
import { IPlaceholder } from '@vervedoc/docx-editor-schema';
|
|
60
|
+
import { IPositionContext } from '@vervedoc/docx-editor-schema';
|
|
61
|
+
import { IPreviewerDrawOption } from '@vervedoc/docx-editor-schema';
|
|
62
|
+
import { IRange } from '@vervedoc/docx-editor-schema';
|
|
63
|
+
import { IRangeElementStyle } from '@vervedoc/docx-editor-schema';
|
|
64
|
+
import { IRegisterShortcut } from '@vervedoc/docx-editor-schema';
|
|
65
|
+
import { IRepaintControlOption } from '@vervedoc/docx-editor-schema';
|
|
66
|
+
import { IReplaceOption } from '@vervedoc/docx-editor-schema';
|
|
67
|
+
import { IRow } from '@vervedoc/docx-editor-schema';
|
|
68
|
+
import { IRowElement } from '@vervedoc/docx-editor-schema';
|
|
69
|
+
import { ISearchResult } from '@vervedoc/docx-editor-schema';
|
|
70
|
+
import { ISetAreaPropertiesOption } from '@vervedoc/docx-editor-schema';
|
|
71
|
+
import { ISetControlExtensionOption } from '@vervedoc/docx-editor-schema';
|
|
72
|
+
import { ISetControlProperties } from '@vervedoc/docx-editor-schema';
|
|
73
|
+
import { ISetControlRowFlexOption } from '@vervedoc/docx-editor-schema';
|
|
74
|
+
import { ISetControlValueOption } from '@vervedoc/docx-editor-schema';
|
|
75
|
+
import { ISetSurroundPositionPayload } from '@vervedoc/docx-editor-schema';
|
|
76
|
+
import { ISetValueOption } from '@vervedoc/docx-editor-schema';
|
|
77
|
+
import { ISpliceElementListOption } from '@vervedoc/docx-editor-schema';
|
|
78
|
+
import { ITd } from '@vervedoc/docx-editor-schema';
|
|
79
|
+
import { ITextMetrics } from '@vervedoc/docx-editor-schema';
|
|
80
|
+
import { ITr } from '@vervedoc/docx-editor-schema';
|
|
81
|
+
import { Listener } from '@vervedoc/docx-editor-state';
|
|
82
|
+
import { ListStyle } from '@vervedoc/docx-editor-schema';
|
|
83
|
+
import { ListType } from '@vervedoc/docx-editor-schema';
|
|
84
|
+
import { MoveDirection } from '@vervedoc/docx-editor-schema';
|
|
85
|
+
import { NumberType } from '@vervedoc/docx-editor-schema';
|
|
86
|
+
import { PageMode } from '@vervedoc/docx-editor-schema';
|
|
87
|
+
import { PaperDirection } from '@vervedoc/docx-editor-schema';
|
|
88
|
+
import { PluginFunction } from '@vervedoc/docx-editor-schema';
|
|
89
|
+
import { RangeManager } from '@vervedoc/docx-editor-state';
|
|
90
|
+
import { TableBorder } from '@vervedoc/docx-editor-schema';
|
|
91
|
+
import { TdBorder } from '@vervedoc/docx-editor-schema';
|
|
92
|
+
import { TdSlash } from '@vervedoc/docx-editor-schema';
|
|
93
|
+
import { TextDecorationStyle } from '@vervedoc/docx-editor-schema';
|
|
94
|
+
import { VerticalAlign } from '@vervedoc/docx-editor-schema';
|
|
95
|
+
|
|
96
|
+
export declare abstract class AbstractRichText {
|
|
97
|
+
protected fillRect: IElementFillRect;
|
|
98
|
+
protected fillColor?: string;
|
|
99
|
+
protected fillDecorationStyle?: TextDecorationStyle;
|
|
100
|
+
constructor();
|
|
101
|
+
clearFillInfo(): IElementFillRect;
|
|
102
|
+
recordFillInfo(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height?: number, color?: string, decorationStyle?: TextDecorationStyle): void;
|
|
103
|
+
abstract render(ctx: CanvasRenderingContext2D): void;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export declare class Actuator {
|
|
107
|
+
constructor(..._: any[]);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export declare class Area {
|
|
111
|
+
private draw;
|
|
112
|
+
private zone;
|
|
113
|
+
private range;
|
|
114
|
+
private position;
|
|
115
|
+
private areaInfoMap;
|
|
116
|
+
constructor(draw: Draw);
|
|
117
|
+
getAreaInfo(): Map<string, IAreaInfo>;
|
|
118
|
+
getActiveAreaId(): string | null;
|
|
119
|
+
getActiveAreaInfo(): IAreaInfo | null;
|
|
120
|
+
isReadonly(): boolean;
|
|
121
|
+
insertArea(payload: IInsertAreaOption): string | null;
|
|
122
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
123
|
+
compute(): void;
|
|
124
|
+
getAreaValue(options?: IGetAreaValueOption): IGetAreaValueResult | null;
|
|
125
|
+
getContextByAreaId(areaId: string, options?: ILocationAreaOption): {
|
|
126
|
+
range: IRange;
|
|
127
|
+
elementPosition: IElementPosition;
|
|
128
|
+
} | null;
|
|
129
|
+
setAreaProperties(payload: ISetAreaPropertiesOption): void;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export declare class Background {
|
|
133
|
+
private draw;
|
|
134
|
+
private options;
|
|
135
|
+
private imageCache;
|
|
136
|
+
constructor(draw: Draw);
|
|
137
|
+
private _renderBackgroundColor;
|
|
138
|
+
private _drawImage;
|
|
139
|
+
private _renderBackgroundImage;
|
|
140
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export declare class Badge {
|
|
144
|
+
private draw;
|
|
145
|
+
private options;
|
|
146
|
+
private imageCache;
|
|
147
|
+
private mainBadge;
|
|
148
|
+
private areaBadgeMap;
|
|
149
|
+
constructor(draw: Draw);
|
|
150
|
+
setMainBadge(payload: IBadge | null): void;
|
|
151
|
+
setAreaBadgeMap(payload: IAreaBadge[]): void;
|
|
152
|
+
private _drawImage;
|
|
153
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export declare class BlockParticle {
|
|
157
|
+
constructor(..._: any[]);
|
|
158
|
+
render(..._: any[]): void;
|
|
159
|
+
clear(..._: any[]): void;
|
|
160
|
+
destroy(..._: any[]): void;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export declare class CanvasEvent {
|
|
164
|
+
isAllowSelection: boolean;
|
|
165
|
+
isComposing: boolean;
|
|
166
|
+
compositionInfo: ICompositionInfo | null;
|
|
167
|
+
isAllowDrag: boolean;
|
|
168
|
+
isAllowDrop: boolean;
|
|
169
|
+
cacheRange: IRange | null;
|
|
170
|
+
cacheElementList: IElement[] | null;
|
|
171
|
+
cachePositionList: IElementPosition[] | null;
|
|
172
|
+
cachePositionContext: IPositionContext | null;
|
|
173
|
+
mouseDownStartPosition: ICurrentPosition | null;
|
|
174
|
+
private draw;
|
|
175
|
+
private pageContainer;
|
|
176
|
+
private pageList;
|
|
177
|
+
private range;
|
|
178
|
+
private position;
|
|
179
|
+
private _clickHandler;
|
|
180
|
+
private _mousedownHandler;
|
|
181
|
+
private _mouseupHandler;
|
|
182
|
+
private _mouseleaveHandler;
|
|
183
|
+
private _mousemoveHandler;
|
|
184
|
+
private _dblclickHandler;
|
|
185
|
+
private _dragoverHandler;
|
|
186
|
+
private _dropHandler;
|
|
187
|
+
private _contextmenuHandler;
|
|
188
|
+
private _threeClickCleanup;
|
|
189
|
+
constructor(draw: Draw);
|
|
190
|
+
getDraw(): Draw;
|
|
191
|
+
register(): void;
|
|
192
|
+
removeEvent(): void;
|
|
193
|
+
setIsAllowSelection(payload: boolean): void;
|
|
194
|
+
setIsAllowDrag(payload: boolean): void;
|
|
195
|
+
clearPainterStyle(): void;
|
|
196
|
+
applyPainterStyle(): void;
|
|
197
|
+
selectAll(): void;
|
|
198
|
+
mousemove(evt: MouseEvent): void;
|
|
199
|
+
mousedown(evt: MouseEvent): void;
|
|
200
|
+
click(): void;
|
|
201
|
+
mouseup(evt: MouseEvent): void;
|
|
202
|
+
mouseleave(evt: MouseEvent): void;
|
|
203
|
+
keydown(evt: KeyboardEvent): void;
|
|
204
|
+
dblclick(evt: MouseEvent): void;
|
|
205
|
+
handleTripleClick(): void;
|
|
206
|
+
input(data: string): void;
|
|
207
|
+
cut(): void;
|
|
208
|
+
copy(options?: ICopyOption): void;
|
|
209
|
+
compositionstart(): void;
|
|
210
|
+
compositionend(evt: CompositionEvent): void;
|
|
211
|
+
drop(evt: DragEvent): void;
|
|
212
|
+
dragover(evt: DragEvent | MouseEvent): void;
|
|
213
|
+
private _contextmenu;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export declare class CheckboxControl implements IControlInstance {
|
|
217
|
+
protected element: IElement;
|
|
218
|
+
protected control: Control;
|
|
219
|
+
constructor(element: IElement, control: Control);
|
|
220
|
+
setElement(element: IElement): void;
|
|
221
|
+
getElement(): IElement;
|
|
222
|
+
getCode(): string | null;
|
|
223
|
+
getValue(): IElement[];
|
|
224
|
+
setValue(): number;
|
|
225
|
+
setSelect(codes: string[], context?: IControlContext, options?: IControlRuleOption): void;
|
|
226
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
227
|
+
cut(): number;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare class CheckboxParticle {
|
|
231
|
+
private draw;
|
|
232
|
+
private options;
|
|
233
|
+
constructor(draw: Draw);
|
|
234
|
+
setSelect(element: IElement): void;
|
|
235
|
+
render(payload: ICheckboxRenderOption): void;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export declare class Control {
|
|
239
|
+
private controlBorder;
|
|
240
|
+
private draw;
|
|
241
|
+
private range;
|
|
242
|
+
private listener;
|
|
243
|
+
private eventBus;
|
|
244
|
+
private controlSearch;
|
|
245
|
+
private options;
|
|
246
|
+
private controlOptions;
|
|
247
|
+
private activeControl;
|
|
248
|
+
private activeControlValue;
|
|
249
|
+
private preElement;
|
|
250
|
+
constructor(draw: Draw);
|
|
251
|
+
setHighlightList(payload: IControlHighlight[]): void;
|
|
252
|
+
computeHighlightList(): void;
|
|
253
|
+
renderHighlightList(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
254
|
+
getDraw(): Draw;
|
|
255
|
+
filterAssistElement(elementList: IElement[]): IElement[];
|
|
256
|
+
getIsRangeCanCaptureEvent(): boolean;
|
|
257
|
+
getIsRangeInPostfix(): boolean;
|
|
258
|
+
getIsRangeWithinControl(): boolean;
|
|
259
|
+
getIsElementListContainFullControl(elementList: IElement[]): boolean;
|
|
260
|
+
getIsDisabledControl(context?: IControlContext): boolean;
|
|
261
|
+
getIsDisabledPasteControl(context?: IControlContext): boolean;
|
|
262
|
+
getIsExistValueByElementListIndex(elementList: IElement[], index: number): boolean;
|
|
263
|
+
getControlHighlight(elementList: IElement[], index: number): string;
|
|
264
|
+
getContainer(): HTMLDivElement;
|
|
265
|
+
getElementList(): IElement[];
|
|
266
|
+
getPosition(): IElementPosition | null;
|
|
267
|
+
getPreY(): number;
|
|
268
|
+
getRange(): IRange;
|
|
269
|
+
shrinkBoundary(context?: IControlContext): void;
|
|
270
|
+
getActiveControl(): IControlInstance | null;
|
|
271
|
+
getControlElementList(context?: IControlContext): IElement[];
|
|
272
|
+
updateActiveControlValue(): void;
|
|
273
|
+
emitControlChange(state: ControlState): void;
|
|
274
|
+
initControl(): void;
|
|
275
|
+
destroyControl(options?: IDestroyControlOption): void;
|
|
276
|
+
repaintControl(options?: IRepaintControlOption): void;
|
|
277
|
+
emitControlContentChange(options?: IControlChangeOption): void;
|
|
278
|
+
reAwakeControl(): void;
|
|
279
|
+
moveCursor(position: IControlInitOption): IMoveCursorResult;
|
|
280
|
+
removeControl(startIndex: number, context?: IControlContext): number | null;
|
|
281
|
+
removePlaceholder(startIndex: number, context?: IControlContext): void;
|
|
282
|
+
addPlaceholder(startIndex: number, context?: IControlContext): void;
|
|
283
|
+
setValue(data: IElement[]): number;
|
|
284
|
+
setControlProperties(properties: Partial<IControl>, context?: IControlContext): void;
|
|
285
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
286
|
+
cut(): number;
|
|
287
|
+
getValueById(payload: IGetControlValueOption): IGetControlValueResult;
|
|
288
|
+
setValueListById(payload: ISetControlValueOption[]): void;
|
|
289
|
+
setExtensionListById(payload: ISetControlExtensionOption[]): void;
|
|
290
|
+
setPropertiesListById(payload: ISetControlProperties[]): void;
|
|
291
|
+
getList(): IElement[];
|
|
292
|
+
recordBorderInfo(x: number, y: number, width: number, height: number): void;
|
|
293
|
+
drawBorder(ctx: CanvasRenderingContext2D): void;
|
|
294
|
+
getPreControlContext(): INextControlContext | null;
|
|
295
|
+
getNextControlContext(): INextControlContext | null;
|
|
296
|
+
initNextControl(option?: IInitNextControlOption): void;
|
|
297
|
+
setMinWidthControlInfo(option: ISetControlRowFlexOption): void;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export declare class ControlBorder {
|
|
301
|
+
protected borderRect: IElementFillRect;
|
|
302
|
+
private options;
|
|
303
|
+
constructor(draw: Draw);
|
|
304
|
+
clearBorderInfo(): IElementFillRect;
|
|
305
|
+
recordBorderInfo(x: number, y: number, width: number, height: number): void;
|
|
306
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export declare class ControlSearch {
|
|
310
|
+
private draw;
|
|
311
|
+
private control;
|
|
312
|
+
private options;
|
|
313
|
+
private highlightList;
|
|
314
|
+
private highlightMatchResult;
|
|
315
|
+
constructor(control: Control);
|
|
316
|
+
getControlHighlight(elementList: IElement[], index: number): string;
|
|
317
|
+
getHighlightMatchResult(): IHighlightMatchResult;
|
|
318
|
+
getHighlightList(): IControlHighlight[];
|
|
319
|
+
setHighlightList(payload: IControlHighlight[]): void;
|
|
320
|
+
computeHighlightList(): void;
|
|
321
|
+
renderHighlightList(ctx: CanvasRenderingContext2D, pageIndex: number): void;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
declare class Cursor {
|
|
325
|
+
private readonly ANIMATION_CLASS;
|
|
326
|
+
private draw;
|
|
327
|
+
private container;
|
|
328
|
+
private options;
|
|
329
|
+
private position;
|
|
330
|
+
private cursorDom;
|
|
331
|
+
private cursorAgent;
|
|
332
|
+
private blinkTimeout;
|
|
333
|
+
private hitLineStartIndex;
|
|
334
|
+
constructor(draw: Draw, canvasEvent: CanvasEvent);
|
|
335
|
+
getCursorDom(): HTMLDivElement;
|
|
336
|
+
getAgentDom(): HTMLTextAreaElement;
|
|
337
|
+
getAgentIsActive(): boolean;
|
|
338
|
+
getAgentDomValue(): string;
|
|
339
|
+
clearAgentDomValue(): void;
|
|
340
|
+
getHitLineStartIndex(): number | undefined;
|
|
341
|
+
private _blinkStart;
|
|
342
|
+
private _blinkStop;
|
|
343
|
+
private _setBlinkTimeout;
|
|
344
|
+
private _clearBlinkTimeout;
|
|
345
|
+
focus(): void;
|
|
346
|
+
drawCursor(payload?: IDrawCursorOption): void;
|
|
347
|
+
recoveryCursor(): void;
|
|
348
|
+
moveCursorToVisible(payload: IMoveCursorToVisibleOption): void;
|
|
349
|
+
}
|
|
350
|
+
export { Cursor }
|
|
351
|
+
export { Cursor as TextCursor }
|
|
352
|
+
|
|
353
|
+
export declare class CursorAgent {
|
|
354
|
+
private draw;
|
|
355
|
+
private container;
|
|
356
|
+
private agentCursorDom;
|
|
357
|
+
private canvasEvent;
|
|
358
|
+
private eventBus;
|
|
359
|
+
constructor(draw: Draw, canvasEvent: CanvasEvent);
|
|
360
|
+
getAgentCursorDom(): HTMLTextAreaElement;
|
|
361
|
+
private _keyDown;
|
|
362
|
+
private _input;
|
|
363
|
+
private _paste;
|
|
364
|
+
private _compositionstart;
|
|
365
|
+
private _compositionend;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export declare class DateControl implements IControlInstance {
|
|
369
|
+
private draw;
|
|
370
|
+
private element;
|
|
371
|
+
private control;
|
|
372
|
+
private isPopup;
|
|
373
|
+
private datePicker;
|
|
374
|
+
private options;
|
|
375
|
+
constructor(element: IElement, control: Control);
|
|
376
|
+
setElement(element: IElement): void;
|
|
377
|
+
getElement(): IElement;
|
|
378
|
+
getIsPopup(): boolean;
|
|
379
|
+
getValueRange(context?: IControlContext): [number, number] | null;
|
|
380
|
+
getValue(context?: IControlContext): IElement[];
|
|
381
|
+
setValue(data: IElement[], context?: IControlContext, options?: IControlRuleOption): number;
|
|
382
|
+
clearSelect(context?: IControlContext, options?: IControlRuleOption): number;
|
|
383
|
+
setSelect(date: string, context?: IControlContext, options?: IControlRuleOption): void;
|
|
384
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
385
|
+
cut(): number;
|
|
386
|
+
awake(): void;
|
|
387
|
+
destroy(): void;
|
|
388
|
+
private _setDate;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export declare class DateParticle {
|
|
392
|
+
constructor(..._: any[]);
|
|
393
|
+
render(..._: any[]): void;
|
|
394
|
+
renderDatePicker(..._: any[]): void;
|
|
395
|
+
clearDatePicker(..._: any[]): void;
|
|
396
|
+
destroy(..._: any[]): void;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export declare class DatePicker {
|
|
400
|
+
constructor(..._: any[]);
|
|
401
|
+
render(..._: any[]): void;
|
|
402
|
+
destroy(..._: any[]): void;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
declare class Draw {
|
|
406
|
+
private container;
|
|
407
|
+
private pageContainer;
|
|
408
|
+
private pageList;
|
|
409
|
+
private ctxList;
|
|
410
|
+
private pageNo;
|
|
411
|
+
private renderCount;
|
|
412
|
+
private pagePixelRatio;
|
|
413
|
+
private mode;
|
|
414
|
+
private options;
|
|
415
|
+
private position;
|
|
416
|
+
private zone;
|
|
417
|
+
private elementList;
|
|
418
|
+
private listener;
|
|
419
|
+
private eventBus;
|
|
420
|
+
private override;
|
|
421
|
+
private i18n;
|
|
422
|
+
private canvasEvent;
|
|
423
|
+
private globalEvent;
|
|
424
|
+
private cursor;
|
|
425
|
+
private range;
|
|
426
|
+
private margin;
|
|
427
|
+
private background;
|
|
428
|
+
private badge;
|
|
429
|
+
private search;
|
|
430
|
+
private group;
|
|
431
|
+
private area;
|
|
432
|
+
private underline;
|
|
433
|
+
private strikeout;
|
|
434
|
+
private highlight;
|
|
435
|
+
private paragraphColor;
|
|
436
|
+
private historyManager;
|
|
437
|
+
private previewer;
|
|
438
|
+
private imageParticle;
|
|
439
|
+
private laTexParticle;
|
|
440
|
+
private textParticle;
|
|
441
|
+
private tableParticle;
|
|
442
|
+
private tableTool;
|
|
443
|
+
private tableOperate;
|
|
444
|
+
private pageNumber;
|
|
445
|
+
private lineNumber;
|
|
446
|
+
private waterMark;
|
|
447
|
+
private placeholder;
|
|
448
|
+
private header;
|
|
449
|
+
private footer;
|
|
450
|
+
private hyperlinkParticle;
|
|
451
|
+
private dateParticle;
|
|
452
|
+
private separatorParticle;
|
|
453
|
+
private pageBreakParticle;
|
|
454
|
+
private superscriptParticle;
|
|
455
|
+
private subscriptParticle;
|
|
456
|
+
private checkboxParticle;
|
|
457
|
+
private radioParticle;
|
|
458
|
+
private blockParticle;
|
|
459
|
+
private listParticle;
|
|
460
|
+
private lineBreakParticle;
|
|
461
|
+
private control;
|
|
462
|
+
private pageBorder;
|
|
463
|
+
private revisionOverlay;
|
|
464
|
+
private commentOverlay;
|
|
465
|
+
private workerManager;
|
|
466
|
+
private scrollObserver;
|
|
467
|
+
private selectionObserver;
|
|
468
|
+
private imageObserver;
|
|
469
|
+
private mouseObserver;
|
|
470
|
+
private LETTER_REG;
|
|
471
|
+
private WORD_LIKE_REG;
|
|
472
|
+
private rowList;
|
|
473
|
+
private pageRowList;
|
|
474
|
+
private painterStyle;
|
|
475
|
+
private painterOptions;
|
|
476
|
+
private visiblePageNoList;
|
|
477
|
+
private intersectionPageNo;
|
|
478
|
+
private lazyRenderIntersectionObserver;
|
|
479
|
+
private printModeData;
|
|
480
|
+
private _register;
|
|
481
|
+
private readonly HEADER_DEFAULT_SIZE;
|
|
482
|
+
constructor(rootContainer: HTMLElement, options: DeepRequired<IEditorOption>, data: IEditorData, listener: Listener, eventBus: EventBus<EventBusMap>, override: Override);
|
|
483
|
+
setPrintData(): void;
|
|
484
|
+
clearPrintData(): void;
|
|
485
|
+
getLetterReg(): RegExp;
|
|
486
|
+
getMode(): EditorMode;
|
|
487
|
+
setRegister(register: any): void;
|
|
488
|
+
getRegister(): any | null;
|
|
489
|
+
setMode(payload: EditorMode): void;
|
|
490
|
+
isReadonly(): boolean;
|
|
491
|
+
isDisabled(): boolean;
|
|
492
|
+
isDesignMode(): boolean;
|
|
493
|
+
isPrintMode(): boolean;
|
|
494
|
+
getOriginalWidth(): number;
|
|
495
|
+
getOriginalHeight(): number;
|
|
496
|
+
getWidth(): number;
|
|
497
|
+
getHeight(): number;
|
|
498
|
+
getMainHeight(): number;
|
|
499
|
+
getMainOuterHeight(): number;
|
|
500
|
+
getCanvasWidth(pageNo?: number): number;
|
|
501
|
+
getCanvasHeight(pageNo?: number): number;
|
|
502
|
+
getInnerWidth(): number;
|
|
503
|
+
getOriginalInnerWidth(): number;
|
|
504
|
+
getContextInnerWidth(): number;
|
|
505
|
+
getMargins(): IMargin;
|
|
506
|
+
getOriginalMargins(): number[];
|
|
507
|
+
getPageGap(): number;
|
|
508
|
+
getOriginalPageGap(): number;
|
|
509
|
+
getPageNumberBottom(): number;
|
|
510
|
+
getMarginIndicatorSize(): number;
|
|
511
|
+
getDefaultBasicRowMarginHeight(): number;
|
|
512
|
+
getHighlightMarginHeight(): number;
|
|
513
|
+
getTdPadding(): IPadding;
|
|
514
|
+
getContainer(): HTMLDivElement;
|
|
515
|
+
getPageContainer(): HTMLDivElement;
|
|
516
|
+
getVisiblePageNoList(): number[];
|
|
517
|
+
setVisiblePageNoList(payload: number[]): void;
|
|
518
|
+
getIntersectionPageNo(): number;
|
|
519
|
+
setIntersectionPageNo(payload: number): void;
|
|
520
|
+
getPageNo(): number;
|
|
521
|
+
setPageNo(payload: number): void;
|
|
522
|
+
getRenderCount(): number;
|
|
523
|
+
getPage(pageNo?: number): HTMLCanvasElement;
|
|
524
|
+
getPageList(): HTMLCanvasElement[];
|
|
525
|
+
getPageCount(): number;
|
|
526
|
+
getTableRowList(sourceElementList: IElement[]): IRow[];
|
|
527
|
+
getOriginalRowList(): IRow[];
|
|
528
|
+
getRowList(): IRow[];
|
|
529
|
+
getPageRowList(): IRow[][];
|
|
530
|
+
getCtx(): CanvasRenderingContext2D;
|
|
531
|
+
getOptions(): DeepRequired<IEditorOption>;
|
|
532
|
+
getSearch(): Search;
|
|
533
|
+
getGroup(): Group;
|
|
534
|
+
getArea(): Area;
|
|
535
|
+
getBadge(): Badge;
|
|
536
|
+
getHistoryManager(): HistoryManager;
|
|
537
|
+
setHistoryManager(historyManager: HistoryManager): void;
|
|
538
|
+
getPosition(): Position;
|
|
539
|
+
getZone(): Zone;
|
|
540
|
+
getRange(): RangeManager;
|
|
541
|
+
getLineBreakParticle(): LineBreakParticle;
|
|
542
|
+
getTextParticle(): TextParticle;
|
|
543
|
+
getHeaderElementList(): IElement[];
|
|
544
|
+
getTableElementList(sourceElementList: IElement[]): IElement[];
|
|
545
|
+
getElementList(): IElement[];
|
|
546
|
+
getMainElementList(): IElement[];
|
|
547
|
+
getOriginalElementList(): IElement[];
|
|
548
|
+
getOriginalMainElementList(): IElement[];
|
|
549
|
+
getFooterElementList(): IElement[];
|
|
550
|
+
getTd(): ITd | null;
|
|
551
|
+
insertElementList(payload: IElement[], options?: IInsertElementListOption): void;
|
|
552
|
+
appendElementList(elementList: IElement[], options?: IAppendElementListOption): void;
|
|
553
|
+
spliceElementList(elementList: IElement[], start: number, deleteCount: number, items?: IElement[], options?: ISpliceElementListOption): void;
|
|
554
|
+
getCanvasEvent(): CanvasEvent;
|
|
555
|
+
getGlobalEvent(): GlobalEvent;
|
|
556
|
+
getListener(): Listener;
|
|
557
|
+
getEventBus(): EventBus<EventBusMap>;
|
|
558
|
+
getOverride(): Override;
|
|
559
|
+
initRevisionOverlay(_callbacks?: {
|
|
560
|
+
onAccept?: (id: string) => void;
|
|
561
|
+
onReject?: (id: string) => void;
|
|
562
|
+
}): void;
|
|
563
|
+
setRevisionOverlay(overlay: any): void;
|
|
564
|
+
setCommentOverlay(overlay: any): void;
|
|
565
|
+
destroyRevisionOverlay(): void;
|
|
566
|
+
getRevisionOverlay(): any | null;
|
|
567
|
+
getCursor(): Cursor;
|
|
568
|
+
getPreviewer(): Previewer;
|
|
569
|
+
getImageParticle(): ImageParticle;
|
|
570
|
+
getLaTexParticle(): LaTexParticle;
|
|
571
|
+
setLaTexParticle(laTexParticle: LaTexParticle): void;
|
|
572
|
+
getBlockParticle(): BlockParticle;
|
|
573
|
+
setBlockParticle(blockParticle: BlockParticle): void;
|
|
574
|
+
getTableTool(): TableTool;
|
|
575
|
+
getTableOperate(): TableOperate;
|
|
576
|
+
getTableParticle(): TableParticle;
|
|
577
|
+
getHeader(): Header;
|
|
578
|
+
getFooter(): Footer;
|
|
579
|
+
getHyperlinkParticle(): HyperlinkParticle;
|
|
580
|
+
getDateParticle(): DateParticle;
|
|
581
|
+
setDateParticle(dateParticle: DateParticle): void;
|
|
582
|
+
getListParticle(): ListParticle;
|
|
583
|
+
getCheckboxParticle(): CheckboxParticle;
|
|
584
|
+
getRadioParticle(): RadioParticle;
|
|
585
|
+
getControl(): Control;
|
|
586
|
+
setControl(control: Control): void;
|
|
587
|
+
getWorkerManager(): WorkerManager;
|
|
588
|
+
setWorkerManager(workerManager: WorkerManager): void;
|
|
589
|
+
getImageObserver(): ImageObserver;
|
|
590
|
+
getI18n(): I18n;
|
|
591
|
+
getRowCount(): number;
|
|
592
|
+
getDataURL(payload?: IGetImageOption): Promise<string[]>;
|
|
593
|
+
getPainterStyle(): IElementStyle | null;
|
|
594
|
+
getPainterOptions(): IPainterOption | null;
|
|
595
|
+
setPainterStyle(payload: IElementStyle | null, options?: IPainterOption): void;
|
|
596
|
+
setDefaultRange(): void;
|
|
597
|
+
getIsPagingMode(): boolean;
|
|
598
|
+
setPageMode(payload: PageMode): void;
|
|
599
|
+
setPageScale(payload: number): void;
|
|
600
|
+
getPagePixelRatio(): number;
|
|
601
|
+
setPagePixelRatio(payload: number | null): void;
|
|
602
|
+
setPageDevicePixel(): void;
|
|
603
|
+
setPaperSize(width: number, height: number): void;
|
|
604
|
+
setPaperDirection(payload: PaperDirection): void;
|
|
605
|
+
setPaperMargin(payload: IMargin): void;
|
|
606
|
+
getOriginValue(options?: IGetOriginValueOption): Required<IEditorData>;
|
|
607
|
+
getValue(options?: IGetValueOption): IEditorResult;
|
|
608
|
+
setValue(payload: Partial<IEditorData>, options?: ISetValueOption): void;
|
|
609
|
+
setEditorData(payload: Partial<IEditorData>): void;
|
|
610
|
+
private _normalizeHeaderElementList;
|
|
611
|
+
private _wrapContainer;
|
|
612
|
+
private _formatContainer;
|
|
613
|
+
private _createPageContainer;
|
|
614
|
+
private _createPage;
|
|
615
|
+
private _initPageContext;
|
|
616
|
+
getElementFont(el: IElement, scale?: number): string;
|
|
617
|
+
getElementSize(el: IElement): number;
|
|
618
|
+
getElementRowMargin(el: IElement): number;
|
|
619
|
+
private isPageBreakElement;
|
|
620
|
+
private shouldForceWrapRow;
|
|
621
|
+
private normalizeSpecialRow;
|
|
622
|
+
private shouldDrawLineBreakForRow;
|
|
623
|
+
computeRowList(payload: IComputeRowListPayload): IRow[];
|
|
624
|
+
private _computePageList;
|
|
625
|
+
private _drawParagraphColor;
|
|
626
|
+
private _drawHighlight;
|
|
627
|
+
drawRow(ctx: CanvasRenderingContext2D, payload: IDrawRowPayload): void;
|
|
628
|
+
private _drawFloat;
|
|
629
|
+
private _clearPage;
|
|
630
|
+
private _drawPage;
|
|
631
|
+
private _disconnectLazyRender;
|
|
632
|
+
private _renderVisiblePages;
|
|
633
|
+
private _lazyRender;
|
|
634
|
+
private _immediateRender;
|
|
635
|
+
render(payload?: IDrawOption): void;
|
|
636
|
+
setCursor(curIndex: number | undefined): number | undefined;
|
|
637
|
+
submitHistory(curIndex: number | undefined): void;
|
|
638
|
+
destroy(): void;
|
|
639
|
+
clearSideEffect(): void;
|
|
640
|
+
}
|
|
641
|
+
export { Draw as DocumentRenderer }
|
|
642
|
+
export { Draw }
|
|
643
|
+
|
|
644
|
+
export declare type Editor = any;
|
|
645
|
+
|
|
646
|
+
export declare class FloatingBar {
|
|
647
|
+
private draw;
|
|
648
|
+
private command;
|
|
649
|
+
private range;
|
|
650
|
+
private options;
|
|
651
|
+
private container;
|
|
652
|
+
private textToolbar;
|
|
653
|
+
private imageToolbar;
|
|
654
|
+
private lastMousePosition;
|
|
655
|
+
private currentImageElement;
|
|
656
|
+
constructor(draw: Draw, command: Command);
|
|
657
|
+
private _createToolbars;
|
|
658
|
+
private _bindToolbarEvents;
|
|
659
|
+
private _createFontOptionsHtml;
|
|
660
|
+
private _createSizeOptionsHtml;
|
|
661
|
+
private _resolveFontValue;
|
|
662
|
+
private _resolveSizeValue;
|
|
663
|
+
private _executeTextAction;
|
|
664
|
+
private _executeImageAction;
|
|
665
|
+
private _rotateImage;
|
|
666
|
+
private _replaceImage;
|
|
667
|
+
private _updateImageToolbarState;
|
|
668
|
+
private _addEvents;
|
|
669
|
+
private _handleMouseUp;
|
|
670
|
+
private _handleClickOutside;
|
|
671
|
+
private _handleContextMenu;
|
|
672
|
+
private _getContext;
|
|
673
|
+
private _showTextToolbar;
|
|
674
|
+
private _hideTextToolbar;
|
|
675
|
+
private _showImageToolbar;
|
|
676
|
+
private _hideImageToolbar;
|
|
677
|
+
private _positionToolbar;
|
|
678
|
+
removeEvent(): void;
|
|
679
|
+
dispose(): void;
|
|
680
|
+
destroy(): void;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export declare class Footer {
|
|
684
|
+
private draw;
|
|
685
|
+
private position;
|
|
686
|
+
private zone;
|
|
687
|
+
private options;
|
|
688
|
+
private elementList;
|
|
689
|
+
private rowList;
|
|
690
|
+
private positionList;
|
|
691
|
+
constructor(draw: Draw, data?: IElement[]);
|
|
692
|
+
getRowList(): IRow[];
|
|
693
|
+
setElementList(elementList: IElement[]): void;
|
|
694
|
+
getElementList(): IElement[];
|
|
695
|
+
getPositionList(): IElementPosition[];
|
|
696
|
+
compute(): void;
|
|
697
|
+
recovery(): void;
|
|
698
|
+
private _computeRowList;
|
|
699
|
+
private _computePositionList;
|
|
700
|
+
getFooterBottom(): number;
|
|
701
|
+
getMaxHeight(): number;
|
|
702
|
+
getHeight(): number;
|
|
703
|
+
getRowHeight(): number;
|
|
704
|
+
getExtraHeight(): number;
|
|
705
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export declare function getClipboardData(): IClipboardData | null;
|
|
709
|
+
|
|
710
|
+
export declare function getIsClipboardContainFile(clipboardData: DataTransfer): boolean;
|
|
711
|
+
|
|
712
|
+
export declare class GlobalEvent {
|
|
713
|
+
private draw;
|
|
714
|
+
private options;
|
|
715
|
+
private cursor;
|
|
716
|
+
private canvasEvent;
|
|
717
|
+
private range;
|
|
718
|
+
private previewer;
|
|
719
|
+
private tableTool;
|
|
720
|
+
private hyperlinkParticle;
|
|
721
|
+
private control;
|
|
722
|
+
private dateParticle;
|
|
723
|
+
private imageParticle;
|
|
724
|
+
private dprMediaQueryList;
|
|
725
|
+
constructor(draw: Draw, canvasEvent: CanvasEvent);
|
|
726
|
+
register(): void;
|
|
727
|
+
private addEvent;
|
|
728
|
+
removeEvent(): void;
|
|
729
|
+
clearSideEffect: (evt: Event) => void;
|
|
730
|
+
setCanvasEventAbility: () => void;
|
|
731
|
+
watchCursorActive(): void;
|
|
732
|
+
setPageScale: (evt: WheelEvent) => void;
|
|
733
|
+
private _handleVisibilityChange;
|
|
734
|
+
private _handleDprChange;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
export declare class Group {
|
|
738
|
+
private draw;
|
|
739
|
+
private options;
|
|
740
|
+
private range;
|
|
741
|
+
private fillRectMap;
|
|
742
|
+
private groupIndexMap;
|
|
743
|
+
constructor(draw: Draw);
|
|
744
|
+
setGroup(): string | null;
|
|
745
|
+
getElementListByGroupId(elementList: IElement[], groupId: string): IElement[];
|
|
746
|
+
deleteGroup(groupId: string): void;
|
|
747
|
+
getContextByGroupId(elementList: IElement[], groupId: string): (IRange & IPositionContext) | null;
|
|
748
|
+
clearFillInfo(): void;
|
|
749
|
+
recordFillInfo(element: IElement, x: number, y: number, width: number, height: number): void;
|
|
750
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
751
|
+
getCommentIndex(groupId: string): number;
|
|
752
|
+
getAllGroupIds(): string[];
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
export declare class Header {
|
|
756
|
+
private draw;
|
|
757
|
+
private position;
|
|
758
|
+
private zone;
|
|
759
|
+
private options;
|
|
760
|
+
private elementList;
|
|
761
|
+
private rowList;
|
|
762
|
+
private positionList;
|
|
763
|
+
constructor(draw: Draw, data?: IElement[]);
|
|
764
|
+
getRowList(): IRow[];
|
|
765
|
+
setElementList(elementList: IElement[]): void;
|
|
766
|
+
getElementList(): IElement[];
|
|
767
|
+
getPositionList(): IElementPosition[];
|
|
768
|
+
compute(): void;
|
|
769
|
+
recovery(): void;
|
|
770
|
+
private _computeRowList;
|
|
771
|
+
private _computePositionList;
|
|
772
|
+
getHeaderTop(): number;
|
|
773
|
+
getMaxHeight(): number;
|
|
774
|
+
getHeight(): number;
|
|
775
|
+
getRowHeight(): number;
|
|
776
|
+
getExtraHeight(): number;
|
|
777
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
declare class Highlight_2 extends AbstractRichText {
|
|
781
|
+
private options;
|
|
782
|
+
constructor(draw: Draw);
|
|
783
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
784
|
+
}
|
|
785
|
+
export { Highlight_2 as Highlight }
|
|
786
|
+
|
|
787
|
+
export declare class HistoryManager {
|
|
788
|
+
constructor(..._: any[]);
|
|
789
|
+
undo(..._: any[]): void;
|
|
790
|
+
redo(..._: any[]): void;
|
|
791
|
+
recovery(..._: any[]): void;
|
|
792
|
+
clear(..._: any[]): void;
|
|
793
|
+
popUndo(..._: any[]): any;
|
|
794
|
+
isStackEmpty(..._: any[]): boolean;
|
|
795
|
+
isCanUndo(..._: any[]): boolean;
|
|
796
|
+
isCanRedo(..._: any[]): boolean;
|
|
797
|
+
execute(..._: any[]): void;
|
|
798
|
+
destroy(..._: any[]): void;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
export declare class HyperlinkParticle {
|
|
802
|
+
private draw;
|
|
803
|
+
private options;
|
|
804
|
+
private container;
|
|
805
|
+
private hyperlinkPopupContainer;
|
|
806
|
+
private hyperlinkDom;
|
|
807
|
+
constructor(draw: Draw);
|
|
808
|
+
private _createHyperlinkPopupDom;
|
|
809
|
+
private _isSafeUrl;
|
|
810
|
+
drawHyperlinkPopup(element: IElement, position: IElementPosition): void;
|
|
811
|
+
clearHyperlinkPopup(): void;
|
|
812
|
+
openHyperlink(element: IElement): void;
|
|
813
|
+
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export declare class I18n {
|
|
817
|
+
constructor(..._: any[]);
|
|
818
|
+
t(key: string, ..._args: any[]): string;
|
|
819
|
+
registerLangMap(..._: any[]): void;
|
|
820
|
+
destroy(..._: any[]): void;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
declare interface ICheckboxRenderOption {
|
|
824
|
+
ctx: CanvasRenderingContext2D;
|
|
825
|
+
x: number;
|
|
826
|
+
y: number;
|
|
827
|
+
row: IRow;
|
|
828
|
+
index: number;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
declare interface IClipboardData {
|
|
832
|
+
text: string;
|
|
833
|
+
elementList: IElement[];
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
declare interface ICompositionInfo {
|
|
837
|
+
elementList: IElement[];
|
|
838
|
+
startIndex: number;
|
|
839
|
+
endIndex: number;
|
|
840
|
+
value: string;
|
|
841
|
+
defaultStyle: IRangeElementStyle | null;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
export declare interface IControlProvider {
|
|
845
|
+
activate(control: any): void;
|
|
846
|
+
deactivate(): void;
|
|
847
|
+
getActiveControl(): any;
|
|
848
|
+
nextControl(): void;
|
|
849
|
+
preControl(): void;
|
|
850
|
+
destroy(): void;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
declare type IDrawCursorOption = ICursorOption & {
|
|
854
|
+
isShow?: boolean;
|
|
855
|
+
isBlink?: boolean;
|
|
856
|
+
isFocus?: boolean;
|
|
857
|
+
hitLineStartIndex?: number;
|
|
858
|
+
};
|
|
859
|
+
|
|
860
|
+
declare interface IElementVisibleInfo {
|
|
861
|
+
intersectionHeight: number;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
declare type IHighlightMatchResult = (ISearchResult & IControlHighlightRule)[];
|
|
865
|
+
|
|
866
|
+
export declare interface IHistoryProvider {
|
|
867
|
+
undo(): void;
|
|
868
|
+
redo(): void;
|
|
869
|
+
pushSnapshot(): void;
|
|
870
|
+
hasUndo(): boolean;
|
|
871
|
+
hasRedo(): boolean;
|
|
872
|
+
recovery(): void;
|
|
873
|
+
destroy(): void;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
export declare class ImageObserver {
|
|
877
|
+
private promiseList;
|
|
878
|
+
constructor();
|
|
879
|
+
add(payload: Promise<unknown>): void;
|
|
880
|
+
clearAll(): void;
|
|
881
|
+
allSettled(): Promise<PromiseSettledResult<unknown>[]>;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
export declare class ImageParticle {
|
|
885
|
+
private draw;
|
|
886
|
+
protected options: Required<IEditorOption>;
|
|
887
|
+
protected imageCache: Map<string, HTMLImageElement>;
|
|
888
|
+
private container;
|
|
889
|
+
private floatImageContainer;
|
|
890
|
+
private floatImage;
|
|
891
|
+
constructor(draw: Draw);
|
|
892
|
+
getOriginalMainImageList(): IElement[];
|
|
893
|
+
createFloatImage(element: IElement): void;
|
|
894
|
+
dragFloatImage(movementX: number, movementY: number): void;
|
|
895
|
+
destroyFloatImage(): void;
|
|
896
|
+
protected addImageObserver(promise: Promise<unknown>): void;
|
|
897
|
+
protected getFallbackImage(width: number, height: number): HTMLImageElement;
|
|
898
|
+
render(ctx: CanvasRenderingContext2D, element: IElement, x: number, y: number): void;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
declare interface IMeasureWordResult {
|
|
902
|
+
width: number;
|
|
903
|
+
endElement: IElement;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
declare interface IMoveCursorResult {
|
|
907
|
+
newIndex: number;
|
|
908
|
+
newElement: IElement;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
declare interface IMoveCursorToVisibleOption {
|
|
912
|
+
direction: MoveDirection;
|
|
913
|
+
cursorPosition: IElementPosition;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
export declare interface INavigateInfo {
|
|
917
|
+
index: number;
|
|
918
|
+
count: number;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
declare interface IOverrideResult {
|
|
922
|
+
preventDefault?: boolean;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
declare interface IPageVisibleInfo {
|
|
926
|
+
intersectionPageNo: number;
|
|
927
|
+
visiblePageNoList: number[];
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
export declare interface IParticleRegistry {
|
|
931
|
+
registerParticle(name: string, particle: any): void;
|
|
932
|
+
getParticle(name: string): any;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
declare interface IPlaceholderRenderOption {
|
|
936
|
+
placeholder: Required<IPlaceholder>;
|
|
937
|
+
startY?: number;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
declare interface IRadioRenderOption {
|
|
941
|
+
ctx: CanvasRenderingContext2D;
|
|
942
|
+
x: number;
|
|
943
|
+
y: number;
|
|
944
|
+
row: IRow;
|
|
945
|
+
index: number;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
declare interface IRegisterPayload {
|
|
949
|
+
shortcut: Shortcut;
|
|
950
|
+
i18n: I18n;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
export declare interface ISearchProvider {
|
|
954
|
+
search(keyword: string): void;
|
|
955
|
+
navigate(index: number): void;
|
|
956
|
+
replace(replacement: string): void;
|
|
957
|
+
replaceAll(replacement: string): void;
|
|
958
|
+
close(): void;
|
|
959
|
+
getMatchResult(): any;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
export declare class LaTexParticle {
|
|
963
|
+
constructor(..._: any[]);
|
|
964
|
+
render(..._: any[]): void;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
export declare class LineBreakParticle {
|
|
968
|
+
private options;
|
|
969
|
+
static readonly WIDTH = 12;
|
|
970
|
+
static readonly HEIGHT = 9;
|
|
971
|
+
static readonly GAP = 3;
|
|
972
|
+
constructor(draw: Draw);
|
|
973
|
+
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
export declare class LineNumber {
|
|
977
|
+
private draw;
|
|
978
|
+
private options;
|
|
979
|
+
constructor(draw: Draw);
|
|
980
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
export declare class ListParticle {
|
|
984
|
+
private draw;
|
|
985
|
+
private range;
|
|
986
|
+
private options;
|
|
987
|
+
private symbolDrawer;
|
|
988
|
+
private readonly MEASURE_BASE_TEXT;
|
|
989
|
+
private readonly LIST_GAP;
|
|
990
|
+
constructor(draw: Draw);
|
|
991
|
+
setList(listType: ListType | null, listStyle?: ListStyle): void;
|
|
992
|
+
unsetList(): void;
|
|
993
|
+
computeListStyle(ctx: CanvasRenderingContext2D, elementList: IElement[]): Map<string, number>;
|
|
994
|
+
getListStyleWidth(ctx: CanvasRenderingContext2D, listElementList: IElement[]): number;
|
|
995
|
+
drawListStyle(ctx: CanvasRenderingContext2D, row: IRow, position: IElementPosition): void;
|
|
996
|
+
private getOlValue;
|
|
997
|
+
private chineseFromNumber;
|
|
998
|
+
private circleFromNumber;
|
|
999
|
+
private alphaFromNumber;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
export declare class Margin {
|
|
1003
|
+
private draw;
|
|
1004
|
+
private options;
|
|
1005
|
+
constructor(draw: Draw);
|
|
1006
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
export declare class MouseObserver {
|
|
1010
|
+
private draw;
|
|
1011
|
+
private eventBus;
|
|
1012
|
+
private pageContainer;
|
|
1013
|
+
private _mousemoveHandler;
|
|
1014
|
+
private _mouseenterHandler;
|
|
1015
|
+
private _mouseleaveHandler;
|
|
1016
|
+
private _mousedownHandler;
|
|
1017
|
+
private _mouseupHandler;
|
|
1018
|
+
private _clickHandler;
|
|
1019
|
+
constructor(draw: Draw);
|
|
1020
|
+
removeEvent(): void;
|
|
1021
|
+
private _mousemove;
|
|
1022
|
+
private _mouseenter;
|
|
1023
|
+
private _mouseleave;
|
|
1024
|
+
private _mousedown;
|
|
1025
|
+
private _mouseup;
|
|
1026
|
+
private _click;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
export declare class NumberControl extends TextControl {
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
export declare class Override {
|
|
1033
|
+
paste: ((evt?: ClipboardEvent) => unknown | IOverrideResult) | undefined;
|
|
1034
|
+
copy: (() => unknown | IOverrideResult) | undefined;
|
|
1035
|
+
drop: ((evt: DragEvent) => unknown | IOverrideResult) | undefined;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
export declare class PageBorder {
|
|
1039
|
+
private draw;
|
|
1040
|
+
private header;
|
|
1041
|
+
private footer;
|
|
1042
|
+
private options;
|
|
1043
|
+
constructor(draw: Draw);
|
|
1044
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
export declare class PageBreakParticle {
|
|
1048
|
+
private draw;
|
|
1049
|
+
private options;
|
|
1050
|
+
private i18n;
|
|
1051
|
+
constructor(draw: Draw);
|
|
1052
|
+
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
export declare class PageNumber {
|
|
1056
|
+
private draw;
|
|
1057
|
+
private options;
|
|
1058
|
+
constructor(draw: Draw);
|
|
1059
|
+
static formatNumberPlaceholder(text: string, pageNo: number, replaceReg: RegExp, numberType: NumberType): string;
|
|
1060
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
export declare class ParagraphColor extends AbstractRichText {
|
|
1064
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
export declare function pasteByApi(host: CanvasEvent, options?: IPasteOption): Promise<void>;
|
|
1068
|
+
|
|
1069
|
+
export declare class Placeholder {
|
|
1070
|
+
private draw;
|
|
1071
|
+
private position;
|
|
1072
|
+
private options;
|
|
1073
|
+
private elementList;
|
|
1074
|
+
private rowList;
|
|
1075
|
+
private positionList;
|
|
1076
|
+
constructor(draw: Draw);
|
|
1077
|
+
private _recovery;
|
|
1078
|
+
_compute(options?: IPlaceholderRenderOption): void;
|
|
1079
|
+
private _computeRowList;
|
|
1080
|
+
private _computePositionList;
|
|
1081
|
+
render(ctx: CanvasRenderingContext2D, options?: IPlaceholderRenderOption): void;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
declare class Plugin_2 {
|
|
1085
|
+
private editor;
|
|
1086
|
+
constructor(editor: Editor);
|
|
1087
|
+
use<Options>(pluginFunction: PluginFunction<Options>, options?: Options): void;
|
|
1088
|
+
}
|
|
1089
|
+
export { Plugin_2 as Plugin }
|
|
1090
|
+
|
|
1091
|
+
declare class Position {
|
|
1092
|
+
private cursorPosition;
|
|
1093
|
+
private positionContext;
|
|
1094
|
+
private positionList;
|
|
1095
|
+
private floatPositionList;
|
|
1096
|
+
private draw;
|
|
1097
|
+
private eventBus;
|
|
1098
|
+
private options;
|
|
1099
|
+
constructor(draw: Draw);
|
|
1100
|
+
getFloatPositionList(): IFloatPosition[];
|
|
1101
|
+
getTablePositionList(sourceElementList: IElement[]): IElementPosition[];
|
|
1102
|
+
getPositionList(): IElementPosition[];
|
|
1103
|
+
getMainPositionList(): IElementPosition[];
|
|
1104
|
+
getOriginalPositionList(): IElementPosition[];
|
|
1105
|
+
getOriginalMainPositionList(): IElementPosition[];
|
|
1106
|
+
getSelectionPositionList(): IElementPosition[] | null;
|
|
1107
|
+
setPositionList(payload: IElementPosition[]): void;
|
|
1108
|
+
setFloatPositionList(payload: IFloatPosition[]): void;
|
|
1109
|
+
computePageRowPosition(payload: IComputePageRowPositionPayload): IComputePageRowPositionResult;
|
|
1110
|
+
computePositionList(): void;
|
|
1111
|
+
computeRowPosition(payload: IComputeRowPositionPayload): IElementPosition[];
|
|
1112
|
+
setCursorPosition(position: IElementPosition | null): void;
|
|
1113
|
+
getCursorPosition(): IElementPosition | null;
|
|
1114
|
+
getPositionContext(): IPositionContext;
|
|
1115
|
+
setPositionContext(payload: IPositionContext): void;
|
|
1116
|
+
getPositionByXY(payload: IGetPositionByXYPayload): ICurrentPosition;
|
|
1117
|
+
getFloatPositionByXY(payload: IGetFloatPositionByXYPayload): ICurrentPosition | void;
|
|
1118
|
+
adjustPositionContext(payload: IGetPositionByXYPayload): ICurrentPosition | null;
|
|
1119
|
+
setSurroundPosition(payload: ISetSurroundPositionPayload): {
|
|
1120
|
+
x: number;
|
|
1121
|
+
rowIncreaseWidth: number;
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
export { Position }
|
|
1125
|
+
export { Position as PositionCalculator }
|
|
1126
|
+
|
|
1127
|
+
export declare class Previewer {
|
|
1128
|
+
private container;
|
|
1129
|
+
private canvas;
|
|
1130
|
+
private draw;
|
|
1131
|
+
private options;
|
|
1132
|
+
private curElement;
|
|
1133
|
+
private curElementSrc;
|
|
1134
|
+
private previewerDrawOption;
|
|
1135
|
+
private curPosition;
|
|
1136
|
+
private eventBus;
|
|
1137
|
+
private imageList;
|
|
1138
|
+
private curShowElement;
|
|
1139
|
+
private imageCount;
|
|
1140
|
+
private imagePre;
|
|
1141
|
+
private imageNext;
|
|
1142
|
+
private resizerSelection;
|
|
1143
|
+
private resizerHandleList;
|
|
1144
|
+
private resizerImageContainer;
|
|
1145
|
+
private resizerImage;
|
|
1146
|
+
private resizerSize;
|
|
1147
|
+
private width;
|
|
1148
|
+
private height;
|
|
1149
|
+
private mousedownX;
|
|
1150
|
+
private mousedownY;
|
|
1151
|
+
private curHandleIndex;
|
|
1152
|
+
private previewerContainer;
|
|
1153
|
+
private previewerImage;
|
|
1154
|
+
constructor(draw: Draw);
|
|
1155
|
+
private _getElementPosition;
|
|
1156
|
+
private _createResizerDom;
|
|
1157
|
+
private _keydown;
|
|
1158
|
+
private _mousedown;
|
|
1159
|
+
private _mousemove;
|
|
1160
|
+
private _drawPreviewer;
|
|
1161
|
+
private _updateImageNavigate;
|
|
1162
|
+
_setPreviewerTransform(scale: number, rotate: number, x: number, y: number): void;
|
|
1163
|
+
private _clearPreviewer;
|
|
1164
|
+
_updateResizerRect(width: number, height: number): void;
|
|
1165
|
+
_updateResizerSizeView(width: number, height: number): void;
|
|
1166
|
+
render(): void;
|
|
1167
|
+
drawResizer(element: IElement, position?: IElementPosition | null, options?: IPreviewerDrawOption): void;
|
|
1168
|
+
updateResizer(element: IElement, position?: IElementPosition | null): void;
|
|
1169
|
+
clearResizer(): void;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
export declare class RadioControl extends CheckboxControl {
|
|
1173
|
+
setSelect(codes: string[], context?: IControlContext, options?: IControlRuleOption): void;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
export declare class RadioParticle {
|
|
1177
|
+
private draw;
|
|
1178
|
+
private options;
|
|
1179
|
+
constructor(draw: Draw);
|
|
1180
|
+
setSelect(element: IElement): void;
|
|
1181
|
+
render(payload: IRadioRenderOption): void;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
export declare class Register {
|
|
1185
|
+
shortcutList: (payload: IRegisterShortcut[]) => void;
|
|
1186
|
+
langMap: (locale: string, lang: DeepPartial<ILang>) => void;
|
|
1187
|
+
private chartRenderer;
|
|
1188
|
+
constructor(payload: IRegisterPayload);
|
|
1189
|
+
/**
|
|
1190
|
+
* 注册图表渲染器
|
|
1191
|
+
* @param renderer 图表渲染器实例
|
|
1192
|
+
*/
|
|
1193
|
+
registerChartRenderer(renderer: IChartRenderer): void;
|
|
1194
|
+
/**
|
|
1195
|
+
* 获取图表渲染器
|
|
1196
|
+
* @returns 图表渲染器实例或 null
|
|
1197
|
+
*/
|
|
1198
|
+
getChartRenderer(): IChartRenderer | null;
|
|
1199
|
+
/**
|
|
1200
|
+
* 检查是否已注册图表渲染器
|
|
1201
|
+
* @returns 是否已注册
|
|
1202
|
+
*/
|
|
1203
|
+
hasChartRenderer(): boolean;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
export declare function removeClipboardData(): void;
|
|
1207
|
+
|
|
1208
|
+
export declare class ScrollObserver {
|
|
1209
|
+
private draw;
|
|
1210
|
+
private options;
|
|
1211
|
+
private scrollContainer;
|
|
1212
|
+
constructor(draw: Draw);
|
|
1213
|
+
getScrollContainer(): Element | Document;
|
|
1214
|
+
private _addEvent;
|
|
1215
|
+
removeEvent(): void;
|
|
1216
|
+
getElementVisibleInfo(element: Element): IElementVisibleInfo;
|
|
1217
|
+
getPageVisibleInfo(): IPageVisibleInfo;
|
|
1218
|
+
private _observer;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
export declare class Search {
|
|
1222
|
+
private draw;
|
|
1223
|
+
private options;
|
|
1224
|
+
private position;
|
|
1225
|
+
private searchKeyword;
|
|
1226
|
+
private searchNavigateIndex;
|
|
1227
|
+
private searchMatchList;
|
|
1228
|
+
constructor(draw: Draw);
|
|
1229
|
+
getSearchKeyword(): string | null;
|
|
1230
|
+
setSearchKeyword(payload: string | null): void;
|
|
1231
|
+
searchNavigatePre(): number | null;
|
|
1232
|
+
searchNavigateNext(): number | null;
|
|
1233
|
+
searchNavigateScrollIntoView(position: IElementPosition): void;
|
|
1234
|
+
getSearchNavigateIndexList(): any[];
|
|
1235
|
+
getSearchMatchList(): ISearchResult[];
|
|
1236
|
+
getSearchNavigateInfo(): null | INavigateInfo;
|
|
1237
|
+
getMatchList(payload: string, originalElementList: IElement[]): ISearchResult[];
|
|
1238
|
+
compute(payload: string): void;
|
|
1239
|
+
render(ctx: CanvasRenderingContext2D, pageIndex: number): void;
|
|
1240
|
+
replace(payload: string, option?: IReplaceOption): void;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
export declare class SelectControl implements IControlInstance {
|
|
1244
|
+
private element;
|
|
1245
|
+
private control;
|
|
1246
|
+
private isPopup;
|
|
1247
|
+
private selectDom;
|
|
1248
|
+
private options;
|
|
1249
|
+
private VALUE_DELIMITER;
|
|
1250
|
+
private DEFAULT_MULTI_SELECT_DELIMITER;
|
|
1251
|
+
constructor(element: IElement, control: Control);
|
|
1252
|
+
setElement(element: IElement): void;
|
|
1253
|
+
getElement(): IElement;
|
|
1254
|
+
getIsPopup(): boolean;
|
|
1255
|
+
getCodes(): string[];
|
|
1256
|
+
getText(codes: string[]): string | null;
|
|
1257
|
+
getValue(context?: IControlContext): IElement[];
|
|
1258
|
+
setValue(data: IElement[], context?: IControlContext, options?: IControlRuleOption): number;
|
|
1259
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
1260
|
+
cut(): number;
|
|
1261
|
+
clearSelect(context?: IControlContext, options?: IControlRuleOption): number;
|
|
1262
|
+
setSelect(code: string, context?: IControlContext, options?: IControlRuleOption): void;
|
|
1263
|
+
private _createSelectPopupDom;
|
|
1264
|
+
awake(): void;
|
|
1265
|
+
destroy(): void;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
export declare class SelectionObserver {
|
|
1269
|
+
private readonly step;
|
|
1270
|
+
private readonly thresholdPoints;
|
|
1271
|
+
private selectionContainer;
|
|
1272
|
+
private rangeManager;
|
|
1273
|
+
private requestAnimationFrameId;
|
|
1274
|
+
private isMousedown;
|
|
1275
|
+
private isMoving;
|
|
1276
|
+
private clientWidth;
|
|
1277
|
+
private clientHeight;
|
|
1278
|
+
private containerRect;
|
|
1279
|
+
constructor(draw: Draw);
|
|
1280
|
+
private _addEvent;
|
|
1281
|
+
removeEvent(): void;
|
|
1282
|
+
private _mousedown;
|
|
1283
|
+
private _mouseup;
|
|
1284
|
+
private _mousemove;
|
|
1285
|
+
private _move;
|
|
1286
|
+
private _startMove;
|
|
1287
|
+
private _stopMove;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
export declare class SeparatorParticle {
|
|
1291
|
+
private options;
|
|
1292
|
+
constructor(draw: Draw);
|
|
1293
|
+
private withAlpha;
|
|
1294
|
+
private scaleDashArray;
|
|
1295
|
+
private drawStraightLine;
|
|
1296
|
+
private drawWavyLine;
|
|
1297
|
+
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
declare class Shortcut {
|
|
1301
|
+
constructor(..._: any[]);
|
|
1302
|
+
registerShortcutList(..._: any[]): void;
|
|
1303
|
+
removeEvent(): void;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
export declare class Strikeout extends AbstractRichText {
|
|
1307
|
+
private options;
|
|
1308
|
+
constructor(draw: Draw);
|
|
1309
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
export declare class SubscriptParticle {
|
|
1313
|
+
getOffsetY(element: IRowElement): number;
|
|
1314
|
+
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
export declare class SuperscriptParticle {
|
|
1318
|
+
getOffsetY(element: IRowElement): number;
|
|
1319
|
+
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
export declare class TableOperate {
|
|
1323
|
+
private draw;
|
|
1324
|
+
private range;
|
|
1325
|
+
private position;
|
|
1326
|
+
private tableTool;
|
|
1327
|
+
private tableParticle;
|
|
1328
|
+
private options;
|
|
1329
|
+
constructor(draw: Draw);
|
|
1330
|
+
insertTable(row: number, col: number): void;
|
|
1331
|
+
insertTableTopRow(): void;
|
|
1332
|
+
insertTableBottomRow(): void;
|
|
1333
|
+
adjustColWidth(element: IElement): void;
|
|
1334
|
+
insertTableLeftCol(): void;
|
|
1335
|
+
insertTableRightCol(): void;
|
|
1336
|
+
deleteTableRow(): void;
|
|
1337
|
+
deleteTableCol(): void;
|
|
1338
|
+
deleteTable(): void;
|
|
1339
|
+
mergeTableCell(): void;
|
|
1340
|
+
cancelMergeTableCell(): void;
|
|
1341
|
+
splitVerticalTableCell(): void;
|
|
1342
|
+
splitHorizontalTableCell(): void;
|
|
1343
|
+
tableTdVerticalAlign(payload: VerticalAlign): void;
|
|
1344
|
+
tableBorderType(payload: TableBorder): void;
|
|
1345
|
+
tableBorderColor(payload: string): void;
|
|
1346
|
+
tableBorderWidth(payload: number): void;
|
|
1347
|
+
tableBorderExternalWidth(payload: number): void;
|
|
1348
|
+
tableTdBorderType(payload: TdBorder): void;
|
|
1349
|
+
tableTdSlashType(payload: TdSlash): void;
|
|
1350
|
+
tableTdBackgroundColor(payload: string): void;
|
|
1351
|
+
tableSelectAll(): void;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
export declare class TableParticle {
|
|
1355
|
+
private draw;
|
|
1356
|
+
private range;
|
|
1357
|
+
private options;
|
|
1358
|
+
constructor(draw: Draw);
|
|
1359
|
+
getTrListGroupByCol(payload: ITr[]): ITr[];
|
|
1360
|
+
getRangeRowCol(): ITd[][] | null;
|
|
1361
|
+
private _drawSlash;
|
|
1362
|
+
private _drawBorder;
|
|
1363
|
+
private _drawBackgroundColor;
|
|
1364
|
+
getTableWidth(element: IElement): number;
|
|
1365
|
+
getTableHeight(element: IElement): number;
|
|
1366
|
+
getRowCountByColIndex(trList: ITr[], colIndex: number): number;
|
|
1367
|
+
getTdListByColIndex(trList: ITr[], colIndex: number): ITd[];
|
|
1368
|
+
getTdListByRowIndex(trList: ITr[], rowIndex: number): ITd[];
|
|
1369
|
+
computeRowColInfo(element: IElement): void;
|
|
1370
|
+
drawRange(ctx: CanvasRenderingContext2D, element: IElement, startX: number, startY: number): void;
|
|
1371
|
+
render(ctx: CanvasRenderingContext2D, element: IElement, startX: number, startY: number): void;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
export declare class TableTool {
|
|
1375
|
+
private readonly MIN_TD_WIDTH;
|
|
1376
|
+
private readonly ROW_COL_OFFSET;
|
|
1377
|
+
private readonly ROW_COL_QUICK_WIDTH;
|
|
1378
|
+
private readonly ROW_COL_QUICK_OFFSET;
|
|
1379
|
+
private readonly ROW_COL_QUICK_POSITION;
|
|
1380
|
+
private readonly BORDER_VALUE;
|
|
1381
|
+
private readonly TABLE_SELECT_OFFSET;
|
|
1382
|
+
private draw;
|
|
1383
|
+
private canvas;
|
|
1384
|
+
private options;
|
|
1385
|
+
private position;
|
|
1386
|
+
private range;
|
|
1387
|
+
private container;
|
|
1388
|
+
private toolRowContainer;
|
|
1389
|
+
private toolRowAddBtn;
|
|
1390
|
+
private toolColAddBtn;
|
|
1391
|
+
private toolTableSelectBtn;
|
|
1392
|
+
private toolColContainer;
|
|
1393
|
+
private toolBorderContainer;
|
|
1394
|
+
private anchorLine;
|
|
1395
|
+
private mousedownX;
|
|
1396
|
+
private mousedownY;
|
|
1397
|
+
constructor(draw: Draw);
|
|
1398
|
+
dispose(): void;
|
|
1399
|
+
render(): void;
|
|
1400
|
+
private _setAnchorActive;
|
|
1401
|
+
private _mousedown;
|
|
1402
|
+
private _mousemove;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
export declare class TextControl implements IControlInstance {
|
|
1406
|
+
private element;
|
|
1407
|
+
private control;
|
|
1408
|
+
private options;
|
|
1409
|
+
constructor(element: IElement, control: Control);
|
|
1410
|
+
setElement(element: IElement): void;
|
|
1411
|
+
getElement(): IElement;
|
|
1412
|
+
getValue(context?: IControlContext): IElement[];
|
|
1413
|
+
setValue(data: IElement[], context?: IControlContext, options?: IControlRuleOption): number;
|
|
1414
|
+
clearValue(context?: IControlContext, options?: IControlRuleOption): number;
|
|
1415
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
1416
|
+
cut(): number;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
export declare class TextParticle {
|
|
1420
|
+
private draw;
|
|
1421
|
+
private options;
|
|
1422
|
+
private ctx;
|
|
1423
|
+
private curX;
|
|
1424
|
+
private curY;
|
|
1425
|
+
private text;
|
|
1426
|
+
private curStyle;
|
|
1427
|
+
private curColor?;
|
|
1428
|
+
private curCharacterScale;
|
|
1429
|
+
cacheMeasureText: Map<string, TextMetrics>;
|
|
1430
|
+
constructor(draw: Draw);
|
|
1431
|
+
static getCharacterScaleRatio(characterScale?: number): number;
|
|
1432
|
+
static fillScaledText(ctx: CanvasRenderingContext2D, text: string, x: number, y: number, characterScale?: number): void;
|
|
1433
|
+
measureBasisWord(ctx: CanvasRenderingContext2D, font: string): ITextMetrics;
|
|
1434
|
+
measureWord(ctx: CanvasRenderingContext2D, elementList: IElement[], curIndex: number): IMeasureWordResult;
|
|
1435
|
+
measurePunctuationWidth(ctx: CanvasRenderingContext2D, element: IElement): number;
|
|
1436
|
+
measureText(ctx: CanvasRenderingContext2D, element: IElement): ITextMetrics;
|
|
1437
|
+
complete(): void;
|
|
1438
|
+
record(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
1439
|
+
private _setCurXY;
|
|
1440
|
+
private _render;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
export declare class Underline extends AbstractRichText {
|
|
1444
|
+
private options;
|
|
1445
|
+
constructor(draw: Draw);
|
|
1446
|
+
private _drawLine;
|
|
1447
|
+
private _drawDouble;
|
|
1448
|
+
private _drawWave;
|
|
1449
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
export declare const version: string;
|
|
1453
|
+
|
|
1454
|
+
export declare class Watermark {
|
|
1455
|
+
private draw;
|
|
1456
|
+
private options;
|
|
1457
|
+
private imageCache;
|
|
1458
|
+
constructor(draw: Draw);
|
|
1459
|
+
renderText(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
1460
|
+
renderImage(ctx: CanvasRenderingContext2D): void;
|
|
1461
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
export declare class WorkerManager {
|
|
1465
|
+
constructor(..._: any[]);
|
|
1466
|
+
destroy(..._: any[]): void;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
export declare class Zone {
|
|
1470
|
+
private readonly INDICATOR_PADDING;
|
|
1471
|
+
private draw;
|
|
1472
|
+
private options;
|
|
1473
|
+
private i18n;
|
|
1474
|
+
private container;
|
|
1475
|
+
private currentZone;
|
|
1476
|
+
private indicatorContainer;
|
|
1477
|
+
private pageNumberMenu;
|
|
1478
|
+
constructor(draw: Draw);
|
|
1479
|
+
isHeaderActive(): boolean;
|
|
1480
|
+
isMainActive(): boolean;
|
|
1481
|
+
isFooterActive(): boolean;
|
|
1482
|
+
getZone(): EditorZone;
|
|
1483
|
+
setZone(payload: EditorZone): void;
|
|
1484
|
+
getZoneByY(y: number): EditorZone;
|
|
1485
|
+
drawZoneIndicator(): void;
|
|
1486
|
+
private _showPageNumberMenu;
|
|
1487
|
+
private _hidePageNumberMenu;
|
|
1488
|
+
private _insertPageNumber;
|
|
1489
|
+
private _getZoneName;
|
|
1490
|
+
private _clearZoneIndicator;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
export declare class ZoneTip {
|
|
1494
|
+
private draw;
|
|
1495
|
+
private zone;
|
|
1496
|
+
private i18n;
|
|
1497
|
+
private container;
|
|
1498
|
+
private pageContainer;
|
|
1499
|
+
private isDisableMouseMove;
|
|
1500
|
+
private tipContainer;
|
|
1501
|
+
private tipContent;
|
|
1502
|
+
private currentMoveZone;
|
|
1503
|
+
constructor(draw: Draw, zone: Zone);
|
|
1504
|
+
private _watchMouseMoveZoneChange;
|
|
1505
|
+
private _drawZoneTip;
|
|
1506
|
+
private _updateZoneTip;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
export { }
|