ht-emr 0.7.3 → 0.7.5

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.
@@ -64,7 +64,7 @@ export declare class CommandAdapt {
64
64
  /**
65
65
  * 触发控件编辑属性事件
66
66
  */
67
- triggerControlEditAttribute(controlId: string): void;
67
+ triggerControlEditAttribute(controlId?: string, targetElement?: IElement | null): void;
68
68
  /**
69
69
  * 修改元素属性
70
70
  * api 实现
@@ -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 字母匹配的正则表达式
@@ -20,7 +20,9 @@ export declare class Control {
20
20
  private activeControl;
21
21
  private activeControlValue;
22
22
  private preElement;
23
+ private isPopupAwakeDisabled;
23
24
  constructor(draw: Draw);
25
+ setPopupAwakeDisabled(isDisabled: boolean): void;
24
26
  setHighlightList(payload: IControlHighlight[]): void;
25
27
  computeHighlightList(): void;
26
28
  renderHighlightList(ctx: CanvasRenderingContext2D, pageNo: number): void;
@@ -86,6 +88,13 @@ export declare class Control {
86
88
  startTextFieldUnderline(controlId: string, x: number, y: number): void;
87
89
  recordTextFieldUnderlineWidth(width: number): void;
88
90
  drawTextFieldUnderline(ctx: CanvasRenderingContext2D): void;
91
+ private _getControlIdentity;
92
+ private _isSameControlIdentity;
93
+ private _isNestedParentControlElement;
94
+ private _isNestedTextContainerElement;
95
+ private _getCurrentControlIdentity;
96
+ private _getControlNavigationIndex;
97
+ private _isTrailingNestedControlBoundary;
89
98
  getPreControlContext(): INextControlContext | null;
90
99
  getNextControlContext(): INextControlContext | null;
91
100
  initNextControl(option?: IInitNextControlOption): void;
@@ -13,6 +13,9 @@ export declare class TableParticle {
13
13
  getTrListGroupByCol(payload: ITr[]): ITr[];
14
14
  getRangeRowCol(): ITd[][] | null;
15
15
  private _drawOuterBorder;
16
+ private _drawHorizontalBorder;
17
+ private _mergeHorizontalBorderRanges;
18
+ private _getPagingContinuationTopBorderRanges;
16
19
  private _drawSlash;
17
20
  private _drawBorder;
18
21
  private _drawBackgroundColor;
@@ -74,6 +74,8 @@ export type IButtonClick = (payload: {
74
74
  export type IControlEditAttribute = (payload: {
75
75
  controlId: string | undefined;
76
76
  element: IElement | IElement[];
77
+ targetElement?: IElement | null;
78
+ isControl?: boolean;
77
79
  }) => void;
78
80
  export type ILabelMousedown = (payload: {
79
81
  evt: MouseEvent;
@@ -6,6 +6,8 @@ import { IElement } from '../Element';
6
6
  export interface IContextMenuContext {
7
7
  startElement: IElement | null;
8
8
  endElement: IElement | null;
9
+ hitElement: IElement | null;
10
+ hitTableElement: IElement | null;
9
11
  isReadonly: boolean;
10
12
  editorHasSelection: boolean;
11
13
  editorTextFocus: boolean;
@@ -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.3",
5
+ "version": "0.7.5",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",