@hailin-zheng/editor-core 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/editor.css +610 -610
  2. package/index-cjs.d.ts +31 -31
  3. package/index-cjs.js +22202 -22166
  4. package/index-cjs.js.map +1 -1
  5. package/index.d.ts +31 -31
  6. package/index.js +22204 -22169
  7. package/index.js.map +1 -1
  8. package/med_editor/doc-editor.d.ts +464 -461
  9. package/med_editor/doc-rule.d.ts +46 -46
  10. package/med_editor/editor-core.d.ts +21 -21
  11. package/med_editor/framework/code-interpreter/ast-parser.d.ts +4 -4
  12. package/med_editor/framework/code-interpreter/document-eval-func.d.ts +18 -18
  13. package/med_editor/framework/code-interpreter/dynamic-execute.d.ts +23 -23
  14. package/med_editor/framework/doc-layout/document-arrange.d.ts +86 -86
  15. package/med_editor/framework/doc-layout/paragraph-arrange.d.ts +107 -107
  16. package/med_editor/framework/document-change.d.ts +295 -295
  17. package/med_editor/framework/document-combine.d.ts +24 -24
  18. package/med_editor/framework/document-comment.d.ts +38 -38
  19. package/med_editor/framework/document-context.d.ts +133 -133
  20. package/med_editor/framework/document-event.d.ts +251 -251
  21. package/med_editor/framework/document-input-cursor.d.ts +43 -43
  22. package/med_editor/framework/document-paginator.d.ts +46 -46
  23. package/med_editor/framework/document-svg.d.ts +36 -36
  24. package/med_editor/framework/document-template.d.ts +13 -13
  25. package/med_editor/framework/document-textline-mode.d.ts +6 -6
  26. package/med_editor/framework/element-define.d.ts +409 -406
  27. package/med_editor/framework/element-event-define.d.ts +107 -107
  28. package/med_editor/framework/element-props.d.ts +343 -343
  29. package/med_editor/framework/element-reader.d.ts +20 -20
  30. package/med_editor/framework/element-serialize.d.ts +36 -36
  31. package/med_editor/framework/element-type-handler.d.ts +9 -9
  32. package/med_editor/framework/history/element-trace-manage.d.ts +107 -107
  33. package/med_editor/framework/history/element-trace-tracking.d.ts +89 -89
  34. package/med_editor/framework/impl/checkbox/checkbox-impl.d.ts +19 -19
  35. package/med_editor/framework/impl/comments/comment-content-impl.d.ts +39 -39
  36. package/med_editor/framework/impl/comments/comment-element-impl.d.ts +24 -24
  37. package/med_editor/framework/impl/comments/comments-container-impl.d.ts +19 -19
  38. package/med_editor/framework/impl/comments/validate-msg-impl.d.ts +19 -19
  39. package/med_editor/framework/impl/data-element/data-decorate-impl.d.ts +15 -15
  40. package/med_editor/framework/impl/data-element/data-element-barcode.d.ts +32 -32
  41. package/med_editor/framework/impl/data-element/data-element-base-impl.d.ts +96 -96
  42. package/med_editor/framework/impl/data-element/data-element-check-impl.d.ts +26 -26
  43. package/med_editor/framework/impl/data-element/data-element-date-impl.d.ts +23 -23
  44. package/med_editor/framework/impl/data-element/data-element-group-impl.d.ts +17 -17
  45. package/med_editor/framework/impl/data-element/data-element-image-impl.d.ts +23 -23
  46. package/med_editor/framework/impl/data-element/data-element-list-impl.d.ts +21 -21
  47. package/med_editor/framework/impl/data-element/data-element-text-impl.d.ts +22 -22
  48. package/med_editor/framework/impl/data-element/qrcode.d.ts +93 -93
  49. package/med_editor/framework/impl/decorate/fill-null-space-imple.d.ts +16 -16
  50. package/med_editor/framework/impl/document/doc-body-impl.d.ts +19 -20
  51. package/med_editor/framework/impl/document/doc-body-part-impl.d.ts +22 -22
  52. package/med_editor/framework/impl/document/doc-container-impl.d.ts +7 -7
  53. package/med_editor/framework/impl/document/doc-footer-impl.d.ts +19 -19
  54. package/med_editor/framework/impl/document/doc-header-impl.d.ts +19 -19
  55. package/med_editor/framework/impl/document/doc-impl.d.ts +72 -71
  56. package/med_editor/framework/impl/index.d.ts +39 -39
  57. package/med_editor/framework/impl/media-formula/menstrual-history.d.ts +31 -31
  58. package/med_editor/framework/impl/media-formula/permanent-teeth.d.ts +34 -34
  59. package/med_editor/framework/impl/paragraph/p-impl.d.ts +38 -38
  60. package/med_editor/framework/impl/picture/RectEle.d.ts +44 -44
  61. package/med_editor/framework/impl/picture/image-impl.d.ts +24 -24
  62. package/med_editor/framework/impl/radio/radio-impl.d.ts +17 -17
  63. package/med_editor/framework/impl/svg/svg-impl.d.ts +20 -20
  64. package/med_editor/framework/impl/symbol/br-symbol-impl.d.ts +18 -18
  65. package/med_editor/framework/impl/symbol/p-symbol-impl.d.ts +16 -16
  66. package/med_editor/framework/impl/symbol/page-br-symbol-impl.d.ts +20 -20
  67. package/med_editor/framework/impl/symbol/tab-symbol-impl.d.ts +15 -15
  68. package/med_editor/framework/impl/table/table-cell-impl.d.ts +34 -34
  69. package/med_editor/framework/impl/table/table-impl.d.ts +49 -49
  70. package/med_editor/framework/impl/table/table-row-impl.d.ts +27 -27
  71. package/med_editor/framework/impl/table/table-split-cell-patch.d.ts +20 -20
  72. package/med_editor/framework/impl/table/table-split-cell.d.ts +92 -92
  73. package/med_editor/framework/impl/table/table-util.d.ts +180 -180
  74. package/med_editor/framework/impl/text/text-impl.d.ts +34 -34
  75. package/med_editor/framework/impl/text/track-run-impl.d.ts +27 -27
  76. package/med_editor/framework/infrastructure/event-subject.d.ts +56 -56
  77. package/med_editor/framework/infrastructure/notify.d.ts +13 -13
  78. package/med_editor/framework/print/document-print-offscreen.d.ts +58 -58
  79. package/med_editor/framework/print/document-print.d.ts +18 -18
  80. package/med_editor/framework/render-context.d.ts +111 -111
  81. package/med_editor/framework/render-define.d.ts +141 -141
  82. package/med_editor/framework/selection/document-selection.d.ts +91 -97
  83. package/med_editor/framework/selection/range-util.d.ts +36 -36
  84. package/med_editor/framework/selection/selection-overlays.d.ts +32 -32
  85. package/med_editor/framework/util/adjust-viewport-elements.d.ts +12 -12
  86. package/med_editor/framework/util/common-util.d.ts +76 -76
  87. package/med_editor/framework/util/document-segmenter.d.ts +2 -2
  88. package/med_editor/framework/util/element-util.d.ts +410 -410
  89. package/med_editor/framework/vnode/editor-calendar-vnode.d.ts +42 -42
  90. package/package.json +19 -19
