ht-emr 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-editor.js +4036 -3892
- package/dist/canvas-editor.js.map +1 -1
- package/dist/canvas-editor.umd.cjs +41 -41
- package/dist/canvas-editor.umd.cjs.map +1 -1
- package/dist/src/editor/core/command/Command.d.ts +1 -0
- package/dist/src/editor/core/command/CommandAdapt.d.ts +2 -1
- package/dist/src/editor/core/draw/Draw.d.ts +12 -0
- package/dist/src/editor/core/event/GlobalEvent.d.ts +1 -0
- package/dist/src/editor/core/observer/SelectionObserver.d.ts +1 -0
- package/dist/src/editor/core/range/RangeManager.d.ts +3 -0
- package/dist/src/editor/core/shortcut/Shortcut.d.ts +1 -0
- package/dist/src/editor/index.d.ts +8 -2
- package/dist/src/editor/interface/Editor.d.ts +6 -0
- package/package.json +1 -1
|
@@ -120,6 +120,7 @@ export declare class Command {
|
|
|
120
120
|
executeInsertTextField: CommandAdapt['insertTextField'];
|
|
121
121
|
executeJumpControl: CommandAdapt['jumpControl'];
|
|
122
122
|
executeUpdateOptions: CommandAdapt['updateOptions'];
|
|
123
|
+
executeSetFormModeTrace: CommandAdapt['setFormModeTrace'];
|
|
123
124
|
executeInsertTitle: CommandAdapt['insertTitle'];
|
|
124
125
|
executeFocus: CommandAdapt['focus'];
|
|
125
126
|
executeComputeElementListHeight: CommandAdapt['computeElementListHeight'];
|
|
@@ -12,7 +12,7 @@ import { ICatalog } from '../../interface/Catalog';
|
|
|
12
12
|
import { DeepRequired } from '../../interface/Common';
|
|
13
13
|
import { IGetControlValueOption, IGetControlValueResult, ILocationControlOption, IRemoveControlOption, ISetControlExtensionOption, ISetControlHighlightOption, ISetControlProperties, ISetControlValueOption } from '../../interface/Control';
|
|
14
14
|
import { IAppendElementListOption, IDrawImagePayload, IForceUpdateOption, IGetImageOption, IGetValueOption, IPainterOption } from '../../interface/Draw';
|
|
15
|
-
import { IEditorData, IEditorHTML, IEditorOption, IEditorResult, IEditorText, IFocusOption, ISetValueOption, IUpdateOption } from '../../interface/Editor';
|
|
15
|
+
import { IEditorData, IEditorHTML, IEditorOption, IFormModeTraceOption, IEditorResult, IEditorText, IFocusOption, ISetValueOption, IUpdateOption } from '../../interface/Editor';
|
|
16
16
|
import { IDeleteElementByIdOption, IElement, IElementPosition, IGetElementByIdOption, IGetMacroValueOption, IImageCaption, IImageCrop, IInsertElementListOption, IMacroValueResult, ISetMacroValueOption, IUpdateElementByIdOption, IUpdateMacroPropertiesOption } from '../../interface/Element';
|
|
17
17
|
import { ICopyOption, IPasteOption, IPositionContextByEventOption, IPositionContextByEventResult } from '../../interface/Event';
|
|
18
18
|
import { IMargin } from '../../interface/Margin';
|
|
@@ -194,6 +194,7 @@ export declare class CommandAdapt {
|
|
|
194
194
|
setControlPropertiesList(payload: ISetControlProperties[]): void;
|
|
195
195
|
setControlHighlight(payload: ISetControlHighlightOption): void;
|
|
196
196
|
updateOptions(payload: IUpdateOption): void;
|
|
197
|
+
setFormModeTrace(payload: IFormModeTraceOption): void;
|
|
197
198
|
getControlList(): IElement[];
|
|
198
199
|
locationControl(controlId: string, options?: ILocationControlOption): void;
|
|
199
200
|
insertTextField(payload?: IElement): void;
|
|
@@ -117,6 +117,9 @@ export declare class Draw {
|
|
|
117
117
|
private imageObserver;
|
|
118
118
|
private graffiti;
|
|
119
119
|
private command;
|
|
120
|
+
private interactionPaused;
|
|
121
|
+
private overlayActiveCount;
|
|
122
|
+
private globalShortcutSuspended;
|
|
120
123
|
private LETTER_REG;
|
|
121
124
|
private WORD_LIKE_REG;
|
|
122
125
|
private rowList;
|
|
@@ -165,6 +168,15 @@ export declare class Draw {
|
|
|
165
168
|
getTdPadding(tableElement?: IElement): IPadding;
|
|
166
169
|
getContainer(): HTMLDivElement;
|
|
167
170
|
getPageContainer(): HTMLDivElement;
|
|
171
|
+
getEventTarget(target: EventTarget | null): Element | null;
|
|
172
|
+
isTargetInsideEditor(target: EventTarget | null): boolean;
|
|
173
|
+
isTargetInsideExternalOverlay(target: EventTarget | null): boolean;
|
|
174
|
+
pauseInteraction(): void;
|
|
175
|
+
resumeInteraction(): void;
|
|
176
|
+
setOverlayActive(payload: boolean): void;
|
|
177
|
+
suspendGlobalShortcut(payload: boolean): void;
|
|
178
|
+
isInteractionSuspended(): boolean;
|
|
179
|
+
isGlobalShortcutActive(): boolean;
|
|
168
180
|
getVisiblePageNoList(): number[];
|
|
169
181
|
setVisiblePageNoList(payload: number[]): void;
|
|
170
182
|
getIntersectionPageNo(): number;
|
|
@@ -18,6 +18,7 @@ export declare class GlobalEvent {
|
|
|
18
18
|
private addEvent;
|
|
19
19
|
removeEvent(): void;
|
|
20
20
|
clearSideEffect: (evt: Event) => void;
|
|
21
|
+
resetSideEffect: () => void;
|
|
21
22
|
setCanvasEventAbility: () => void;
|
|
22
23
|
watchCursorActive(): void;
|
|
23
24
|
setPageScale: (evt: WheelEvent) => void;
|
|
@@ -11,7 +11,10 @@ export declare class RangeManager {
|
|
|
11
11
|
private position;
|
|
12
12
|
private historyManager;
|
|
13
13
|
private defaultStyle;
|
|
14
|
+
private lastRangeStyle;
|
|
14
15
|
constructor(draw: Draw);
|
|
16
|
+
private _isSameRangeStyle;
|
|
17
|
+
private _emitRangeStyle;
|
|
15
18
|
getRange(): IRange;
|
|
16
19
|
clearRange(): void;
|
|
17
20
|
setDefaultStyle(style: IRangeElementStyle | null): void;
|
|
@@ -2,6 +2,7 @@ import { IRegisterShortcut } from '../../interface/shortcut/Shortcut';
|
|
|
2
2
|
import { Command } from '../command/Command';
|
|
3
3
|
import { Draw } from '../draw/Draw';
|
|
4
4
|
export declare class Shortcut {
|
|
5
|
+
private draw;
|
|
5
6
|
private command;
|
|
6
7
|
private globalShortcutList;
|
|
7
8
|
private agentShortcutList;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './assets/css/index.css';
|
|
2
|
-
import { IEditorData, IEditorOption, IEditorResult } from './interface/Editor';
|
|
2
|
+
import { IEditorData, IEditorOption, IEditorResult, IFormModeTraceOption } from './interface/Editor';
|
|
3
3
|
import { IElement, IMacroConfig, IMacroElement, IGetMacroValueOption, IMacroValueResult, ISetMacroValueOption, IUpdateMacroPropertiesOption, ISubTemplateElement } from './interface/Element';
|
|
4
4
|
import { Command } from './core/command/Command';
|
|
5
5
|
import { Listener } from './core/listener/Listener';
|
|
@@ -49,9 +49,15 @@ export default class Editor {
|
|
|
49
49
|
register: Register;
|
|
50
50
|
destroy: () => void;
|
|
51
51
|
use: UsePlugin;
|
|
52
|
+
private draw;
|
|
52
53
|
constructor(container: HTMLDivElement, data: IEditorData | IElement[], options?: IEditorOption);
|
|
54
|
+
setFormModeTrace(payload: IFormModeTraceOption): void;
|
|
55
|
+
pauseInteraction(): void;
|
|
56
|
+
resumeInteraction(): void;
|
|
57
|
+
setOverlayActive(payload: boolean): void;
|
|
58
|
+
suspendGlobalShortcut(payload: boolean): void;
|
|
53
59
|
}
|
|
54
60
|
export { splitText, createDomFromElementList, getElementListByHTML, getTextFromElementList };
|
|
55
61
|
export { EDITOR_COMPONENT, LETTER_CLASS, INTERNAL_CONTEXT_MENU_KEY, INTERNAL_SHORTCUT_KEY, EDITOR_CLIPBOARD };
|
|
56
62
|
export { Editor, RowFlex, VerticalAlign, EditorZone, EditorMode, ElementType, ControlType, EditorComponent, PageMode, RenderMode, ImageDisplay, Command, KeyMap, BlockType, PaperDirection, TableBorder, TdBorder, TdSlash, MaxHeightRatio, NumberType, TitleLevel, ListType, ListStyle, WordBreak, ControlIndentation, ControlComponent, BackgroundRepeat, BackgroundSize, TextDecorationStyle, LineNumberType, LocationPosition, AreaMode, ControlState, FlexDirection, WatermarkType };
|
|
57
|
-
export type { IElement, IEditorData, IEditorOption, IEditorResult, IContextMenuContext, IRegisterContextMenu, IWatermark, INavigateInfo, IBlock, ILang, ICatalog, ICatalogItem, IRange, IRangeStyle, IBadge, IGetElementListByHTMLOption, IMacroConfig, IMacroElement, IGetMacroValueOption, IMacroValueResult, ISetMacroValueOption, IUpdateMacroPropertiesOption, ISubTemplateElement };
|
|
63
|
+
export type { IElement, IEditorData, IEditorOption, IEditorResult, IFormModeTraceOption, IContextMenuContext, IRegisterContextMenu, IWatermark, INavigateInfo, IBlock, ILang, ICatalog, ICatalogItem, IRange, IRangeStyle, IBadge, IGetElementListByHTMLOption, IMacroConfig, IMacroElement, IGetMacroValueOption, IMacroValueResult, ISetMacroValueOption, IUpdateMacroPropertiesOption, ISubTemplateElement };
|
|
@@ -140,6 +140,12 @@ export interface IReadonlyModeRule {
|
|
|
140
140
|
}
|
|
141
141
|
export interface IFormModeRule {
|
|
142
142
|
controlDeletableDisabled?: boolean;
|
|
143
|
+
inputTraceEnabled?: boolean;
|
|
144
|
+
deleteTraceEnabled?: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface IFormModeTraceOption {
|
|
147
|
+
inputTraceEnabled?: boolean;
|
|
148
|
+
deleteTraceEnabled?: boolean;
|
|
143
149
|
}
|
|
144
150
|
export interface IModeRule {
|
|
145
151
|
[EditorMode.PRINT]?: IPrintModeRule;
|