@agile_jy/word-editor 0.0.1
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/CHANGELOG.md +2543 -0
- package/LICENSE +21 -0
- package/README.md +110 -0
- package/dist/canvas-editor.es.js +25197 -0
- package/dist/canvas-editor.es.js.map +1 -0
- package/dist/canvas-editor.umd.js +97 -0
- package/dist/canvas-editor.umd.js.map +1 -0
- package/dist/src/editor/core/actuator/Actuator.d.ts +7 -0
- package/dist/src/editor/core/actuator/handlers/positionContextChange.d.ts +3 -0
- package/dist/src/editor/core/command/Command.d.ts +147 -0
- package/dist/src/editor/core/command/CommandAdapt.d.ts +190 -0
- package/dist/src/editor/core/contextmenu/ContextMenu.d.ts +31 -0
- package/dist/src/editor/core/contextmenu/menus/controlMenus.d.ts +2 -0
- package/dist/src/editor/core/contextmenu/menus/globalMenus.d.ts +2 -0
- package/dist/src/editor/core/contextmenu/menus/hyperlinkMenus.d.ts +2 -0
- package/dist/src/editor/core/contextmenu/menus/imageMenus.d.ts +2 -0
- package/dist/src/editor/core/contextmenu/menus/tableMenus.d.ts +2 -0
- package/dist/src/editor/core/cursor/Cursor.d.ts +41 -0
- package/dist/src/editor/core/cursor/CursorAgent.d.ts +16 -0
- package/dist/src/editor/core/draw/Draw.d.ts +252 -0
- package/dist/src/editor/core/draw/control/Control.d.ts +73 -0
- package/dist/src/editor/core/draw/control/checkbox/CheckboxControl.d.ts +16 -0
- package/dist/src/editor/core/draw/control/date/DateControl.d.ts +24 -0
- package/dist/src/editor/core/draw/control/interactive/ControlSearch.d.ts +20 -0
- package/dist/src/editor/core/draw/control/number/Calculator.d.ts +16 -0
- package/dist/src/editor/core/draw/control/number/NumberControl.d.ts +13 -0
- package/dist/src/editor/core/draw/control/radio/RadioControl.d.ts +5 -0
- package/dist/src/editor/core/draw/control/richtext/Border.d.ts +10 -0
- package/dist/src/editor/core/draw/control/select/SelectControl.d.ts +28 -0
- package/dist/src/editor/core/draw/control/text/TextControl.d.ts +18 -0
- package/dist/src/editor/core/draw/frame/Background.d.ts +11 -0
- package/dist/src/editor/core/draw/frame/Badge.d.ts +14 -0
- package/dist/src/editor/core/draw/frame/Footer.d.ts +27 -0
- package/dist/src/editor/core/draw/frame/Header.d.ts +27 -0
- package/dist/src/editor/core/draw/frame/LineNumber.d.ts +7 -0
- package/dist/src/editor/core/draw/frame/Margin.d.ts +7 -0
- package/dist/src/editor/core/draw/frame/PageBorder.d.ts +9 -0
- package/dist/src/editor/core/draw/frame/PageNumber.d.ts +9 -0
- package/dist/src/editor/core/draw/frame/Placeholder.d.ts +20 -0
- package/dist/src/editor/core/draw/frame/Watermark.d.ts +10 -0
- package/dist/src/editor/core/draw/graffiti/Graffiti.d.ts +19 -0
- package/dist/src/editor/core/draw/interactive/Area.d.ts +27 -0
- package/dist/src/editor/core/draw/interactive/Group.d.ts +18 -0
- package/dist/src/editor/core/draw/interactive/Search.d.ts +30 -0
- package/dist/src/editor/core/draw/particle/CheckboxParticle.d.ts +18 -0
- package/dist/src/editor/core/draw/particle/HyperlinkParticle.d.ts +17 -0
- package/dist/src/editor/core/draw/particle/ImageParticle.d.ts +23 -0
- package/dist/src/editor/core/draw/particle/LabelParticle.d.ts +8 -0
- package/dist/src/editor/core/draw/particle/LineBreakParticle.d.ts +10 -0
- package/dist/src/editor/core/draw/particle/ListParticle.d.ts +20 -0
- package/dist/src/editor/core/draw/particle/PageBreakParticle.d.ts +9 -0
- package/dist/src/editor/core/draw/particle/RadioParticle.d.ts +18 -0
- package/dist/src/editor/core/draw/particle/SeparatorParticle.d.ts +7 -0
- package/dist/src/editor/core/draw/particle/SubscriptParticle.d.ts +5 -0
- package/dist/src/editor/core/draw/particle/SuperscriptParticle.d.ts +5 -0
- package/dist/src/editor/core/draw/particle/TextParticle.d.ts +29 -0
- package/dist/src/editor/core/draw/particle/WhiteSpaceParticle.d.ts +7 -0
- package/dist/src/editor/core/draw/particle/block/BlockParticle.d.ts +14 -0
- package/dist/src/editor/core/draw/particle/block/modules/BaseBlock.d.ts +33 -0
- package/dist/src/editor/core/draw/particle/block/modules/IFrameBlock.d.ts +9 -0
- package/dist/src/editor/core/draw/particle/block/modules/VideoBlock.d.ts +8 -0
- package/dist/src/editor/core/draw/particle/date/DateParticle.d.ts +13 -0
- package/dist/src/editor/core/draw/particle/date/DatePicker.d.ts +64 -0
- package/dist/src/editor/core/draw/particle/latex/LaTexParticle.d.ts +7 -0
- package/dist/src/editor/core/draw/particle/latex/utils/LaTexUtils.d.ts +47 -0
- package/dist/src/editor/core/draw/particle/latex/utils/hershey.d.ts +10 -0
- package/dist/src/editor/core/draw/particle/latex/utils/symbols.d.ts +8 -0
- package/dist/src/editor/core/draw/particle/previewer/Previewer.d.ts +47 -0
- package/dist/src/editor/core/draw/particle/table/TableOperate.d.ts +32 -0
- package/dist/src/editor/core/draw/particle/table/TableParticle.d.ts +24 -0
- package/dist/src/editor/core/draw/particle/table/TableTool.d.ts +31 -0
- package/dist/src/editor/core/draw/richtext/AbstractRichText.d.ts +11 -0
- package/dist/src/editor/core/draw/richtext/Highlight.d.ts +7 -0
- package/dist/src/editor/core/draw/richtext/Strikeout.d.ts +7 -0
- package/dist/src/editor/core/draw/richtext/Underline.d.ts +10 -0
- package/dist/src/editor/core/event/CanvasEvent.d.ts +52 -0
- package/dist/src/editor/core/event/GlobalEvent.d.ts +26 -0
- package/dist/src/editor/core/event/eventbus/EventBus.d.ts +9 -0
- package/dist/src/editor/core/event/handlers/click.d.ts +11 -0
- package/dist/src/editor/core/event/handlers/composition.d.ts +8 -0
- package/dist/src/editor/core/event/handlers/copy.d.ts +3 -0
- package/dist/src/editor/core/event/handlers/cut.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/drag.d.ts +6 -0
- package/dist/src/editor/core/event/handlers/drop.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/input.d.ts +3 -0
- package/dist/src/editor/core/event/handlers/keydown/backspace.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/keydown/delete.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/keydown/enter.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/keydown/index.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/keydown/left.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/keydown/right.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/keydown/tab.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/keydown/updown.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/mousedown.d.ts +7 -0
- package/dist/src/editor/core/event/handlers/mouseleave.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/mousemove.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/mouseup.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/paste.d.ts +8 -0
- package/dist/src/editor/core/history/HistoryManager.d.ts +15 -0
- package/dist/src/editor/core/i18n/I18n.d.ts +12 -0
- package/dist/src/editor/core/listener/Listener.d.ts +15 -0
- package/dist/src/editor/core/observer/ImageObserver.d.ts +7 -0
- package/dist/src/editor/core/observer/MouseObserver.d.ts +13 -0
- package/dist/src/editor/core/observer/ScrollObserver.d.ts +20 -0
- package/dist/src/editor/core/observer/SelectionObserver.d.ts +22 -0
- package/dist/src/editor/core/override/Override.d.ts +8 -0
- package/dist/src/editor/core/plugin/Plugin.d.ts +7 -0
- package/dist/src/editor/core/position/Position.d.ts +37 -0
- package/dist/src/editor/core/range/RangeManager.d.ts +45 -0
- package/dist/src/editor/core/register/Register.d.ts +20 -0
- package/dist/src/editor/core/shortcut/Shortcut.d.ts +16 -0
- package/dist/src/editor/core/shortcut/keys/listKeys.d.ts +2 -0
- package/dist/src/editor/core/shortcut/keys/richtextKeys.d.ts +2 -0
- package/dist/src/editor/core/shortcut/keys/titleKeys.d.ts +2 -0
- package/dist/src/editor/core/worker/WorkerManager.d.ts +16 -0
- package/dist/src/editor/core/worker/works/catalog.d.ts +1 -0
- package/dist/src/editor/core/worker/works/group.d.ts +1 -0
- package/dist/src/editor/core/worker/works/value.d.ts +1 -0
- package/dist/src/editor/core/worker/works/wordCount.d.ts +1 -0
- package/dist/src/editor/core/zone/Zone.d.ts +21 -0
- package/dist/src/editor/core/zone/ZoneTip.d.ts +17 -0
- package/dist/src/editor/dataset/constant/Background.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Badge.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Checkbox.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Common.d.ts +21 -0
- package/dist/src/editor/dataset/constant/ContextMenu.d.ts +60 -0
- package/dist/src/editor/dataset/constant/Control.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Cursor.d.ts +3 -0
- package/dist/src/editor/dataset/constant/Editor.d.ts +6 -0
- package/dist/src/editor/dataset/constant/Element.d.ts +21 -0
- package/dist/src/editor/dataset/constant/Footer.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Graffiti.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Group.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Header.d.ts +2 -0
- package/dist/src/editor/dataset/constant/ImgCaption.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Label.d.ts +2 -0
- package/dist/src/editor/dataset/constant/LineBreak.d.ts +2 -0
- package/dist/src/editor/dataset/constant/LineNumber.d.ts +2 -0
- package/dist/src/editor/dataset/constant/List.d.ts +6 -0
- package/dist/src/editor/dataset/constant/PageBorder.d.ts +2 -0
- package/dist/src/editor/dataset/constant/PageBreak.d.ts +2 -0
- package/dist/src/editor/dataset/constant/PageNumber.d.ts +6 -0
- package/dist/src/editor/dataset/constant/Placeholder.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Radio.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Regular.d.ts +10 -0
- package/dist/src/editor/dataset/constant/Separator.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Shortcut.d.ts +3 -0
- package/dist/src/editor/dataset/constant/Table.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Title.d.ts +6 -0
- package/dist/src/editor/dataset/constant/Watermark.d.ts +2 -0
- package/dist/src/editor/dataset/constant/WhiteSpace.d.ts +2 -0
- package/dist/src/editor/dataset/constant/Zone.d.ts +2 -0
- package/dist/src/editor/dataset/enum/Area.d.ts +5 -0
- package/dist/src/editor/dataset/enum/Background.d.ts +10 -0
- package/dist/src/editor/dataset/enum/Block.d.ts +4 -0
- package/dist/src/editor/dataset/enum/Common.d.ts +26 -0
- package/dist/src/editor/dataset/enum/Control.d.ts +32 -0
- package/dist/src/editor/dataset/enum/Editor.d.ts +44 -0
- package/dist/src/editor/dataset/enum/Element.d.ts +21 -0
- package/dist/src/editor/dataset/enum/ElementStyle.d.ts +12 -0
- package/dist/src/editor/dataset/enum/Event.d.ts +5 -0
- package/dist/src/editor/dataset/enum/KeyMap.d.ts +83 -0
- package/dist/src/editor/dataset/enum/LineNumber.d.ts +4 -0
- package/dist/src/editor/dataset/enum/List.d.ts +20 -0
- package/dist/src/editor/dataset/enum/Observer.d.ts +6 -0
- package/dist/src/editor/dataset/enum/Row.d.ts +7 -0
- package/dist/src/editor/dataset/enum/Text.d.ts +12 -0
- package/dist/src/editor/dataset/enum/Title.d.ts +8 -0
- package/dist/src/editor/dataset/enum/VerticalAlign.d.ts +5 -0
- package/dist/src/editor/dataset/enum/Watermark.d.ts +4 -0
- package/dist/src/editor/dataset/enum/table/Table.d.ts +17 -0
- package/dist/src/editor/dataset/enum/table/TableTool.d.ts +4 -0
- package/dist/src/editor/index.d.ts +59 -0
- package/dist/src/editor/interface/Area.d.ts +55 -0
- package/dist/src/editor/interface/Background.d.ts +8 -0
- package/dist/src/editor/interface/Badge.d.ts +15 -0
- package/dist/src/editor/interface/Block.d.ts +15 -0
- package/dist/src/editor/interface/Catalog.d.ts +9 -0
- package/dist/src/editor/interface/Checkbox.d.ts +15 -0
- package/dist/src/editor/interface/Command.d.ts +3 -0
- package/dist/src/editor/interface/Common.d.ts +14 -0
- package/dist/src/editor/interface/Control.d.ts +198 -0
- package/dist/src/editor/interface/Cursor.d.ts +7 -0
- package/dist/src/editor/interface/Draw.d.ts +74 -0
- package/dist/src/editor/interface/Editor.d.ts +143 -0
- package/dist/src/editor/interface/Element.d.ts +234 -0
- package/dist/src/editor/interface/Event.d.ts +22 -0
- package/dist/src/editor/interface/EventBus.d.ts +26 -0
- package/dist/src/editor/interface/Footer.d.ts +8 -0
- package/dist/src/editor/interface/Graffiti.d.ts +13 -0
- package/dist/src/editor/interface/Group.d.ts +8 -0
- package/dist/src/editor/interface/Header.d.ts +8 -0
- package/dist/src/editor/interface/Label.d.ts +7 -0
- package/dist/src/editor/interface/LineBreak.d.ts +5 -0
- package/dist/src/editor/interface/LineNumber.d.ts +9 -0
- package/dist/src/editor/interface/Listener.d.ts +66 -0
- package/dist/src/editor/interface/Margin.d.ts +1 -0
- package/dist/src/editor/interface/PageBorder.d.ts +7 -0
- package/dist/src/editor/interface/PageBreak.d.ts +5 -0
- package/dist/src/editor/interface/PageNumber.d.ts +15 -0
- package/dist/src/editor/interface/Placeholder.d.ts +7 -0
- package/dist/src/editor/interface/Plugin.d.ts +3 -0
- package/dist/src/editor/interface/Position.d.ts +103 -0
- package/dist/src/editor/interface/Previewer.d.ts +13 -0
- package/dist/src/editor/interface/Radio.d.ts +15 -0
- package/dist/src/editor/interface/Range.d.ts +44 -0
- package/dist/src/editor/interface/Row.d.ts +23 -0
- package/dist/src/editor/interface/Search.d.ts +30 -0
- package/dist/src/editor/interface/Separator.d.ts +4 -0
- package/dist/src/editor/interface/Text.d.ts +13 -0
- package/dist/src/editor/interface/Title.d.ts +26 -0
- package/dist/src/editor/interface/Watermark.d.ts +15 -0
- package/dist/src/editor/interface/WhiteSpace.d.ts +5 -0
- package/dist/src/editor/interface/Zone.d.ts +3 -0
- package/dist/src/editor/interface/contextmenu/ContextMenu.d.ts +73 -0
- package/dist/src/editor/interface/i18n/I18n.d.ts +6 -0
- package/dist/src/editor/interface/shortcut/Shortcut.d.ts +13 -0
- package/dist/src/editor/interface/table/Colgroup.d.ts +4 -0
- package/dist/src/editor/interface/table/Table.d.ts +8 -0
- package/dist/src/editor/interface/table/Td.d.ts +35 -0
- package/dist/src/editor/interface/table/Tr.d.ts +10 -0
- package/dist/src/editor/utils/clipboard.d.ts +13 -0
- package/dist/src/editor/utils/element.d.ts +57 -0
- package/dist/src/editor/utils/hotkey.d.ts +1 -0
- package/dist/src/editor/utils/index.d.ts +34 -0
- package/dist/src/editor/utils/option.d.ts +3 -0
- package/dist/src/editor/utils/paragraph.d.ts +8 -0
- package/dist/src/editor/utils/print.d.ts +7 -0
- package/dist/src/editor/utils/ua.d.ts +4 -0
- package/package.json +77 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { IAppendElementListOption, IComputeRowListPayload, IDrawOption, IDrawRowPayload, IGetImageOption, IGetOriginValueOption, IGetValueOption, IPainterOption } from '../../interface/Draw';
|
|
2
|
+
import { IEditorData, IEditorOption, IEditorResult, ISetValueOption } from '../../interface/Editor';
|
|
3
|
+
import { IElement, IElementStyle, ISpliceElementListOption, IInsertElementListOption } from '../../interface/Element';
|
|
4
|
+
import { IRow } from '../../interface/Row';
|
|
5
|
+
import { Cursor } from '../cursor/Cursor';
|
|
6
|
+
import { CanvasEvent } from '../event/CanvasEvent';
|
|
7
|
+
import { GlobalEvent } from '../event/GlobalEvent';
|
|
8
|
+
import { HistoryManager } from '../history/HistoryManager';
|
|
9
|
+
import { Listener } from '../listener/Listener';
|
|
10
|
+
import { Position } from '../position/Position';
|
|
11
|
+
import { RangeManager } from '../range/RangeManager';
|
|
12
|
+
import { Search } from './interactive/Search';
|
|
13
|
+
import { ImageParticle } from './particle/ImageParticle';
|
|
14
|
+
import { TextParticle } from './particle/TextParticle';
|
|
15
|
+
import { TableParticle } from './particle/table/TableParticle';
|
|
16
|
+
import { TableTool } from './particle/table/TableTool';
|
|
17
|
+
import { HyperlinkParticle } from './particle/HyperlinkParticle';
|
|
18
|
+
import { Header } from './frame/Header';
|
|
19
|
+
import { EditorMode, PageMode, PaperDirection } from '../../dataset/enum/Editor';
|
|
20
|
+
import { Control } from './control/Control';
|
|
21
|
+
import { CheckboxParticle } from './particle/CheckboxParticle';
|
|
22
|
+
import { RadioParticle } from './particle/RadioParticle';
|
|
23
|
+
import { DeepRequired, IPadding } from '../../interface/Common';
|
|
24
|
+
import { WorkerManager } from '../worker/WorkerManager';
|
|
25
|
+
import { Previewer } from './particle/previewer/Previewer';
|
|
26
|
+
import { DateParticle } from './particle/date/DateParticle';
|
|
27
|
+
import { IMargin } from '../../interface/Margin';
|
|
28
|
+
import { I18n } from '../i18n/I18n';
|
|
29
|
+
import { ImageObserver } from '../observer/ImageObserver';
|
|
30
|
+
import { Zone } from '../zone/Zone';
|
|
31
|
+
import { Footer } from './frame/Footer';
|
|
32
|
+
import { ListParticle } from './particle/ListParticle';
|
|
33
|
+
import { EventBus } from '../event/eventbus/EventBus';
|
|
34
|
+
import { EventBusMap } from '../../interface/EventBus';
|
|
35
|
+
import { Group } from './interactive/Group';
|
|
36
|
+
import { Override } from '../override/Override';
|
|
37
|
+
import { LineBreakParticle } from './particle/LineBreakParticle';
|
|
38
|
+
import { ITd } from '../../interface/table/Td';
|
|
39
|
+
import { TableOperate } from './particle/table/TableOperate';
|
|
40
|
+
import { Area } from './interactive/Area';
|
|
41
|
+
import { Badge } from './frame/Badge';
|
|
42
|
+
import { Graffiti } from './graffiti/Graffiti';
|
|
43
|
+
export declare class Draw {
|
|
44
|
+
private container;
|
|
45
|
+
private pageContainer;
|
|
46
|
+
private pageList;
|
|
47
|
+
private ctxList;
|
|
48
|
+
private pageNo;
|
|
49
|
+
private renderCount;
|
|
50
|
+
private pagePixelRatio;
|
|
51
|
+
private mode;
|
|
52
|
+
private options;
|
|
53
|
+
private position;
|
|
54
|
+
private zone;
|
|
55
|
+
private elementList;
|
|
56
|
+
private listener;
|
|
57
|
+
private eventBus;
|
|
58
|
+
private override;
|
|
59
|
+
private i18n;
|
|
60
|
+
private canvasEvent;
|
|
61
|
+
private globalEvent;
|
|
62
|
+
private cursor;
|
|
63
|
+
private range;
|
|
64
|
+
private margin;
|
|
65
|
+
private background;
|
|
66
|
+
private badge;
|
|
67
|
+
private search;
|
|
68
|
+
private group;
|
|
69
|
+
private area;
|
|
70
|
+
private underline;
|
|
71
|
+
private strikeout;
|
|
72
|
+
private highlight;
|
|
73
|
+
private historyManager;
|
|
74
|
+
private previewer;
|
|
75
|
+
private imageParticle;
|
|
76
|
+
private laTexParticle;
|
|
77
|
+
private textParticle;
|
|
78
|
+
private tableParticle;
|
|
79
|
+
private tableTool;
|
|
80
|
+
private tableOperate;
|
|
81
|
+
private pageNumber;
|
|
82
|
+
private lineNumber;
|
|
83
|
+
private waterMark;
|
|
84
|
+
private placeholder;
|
|
85
|
+
private header;
|
|
86
|
+
private footer;
|
|
87
|
+
private hyperlinkParticle;
|
|
88
|
+
private labelParticle;
|
|
89
|
+
private dateParticle;
|
|
90
|
+
private separatorParticle;
|
|
91
|
+
private pageBreakParticle;
|
|
92
|
+
private superscriptParticle;
|
|
93
|
+
private subscriptParticle;
|
|
94
|
+
private checkboxParticle;
|
|
95
|
+
private radioParticle;
|
|
96
|
+
private blockParticle;
|
|
97
|
+
private listParticle;
|
|
98
|
+
private lineBreakParticle;
|
|
99
|
+
private whiteSpaceParticle;
|
|
100
|
+
private control;
|
|
101
|
+
private pageBorder;
|
|
102
|
+
private workerManager;
|
|
103
|
+
private scrollObserver;
|
|
104
|
+
private selectionObserver;
|
|
105
|
+
private imageObserver;
|
|
106
|
+
private graffiti;
|
|
107
|
+
private LETTER_REG;
|
|
108
|
+
private WORD_LIKE_REG;
|
|
109
|
+
private rowList;
|
|
110
|
+
private pageRowList;
|
|
111
|
+
private painterStyle;
|
|
112
|
+
private painterOptions;
|
|
113
|
+
private visiblePageNoList;
|
|
114
|
+
private intersectionPageNo;
|
|
115
|
+
private lazyRenderIntersectionObserver;
|
|
116
|
+
private printModeData;
|
|
117
|
+
constructor(rootContainer: HTMLElement, options: DeepRequired<IEditorOption>, data: IEditorData, listener: Listener, eventBus: EventBus<EventBusMap>, override: Override);
|
|
118
|
+
setPrintData(): void;
|
|
119
|
+
clearPrintData(): void;
|
|
120
|
+
getLetterReg(): RegExp;
|
|
121
|
+
getMode(): EditorMode;
|
|
122
|
+
setMode(payload: EditorMode): void;
|
|
123
|
+
isReadonly(): boolean;
|
|
124
|
+
isDisabled(): boolean;
|
|
125
|
+
isDesignMode(): boolean;
|
|
126
|
+
isPrintMode(): boolean;
|
|
127
|
+
isGraffitiMode(): boolean;
|
|
128
|
+
getOriginalWidth(): number;
|
|
129
|
+
getOriginalHeight(): number;
|
|
130
|
+
getWidth(): number;
|
|
131
|
+
getHeight(): number;
|
|
132
|
+
getMainHeight(): number;
|
|
133
|
+
getMainOuterHeight(): number;
|
|
134
|
+
getCanvasWidth(pageNo?: number): number;
|
|
135
|
+
getCanvasHeight(pageNo?: number): number;
|
|
136
|
+
getInnerWidth(): number;
|
|
137
|
+
getOriginalInnerWidth(): number;
|
|
138
|
+
getContextInnerWidth(): number;
|
|
139
|
+
getMargins(): IMargin;
|
|
140
|
+
getOriginalMargins(): number[];
|
|
141
|
+
getPageGap(): number;
|
|
142
|
+
getOriginalPageGap(): number;
|
|
143
|
+
getPageNumberBottom(): number;
|
|
144
|
+
getMarginIndicatorSize(): number;
|
|
145
|
+
getDefaultBasicRowMarginHeight(): number;
|
|
146
|
+
getHighlightMarginHeight(): number;
|
|
147
|
+
getTdPadding(): IPadding;
|
|
148
|
+
getContainer(): HTMLDivElement;
|
|
149
|
+
getPageContainer(): HTMLDivElement;
|
|
150
|
+
getVisiblePageNoList(): number[];
|
|
151
|
+
setVisiblePageNoList(payload: number[]): void;
|
|
152
|
+
getIntersectionPageNo(): number;
|
|
153
|
+
setIntersectionPageNo(payload: number): void;
|
|
154
|
+
getPageNo(): number;
|
|
155
|
+
setPageNo(payload: number): void;
|
|
156
|
+
getRenderCount(): number;
|
|
157
|
+
getPage(pageNo?: number): HTMLCanvasElement;
|
|
158
|
+
getPageList(): HTMLCanvasElement[];
|
|
159
|
+
getPageCount(): number;
|
|
160
|
+
getTableRowList(sourceElementList: IElement[]): IRow[];
|
|
161
|
+
getOriginalRowList(): IRow[];
|
|
162
|
+
getRowList(): IRow[];
|
|
163
|
+
getPageRowList(): IRow[][];
|
|
164
|
+
getCtx(): CanvasRenderingContext2D;
|
|
165
|
+
getOptions(): DeepRequired<IEditorOption>;
|
|
166
|
+
getSearch(): Search;
|
|
167
|
+
getGroup(): Group;
|
|
168
|
+
getArea(): Area;
|
|
169
|
+
getBadge(): Badge;
|
|
170
|
+
getHistoryManager(): HistoryManager;
|
|
171
|
+
getPosition(): Position;
|
|
172
|
+
getZone(): Zone;
|
|
173
|
+
getRange(): RangeManager;
|
|
174
|
+
getLineBreakParticle(): LineBreakParticle;
|
|
175
|
+
getTextParticle(): TextParticle;
|
|
176
|
+
getHeaderElementList(): IElement[];
|
|
177
|
+
getTableElementList(sourceElementList: IElement[]): IElement[];
|
|
178
|
+
getElementList(): IElement[];
|
|
179
|
+
getMainElementList(): IElement[];
|
|
180
|
+
getOriginalElementList(): IElement[];
|
|
181
|
+
getOriginalMainElementList(): IElement[];
|
|
182
|
+
getFooterElementList(): IElement[];
|
|
183
|
+
getTd(): ITd | null;
|
|
184
|
+
insertElementList(payload: IElement[], options?: IInsertElementListOption): void;
|
|
185
|
+
appendElementList(elementList: IElement[], options?: IAppendElementListOption): void;
|
|
186
|
+
spliceElementList(elementList: IElement[], start: number, deleteCount: number, items?: IElement[], options?: ISpliceElementListOption): void;
|
|
187
|
+
getCanvasEvent(): CanvasEvent;
|
|
188
|
+
getGlobalEvent(): GlobalEvent;
|
|
189
|
+
getListener(): Listener;
|
|
190
|
+
getEventBus(): EventBus<EventBusMap>;
|
|
191
|
+
getOverride(): Override;
|
|
192
|
+
getCursor(): Cursor;
|
|
193
|
+
getPreviewer(): Previewer;
|
|
194
|
+
getImageParticle(): ImageParticle;
|
|
195
|
+
getTableTool(): TableTool;
|
|
196
|
+
getTableOperate(): TableOperate;
|
|
197
|
+
getTableParticle(): TableParticle;
|
|
198
|
+
getHeader(): Header;
|
|
199
|
+
getFooter(): Footer;
|
|
200
|
+
getHyperlinkParticle(): HyperlinkParticle;
|
|
201
|
+
getDateParticle(): DateParticle;
|
|
202
|
+
getListParticle(): ListParticle;
|
|
203
|
+
getCheckboxParticle(): CheckboxParticle;
|
|
204
|
+
getRadioParticle(): RadioParticle;
|
|
205
|
+
getControl(): Control;
|
|
206
|
+
getWorkerManager(): WorkerManager;
|
|
207
|
+
getImageObserver(): ImageObserver;
|
|
208
|
+
getI18n(): I18n;
|
|
209
|
+
getGraffiti(): Graffiti;
|
|
210
|
+
getRowCount(): number;
|
|
211
|
+
getDataURL(payload?: IGetImageOption): Promise<string[]>;
|
|
212
|
+
getPainterStyle(): IElementStyle | null;
|
|
213
|
+
getPainterOptions(): IPainterOption | null;
|
|
214
|
+
setPainterStyle(payload: IElementStyle | null, options?: IPainterOption): void;
|
|
215
|
+
setDefaultRange(): void;
|
|
216
|
+
getIsPagingMode(): boolean;
|
|
217
|
+
setPageMode(payload: PageMode): void;
|
|
218
|
+
setPageScale(payload: number): void;
|
|
219
|
+
getPagePixelRatio(): number;
|
|
220
|
+
setPagePixelRatio(payload: number | null): void;
|
|
221
|
+
setPageDevicePixel(): void;
|
|
222
|
+
setPaperSize(width: number, height: number): void;
|
|
223
|
+
setPaperDirection(payload: PaperDirection): void;
|
|
224
|
+
setPaperMargin(payload: IMargin): void;
|
|
225
|
+
getOriginValue(options?: IGetOriginValueOption): Required<IEditorData>;
|
|
226
|
+
getValue(options?: IGetValueOption): IEditorResult;
|
|
227
|
+
setValue(payload: Partial<IEditorData>, options?: ISetValueOption): void;
|
|
228
|
+
setEditorData(payload: Partial<Omit<IEditorData, 'graffiti'>>): void;
|
|
229
|
+
private _wrapContainer;
|
|
230
|
+
private _formatContainer;
|
|
231
|
+
private _createPageContainer;
|
|
232
|
+
private _createPage;
|
|
233
|
+
private _initPageContext;
|
|
234
|
+
getElementFont(el: IElement, scale?: number): string;
|
|
235
|
+
getElementSize(el: IElement): number;
|
|
236
|
+
getElementRowMargin(el: IElement): number;
|
|
237
|
+
computeRowList(payload: IComputeRowListPayload): IRow[];
|
|
238
|
+
private _computePageList;
|
|
239
|
+
private _drawHighlight;
|
|
240
|
+
drawRow(ctx: CanvasRenderingContext2D, payload: IDrawRowPayload): void;
|
|
241
|
+
private _drawFloat;
|
|
242
|
+
private _clearPage;
|
|
243
|
+
private _drawPage;
|
|
244
|
+
private _disconnectLazyRender;
|
|
245
|
+
private _lazyRender;
|
|
246
|
+
private _immediateRender;
|
|
247
|
+
render(payload?: IDrawOption): void;
|
|
248
|
+
setCursor(curIndex: number | undefined): number | undefined;
|
|
249
|
+
submitHistory(curIndex: number | undefined): void;
|
|
250
|
+
destroy(): void;
|
|
251
|
+
clearSideEffect(): void;
|
|
252
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ControlState } from '../../../dataset/enum/Control';
|
|
2
|
+
import { IControl, IControlChangeOption, IControlContext, IControlHighlight, IControlInitOption, IControlInstance, IDestroyControlOption, IGetControlValueOption, IGetControlValueResult, IInitNextControlOption, INextControlContext, IRepaintControlOption, ISetControlExtensionOption, ISetControlProperties, ISetControlRowFlexOption, ISetControlValueOption } from '../../../interface/Control';
|
|
3
|
+
import { IElement, IElementPosition } from '../../../interface/Element';
|
|
4
|
+
import { IRange } from '../../../interface/Range';
|
|
5
|
+
import { Draw } from '../Draw';
|
|
6
|
+
interface IMoveCursorResult {
|
|
7
|
+
newIndex: number;
|
|
8
|
+
newElement: IElement;
|
|
9
|
+
}
|
|
10
|
+
export declare class Control {
|
|
11
|
+
private controlBorder;
|
|
12
|
+
private draw;
|
|
13
|
+
private range;
|
|
14
|
+
private listener;
|
|
15
|
+
private eventBus;
|
|
16
|
+
private controlSearch;
|
|
17
|
+
private options;
|
|
18
|
+
private controlOptions;
|
|
19
|
+
private activeControl;
|
|
20
|
+
private activeControlValue;
|
|
21
|
+
private preElement;
|
|
22
|
+
constructor(draw: Draw);
|
|
23
|
+
setHighlightList(payload: IControlHighlight[]): void;
|
|
24
|
+
computeHighlightList(): void;
|
|
25
|
+
renderHighlightList(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
26
|
+
getDraw(): Draw;
|
|
27
|
+
filterAssistElement(elementList: IElement[]): IElement[];
|
|
28
|
+
getIsRangeCanCaptureEvent(): boolean;
|
|
29
|
+
getIsRangeInPostfix(): boolean;
|
|
30
|
+
getIsRangeWithinControl(): boolean;
|
|
31
|
+
getIsElementListContainFullControl(elementList: IElement[]): boolean;
|
|
32
|
+
getIsDisabledControl(context?: IControlContext): boolean;
|
|
33
|
+
getIsDisabledPasteControl(context?: IControlContext): boolean;
|
|
34
|
+
getIsExistValueByElementListIndex(elementList: IElement[], index: number): boolean;
|
|
35
|
+
getControlHighlight(elementList: IElement[], index: number): string;
|
|
36
|
+
getContainer(): HTMLDivElement;
|
|
37
|
+
getElementList(): IElement[];
|
|
38
|
+
getPosition(): IElementPosition | null;
|
|
39
|
+
getPreY(): number;
|
|
40
|
+
getRange(): IRange;
|
|
41
|
+
getValueRange(context?: IControlContext): IRange | null;
|
|
42
|
+
shrinkBoundary(context?: IControlContext): void;
|
|
43
|
+
getActiveControl(): IControlInstance | null;
|
|
44
|
+
getControlElementList(context?: IControlContext): IElement[];
|
|
45
|
+
updateActiveControlValue(): void;
|
|
46
|
+
emitControlChange(state: ControlState): void;
|
|
47
|
+
initControl(): void;
|
|
48
|
+
destroyControl(options?: IDestroyControlOption): void;
|
|
49
|
+
repaintControl(options?: IRepaintControlOption): void;
|
|
50
|
+
emitControlContentChange(options?: IControlChangeOption): void;
|
|
51
|
+
reAwakeControl(): void;
|
|
52
|
+
selectValue(): boolean;
|
|
53
|
+
moveCursor(position: IControlInitOption): IMoveCursorResult;
|
|
54
|
+
removeControl(startIndex: number, context?: IControlContext): number | null;
|
|
55
|
+
removePlaceholder(startIndex: number, context?: IControlContext): void;
|
|
56
|
+
addPlaceholder(startIndex: number, context?: IControlContext): void;
|
|
57
|
+
setValue(data: IElement[]): number;
|
|
58
|
+
setControlProperties(properties: Partial<IControl>, context?: IControlContext): void;
|
|
59
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
60
|
+
cut(): number;
|
|
61
|
+
getValueById(payload: IGetControlValueOption): IGetControlValueResult;
|
|
62
|
+
setValueListById(payload: ISetControlValueOption[]): void;
|
|
63
|
+
setExtensionListById(payload: ISetControlExtensionOption[]): void;
|
|
64
|
+
setPropertiesListById(payload: ISetControlProperties[]): void;
|
|
65
|
+
getList(): IElement[];
|
|
66
|
+
recordBorderInfo(x: number, y: number, width: number, height: number): void;
|
|
67
|
+
drawBorder(ctx: CanvasRenderingContext2D): void;
|
|
68
|
+
getPreControlContext(): INextControlContext | null;
|
|
69
|
+
getNextControlContext(): INextControlContext | null;
|
|
70
|
+
initNextControl(option?: IInitNextControlOption): void;
|
|
71
|
+
setMinWidthControlInfo(option: ISetControlRowFlexOption): void;
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IControlContext, IControlInstance, IControlRuleOption } from '../../../../interface/Control';
|
|
2
|
+
import { IElement } from '../../../../interface/Element';
|
|
3
|
+
import { Control } from '../Control';
|
|
4
|
+
export declare class CheckboxControl implements IControlInstance {
|
|
5
|
+
protected element: IElement;
|
|
6
|
+
protected control: Control;
|
|
7
|
+
constructor(element: IElement, control: Control);
|
|
8
|
+
setElement(element: IElement): void;
|
|
9
|
+
getElement(): IElement;
|
|
10
|
+
getCode(): string | null;
|
|
11
|
+
getValue(): IElement[];
|
|
12
|
+
setValue(): number;
|
|
13
|
+
setSelect(codes: string[], context?: IControlContext, options?: IControlRuleOption): void;
|
|
14
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
15
|
+
cut(): number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IControlContext, IControlInstance, IControlRuleOption } from '../../../../interface/Control';
|
|
2
|
+
import { IElement } from '../../../../interface/Element';
|
|
3
|
+
import { Control } from '../Control';
|
|
4
|
+
export declare class DateControl implements IControlInstance {
|
|
5
|
+
private draw;
|
|
6
|
+
private element;
|
|
7
|
+
private control;
|
|
8
|
+
private isPopup;
|
|
9
|
+
private datePicker;
|
|
10
|
+
private options;
|
|
11
|
+
constructor(element: IElement, control: Control);
|
|
12
|
+
setElement(element: IElement): void;
|
|
13
|
+
getElement(): IElement;
|
|
14
|
+
getIsPopup(): boolean;
|
|
15
|
+
getValue(context?: IControlContext): IElement[];
|
|
16
|
+
setValue(data: IElement[], context?: IControlContext, options?: IControlRuleOption): number;
|
|
17
|
+
clearSelect(context?: IControlContext, options?: IControlRuleOption): number;
|
|
18
|
+
setSelect(date: string, context?: IControlContext, options?: IControlRuleOption): void;
|
|
19
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
20
|
+
cut(): number;
|
|
21
|
+
awake(): void;
|
|
22
|
+
destroy(): void;
|
|
23
|
+
private _setDate;
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IControlHighlight, IControlHighlightRule } from '../../../../interface/Control';
|
|
2
|
+
import { IElement } from '../../../../interface/Element';
|
|
3
|
+
import { ISearchResult } from '../../../../interface/Search';
|
|
4
|
+
import { Control } from '../Control';
|
|
5
|
+
type IHighlightMatchResult = (ISearchResult & IControlHighlightRule)[];
|
|
6
|
+
export declare class ControlSearch {
|
|
7
|
+
private draw;
|
|
8
|
+
private control;
|
|
9
|
+
private options;
|
|
10
|
+
private highlightList;
|
|
11
|
+
private highlightMatchResult;
|
|
12
|
+
constructor(control: Control);
|
|
13
|
+
getControlHighlight(elementList: IElement[], index: number): string;
|
|
14
|
+
getHighlightMatchResult(): IHighlightMatchResult;
|
|
15
|
+
getHighlightList(): IControlHighlight[];
|
|
16
|
+
setHighlightList(payload: IControlHighlight[]): void;
|
|
17
|
+
computeHighlightList(): void;
|
|
18
|
+
renderHighlightList(ctx: CanvasRenderingContext2D, pageIndex: number): void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Control } from '../Control';
|
|
2
|
+
interface CalculatorOptions {
|
|
3
|
+
control: Control;
|
|
4
|
+
onCalculate: (result: number) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare class Calculator {
|
|
7
|
+
private control;
|
|
8
|
+
private calculatorDom;
|
|
9
|
+
private onCalculate;
|
|
10
|
+
private currentExpression;
|
|
11
|
+
constructor(options: CalculatorOptions);
|
|
12
|
+
createPopup(): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
private calculate;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IControlContext, IControlRuleOption } from '../../../../interface/Control';
|
|
2
|
+
import { IElement } from '../../../../interface/Element';
|
|
3
|
+
import { TextControl } from '../text/TextControl';
|
|
4
|
+
export declare class NumberControl extends TextControl {
|
|
5
|
+
private isPopup;
|
|
6
|
+
private calculator;
|
|
7
|
+
constructor(element: IElement, control: any);
|
|
8
|
+
getIsPopup(): boolean;
|
|
9
|
+
setValue(data: IElement[], context?: IControlContext, options?: IControlRuleOption): number;
|
|
10
|
+
private _setCalculatedValue;
|
|
11
|
+
awake(): void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IControlContext, IControlRuleOption } from '../../../../interface/Control';
|
|
2
|
+
import { CheckboxControl } from '../checkbox/CheckboxControl';
|
|
3
|
+
export declare class RadioControl extends CheckboxControl {
|
|
4
|
+
setSelect(codes: string[], context?: IControlContext, options?: IControlRuleOption): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IElementFillRect } from '../../../../interface/Element';
|
|
2
|
+
import { Draw } from '../../Draw';
|
|
3
|
+
export declare class ControlBorder {
|
|
4
|
+
protected borderRect: IElementFillRect;
|
|
5
|
+
private options;
|
|
6
|
+
constructor(draw: Draw);
|
|
7
|
+
clearBorderInfo(): IElementFillRect;
|
|
8
|
+
recordBorderInfo(x: number, y: number, width: number, height: number): void;
|
|
9
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IControlContext, IControlInstance, IControlRuleOption } from '../../../../interface/Control';
|
|
2
|
+
import { IElement } from '../../../../interface/Element';
|
|
3
|
+
import { Control } from '../Control';
|
|
4
|
+
export declare class SelectControl implements IControlInstance {
|
|
5
|
+
private draw;
|
|
6
|
+
private element;
|
|
7
|
+
private control;
|
|
8
|
+
private isPopup;
|
|
9
|
+
private selectDom;
|
|
10
|
+
private options;
|
|
11
|
+
private VALUE_DELIMITER;
|
|
12
|
+
private DEFAULT_MULTI_SELECT_DELIMITER;
|
|
13
|
+
constructor(element: IElement, control: Control);
|
|
14
|
+
setElement(element: IElement): void;
|
|
15
|
+
getElement(): IElement;
|
|
16
|
+
getIsPopup(): boolean;
|
|
17
|
+
getCodes(): string[];
|
|
18
|
+
getText(codes: string[]): string | null;
|
|
19
|
+
getValue(context?: IControlContext): IElement[];
|
|
20
|
+
setValue(data: IElement[], context?: IControlContext, options?: IControlRuleOption): number;
|
|
21
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
22
|
+
cut(): number;
|
|
23
|
+
clearSelect(context?: IControlContext, options?: IControlRuleOption): number;
|
|
24
|
+
setSelect(code: string, context?: IControlContext, options?: IControlRuleOption): void;
|
|
25
|
+
private _createSelectPopupDom;
|
|
26
|
+
awake(): void;
|
|
27
|
+
destroy(): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DeepRequired } from '../../../../interface/Common';
|
|
2
|
+
import { IControlContext, IControlInstance, IControlRuleOption } from '../../../../interface/Control';
|
|
3
|
+
import { IEditorOption } from '../../../../interface/Editor';
|
|
4
|
+
import { IElement } from '../../../../interface/Element';
|
|
5
|
+
import { Control } from '../Control';
|
|
6
|
+
export declare class TextControl implements IControlInstance {
|
|
7
|
+
protected element: IElement;
|
|
8
|
+
protected control: Control;
|
|
9
|
+
protected options: DeepRequired<IEditorOption>;
|
|
10
|
+
constructor(element: IElement, control: Control);
|
|
11
|
+
setElement(element: IElement): void;
|
|
12
|
+
getElement(): IElement;
|
|
13
|
+
getValue(context?: IControlContext): IElement[];
|
|
14
|
+
setValue(data: IElement[], context?: IControlContext, options?: IControlRuleOption): number;
|
|
15
|
+
clearValue(context?: IControlContext, options?: IControlRuleOption): number;
|
|
16
|
+
keydown(evt: KeyboardEvent): number | null;
|
|
17
|
+
cut(): number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Draw } from '../Draw';
|
|
2
|
+
export declare class Background {
|
|
3
|
+
private draw;
|
|
4
|
+
private options;
|
|
5
|
+
private imageCache;
|
|
6
|
+
constructor(draw: Draw);
|
|
7
|
+
private _renderBackgroundColor;
|
|
8
|
+
private _drawImage;
|
|
9
|
+
private _renderBackgroundImage;
|
|
10
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IAreaBadge, IBadge } from '../../../interface/Badge';
|
|
2
|
+
import { Draw } from '../Draw';
|
|
3
|
+
export declare class Badge {
|
|
4
|
+
private draw;
|
|
5
|
+
private options;
|
|
6
|
+
private imageCache;
|
|
7
|
+
private mainBadge;
|
|
8
|
+
private areaBadgeMap;
|
|
9
|
+
constructor(draw: Draw);
|
|
10
|
+
setMainBadge(payload: IBadge | null): void;
|
|
11
|
+
setAreaBadgeMap(payload: IAreaBadge[]): void;
|
|
12
|
+
private _drawImage;
|
|
13
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IElement, IElementPosition } from '../../../interface/Element';
|
|
2
|
+
import { IRow } from '../../../interface/Row';
|
|
3
|
+
import { Draw } from '../Draw';
|
|
4
|
+
export declare class Footer {
|
|
5
|
+
private draw;
|
|
6
|
+
private position;
|
|
7
|
+
private zone;
|
|
8
|
+
private options;
|
|
9
|
+
private elementList;
|
|
10
|
+
private rowList;
|
|
11
|
+
private positionList;
|
|
12
|
+
constructor(draw: Draw, data?: IElement[]);
|
|
13
|
+
getRowList(): IRow[];
|
|
14
|
+
setElementList(elementList: IElement[]): void;
|
|
15
|
+
getElementList(): IElement[];
|
|
16
|
+
getPositionList(): IElementPosition[];
|
|
17
|
+
compute(): void;
|
|
18
|
+
recovery(): void;
|
|
19
|
+
private _computeRowList;
|
|
20
|
+
private _computePositionList;
|
|
21
|
+
getFooterBottom(): number;
|
|
22
|
+
getMaxHeight(): number;
|
|
23
|
+
getHeight(): number;
|
|
24
|
+
getRowHeight(): number;
|
|
25
|
+
getExtraHeight(): number;
|
|
26
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IElement, IElementPosition } from '../../../interface/Element';
|
|
2
|
+
import { IRow } from '../../../interface/Row';
|
|
3
|
+
import { Draw } from '../Draw';
|
|
4
|
+
export declare class Header {
|
|
5
|
+
private draw;
|
|
6
|
+
private position;
|
|
7
|
+
private zone;
|
|
8
|
+
private options;
|
|
9
|
+
private elementList;
|
|
10
|
+
private rowList;
|
|
11
|
+
private positionList;
|
|
12
|
+
constructor(draw: Draw, data?: IElement[]);
|
|
13
|
+
getRowList(): IRow[];
|
|
14
|
+
setElementList(elementList: IElement[]): void;
|
|
15
|
+
getElementList(): IElement[];
|
|
16
|
+
getPositionList(): IElementPosition[];
|
|
17
|
+
compute(): void;
|
|
18
|
+
recovery(): void;
|
|
19
|
+
private _computeRowList;
|
|
20
|
+
private _computePositionList;
|
|
21
|
+
getHeaderTop(): number;
|
|
22
|
+
getMaxHeight(): number;
|
|
23
|
+
getHeight(): number;
|
|
24
|
+
getRowHeight(): number;
|
|
25
|
+
getExtraHeight(): number;
|
|
26
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NumberType } from '../../../dataset/enum/Common';
|
|
2
|
+
import { Draw } from '../Draw';
|
|
3
|
+
export declare class PageNumber {
|
|
4
|
+
private draw;
|
|
5
|
+
private options;
|
|
6
|
+
constructor(draw: Draw);
|
|
7
|
+
static formatNumberPlaceholder(text: string, pageNo: number, replaceReg: RegExp, numberType: NumberType): string;
|
|
8
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IPlaceholder } from '../../../interface/Placeholder';
|
|
2
|
+
import { Draw } from '../Draw';
|
|
3
|
+
export interface IPlaceholderRenderOption {
|
|
4
|
+
placeholder: Required<IPlaceholder>;
|
|
5
|
+
startY?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class Placeholder {
|
|
8
|
+
private draw;
|
|
9
|
+
private position;
|
|
10
|
+
private options;
|
|
11
|
+
private elementList;
|
|
12
|
+
private rowList;
|
|
13
|
+
private positionList;
|
|
14
|
+
constructor(draw: Draw);
|
|
15
|
+
private _recovery;
|
|
16
|
+
_compute(options?: IPlaceholderRenderOption): void;
|
|
17
|
+
private _computeRowList;
|
|
18
|
+
private _computePositionList;
|
|
19
|
+
render(ctx: CanvasRenderingContext2D, options?: IPlaceholderRenderOption): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Draw } from '../Draw';
|
|
2
|
+
export declare class Watermark {
|
|
3
|
+
private draw;
|
|
4
|
+
private options;
|
|
5
|
+
private imageCache;
|
|
6
|
+
constructor(draw: Draw);
|
|
7
|
+
renderText(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
8
|
+
renderImage(ctx: CanvasRenderingContext2D): void;
|
|
9
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IGraffitiData } from '../../../interface/Graffiti';
|
|
2
|
+
import { Draw } from '../Draw';
|
|
3
|
+
export declare class Graffiti {
|
|
4
|
+
private draw;
|
|
5
|
+
private options;
|
|
6
|
+
private data;
|
|
7
|
+
private pageContainer;
|
|
8
|
+
private isDrawing;
|
|
9
|
+
private startStroke;
|
|
10
|
+
constructor(draw: Draw, data?: IGraffitiData[]);
|
|
11
|
+
private register;
|
|
12
|
+
private start;
|
|
13
|
+
private stop;
|
|
14
|
+
private drawing;
|
|
15
|
+
getValue(): IGraffitiData[];
|
|
16
|
+
compute(): void;
|
|
17
|
+
clear(): void;
|
|
18
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
19
|
+
}
|