@@ -1,38 +1,38 @@
1
- import { EditorContext } from "./document-context";
2
- import { CommentElement } from "./impl";
3
- /**
4
- * 处理文档批注
5
- */
6
- export declare class DocumentComment {
7
- docCtx: EditorContext;
8
- isDirty: boolean;
9
- constructor(docCtx: EditorContext);
10
- /**
11
- * 读取审阅标记符号
12
- */
13
- readComments(): void;
14
- /**
15
- * 执行删除前,需要更新批注节点位置
16
- */
17
- syncUpdateComments(): void;
18
- /**
19
- * 删除批注
20
- * @param id
21
- */
22
- removeComment(id: string): void;
23
- getCommMarkIndex(commMark: CommentElement): number;
24
- /**
25
- * 清除所有批注
26
- */
27
- clearAllComments(): void;
28
- /**
29
- * 清除所有的验证批注
30
- */
31
- clearAllValidates(): void;
32
- }
33
- export interface CommMarkSelectedStatus {
34
- startMark: CommentElement;
35
- endMark: CommentElement;
36
- startMarkStatus: boolean;
37
- endMarkStatus: boolean;
38
- }
1
+ import { EditorContext } from "./document-context";
2
+ import { CommentElement } from "./impl";
3
+ /**
4
+ * 处理文档批注
5
+ */
6
+ export declare class DocumentComment {
7
+ docCtx: EditorContext;
8
+ isDirty: boolean;
9
+ constructor(docCtx: EditorContext);
10
+ /**
11
+ * 读取审阅标记符号
12
+ */
13
+ readComments(): void;
14
+ /**
15
+ * 执行删除前,需要更新批注节点位置
16
+ */
17
+ syncUpdateComments(): void;
18
+ /**
19
+ * 删除批注
20
+ * @param id
21
+ */
22
+ removeComment(id: string): void;
23
+ getCommMarkIndex(commMark: CommentElement): number;
24
+ /**
25
+ * 清除所有批注
26
+ */
27
+ clearAllComments(): void;
28
+ /**
29
+ * 清除所有的验证批注
30
+ */
31
+ clearAllValidates(): void;
32
+ }
33
+ export interface CommMarkSelectedStatus {
34
+ startMark: CommentElement;
35
+ endMark: CommentElement;
36
+ startMarkStatus: boolean;
37
+ endMarkStatus: boolean;
38
+ }
@@ -1,133 +1,133 @@
1
- import { SelectionState } from "./selection/document-selection";
2
- import { BranchElement, Element, ElementHandler, Rect, RefreshType, ViewOptions } from "./element-define";
3
- import { ElementEvent, EventTypes } from "./element-event-define";
4
- import { DataElementValueStruct } from "./element-serialize";
5
- import { DataElementCheck, DataElementInlineGroup, DataElementLeaf, DocumentElement, TrackRunElement, TrackRunTypeEnum } from "./impl";
6
- import { DocumentChange } from "./document-change";
7
- /**
8
- * 当前打开的文档的上下文信息,当前文档所有的属性设置都暴露在上下文中
9
- */
10
- export declare class EditorContext {
11
- readonly selectionState: SelectionState;
12
- readonly viewOptions: ViewOptions;
13
- isDirty: boolean;
14
- cursorRect: Rect | null;
15
- private _document;
16
- syncRefresh: () => void;
17
- docChange: DocumentChange;
18
- clearPrevDocCb: (() => void) | null;
19
- nextViewFns: Array<() => void>;
20
- commentFlag: boolean;
21
- trackFlag: boolean;
22
- constructor(selectionState: SelectionState, viewOptions: ViewOptions);
23
- onNextView(cb: (() => void) | null): void;
24
- get document(): DocumentElement;
25
- set document(value: DocumentElement);
26
- clear(): void;
27
- get defaultCtx(): DocumentContext;
28
- getCurrentCtx(ele: Element): DocumentContext;
29
- /**
30
- * 根据当前选区,返回所在的上下文元素,返回类型为DocumentElement|DocumentBodyPartElement
31
- */
32
- getCurrentEleCtx(): BranchElement | null;
33
- getCtx(ele: BranchElement): DocumentContext;
34
- registerTypeHandlers<T extends Element = Element, F extends ElementEvent = ElementEvent>(elementType: any, eventName: EventTypes, handler: ElementHandler<F>, useCapture?: boolean): void;
35
- destroy(): void;
36
- /**
37
- * 切换行打印模式
38
- */
39
- switchTextlineMode(): void;
40
- /**
41
- * 替换数据元
42
- */
43
- replaceDataElement(oldDataElement: DataElementLeaf | DataElementInlineGroup, newElement: DataElementLeaf | DataElementInlineGroup, ss: SelectionState): void;
44
- get refreshType(): RefreshType | null;
45
- adaptiveScale(): number;
46
- }
47
- /**
48
- * 文档上下文
49
- */
50
- export declare class DocumentContext {
51
- ctx: BranchElement;
52
- private ss;
53
- constructor(ctx: BranchElement, ss: SelectionState);
54
- getControlIDList(): Array<string>;
55
- getControlInstanceList(): Array<DataElementInlineGroup | DataElementLeaf>;
56
- getControlById(id: string): DataElementInlineGroup | DataElementLeaf;
57
- getControlByName(name: string): DataElementInlineGroup | DataElementLeaf;
58
- /**
59
- * 获取数据元值集合
60
- */
61
- getDataElementValues(): Array<DataElementValueStruct>;
62
- /**
63
- * 获取数据元结构以及get\set闭包调用函数
64
- * @returns
65
- */
66
- getDataElementModelList(): Array<DataCheckEleModel | DataInputEleModel | DataLeafEleModel>;
67
- /**
68
- * 获取复选框数据元结构列表
69
- * @param dataCheckList
70
- * @returns
71
- */
72
- private getDataCheckModelList;
73
- /**
74
- * 获取留痕块元素列表
75
- */
76
- getTrackElements(): Array<TrackRunElement>;
77
- getTrackElementById(id: string): TrackRunElement | null;
78
- /**
79
- * 获取留痕块内数据
80
- */
81
- getTracksData(): Array<TrackBlockData>;
82
- setControlValue(id: string, value: string): void;
83
- setControlValueByName(name: string, val: any): void;
84
- /**
85
- * 获取复选框选中的值
86
- */
87
- getCheckBoxValues(groupName: string): Array<string>;
88
- getCheckBoxList(groupName: string): Array<DataElementCheck>;
89
- /**
90
- * 当前上下文执行默认绑定
91
- * @param data
92
- * @param predicateKey
93
- */
94
- bindDataValues(data: string | Object | Array<{
95
- key: string;
96
- value: any;
97
- }>, predicateKey?: 'id' | 'name' | 'fieldName'): void;
98
- /**
99
- * 查询字符
100
- * @param text
101
- */
102
- searchText(text: string): void;
103
- private getElementTextData;
104
- }
105
- interface DataEleBaseModel {
106
- id: string;
107
- name: string;
108
- fieldName: string;
109
- getValue: () => any;
110
- setValue: (val: any) => void;
111
- }
112
- export interface DataCheckEleModel extends DataEleBaseModel {
113
- item: Array<DataElementCheck>;
114
- multiSelect: boolean;
115
- }
116
- export interface DataInputEleModel extends DataEleBaseModel {
117
- item: DataElementInlineGroup;
118
- }
119
- export interface DataLeafEleModel extends DataEleBaseModel {
120
- item: DataElementLeaf;
121
- }
122
- /**
123
- * 留痕块结构化数据
124
- */
125
- interface TrackBlockData {
126
- userId: string;
127
- userName: string;
128
- date: string;
129
- type: TrackRunTypeEnum;
130
- content: string;
131
- id: string;
132
- }
133
- export {};
1
+ import { SelectionState } from "./selection/document-selection";
2
+ import { BranchElement, Element, ElementHandler, Rect, RefreshType, ViewOptions } from "./element-define";
3
+ import { ElementEvent, EventTypes } from "./element-event-define";
4
+ import { DataElementValueStruct } from "./element-serialize";
5
+ import { DataElementCheck, DataElementInlineGroup, DataElementLeaf, DocumentElement, TrackRunElement, TrackRunTypeEnum } from "./impl";
6
+ import { DocumentChange } from "./document-change";
7
+ /**
8
+ * 当前打开的文档的上下文信息,当前文档所有的属性设置都暴露在上下文中
9
+ */
10
+ export declare class EditorContext {
11
+ readonly selectionState: SelectionState;
12
+ readonly viewOptions: ViewOptions;
13
+ isDirty: boolean;
14
+ cursorRect: Rect | null;
15
+ private _document;
16
+ syncRefresh: () => void;
17
+ docChange: DocumentChange;
18
+ clearPrevDocCb: (() => void) | null;
19
+ nextViewFns: Array<() => void>;
20
+ commentFlag: boolean;
21
+ trackFlag: boolean;
22
+ constructor(selectionState: SelectionState, viewOptions: ViewOptions);
23
+ onNextView(cb: (() => void) | null): void;
24
+ get document(): DocumentElement;
25
+ set document(value: DocumentElement);
26
+ clear(): void;
27
+ get defaultCtx(): DocumentContext;
28
+ getCurrentCtx(ele: Element): DocumentContext;
29
+ /**
30
+ * 根据当前选区,返回所在的上下文元素,返回类型为DocumentElement|DocumentBodyPartElement
31
+ */
32
+ getCurrentEleCtx(): BranchElement | null;
33
+ getCtx(ele: BranchElement): DocumentContext;
34
+ registerTypeHandlers<T extends Element = Element, F extends ElementEvent = ElementEvent>(elementType: any, eventName: EventTypes, handler: ElementHandler<F>, useCapture?: boolean): void;
35
+ destroy(): void;
36
+ /**
37
+ * 切换行打印模式
38
+ */
39
+ switchTextlineMode(): void;
40
+ /**
41
+ * 替换数据元
42
+ */
43
+ replaceDataElement(oldDataElement: DataElementLeaf | DataElementInlineGroup, newElement: DataElementLeaf | DataElementInlineGroup, ss: SelectionState): void;
44
+ get refreshType(): RefreshType | null;
45
+ adaptiveScale(): number;
46
+ }
47
+ /**
48
+ * 文档上下文
49
+ */
50
+ export declare class DocumentContext {
51
+ ctx: BranchElement;
52
+ private ss;
53
+ constructor(ctx: BranchElement, ss: SelectionState);
54
+ getControlIDList(): Array<string>;
55
+ getControlInstanceList(): Array<DataElementInlineGroup | DataElementLeaf>;
56
+ getControlById(id: string): DataElementInlineGroup | DataElementLeaf;
57
+ getControlByName(name: string): DataElementInlineGroup | DataElementLeaf;
58
+ /**
59
+ * 获取数据元值集合
60
+ */
61
+ getDataElementValues(): Array<DataElementValueStruct>;
62
+ /**
63
+ * 获取数据元结构以及get\set闭包调用函数
64
+ * @returns
65
+ */
66
+ getDataElementModelList(): Array<DataCheckEleModel | DataInputEleModel | DataLeafEleModel>;
67
+ /**
68
+ * 获取复选框数据元结构列表
69
+ * @param dataCheckList
70
+ * @returns
71
+ */
72
+ private getDataCheckModelList;
73
+ /**
74
+ * 获取留痕块元素列表
75
+ */
76
+ getTrackElements(): Array<TrackRunElement>;
77
+ getTrackElementById(id: string): TrackRunElement | null;
78
+ /**
79
+ * 获取留痕块内数据
80
+ */
81
+ getTracksData(): Array<TrackBlockData>;
82
+ setControlValue(id: string, value: string): void;
83
+ setControlValueByName(name: string, val: any): void;
84
+ /**
85
+ * 获取复选框选中的值
86
+ */
87
+ getCheckBoxValues(groupName: string): Array<string>;
88
+ getCheckBoxList(groupName: string): Array<DataElementCheck>;
89
+ /**
90
+ * 当前上下文执行默认绑定
91
+ * @param data
92
+ * @param predicateKey
93
+ */
94
+ bindDataValues(data: string | Object | Array<{
95
+ key: string;
96
+ value: any;
97
+ }>, predicateKey?: 'id' | 'name' | 'fieldName'): void;
98
+ /**
99
+ * 查询字符
100
+ * @param text
101
+ */
102
+ searchText(text: string): void;
103
+ private getElementTextData;
104
+ }
105
+ interface DataEleBaseModel {
106
+ id: string;
107
+ name: string;
108
+ fieldName: string;
109
+ getValue: () => any;
110
+ setValue: (val: any) => void;
111
+ }
112
+ export interface DataCheckEleModel extends DataEleBaseModel {
113
+ item: Array<DataElementCheck>;
114
+ multiSelect: boolean;
115
+ }
116
+ export interface DataInputEleModel extends DataEleBaseModel {
117
+ item: DataElementInlineGroup;
118
+ }
119
+ export interface DataLeafEleModel extends DataEleBaseModel {
120
+ item: DataElementLeaf;
121
+ }
122
+ /**
123
+ * 留痕块结构化数据
124
+ */
125
+ interface TrackBlockData {
126
+ userId: string;
127
+ userName: string;
128
+ date: string;
129
+ type: TrackRunTypeEnum;
130
+ content: string;
131
+ id: string;
132
+ }
133
+ export {};