ht-emr 0.7.30 → 0.7.32

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.
@@ -42,6 +42,7 @@ export declare class CommandAdapt {
42
42
  constructor(draw: Draw);
43
43
  private getButtonContentControlId;
44
44
  private getButtonContentText;
45
+ private hasButtonContent;
45
46
  private syncButtonPlaceholderElements;
46
47
  private normalizeButtonContentValue;
47
48
  private getButtonContentResult;
@@ -25,6 +25,8 @@ export declare class ButtonControl implements IControlInstance {
25
25
  awake(evt?: MouseEvent): void;
26
26
  private closeInputModal;
27
27
  private syncButtonPlaceholderElements;
28
+ private getControlValueText;
29
+ private rebuildButtonValueElements;
28
30
  private showEditModal;
29
31
  destroy(): void;
30
32
  }
@@ -85,6 +85,10 @@ export interface IControlAction {
85
85
  writeTarget?: 'self' | string;
86
86
  writeMode?: 'confirmAppend' | 'replaceOnConfirm' | string;
87
87
  }
88
+ export interface IControlValueLayout {
89
+ newline?: boolean;
90
+ indentChars?: number;
91
+ }
88
92
  export interface IControlBasic {
89
93
  type: ControlType;
90
94
  value: IElement[] | null;
@@ -112,6 +116,7 @@ export interface IControlBasic {
112
116
  code?: string | null;
113
117
  action?: IControlAction;
114
118
  editable?: boolean;
119
+ valueLayout?: IControlValueLayout;
115
120
  menstrualData?: IMenstrualData;
116
121
  }
117
122
  export interface IMenstrualData {
@@ -109,6 +109,7 @@ export interface IControlElement {
109
109
  controlId?: string;
110
110
  originControlId?: string;
111
111
  controlComponent?: ControlComponent;
112
+ buttonValueLayout?: boolean;
112
113
  }
113
114
  export interface ICheckboxElement {
114
115
  checkbox?: ICheckbox;
@@ -16,7 +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
+ import { IControl, IControlValueLayout } from '../interface/Control';
20
20
  import { IEditorOption } from '../interface/Editor';
21
21
  import { IElement } from '../interface/Element';
22
22
  export declare function unzipElementList(elementList: IElement[]): IElement[];
@@ -25,6 +25,12 @@ interface IFormatElementListOption {
25
25
  isForceCompensation?: boolean;
26
26
  editorOptions: DeepRequired<IEditorOption>;
27
27
  }
28
+ export declare function normalizeButtonValueLayout(valueLayout?: IControlValueLayout): Required<IControlValueLayout>;
29
+ export declare function isButtonValueLayoutElement(element?: IElement): boolean;
30
+ export declare function splitButtonValueWithLayout(text: string, control?: IControl): Array<{
31
+ value: string;
32
+ buttonValueLayout?: boolean;
33
+ }>;
28
34
  export declare function getReadonlyControlText(control?: IControl | null): string;
29
35
  export declare function getReadonlyElementText(element: IElement): string;
30
36
  export declare function getReadonlyElementListText(elementList: IElement[]): string;
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.30",
5
+ "version": "0.7.32",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",