@hailin-zheng/editor-core 1.0.5 → 1.0.6
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/lib/doc-ruler.d.ts +51 -0
- package/{src/med_editor/doc-ruler.ts → lib/doc-ruler.js} +73 -100
- package/lib/doc-ruler.js.map +1 -0
- package/lib/framework/common-util.d.ts +63 -0
- package/lib/framework/common-util.js +178 -0
- package/lib/framework/common-util.js.map +1 -0
- package/lib/framework/document-change.d.ts +265 -0
- package/{src/med_editor/framework/document-change.ts → lib/framework/document-change.js} +257 -307
- package/lib/framework/document-change.js.map +1 -0
- package/lib/framework/document-combine.d.ts +24 -0
- package/{src/med_editor/framework/document-combine.ts → lib/framework/document-combine.js} +11 -15
- package/lib/framework/document-combine.js.map +1 -0
- package/lib/framework/document-comment.d.ts +46 -0
- package/{src/med_editor/framework/document-comment.ts → lib/framework/document-comment.js} +37 -57
- package/lib/framework/document-comment.js.map +1 -0
- package/lib/framework/document-context.d.ts +149 -0
- package/{src/med_editor/framework/document-context.ts → lib/framework/document-context.js} +101 -181
- package/lib/framework/document-context.js.map +1 -0
- package/lib/framework/document-eval-func.d.ts +18 -0
- package/{src/med_editor/framework/document-eval-func.ts → lib/framework/document-eval-func.js} +11 -16
- package/lib/framework/document-eval-func.js.map +1 -0
- package/lib/framework/document-event.d.ts +213 -0
- package/{src/med_editor/framework/document-event.ts → lib/framework/document-event.js} +216 -244
- package/lib/framework/document-event.js.map +1 -0
- package/lib/framework/document-history.d.ts +26 -0
- package/{src/med_editor/framework/document-history.ts → lib/framework/document-history.js} +14 -25
- package/lib/framework/document-history.js.map +1 -0
- package/lib/framework/document-images-loader.d.ts +16 -0
- package/{src/med_editor/framework/document-images-loader.ts → lib/framework/document-images-loader.js} +17 -25
- package/lib/framework/document-images-loader.js.map +1 -0
- package/lib/framework/document-input-cursor.d.ts +78 -0
- package/{src/med_editor/framework/document-input-cursor.ts → lib/framework/document-input-cursor.js} +71 -76
- package/lib/framework/document-input-cursor.js.map +1 -0
- package/lib/framework/document-paint.d.ts +34 -0
- package/{src/med_editor/framework/document-paint.ts → lib/framework/document-paint.js} +28 -35
- package/lib/framework/document-paint.js.map +1 -0
- package/lib/framework/document-print-offscreen.d.ts +38 -0
- package/{src/med_editor/framework/document-print-offscreen.ts → lib/framework/document-print-offscreen.js} +19 -25
- package/lib/framework/document-print-offscreen.js.map +1 -0
- package/lib/framework/document-print.d.ts +60 -0
- package/{src/med_editor/framework/document-print.ts → lib/framework/document-print.js} +41 -57
- package/lib/framework/document-print.js.map +1 -0
- package/lib/framework/document-segmenter.d.ts +2 -0
- package/lib/framework/document-segmenter.js +106 -0
- package/lib/framework/document-segmenter.js.map +1 -0
- package/lib/framework/document-selection.d.ts +89 -0
- package/{src/med_editor/framework/document-selection.ts → lib/framework/document-selection.js} +84 -117
- package/lib/framework/document-selection.js.map +1 -0
- package/lib/framework/document-template.d.ts +4 -0
- package/{src/med_editor/framework/document-template.ts → lib/framework/document-template.js} +3 -3
- package/lib/framework/document-template.js.map +1 -0
- package/lib/framework/document-textline-mode.d.ts +7 -0
- package/lib/framework/document-textline-mode.js +30 -0
- package/lib/framework/document-textline-mode.js.map +1 -0
- package/lib/framework/element-define.d.ts +319 -0
- package/{src/med_editor/framework/element-define.ts → lib/framework/element-define.js} +206 -301
- package/lib/framework/element-define.js.map +1 -0
- package/lib/framework/element-event-define.d.ts +99 -0
- package/lib/framework/element-event-define.js +108 -0
- package/lib/framework/element-event-define.js.map +1 -0
- package/lib/framework/element-measure.d.ts +97 -0
- package/{src/med_editor/framework/element-measure.ts → lib/framework/element-measure.js} +121 -143
- package/lib/framework/element-measure.js.map +1 -0
- package/lib/framework/element-paint.d.ts +42 -0
- package/{src/med_editor/framework/element-paint.ts → lib/framework/element-paint.js} +37 -43
- package/lib/framework/element-paint.js.map +1 -0
- package/lib/framework/element-props.d.ts +301 -0
- package/{src/med_editor/framework/element-props.ts → lib/framework/element-props.js} +202 -331
- package/lib/framework/element-props.js.map +1 -0
- package/lib/framework/element-reader.d.ts +19 -0
- package/{src/med_editor/framework/element-reader.ts → lib/framework/element-reader.js} +30 -38
- package/lib/framework/element-reader.js.map +1 -0
- package/lib/framework/element-render-cut.d.ts +55 -0
- package/{src/med_editor/framework/element-render-cut.ts → lib/framework/element-render-cut.js} +106 -113
- package/lib/framework/element-render-cut.js.map +1 -0
- package/lib/framework/element-serialize.d.ts +30 -0
- package/{src/med_editor/framework/element-serialize.ts → lib/framework/element-serialize.js} +25 -40
- package/lib/framework/element-serialize.js.map +1 -0
- package/lib/framework/element-util.d.ts +369 -0
- package/{src/med_editor/framework/element-util.ts → lib/framework/element-util.js} +216 -318
- package/lib/framework/element-util.js.map +1 -0
- package/lib/framework/impl/checkbox/checkbox-impl.d.ts +24 -0
- package/{src/med_editor/framework/impl/checkbox/checkbox-impl.ts → lib/framework/impl/checkbox/checkbox-impl.js} +18 -25
- package/lib/framework/impl/checkbox/checkbox-impl.js.map +1 -0
- package/lib/framework/impl/comments/comment-content-impl.d.ts +40 -0
- package/{src/med_editor/framework/impl/comments/comment-content-impl.ts → lib/framework/impl/comments/comment-content-impl.js} +31 -45
- package/lib/framework/impl/comments/comment-content-impl.js.map +1 -0
- package/lib/framework/impl/comments/comment-element-impl.d.ts +21 -0
- package/{src/med_editor/framework/impl/comments/comment-element-impl.ts → lib/framework/impl/comments/comment-element-impl.js} +18 -21
- package/lib/framework/impl/comments/comment-element-impl.js.map +1 -0
- package/lib/framework/impl/comments/comments-container-impl.d.ts +22 -0
- package/{src/med_editor/framework/impl/comments/comments-container-impl.ts → lib/framework/impl/comments/comments-container-impl.js} +15 -21
- package/lib/framework/impl/comments/comments-container-impl.js.map +1 -0
- package/lib/framework/impl/comments/comments-util.d.ts +12 -0
- package/{src/med_editor/framework/impl/comments/comments-util.ts → lib/framework/impl/comments/comments-util.js} +17 -34
- package/lib/framework/impl/comments/comments-util.js.map +1 -0
- package/lib/framework/impl/comments/validate-msg-impl.d.ts +21 -0
- package/{src/med_editor/framework/impl/comments/validate-msg-impl.ts → lib/framework/impl/comments/validate-msg-impl.js} +15 -26
- package/lib/framework/impl/comments/validate-msg-impl.js.map +1 -0
- package/lib/framework/impl/data-element/data-decorate-impl.d.ts +30 -0
- package/{src/med_editor/framework/impl/data-element/data-decorate-impl.ts → lib/framework/impl/data-element/data-decorate-impl.js} +21 -25
- package/lib/framework/impl/data-element/data-decorate-impl.js.map +1 -0
- package/lib/framework/impl/data-element/data-element-barcode.d.ts +31 -0
- package/{src/med_editor/framework/impl/data-element/data-element-barcode.ts → lib/framework/impl/data-element/data-element-barcode.js} +27 -39
- package/lib/framework/impl/data-element/data-element-barcode.js.map +1 -0
- package/lib/framework/impl/data-element/data-element-base-impl.d.ts +68 -0
- package/{src/med_editor/framework/impl/data-element/data-element-base-impl.ts → lib/framework/impl/data-element/data-element-base-impl.js} +44 -73
- package/lib/framework/impl/data-element/data-element-base-impl.js.map +1 -0
- package/lib/framework/impl/data-element/data-element-check-impl.d.ts +35 -0
- package/{src/med_editor/framework/impl/data-element/data-element-check-impl.ts → lib/framework/impl/data-element/data-element-check-impl.js} +33 -46
- package/lib/framework/impl/data-element/data-element-check-impl.js.map +1 -0
- package/lib/framework/impl/data-element/data-element-date-impl.d.ts +23 -0
- package/{src/med_editor/framework/impl/data-element/data-element-date-impl.ts → lib/framework/impl/data-element/data-element-date-impl.js} +22 -39
- package/lib/framework/impl/data-element/data-element-date-impl.js.map +1 -0
- package/lib/framework/impl/data-element/data-element-group-impl.d.ts +23 -0
- package/{src/med_editor/framework/impl/data-element/data-element-group-impl.ts → lib/framework/impl/data-element/data-element-group-impl.js} +29 -49
- package/lib/framework/impl/data-element/data-element-group-impl.js.map +1 -0
- package/lib/framework/impl/data-element/data-element-image-impl.d.ts +30 -0
- package/{src/med_editor/framework/impl/data-element/data-element-image-impl.ts → lib/framework/impl/data-element/data-element-image-impl.js} +26 -36
- package/lib/framework/impl/data-element/data-element-image-impl.js.map +1 -0
- package/lib/framework/impl/data-element/data-element-list-impl.d.ts +22 -0
- package/{src/med_editor/framework/impl/data-element/data-element-list-impl.ts → lib/framework/impl/data-element/data-element-list-impl.js} +30 -41
- package/lib/framework/impl/data-element/data-element-list-impl.js.map +1 -0
- package/lib/framework/impl/data-element/data-element-text-impl.d.ts +23 -0
- package/{src/med_editor/framework/impl/data-element/data-element-text-impl.ts → lib/framework/impl/data-element/data-element-text-impl.js} +20 -34
- package/lib/framework/impl/data-element/data-element-text-impl.js.map +1 -0
- package/lib/framework/impl/decorate/fill-null-space-imple.d.ts +21 -0
- package/{src/med_editor/framework/impl/decorate/fill-null-space-imple.ts → lib/framework/impl/decorate/fill-null-space-imple.js} +10 -15
- package/lib/framework/impl/decorate/fill-null-space-imple.js.map +1 -0
- package/lib/framework/impl/document/doc-body-impl.d.ts +27 -0
- package/{src/med_editor/framework/impl/document/doc-body-impl.ts → lib/framework/impl/document/doc-body-impl.js} +15 -31
- package/lib/framework/impl/document/doc-body-impl.js.map +1 -0
- package/lib/framework/impl/document/doc-body-part-impl.d.ts +30 -0
- package/{src/med_editor/framework/impl/document/doc-body-part-impl.ts → lib/framework/impl/document/doc-body-part-impl.js} +16 -26
- package/lib/framework/impl/document/doc-body-part-impl.js.map +1 -0
- package/lib/framework/impl/document/doc-container-impl.d.ts +16 -0
- package/lib/framework/impl/document/doc-container-impl.js +21 -0
- package/lib/framework/impl/document/doc-container-impl.js.map +1 -0
- package/lib/framework/impl/document/doc-footer-impl.d.ts +26 -0
- package/{src/med_editor/framework/impl/document/doc-footer-impl.ts → lib/framework/impl/document/doc-footer-impl.js} +18 -29
- package/lib/framework/impl/document/doc-footer-impl.js.map +1 -0
- package/lib/framework/impl/document/doc-header-impl.d.ts +26 -0
- package/{src/med_editor/framework/impl/document/doc-header-impl.ts → lib/framework/impl/document/doc-header-impl.js} +16 -33
- package/lib/framework/impl/document/doc-header-impl.js.map +1 -0
- package/lib/framework/impl/document/doc-impl.d.ts +61 -0
- package/{src/med_editor/framework/impl/document/doc-impl.ts → lib/framework/impl/document/doc-impl.js} +42 -59
- package/lib/framework/impl/document/doc-impl.js.map +1 -0
- package/lib/framework/impl/media-formula/menstrual-history.d.ts +35 -0
- package/{src/med_editor/framework/impl/media-formula/menstrual-history.ts → lib/framework/impl/media-formula/menstrual-history.js} +35 -57
- package/lib/framework/impl/media-formula/menstrual-history.js.map +1 -0
- package/lib/framework/impl/paragraph/p-impl.d.ts +45 -0
- package/{src/med_editor/framework/impl/paragraph/p-impl.ts → lib/framework/impl/paragraph/p-impl.js} +28 -62
- package/lib/framework/impl/paragraph/p-impl.js.map +1 -0
- package/lib/framework/impl/picture/image-impl.d.ts +31 -0
- package/{src/med_editor/framework/impl/picture/image-impl.ts → lib/framework/impl/picture/image-impl.js} +23 -35
- package/lib/framework/impl/picture/image-impl.js.map +1 -0
- package/lib/framework/impl/radio/radio-impl.d.ts +22 -0
- package/{src/med_editor/framework/impl/radio/radio-impl.ts → lib/framework/impl/radio/radio-impl.js} +19 -26
- package/lib/framework/impl/radio/radio-impl.js.map +1 -0
- package/lib/framework/impl/symbol/br-symbol-impl.d.ts +22 -0
- package/{src/med_editor/framework/impl/symbol/br-symbol-impl.ts → lib/framework/impl/symbol/br-symbol-impl.js} +14 -20
- package/lib/framework/impl/symbol/br-symbol-impl.js.map +1 -0
- package/lib/framework/impl/symbol/p-symbol-impl.d.ts +19 -0
- package/{src/med_editor/framework/impl/symbol/p-symbol-impl.ts → lib/framework/impl/symbol/p-symbol-impl.js} +11 -14
- package/lib/framework/impl/symbol/p-symbol-impl.js.map +1 -0
- package/lib/framework/impl/table/table-cell-impl.d.ts +37 -0
- package/{src/med_editor/framework/impl/table/table-cell-impl.ts → lib/framework/impl/table/table-cell-impl.js} +28 -39
- package/lib/framework/impl/table/table-cell-impl.js.map +1 -0
- package/lib/framework/impl/table/table-impl.d.ts +55 -0
- package/{src/med_editor/framework/impl/table/table-impl.ts → lib/framework/impl/table/table-impl.js} +82 -120
- package/lib/framework/impl/table/table-impl.js.map +1 -0
- package/lib/framework/impl/table/table-row-impl.d.ts +26 -0
- package/{src/med_editor/framework/impl/table/table-row-impl.ts → lib/framework/impl/table/table-row-impl.js} +16 -24
- package/lib/framework/impl/table/table-row-impl.js.map +1 -0
- package/lib/framework/impl/table/table-split-cell-patch.d.ts +20 -0
- package/{src/med_editor/framework/impl/table/table-split-cell-patch.ts → lib/framework/impl/table/table-split-cell-patch.js} +22 -31
- package/lib/framework/impl/table/table-split-cell-patch.js.map +1 -0
- package/lib/framework/impl/table/table-split-cell.d.ts +90 -0
- package/{src/med_editor/framework/impl/table/table-split-cell.ts → lib/framework/impl/table/table-split-cell.js} +94 -105
- package/lib/framework/impl/table/table-split-cell.js.map +1 -0
- package/lib/framework/impl/table/table-util.d.ts +150 -0
- package/{src/med_editor/framework/impl/table/table-util.ts → lib/framework/impl/table/table-util.js} +157 -195
- package/lib/framework/impl/table/table-util.js.map +1 -0
- package/lib/framework/impl/text/text-impl.d.ts +32 -0
- package/{src/med_editor/framework/impl/text/text-impl.ts → lib/framework/impl/text/text-impl.js} +32 -47
- package/lib/framework/impl/text/text-impl.js.map +1 -0
- package/lib/framework/impl/text/track-run-impl.d.ts +27 -0
- package/{src/med_editor/framework/impl/text/track-run-impl.ts → lib/framework/impl/text/track-run-impl.js} +28 -51
- package/lib/framework/impl/text/track-run-impl.js.map +1 -0
- package/lib/framework/notify.d.ts +13 -0
- package/{src/med_editor/framework/notify.ts → lib/framework/notify.js} +36 -50
- package/lib/framework/notify.js.map +1 -0
- package/lib/framework/range-util.d.ts +40 -0
- package/{src/med_editor/framework/range-util.ts → lib/framework/range-util.js} +71 -80
- package/lib/framework/range-util.js.map +1 -0
- package/lib/framework/render-context.d.ts +91 -0
- package/{src/med_editor/framework/render-context.ts → lib/framework/render-context.js} +64 -111
- package/lib/framework/render-context.js.map +1 -0
- package/lib/framework/render-define.d.ts +109 -0
- package/{src/med_editor/framework/render-define.ts → lib/framework/render-define.js} +61 -90
- package/lib/framework/render-define.js.map +1 -0
- package/lib/framework/selection-overlays.d.ts +30 -0
- package/{src/med_editor/framework/selection-overlays.ts → lib/framework/selection-overlays.js} +16 -26
- package/lib/framework/selection-overlays.js.map +1 -0
- package/lib/texteditor.d.ts +318 -0
- package/{src/med_editor/texteditor.ts → lib/texteditor.js} +189 -287
- package/lib/texteditor.js.map +1 -0
- package/lib/util/subject.d.ts +34 -0
- package/lib/util/subject.js +88 -0
- package/lib/util/subject.js.map +1 -0
- package/lib/util/table-bind.d.ts +5 -0
- package/{src/med_editor/util/table-bind.ts → lib/util/table-bind.js} +2 -2
- package/lib/util/table-bind.js.map +1 -0
- package/package.json +6 -2
- package/src/med_editor/framework/common-util.ts +0 -200
- package/src/med_editor/framework/document-segmenter.ts +0 -211
- package/src/med_editor/framework/document-textline-mode.ts +0 -34
- package/src/med_editor/framework/element-event-define.ts +0 -142
- package/src/med_editor/framework/impl/document/doc-container-impl.ts +0 -24
- package/src/med_editor/util/subject.ts +0 -118
- package/src/med_editor//345/205/245/351/231/242/350/256/260/345/275/225.json +0 -3573
- package/src/med_editor//345/205/245/351/231/242/350/256/260/345/275/225/346/265/213/350/257/225.json +0 -3573
- package/src/med_editor//345/205/245/351/231/242/350/256/260/345/275/225/346/265/213/350/257/225bug.json +0 -315
- package/src/med_editor//345/205/245/351/231/242/350/256/260/345/275/225/346/265/213/350/257/225/346/211/271/346/263/250.json +0 -122
- package/src/med_editor//345/205/245/351/231/242/350/256/260/345/275/225/346/265/213/350/257/225/346/226/207/346/241/243/351/252/214/350/257/201.json +0 -3599
- package/src/med_editor//345/205/245/351/231/242/350/256/260/345/275/225/346/265/213/350/257/225/351/225/277/346/226/207/346/234/254.json +0 -24586
- package/src/med_editor//345/220/210/345/271/266/347/227/205/347/250/213/345/275/225.json +0 -2874
- package/src/med_editor//346/211/213/346/234/257/350/256/260/345/275/225.json +0 -341
- package/src/med_editor//346/231/256/351/200/232doc/347/261/273/346/226/207/346/241/243.json +0 -2201
- package/src/med_editor//346/243/200/351/252/214/347/224/263/350/257/267/345/215/225.json +0 -1069
- package/src/med_editor//347/227/205/347/250/213/345/275/225//345/206/205/351/225/234/344/270/213/346/262/273/347/226/227/350/256/260/345/275/225.json +0 -125
- package/src/med_editor//347/227/205/347/250/213/345/275/225//345/220/210/345/271/266/347/227/205/347/250/213/345/275/225/346/250/241/346/235/277.json +0 -86
- package/src/med_editor//347/227/205/347/250/213/345/275/225//346/227/245/345/270/270/347/227/205/347/250/213/350/256/260/345/275/225.json +0 -115
- package/src/med_editor//347/227/205/347/250/213/345/275/225//346/237/245/346/210/277/350/256/260/345/275/2251.json +0 -108
- package/src/med_editor//347/227/205/347/250/213/345/275/225//351/246/226/346/254/241/344/270/212/347/272/247/345/214/273/345/270/210/346/237/245/346/210/277/350/256/260/345/275/225.json +0 -272
- package/src/med_editor//351/225/277/346/234/237/345/214/273/345/230/261/345/215/225.json +0 -1070
- package/tsconfig.json +0 -25
- package/webpack.config.js +0 -46
@@ -1,68 +1,47 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
export type TextVertAlign = 'superscript' | 'subscript';
|
5
|
-
|
6
|
-
export abstract class INotifyPropertyChanged {
|
7
|
-
// onPropertyChangedSubject: Subject<string> = new Subject();
|
8
|
-
// propertyChanged(properyName: string): void {
|
9
|
-
// this.onPropertyChangedSubject.next(properyName);
|
10
|
-
// }
|
11
|
-
abstract getSerializeProps(viewOptions: ViewOptions): any;
|
12
|
-
|
13
|
-
private __attatchProperty: Record<string, any> = {};
|
14
|
-
|
15
|
-
registerProperty<T>(propertyName: string, value: T): void {
|
1
|
+
export class INotifyPropertyChanged {
|
2
|
+
__attatchProperty = {};
|
3
|
+
registerProperty(propertyName, value) {
|
16
4
|
this.__attatchProperty[propertyName] = value;
|
17
5
|
}
|
18
|
-
|
19
|
-
removeProperty(propertyName: string): void {
|
6
|
+
removeProperty(propertyName) {
|
20
7
|
delete this.__attatchProperty[propertyName];
|
21
8
|
}
|
22
|
-
|
23
|
-
|
24
|
-
return this.__attatchProperty[propertyName] as T;
|
9
|
+
getProperty(propertyName) {
|
10
|
+
return this.__attatchProperty[propertyName];
|
25
11
|
}
|
26
12
|
}
|
27
|
-
|
28
13
|
export class TextProps extends INotifyPropertyChanged {
|
29
14
|
constructor() {
|
30
15
|
super();
|
31
16
|
}
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
fontStyle: 'normal' | 'italic' = 'normal';
|
17
|
+
color;
|
18
|
+
fontName;
|
19
|
+
fontSize;
|
20
|
+
fontWeight = 'normal';
|
21
|
+
fontStyle = 'normal';
|
38
22
|
//textDecoration: 'none' | 'underline' | 'overline' | 'line-through' = 'none';
|
39
|
-
underline
|
40
|
-
overline
|
41
|
-
linethrough
|
42
|
-
background
|
43
|
-
letterSpace
|
44
|
-
|
23
|
+
underline = false;
|
24
|
+
overline = false;
|
25
|
+
linethrough = false;
|
26
|
+
background;
|
27
|
+
letterSpace;
|
45
28
|
/**
|
46
29
|
* 上标或者下标
|
47
30
|
*/
|
48
|
-
vertAlign
|
49
|
-
|
31
|
+
vertAlign;
|
50
32
|
/**
|
51
33
|
* 字符边框
|
52
34
|
*/
|
53
|
-
border
|
54
|
-
|
55
|
-
clearCache(): void {
|
35
|
+
border;
|
36
|
+
clearCache() {
|
56
37
|
this.__cacheFont = null;
|
57
38
|
}
|
58
|
-
|
59
|
-
clone(source: TextProps | null): TextProps {
|
39
|
+
clone(source) {
|
60
40
|
const clone = source ?? new TextProps();
|
61
41
|
this.setPropsValue(this, clone);
|
62
42
|
return clone;
|
63
43
|
}
|
64
|
-
|
65
|
-
setPropsValue(source: TextProps, target: TextProps): void {
|
44
|
+
setPropsValue(source, target) {
|
66
45
|
target.color = source.color;
|
67
46
|
target.fontName = source.fontName;
|
68
47
|
target.fontSize = source.fontSize;
|
@@ -76,9 +55,8 @@ export class TextProps extends INotifyPropertyChanged {
|
|
76
55
|
target.vertAlign = source.vertAlign;
|
77
56
|
target.border = source.border;
|
78
57
|
}
|
79
|
-
|
80
|
-
|
81
|
-
const props: NullableType<TextProps> = {};
|
58
|
+
getSerializeProps(viewOptions) {
|
59
|
+
const props = {};
|
82
60
|
if (this.color && this.color !== viewOptions.defaultColor) {
|
83
61
|
props["color"] = this.color;
|
84
62
|
}
|
@@ -117,13 +95,12 @@ export class TextProps extends INotifyPropertyChanged {
|
|
117
95
|
}
|
118
96
|
return props;
|
119
97
|
}
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
getFont(): string {
|
98
|
+
__cacheFont;
|
99
|
+
getFont() {
|
124
100
|
if (this.__cacheFont) {
|
125
101
|
return this.__cacheFont;
|
126
|
-
}
|
102
|
+
}
|
103
|
+
else {
|
127
104
|
let fontStr = '';
|
128
105
|
if (this.fontStyle && this.fontStyle !== 'normal') {
|
129
106
|
fontStr += this.fontStyle + ' ';
|
@@ -138,8 +115,7 @@ export class TextProps extends INotifyPropertyChanged {
|
|
138
115
|
return this.__cacheFont;
|
139
116
|
}
|
140
117
|
}
|
141
|
-
|
142
|
-
equals(props: TextProps): boolean {
|
118
|
+
equals(props) {
|
143
119
|
return this.background === props.background
|
144
120
|
&& this.color === props.color
|
145
121
|
&& this.fontName === props.fontName
|
@@ -154,17 +130,16 @@ export class TextProps extends INotifyPropertyChanged {
|
|
154
130
|
&& this.border === props.border;
|
155
131
|
}
|
156
132
|
}
|
157
|
-
|
158
133
|
export class ParagraphProps extends INotifyPropertyChanged {
|
159
134
|
//段落默认的文本属性
|
160
|
-
textProps
|
135
|
+
textProps;
|
161
136
|
indent = 0;
|
162
137
|
hanging = 0;
|
163
138
|
lineHeight = 1.3;
|
164
|
-
textAlign
|
139
|
+
textAlign = 'left';
|
165
140
|
numberType = -1;
|
166
141
|
pageBreak = false;
|
167
|
-
clone(dest
|
142
|
+
clone(dest = null) {
|
168
143
|
const clone = dest ?? new ParagraphProps();
|
169
144
|
clone.indent = this.indent;
|
170
145
|
clone.numberType = this.numberType;
|
@@ -175,9 +150,8 @@ export class ParagraphProps extends INotifyPropertyChanged {
|
|
175
150
|
//clone.pageBreak=this.pageBreak;
|
176
151
|
return clone;
|
177
152
|
}
|
178
|
-
|
179
|
-
|
180
|
-
const props: NullableType<ParagraphProps> = {};
|
153
|
+
getSerializeProps(viewOptions) {
|
154
|
+
const props = {};
|
181
155
|
if (this.indent) {
|
182
156
|
props["indent"] = this.indent;
|
183
157
|
}
|
@@ -194,7 +168,7 @@ export class ParagraphProps extends INotifyPropertyChanged {
|
|
194
168
|
props["numberType"] = this.numberType;
|
195
169
|
}
|
196
170
|
if (this.textProps) {
|
197
|
-
const dt = this.textProps.getSerializeProps(viewOptions)
|
171
|
+
const dt = this.textProps.getSerializeProps(viewOptions);
|
198
172
|
if (Object.keys(dt).length) {
|
199
173
|
props["textProps"] = dt;
|
200
174
|
}
|
@@ -205,20 +179,18 @@ export class ParagraphProps extends INotifyPropertyChanged {
|
|
205
179
|
return props;
|
206
180
|
}
|
207
181
|
}
|
208
|
-
|
209
182
|
export class DocumentProps extends INotifyPropertyChanged {
|
210
|
-
width
|
211
|
-
height
|
212
|
-
padding
|
183
|
+
width;
|
184
|
+
height;
|
185
|
+
padding;
|
213
186
|
headerLine = 12;
|
214
187
|
footerLine = 12;
|
215
|
-
orient
|
216
|
-
createUserId
|
217
|
-
createUserName
|
218
|
-
createDate
|
219
|
-
scripts
|
220
|
-
|
221
|
-
clone(dest: DocumentProps): DocumentProps {
|
188
|
+
orient = 'portrait';
|
189
|
+
createUserId;
|
190
|
+
createUserName;
|
191
|
+
createDate;
|
192
|
+
scripts;
|
193
|
+
clone(dest) {
|
222
194
|
const clone = dest ?? new DocumentProps();
|
223
195
|
clone.width = this.width;
|
224
196
|
clone.height = this.height;
|
@@ -232,9 +204,8 @@ export class DocumentProps extends INotifyPropertyChanged {
|
|
232
204
|
clone.orient = this.orient;
|
233
205
|
return clone;
|
234
206
|
}
|
235
|
-
|
236
|
-
|
237
|
-
const props: NullableType<DocumentProps> = {
|
207
|
+
getSerializeProps() {
|
208
|
+
const props = {
|
238
209
|
width: this.width,
|
239
210
|
height: this.height,
|
240
211
|
padding: this.padding,
|
@@ -253,63 +224,53 @@ export class DocumentProps extends INotifyPropertyChanged {
|
|
253
224
|
return props;
|
254
225
|
}
|
255
226
|
}
|
256
|
-
|
257
227
|
export class CheckBoxProps extends INotifyPropertyChanged {
|
258
|
-
size
|
259
|
-
isChecked
|
228
|
+
size;
|
229
|
+
isChecked;
|
260
230
|
//用于复选框分组
|
261
|
-
groupName
|
262
|
-
|
263
|
-
clone(dest: CheckBoxProps) {
|
231
|
+
groupName;
|
232
|
+
clone(dest) {
|
264
233
|
const clone = dest ?? new CheckBoxProps();
|
265
234
|
clone.size = this.size;
|
266
235
|
clone.isChecked = this.isChecked;
|
267
236
|
clone.groupName = this.groupName;
|
268
237
|
return clone;
|
269
238
|
}
|
270
|
-
|
271
|
-
getSerializeProps(viewOptions: ViewOptions) {
|
239
|
+
getSerializeProps(viewOptions) {
|
272
240
|
return {
|
273
241
|
size: this.size,
|
274
242
|
isChecked: this.isChecked,
|
275
243
|
groupName: this.groupName,
|
276
|
-
}
|
244
|
+
};
|
277
245
|
}
|
278
246
|
}
|
279
|
-
|
280
247
|
export class RadioBoxProps extends INotifyPropertyChanged {
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
clone(dest: RadioBoxProps) {
|
248
|
+
size;
|
249
|
+
isChecked;
|
250
|
+
clone(dest) {
|
286
251
|
const clone = dest ?? new RadioBoxProps();
|
287
252
|
clone.size = this.size;
|
288
253
|
clone.isChecked = this.isChecked;
|
289
254
|
return clone;
|
290
255
|
}
|
291
|
-
|
292
|
-
getSerializeProps(viewOptions: ViewOptions) {
|
256
|
+
getSerializeProps(viewOptions) {
|
293
257
|
return {
|
294
258
|
size: this.size,
|
295
259
|
isCheced: this.isChecked
|
296
260
|
};
|
297
261
|
}
|
298
262
|
}
|
299
|
-
|
300
263
|
export class TableRowProps extends INotifyPropertyChanged {
|
301
|
-
minHeight
|
302
|
-
headerRow
|
303
|
-
|
304
|
-
clone(dest: TableRowProps) {
|
264
|
+
minHeight;
|
265
|
+
headerRow;
|
266
|
+
clone(dest) {
|
305
267
|
const clone = dest ?? new TableRowProps();
|
306
268
|
clone.minHeight = this.minHeight;
|
307
269
|
clone.headerRow = this.headerRow;
|
308
270
|
return clone;
|
309
271
|
}
|
310
|
-
|
311
|
-
|
312
|
-
const props: NullableType<TableRowProps> = {};
|
272
|
+
getSerializeProps(viewOptions) {
|
273
|
+
const props = {};
|
313
274
|
if (this.minHeight > 0) {
|
314
275
|
props["minHeight"] = this.minHeight;
|
315
276
|
props["headerRow"] = this.headerRow;
|
@@ -320,21 +281,14 @@ export class TableRowProps extends INotifyPropertyChanged {
|
|
320
281
|
return props;
|
321
282
|
}
|
322
283
|
}
|
323
|
-
|
324
|
-
export type TableAlignment = 'start' | 'end' | 'center';
|
325
|
-
|
326
284
|
export class TableProps extends INotifyPropertyChanged {
|
327
|
-
|
328
285
|
//auto 或者具体的值
|
329
|
-
width
|
330
|
-
cols
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
allowBreakRow!: boolean;
|
336
|
-
|
337
|
-
clone(dest: TableProps): TableProps {
|
286
|
+
width;
|
287
|
+
cols;
|
288
|
+
alignment;
|
289
|
+
border = 'all';
|
290
|
+
allowBreakRow;
|
291
|
+
clone(dest) {
|
338
292
|
const clone = dest ?? new TableProps();
|
339
293
|
clone.width = this.width;
|
340
294
|
clone.cols = [...this.cols];
|
@@ -342,8 +296,7 @@ export class TableProps extends INotifyPropertyChanged {
|
|
342
296
|
clone.border = this.border;
|
343
297
|
return clone;
|
344
298
|
}
|
345
|
-
|
346
|
-
getSerializeProps(viewOptions: ViewOptions) {
|
299
|
+
getSerializeProps(viewOptions) {
|
347
300
|
return {
|
348
301
|
width: this.width,
|
349
302
|
cols: this.cols,
|
@@ -352,25 +305,16 @@ export class TableProps extends INotifyPropertyChanged {
|
|
352
305
|
};
|
353
306
|
}
|
354
307
|
}
|
355
|
-
|
356
|
-
export type CellMergeType = 'col-merge' | 'row-merge';
|
357
|
-
export type VMergeType = 'restart' | 'continue';
|
358
|
-
export type HMergeType = 'restart' | 'continue';
|
359
|
-
export type VerticalAlign = 'top' | 'middle' | 'bottom';
|
360
|
-
|
361
308
|
export class TableCellProps extends INotifyPropertyChanged {
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
backgroundColor!: string | null;
|
367
|
-
|
309
|
+
vMerge;
|
310
|
+
hMerge;
|
311
|
+
vAlign;
|
312
|
+
backgroundColor;
|
368
313
|
/**
|
369
314
|
* 对角线
|
370
315
|
*/
|
371
|
-
diagonal
|
372
|
-
|
373
|
-
clone(dest: TableCellProps): TableCellProps {
|
316
|
+
diagonal;
|
317
|
+
clone(dest) {
|
374
318
|
const clone = dest ?? new TableCellProps();
|
375
319
|
clone.vMerge = this.vMerge;
|
376
320
|
clone.hMerge = this.hMerge;
|
@@ -379,9 +323,8 @@ export class TableCellProps extends INotifyPropertyChanged {
|
|
379
323
|
clone.diagonal = this.diagonal;
|
380
324
|
return clone;
|
381
325
|
}
|
382
|
-
|
383
|
-
|
384
|
-
const props: NullableType<TableCellProps> = {};
|
326
|
+
getSerializeProps(options) {
|
327
|
+
const props = {};
|
385
328
|
if (this.vMerge) {
|
386
329
|
props['vMerge'] = this.vMerge;
|
387
330
|
}
|
@@ -400,15 +343,13 @@ export class TableCellProps extends INotifyPropertyChanged {
|
|
400
343
|
return props;
|
401
344
|
}
|
402
345
|
}
|
403
|
-
|
404
346
|
export class PictureProps extends INotifyPropertyChanged {
|
405
|
-
title
|
406
|
-
width
|
407
|
-
height
|
408
|
-
src
|
409
|
-
border
|
410
|
-
|
411
|
-
clone(dest: PictureProps): PictureProps {
|
347
|
+
title;
|
348
|
+
width;
|
349
|
+
height;
|
350
|
+
src;
|
351
|
+
border;
|
352
|
+
clone(dest) {
|
412
353
|
const clone = dest ?? new PictureProps();
|
413
354
|
clone.width = this.width;
|
414
355
|
clone.height = this.height;
|
@@ -417,9 +358,8 @@ export class PictureProps extends INotifyPropertyChanged {
|
|
417
358
|
clone.title = this.title;
|
418
359
|
return clone;
|
419
360
|
}
|
420
|
-
|
421
|
-
|
422
|
-
const props: NullableType<PictureProps> = {
|
361
|
+
getSerializeProps(viewOptions) {
|
362
|
+
const props = {
|
423
363
|
width: this.width,
|
424
364
|
height: this.height,
|
425
365
|
src: this.src,
|
@@ -431,48 +371,39 @@ export class PictureProps extends INotifyPropertyChanged {
|
|
431
371
|
return props;
|
432
372
|
}
|
433
373
|
}
|
434
|
-
|
435
374
|
export class DataDecorateProps extends INotifyPropertyChanged {
|
436
|
-
content
|
437
|
-
size
|
438
|
-
|
439
|
-
clone(dest: DataDecorateProps): DataDecorateProps {
|
375
|
+
content;
|
376
|
+
size;
|
377
|
+
clone(dest) {
|
440
378
|
const clone = dest ?? new DataDecorateProps();
|
441
379
|
clone.content = this.content;
|
442
380
|
clone.size = this.size;
|
443
381
|
return clone;
|
444
382
|
}
|
445
|
-
|
446
|
-
getSerializeProps(viewOptions: ViewOptions) {
|
383
|
+
getSerializeProps(viewOptions) {
|
447
384
|
return {
|
448
385
|
size: this.size,
|
449
386
|
content: this.content
|
450
387
|
};
|
451
388
|
}
|
452
389
|
}
|
453
|
-
|
454
|
-
export type DataEleTypes = 'text' | 'droplist' | 'date' | 'check' | 'img';
|
455
|
-
|
456
|
-
|
457
390
|
export class DataEleBaseProps extends INotifyPropertyChanged {
|
458
|
-
id
|
459
|
-
name
|
460
|
-
fieldName
|
461
|
-
caption
|
462
|
-
required
|
463
|
-
printable
|
464
|
-
secretBrowse
|
465
|
-
editable
|
466
|
-
deleteable
|
467
|
-
minLength
|
468
|
-
type
|
469
|
-
underline
|
470
|
-
|
471
|
-
cloneBaseProps(destProps: DataEleBaseProps): void {
|
391
|
+
id;
|
392
|
+
name;
|
393
|
+
fieldName;
|
394
|
+
caption;
|
395
|
+
required;
|
396
|
+
printable;
|
397
|
+
secretBrowse;
|
398
|
+
editable;
|
399
|
+
deleteable;
|
400
|
+
minLength;
|
401
|
+
type;
|
402
|
+
underline;
|
403
|
+
cloneBaseProps(destProps) {
|
472
404
|
this.setPropValue(this, destProps);
|
473
405
|
}
|
474
|
-
|
475
|
-
private setPropValue(source: DataEleBaseProps, target: DataEleBaseProps): void {
|
406
|
+
setPropValue(source, target) {
|
476
407
|
target.id = source.id;
|
477
408
|
target.name = source.name;
|
478
409
|
target.caption = source.caption;
|
@@ -486,12 +417,10 @@ export class DataEleBaseProps extends INotifyPropertyChanged {
|
|
486
417
|
target.type = source.type;
|
487
418
|
target.underline = source.underline;
|
488
419
|
}
|
489
|
-
|
490
|
-
updateProps(props: DataEleBaseProps): void {
|
420
|
+
updateProps(props) {
|
491
421
|
this.setPropValue(props, this);
|
492
422
|
}
|
493
|
-
|
494
|
-
getBaseProps(props: NullableType<DataEleBaseProps>, options: ViewOptions): NullableType<DataEleBaseProps> {
|
423
|
+
getBaseProps(props, options) {
|
495
424
|
props["id"] = this.id;
|
496
425
|
props["name"] = this.name;
|
497
426
|
props["fieldName"] = this.fieldName;
|
@@ -522,23 +451,20 @@ export class DataEleBaseProps extends INotifyPropertyChanged {
|
|
522
451
|
}
|
523
452
|
return props;
|
524
453
|
}
|
525
|
-
|
526
|
-
|
527
|
-
throw new Error('未实现')
|
454
|
+
getSerializeProps(viewOptions) {
|
455
|
+
throw new Error('未实现');
|
528
456
|
}
|
529
457
|
}
|
530
|
-
|
531
458
|
export class DataEleBaseTextProps extends DataEleBaseProps {
|
532
459
|
constructor() {
|
533
460
|
super();
|
534
461
|
super.type = 'text';
|
535
462
|
}
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
clone(dest: DataEleBaseTextProps | null = null): DataEleBaseTextProps {
|
463
|
+
valueTextProps;
|
464
|
+
nullText;
|
465
|
+
nullTextProps;
|
466
|
+
dataType = 'text';
|
467
|
+
clone(dest = null) {
|
542
468
|
const clone = dest ?? new DataEleBaseTextProps();
|
543
469
|
super.cloneBaseProps(clone);
|
544
470
|
clone.valueTextProps = this.valueTextProps.clone(null);
|
@@ -546,9 +472,8 @@ export class DataEleBaseTextProps extends DataEleBaseProps {
|
|
546
472
|
clone.nullTextProps = this.nullTextProps.clone(null);
|
547
473
|
return clone;
|
548
474
|
}
|
549
|
-
|
550
|
-
|
551
|
-
const props: NullableType<DataEleBaseTextProps> = {
|
475
|
+
getSerializeProps(options) {
|
476
|
+
const props = {
|
552
477
|
type: this.type,
|
553
478
|
valueTextProps: this.valueTextProps.getSerializeProps(options),
|
554
479
|
nullText: this.nullText,
|
@@ -560,8 +485,7 @@ export class DataEleBaseTextProps extends DataEleBaseProps {
|
|
560
485
|
this.getBaseProps(props, options);
|
561
486
|
return props;
|
562
487
|
}
|
563
|
-
|
564
|
-
getBaseProps(props: NullableType<DataEleBaseTextProps>, options: ViewOptions): NullableType<DataEleBaseTextProps> {
|
488
|
+
getBaseProps(props, options) {
|
565
489
|
super.getBaseProps(props, options);
|
566
490
|
props['valueTextProps'] = this.valueTextProps.getSerializeProps(options);
|
567
491
|
props['nullTextProps'] = this.nullTextProps.getSerializeProps(options);
|
@@ -569,8 +493,7 @@ export class DataEleBaseTextProps extends DataEleBaseProps {
|
|
569
493
|
props['dataType'] = this.dataType;
|
570
494
|
return props;
|
571
495
|
}
|
572
|
-
|
573
|
-
updateProps(props: DataEleBaseTextProps): void {
|
496
|
+
updateProps(props) {
|
574
497
|
super.updateProps(props);
|
575
498
|
this.valueTextProps = props.valueTextProps;
|
576
499
|
this.nullText = props.nullText;
|
@@ -578,26 +501,18 @@ export class DataEleBaseTextProps extends DataEleBaseProps {
|
|
578
501
|
this.dataType = props.dataType;
|
579
502
|
}
|
580
503
|
}
|
581
|
-
|
582
|
-
export interface DataEleListOption {
|
583
|
-
code: string,
|
584
|
-
value: string
|
585
|
-
}
|
586
|
-
|
587
504
|
export class DataEleListProps extends DataEleBaseTextProps {
|
588
505
|
constructor() {
|
589
506
|
super();
|
590
507
|
super.type = 'droplist';
|
591
508
|
}
|
592
|
-
|
593
|
-
|
594
|
-
dropDownStyle!: 'DropDownList' | 'DropDown';
|
509
|
+
options = [];
|
510
|
+
dropDownStyle;
|
595
511
|
/**
|
596
512
|
* 是否允许多选
|
597
513
|
*/
|
598
|
-
multiSelect
|
599
|
-
|
600
|
-
clone(dest: DataEleListProps | null): DataEleListProps {
|
514
|
+
multiSelect;
|
515
|
+
clone(dest) {
|
601
516
|
const clone = dest ?? new DataEleListProps();
|
602
517
|
super.clone(clone);
|
603
518
|
clone.options = [...this.options];
|
@@ -605,9 +520,8 @@ export class DataEleListProps extends DataEleBaseTextProps {
|
|
605
520
|
clone.multiSelect = this.multiSelect;
|
606
521
|
return clone;
|
607
522
|
}
|
608
|
-
|
609
|
-
|
610
|
-
const props: NullableType<DataEleListProps> = {
|
523
|
+
getSerializeProps(options) {
|
524
|
+
const props = {
|
611
525
|
options: [...this.options],
|
612
526
|
multiSelect: this.multiSelect,
|
613
527
|
dropDownStyle: this.dropDownStyle,
|
@@ -615,67 +529,56 @@ export class DataEleListProps extends DataEleBaseTextProps {
|
|
615
529
|
super.getBaseProps(props, options);
|
616
530
|
return props;
|
617
531
|
}
|
618
|
-
|
619
|
-
updateProps(props: DataEleListProps): void {
|
532
|
+
updateProps(props) {
|
620
533
|
super.updateProps(props);
|
621
534
|
this.options = props.options;
|
622
535
|
this.multiSelect = props.multiSelect;
|
623
536
|
this.dropDownStyle = props.dropDownStyle;
|
624
537
|
}
|
625
538
|
}
|
626
|
-
|
627
539
|
export class CommContentProps extends INotifyPropertyChanged {
|
628
|
-
id
|
629
|
-
createId
|
630
|
-
createName
|
631
|
-
createDate
|
632
|
-
|
633
|
-
clone(dest: CommContentProps): CommContentProps {
|
540
|
+
id;
|
541
|
+
createId;
|
542
|
+
createName;
|
543
|
+
createDate;
|
544
|
+
clone(dest) {
|
634
545
|
const clone = dest ?? new CommContentProps();
|
635
546
|
clone.id = this.id;
|
636
547
|
return clone;
|
637
548
|
}
|
638
|
-
|
639
|
-
getSerializeProps(viewOptions: ViewOptions) {
|
549
|
+
getSerializeProps(viewOptions) {
|
640
550
|
return {
|
641
551
|
id: this.id
|
642
552
|
};
|
643
553
|
}
|
644
554
|
}
|
645
|
-
|
646
555
|
export class CommProps extends INotifyPropertyChanged {
|
647
|
-
id
|
648
|
-
markType
|
649
|
-
|
650
|
-
clone(dest: CommProps): CommProps {
|
556
|
+
id;
|
557
|
+
markType;
|
558
|
+
clone(dest) {
|
651
559
|
const clone = dest ?? new CommProps();
|
652
560
|
clone.id = this.id;
|
653
561
|
clone.markType = this.markType;
|
654
562
|
return clone;
|
655
563
|
}
|
656
|
-
|
657
|
-
getSerializeProps(viewOptions: ViewOptions) {
|
564
|
+
getSerializeProps(viewOptions) {
|
658
565
|
return {
|
659
566
|
id: this.id,
|
660
567
|
markType: this.markType
|
661
568
|
};
|
662
569
|
}
|
663
570
|
}
|
664
|
-
|
665
|
-
|
666
571
|
export class DataEleCheckProps extends DataEleBaseProps {
|
667
572
|
constructor() {
|
668
573
|
super();
|
669
574
|
super.type = 'check';
|
670
575
|
}
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
clone(dest: DataEleCheckProps | null): DataEleCheckProps {
|
576
|
+
size;
|
577
|
+
checked;
|
578
|
+
checkedValue = '';
|
579
|
+
groupName;
|
580
|
+
multiSelect = false;
|
581
|
+
clone(dest) {
|
679
582
|
const clone = dest ?? new DataEleCheckProps();
|
680
583
|
super.cloneBaseProps(clone);
|
681
584
|
clone.checked = this.checked;
|
@@ -685,20 +588,18 @@ export class DataEleCheckProps extends DataEleBaseProps {
|
|
685
588
|
clone.checkedValue = this.checkedValue;
|
686
589
|
return clone;
|
687
590
|
}
|
688
|
-
|
689
|
-
|
690
|
-
const props: NullableType<DataEleCheckProps> = {
|
591
|
+
getSerializeProps(options) {
|
592
|
+
const props = {
|
691
593
|
checked: this.checked,
|
692
594
|
size: this.size,
|
693
595
|
groupName: this.groupName,
|
694
596
|
multiSelect: this.multiSelect,
|
695
597
|
checkedValue: this.checkedValue
|
696
598
|
};
|
697
|
-
this.getBaseProps(props, options)
|
599
|
+
this.getBaseProps(props, options);
|
698
600
|
return props;
|
699
601
|
}
|
700
|
-
|
701
|
-
updateProps(props: DataEleCheckProps): void {
|
602
|
+
updateProps(props) {
|
702
603
|
super.updateProps(props);
|
703
604
|
this.checked = props.checked;
|
704
605
|
this.size = props.size;
|
@@ -707,20 +608,16 @@ export class DataEleCheckProps extends DataEleBaseProps {
|
|
707
608
|
this.checkedValue = props.checkedValue;
|
708
609
|
}
|
709
610
|
}
|
710
|
-
|
711
|
-
|
712
611
|
export class DataEleImageProps extends DataEleBaseProps {
|
713
612
|
constructor() {
|
714
613
|
super();
|
715
614
|
super.type = 'img';
|
716
615
|
}
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
clone(dest: DataEleImageProps | null): DataEleImageProps {
|
616
|
+
width;
|
617
|
+
height;
|
618
|
+
src;
|
619
|
+
border;
|
620
|
+
clone(dest) {
|
724
621
|
const clone = dest ?? new DataEleImageProps();
|
725
622
|
this.cloneBaseProps(clone);
|
726
623
|
clone.width = this.width;
|
@@ -729,38 +626,33 @@ export class DataEleImageProps extends DataEleBaseProps {
|
|
729
626
|
clone.border = this.border;
|
730
627
|
return clone;
|
731
628
|
}
|
732
|
-
|
733
|
-
|
734
|
-
const props: NullableType<DataEleImageProps> = {
|
629
|
+
getSerializeProps(options) {
|
630
|
+
const props = {
|
735
631
|
width: this.width,
|
736
632
|
height: this.height,
|
737
633
|
src: this.src,
|
738
634
|
border: this.border
|
739
635
|
};
|
740
|
-
this.getBaseProps(props, options)
|
636
|
+
this.getBaseProps(props, options);
|
741
637
|
return props;
|
742
638
|
}
|
743
|
-
|
744
|
-
updateProps(props: DataEleImageProps): void {
|
639
|
+
updateProps(props) {
|
745
640
|
super.updateProps(props);
|
746
641
|
this.width = props.width;
|
747
642
|
this.height = props.height;
|
748
643
|
this.src = props.src;
|
749
644
|
this.border = props.border;
|
750
645
|
}
|
751
|
-
|
752
646
|
}
|
753
|
-
|
754
647
|
export class DataEleDateProps extends DataEleBaseTextProps {
|
755
648
|
constructor() {
|
756
649
|
super();
|
757
650
|
super.type = 'date';
|
758
651
|
}
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
clone(dest: DataEleDateProps | null): DataEleDateProps {
|
652
|
+
minValue;
|
653
|
+
maxValue;
|
654
|
+
format;
|
655
|
+
clone(dest) {
|
764
656
|
const clone = dest ?? new DataEleDateProps();
|
765
657
|
super.clone(clone);
|
766
658
|
clone.minValue = this.minValue;
|
@@ -768,9 +660,8 @@ export class DataEleDateProps extends DataEleBaseTextProps {
|
|
768
660
|
clone.format = this.format;
|
769
661
|
return clone;
|
770
662
|
}
|
771
|
-
|
772
|
-
|
773
|
-
const props: NullableType<DataEleDateProps> = {
|
663
|
+
getSerializeProps(options) {
|
664
|
+
const props = {
|
774
665
|
minValue: this.minValue,
|
775
666
|
maxValue: this.maxValue,
|
776
667
|
format: this.format
|
@@ -778,34 +669,31 @@ export class DataEleDateProps extends DataEleBaseTextProps {
|
|
778
669
|
this.getBaseProps(props, options);
|
779
670
|
return props;
|
780
671
|
}
|
781
|
-
|
782
|
-
updateProps(props: DataEleDateProps): void {
|
672
|
+
updateProps(props) {
|
783
673
|
super.updateProps(props);
|
784
674
|
this.minValue = props.minValue;
|
785
675
|
this.maxValue = props.maxValue;
|
786
676
|
this.format = props.format;
|
787
677
|
}
|
788
678
|
}
|
789
|
-
|
790
679
|
export class ValidateCondition {
|
791
|
-
required
|
792
|
-
maxLength
|
793
|
-
dataType
|
680
|
+
required = false;
|
681
|
+
maxLength = -1;
|
682
|
+
dataType = 'string';
|
794
683
|
}
|
795
|
-
|
796
684
|
export class DataEleMHProps extends DataEleBaseProps {
|
797
685
|
//初潮年龄
|
798
|
-
age
|
686
|
+
age;
|
799
687
|
//行经期天数
|
800
|
-
days
|
688
|
+
days;
|
801
689
|
//月经周期天数
|
802
|
-
cycles
|
690
|
+
cycles;
|
803
691
|
//末次月经时间
|
804
|
-
lastDate
|
692
|
+
lastDate;
|
805
693
|
//闭经年龄
|
806
|
-
closeAge
|
807
|
-
kind
|
808
|
-
clone(dest
|
694
|
+
closeAge;
|
695
|
+
kind;
|
696
|
+
clone(dest) {
|
809
697
|
const clone = dest ?? new DataEleMHProps();
|
810
698
|
this.cloneBaseProps(clone);
|
811
699
|
clone.age = this.age;
|
@@ -816,123 +704,106 @@ export class DataEleMHProps extends DataEleBaseProps {
|
|
816
704
|
clone.kind = this.kind;
|
817
705
|
return clone;
|
818
706
|
}
|
819
|
-
|
820
|
-
|
821
|
-
const props: NullableType<DataEleMHProps> = {
|
707
|
+
getSerializeProps(options) {
|
708
|
+
const props = {
|
822
709
|
age: this.age,
|
823
710
|
days: this.days,
|
824
711
|
cycles: this.cycles,
|
825
712
|
lastDate: this.lastDate,
|
826
713
|
closeAge: this.closeAge,
|
827
714
|
kind: this.kind
|
828
|
-
}
|
715
|
+
};
|
829
716
|
this.getBaseProps(props, options);
|
830
717
|
return props;
|
831
718
|
}
|
832
|
-
|
833
719
|
}
|
834
|
-
|
835
720
|
export class TrackRunProps {
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
721
|
+
type;
|
722
|
+
userId;
|
723
|
+
userName;
|
724
|
+
date;
|
725
|
+
id;
|
726
|
+
constructor(type) {
|
727
|
+
this.type = type;
|
728
|
+
}
|
729
|
+
clone(dest) {
|
844
730
|
dest = dest ?? new TrackRunProps(this.type);
|
845
731
|
dest.userId = this.userId;
|
846
732
|
dest.userName = this.userName;
|
847
733
|
dest.date = this.date;
|
848
734
|
dest.id = this.id;
|
849
735
|
}
|
850
|
-
|
851
736
|
getSerializeProps() {
|
852
|
-
const props
|
737
|
+
const props = {
|
853
738
|
userId: this.userId,
|
854
739
|
userName: this.userName,
|
855
740
|
date: this.date,
|
856
741
|
id: this.id
|
857
|
-
}
|
742
|
+
};
|
858
743
|
return props;
|
859
744
|
}
|
860
745
|
}
|
861
|
-
|
862
|
-
|
863
746
|
class FontMapStruct {
|
864
|
-
fontMap = new Map
|
865
|
-
length
|
866
|
-
|
867
|
-
registerFontMap(name: string, keyName: string): void {
|
747
|
+
fontMap = new Map();
|
748
|
+
length = 0;
|
749
|
+
registerFontMap(name, keyName) {
|
868
750
|
this.fontMap.set(name, keyName);
|
869
751
|
this.length = this.fontMap.size;
|
870
752
|
}
|
871
|
-
|
872
|
-
getFontMap(name: string): string {
|
753
|
+
getFontMap(name) {
|
873
754
|
if (this.length === 0) {
|
874
755
|
return name;
|
875
756
|
}
|
876
757
|
if (this.fontMap.has(name)) {
|
877
|
-
let key = this.fontMap.get(name)
|
758
|
+
let key = this.fontMap.get(name);
|
878
759
|
return key;
|
879
760
|
}
|
880
761
|
return name;
|
881
762
|
}
|
882
763
|
}
|
883
|
-
|
884
764
|
export const fontMapFunc = new FontMapStruct();
|
885
|
-
|
886
|
-
|
887
765
|
export class ValidateProps {
|
888
|
-
id
|
889
|
-
title
|
890
|
-
msg
|
766
|
+
id;
|
767
|
+
title;
|
768
|
+
msg;
|
891
769
|
}
|
892
|
-
|
893
770
|
export class DataElementGroupProps {
|
894
|
-
id
|
895
|
-
name
|
896
|
-
clone(dest
|
771
|
+
id;
|
772
|
+
name;
|
773
|
+
clone(dest) {
|
897
774
|
dest = dest ?? new DataElementGroupProps();
|
898
775
|
dest.id = this.id;
|
899
776
|
dest.name = this.name;
|
900
777
|
}
|
901
|
-
|
902
778
|
getSerializeProps() {
|
903
779
|
return {
|
904
780
|
id: this.id,
|
905
781
|
name: this.name
|
906
|
-
}
|
782
|
+
};
|
907
783
|
}
|
908
784
|
}
|
909
|
-
|
910
|
-
|
911
|
-
|
912
785
|
export class DataElementBarcodeProps {
|
913
|
-
type
|
914
|
-
text
|
915
|
-
width
|
916
|
-
height
|
917
|
-
|
918
|
-
clone(dest: DataElementBarcodeProps | null) {
|
786
|
+
type = 'code128';
|
787
|
+
text = '';
|
788
|
+
width = 0;
|
789
|
+
height = 0;
|
790
|
+
clone(dest) {
|
919
791
|
dest = dest ?? new DataElementBarcodeProps();
|
920
792
|
dest.type = this.type;
|
921
793
|
dest.text = this.text;
|
922
794
|
dest.width = this.width;
|
923
795
|
dest.height = this.height;
|
924
796
|
}
|
925
|
-
|
926
797
|
getSerializeProps() {
|
927
798
|
return {
|
928
799
|
type: this.type,
|
929
800
|
text: this.text,
|
930
801
|
width: this.width,
|
931
802
|
height: this.height
|
932
|
-
}
|
803
|
+
};
|
933
804
|
}
|
934
805
|
}
|
935
|
-
|
936
806
|
export class BodyPartProps {
|
937
|
-
partId
|
938
|
-
}
|
807
|
+
partId;
|
808
|
+
}
|
809
|
+
//# sourceMappingURL=element-props.js.map
|