ht-emr 0.7.53 → 0.7.55

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.
@@ -119,6 +119,10 @@ export declare class Cursor {
119
119
  */
120
120
  focus(): void;
121
121
  private _clearFocusTimeout;
122
+ /**
123
+ * 在当前指针事件的浏览器默认聚焦行为结束后恢复输入焦点。
124
+ */
125
+ requestFocus(): void;
122
126
  private _clearVisibilityFrame;
123
127
  /**
124
128
  * 元素已变更但新布局尚未生成时,取消旧光标的滚动检查。
@@ -579,6 +579,7 @@ export declare class Draw {
579
579
  * 在删除、光标移动或鼠标定位前刷新待绘制的输入。
580
580
  */
581
581
  flushPendingRender(): void;
582
+ private _takePendingRenderOption;
582
583
  private _cancelPendingRender;
583
584
  /**
584
585
  * 获取Canvas页面元素
@@ -54,6 +54,7 @@ export declare class Control {
54
54
  getActiveTextControlLimit(): {
55
55
  controlId: string;
56
56
  originControlId: string | null;
57
+ subTemplateInstanceId: string | null;
57
58
  parentControlId: string | null;
58
59
  startIndex: number;
59
60
  endIndex: number;
@@ -11,6 +11,7 @@ export interface IDrawOption {
11
11
  isLazy?: boolean;
12
12
  isInit?: boolean;
13
13
  isSourceHistory?: boolean;
14
+ isContentChange?: boolean;
14
15
  isFirstRender?: boolean;
15
16
  isDel?: boolean;
16
17
  traceLabel?: string;
@@ -299,6 +299,8 @@ export interface ISubTemplateElement {
299
299
  subTemplateExpanded?: boolean;
300
300
  /** 子模板运行时父节点ID,不参与导出 */
301
301
  subTemplateParentId?: string;
302
+ /** 子模板运行时实例ID,用于区分重复插入的模板 */
303
+ subTemplateInstanceId?: string;
302
304
  }
303
305
  export type IElement = IElementBasic & IElementStyle & IElementRule & IElementGroup & ITable & IHyperlinkElement & ISuperscriptSubscript & ISeparator & IControlElement & ICheckboxElement & IRadioElement & ILaTexElement & IDateElement & IImageElement & IBlockElement & ITitleElement & IListElement & IAreaElement & ILabelElement & IMenstrualHistoryElement & IFetalHeartPositionElement & IToothPositionElement & IMacroElement & IReusableItemElement & ISubTemplateElement;
304
306
  export interface IElementMetrics {
@@ -13,6 +13,13 @@ export declare function registerElementMapping(id: string, originalElement: IEle
13
13
  * Clear element mapping (for cleanup)
14
14
  */
15
15
  export declare function clearElementMappings(): void;
16
+ export interface IControlElementIdentity {
17
+ controlId: string;
18
+ originControlId: string | null;
19
+ subTemplateInstanceId: string | null;
20
+ }
21
+ export declare function getControlElementIdentity(element?: IElement | null): IControlElementIdentity | null;
22
+ export declare function isSameControlElementIdentity(source?: IElement | null, target?: IElement | null): boolean;
16
23
  import { LocationPosition } from '../dataset/enum/Common';
17
24
  import { RowFlex } from '../dataset/enum/Row';
18
25
  import { DeepRequired } from '../interface/Common';
@@ -7,6 +7,10 @@ export interface ITemplateFieldValue {
7
7
  }
8
8
  export type ITemplateFieldMap = Map<string, ITemplateFieldValue[]>;
9
9
  export declare function walkNestedElements(elementList: IElement[], visitor: (element: IElement) => void): void;
10
+ /** Attach runtime content to one concrete sub-template instance. */
11
+ export declare function applySubTemplateRuntimeContext(elementList: IElement[], subTemplate: IElement): void;
12
+ /** Remove fields that only identify expanded runtime instances. */
13
+ export declare function clearSubTemplateRuntimeMetadata(elementList: IElement[]): void;
10
14
  export declare function collectTemplateFieldMap(elementList: IElement[]): ITemplateFieldMap;
11
15
  export declare function getTemplateConditionVisible(conditions: ITemplateCondition[] | undefined, fieldMap: ITemplateFieldMap, relation?: ITemplateConditionRelation): boolean;
12
16
  export {};
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.53",
5
+ "version": "0.7.55",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",