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