ht-emr 0.7.2 → 0.7.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/canvas-editor.js +7788 -6822
- package/dist/canvas-editor.umd.cjs +76 -72
- package/dist/src/editor/core/draw/Draw.d.ts +9 -0
- package/dist/src/editor/core/draw/control/Control.d.ts +0 -5
- package/dist/src/editor/core/draw/control/text/TextControl.d.ts +3 -1
- package/dist/src/editor/utils/element.d.ts +6 -1
- package/package.json +4 -9
- package/dist/canvas-editor.js.map +0 -1
- package/dist/canvas-editor.umd.cjs.map +0 -1
|
@@ -222,6 +222,8 @@ export declare class Draw {
|
|
|
222
222
|
private lazyRenderIntersectionObserver;
|
|
223
223
|
/** 打印模式数据 */
|
|
224
224
|
private printModeData;
|
|
225
|
+
/** 只读模式原始数据 */
|
|
226
|
+
private readonlyModeData;
|
|
225
227
|
/** 拆分单元格值缓存 */
|
|
226
228
|
private splitTdValueMap;
|
|
227
229
|
/** 单元格映射 */
|
|
@@ -260,6 +262,8 @@ export declare class Draw {
|
|
|
260
262
|
* 还原打印前保存的原始数据。
|
|
261
263
|
*/
|
|
262
264
|
clearPrintData(): void;
|
|
265
|
+
setReadonlyData(): void;
|
|
266
|
+
clearReadonlyData(): void;
|
|
263
267
|
/**
|
|
264
268
|
* 获取字母正则表达式
|
|
265
269
|
* @returns 字母匹配的正则表达式
|
|
@@ -794,6 +798,11 @@ export declare class Draw {
|
|
|
794
798
|
getElementRowMargin(el: IElement): number;
|
|
795
799
|
computeRowList(payload: IComputeRowListPayload): IRow[];
|
|
796
800
|
private _collectTextControlValueSet;
|
|
801
|
+
/**
|
|
802
|
+
* 收集含有内容的文本/文本域控件ID集合(包括嵌套控件)
|
|
803
|
+
* 嵌套控件也算父控件的内容,应该隐藏父控件的placeholder
|
|
804
|
+
*/
|
|
805
|
+
private _collectTextControlHasContentSet;
|
|
797
806
|
private _computePageList;
|
|
798
807
|
private _drawHighlight;
|
|
799
808
|
validateNumber(value: any): boolean;
|
|
@@ -89,11 +89,6 @@ export declare class Control {
|
|
|
89
89
|
getPreControlContext(): INextControlContext | null;
|
|
90
90
|
getNextControlContext(): INextControlContext | null;
|
|
91
91
|
initNextControl(option?: IInitNextControlOption): void;
|
|
92
|
-
private getControlKey;
|
|
93
|
-
private getControlStartIndex;
|
|
94
|
-
private getControlEnterIndex;
|
|
95
|
-
private isNavigableControlElement;
|
|
96
|
-
private getOrderedNavigableControlContexts;
|
|
97
92
|
setMinWidthControlInfo(option: ISetControlRowFlexOption): void;
|
|
98
93
|
mergeControl(context?: IControlContext): IMergeControlContext;
|
|
99
94
|
}
|
|
@@ -18,9 +18,11 @@ export declare class TextControl implements IControlInstance {
|
|
|
18
18
|
removeNextControlElement(controlId: string, nextTdId?: string): IElement | undefined;
|
|
19
19
|
setValue(data: IElement[], context?: IControlContext, options?: IControlRuleOption): number;
|
|
20
20
|
private _removeControlPlaceholders;
|
|
21
|
+
private _removePlaceholdersByControl;
|
|
22
|
+
private _findNearestTextAncestorId;
|
|
21
23
|
clearValue(context?: IControlContext, options?: IControlRuleOption): number;
|
|
22
24
|
keydown(evt: KeyboardEvent): number | null;
|
|
23
25
|
cut(): number;
|
|
24
|
-
strikeout(options?: IRichtextOption):
|
|
26
|
+
strikeout(options?: IRichtextOption): number | null;
|
|
25
27
|
strikeoute(options?: IRichtextOption): void;
|
|
26
28
|
}
|
|
@@ -16,6 +16,7 @@ export declare function clearElementMappings(): void;
|
|
|
16
16
|
import { LocationPosition } from '../dataset/enum/Common';
|
|
17
17
|
import { RowFlex } from '../dataset/enum/Row';
|
|
18
18
|
import { DeepRequired } from '../interface/Common';
|
|
19
|
+
import { IControl } from '../interface/Control';
|
|
19
20
|
import { IEditorOption } from '../interface/Editor';
|
|
20
21
|
import { IElement } from '../interface/Element';
|
|
21
22
|
export declare function unzipElementList(elementList: IElement[]): IElement[];
|
|
@@ -24,6 +25,10 @@ interface IFormatElementListOption {
|
|
|
24
25
|
isForceCompensation?: boolean;
|
|
25
26
|
editorOptions: DeepRequired<IEditorOption>;
|
|
26
27
|
}
|
|
28
|
+
export declare function getReadonlyControlText(control?: IControl | null): string;
|
|
29
|
+
export declare function getReadonlyElementText(element: IElement): string;
|
|
30
|
+
export declare function getReadonlyElementListText(elementList: IElement[]): string;
|
|
31
|
+
export declare function createReadonlyElementList(elementList?: IElement[]): IElement[];
|
|
27
32
|
export declare function formatElementList(elementList: IElement[], options: IFormatElementListOption): void;
|
|
28
33
|
export declare function isSameElementExceptValue(source: IElement, target: IElement): boolean;
|
|
29
34
|
interface IPickElementOption {
|
|
@@ -63,7 +68,7 @@ export interface IGetElementListByHTMLOption {
|
|
|
63
68
|
innerWidth: number;
|
|
64
69
|
}
|
|
65
70
|
export declare function getElementListByHTML(htmlText: string, options: IGetElementListByHTMLOption): IElement[];
|
|
66
|
-
export declare function getTextFromElementList(elementList: IElement[]): string;
|
|
71
|
+
export declare function getTextFromElementList(elementList: IElement[], options?: IEditorOption): string;
|
|
67
72
|
export declare function getSlimCloneElementList(elementList: IElement[]): IElement[];
|
|
68
73
|
export declare function getIsBlockElement(element?: IElement): boolean;
|
|
69
74
|
export declare function replaceHTMLElementTag(oldDom: HTMLElement, tagName: keyof HTMLElementTagNameMap): HTMLElement;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ht-emr",
|
|
3
3
|
"author": "swj",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.4",
|
|
6
6
|
"description": "rich text editor by canvas/svg",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
"package.json"
|
|
15
15
|
],
|
|
16
16
|
"typings": "./dist/src/editor/index.d.ts",
|
|
17
|
-
"main": "./dist/canvas-editor.umd.
|
|
18
|
-
"module": "./dist/canvas-editor.
|
|
19
|
-
|
|
17
|
+
"main": "./dist/canvas-editor.umd.cjs",
|
|
18
|
+
"module": "./dist/canvas-editor.js",
|
|
20
19
|
"engines": {
|
|
21
20
|
"node": ">=16.9.1"
|
|
22
21
|
},
|
|
@@ -51,10 +50,6 @@
|
|
|
51
50
|
"vitepress": "1.0.0-beta.6",
|
|
52
51
|
"vue": "^3.2.45"
|
|
53
52
|
},
|
|
54
|
-
"dependencies": {
|
|
55
|
-
"moment": "^2.30.1",
|
|
56
|
-
"prismjs": "^1.27.0"
|
|
57
|
-
},
|
|
58
53
|
"simple-git-hooks": {
|
|
59
54
|
"pre-commit": "npm run lint && npm run type:check",
|
|
60
55
|
"commit-msg": "node scripts/verifyCommit.js"
|
|
@@ -70,4 +65,4 @@
|
|
|
70
65
|
"url": "https://github.com/sunwanj1999/ht-emr/issues"
|
|
71
66
|
},
|
|
72
67
|
"homepage": "https://github.com/sunwanj1999/ht-emr#readme"
|
|
73
|
-
}
|
|
68
|
+
}
|