@hailin-zheng/editor-core 2.1.25 → 2.1.26
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/editor.css +2 -1
- package/index-cjs.js +35 -33
- package/index-cjs.js.map +1 -1
- package/index.js +35 -34
- package/index.js.map +1 -1
- package/med_editor/framework/element-define.d.ts +3 -0
- package/med_editor/framework/impl/table/table-row-impl.d.ts +1 -0
- package/med_editor/framework/impl/text/track-run-impl.d.ts +0 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1790,6 +1790,8 @@ class ViewOptions {
|
|
1790
1790
|
docMode = DocMode.Design;
|
1791
1791
|
//是否显示审阅痕迹
|
1792
1792
|
_showTrackChanges = true;
|
1793
|
+
//是否显示审阅痕迹提示
|
1794
|
+
_showTrackChangesTip = true;
|
1793
1795
|
get showTrackChanges() {
|
1794
1796
|
return this._showTrackChanges;
|
1795
1797
|
}
|
@@ -1800,6 +1802,16 @@ class ViewOptions {
|
|
1800
1802
|
this._showTrackChanges = value;
|
1801
1803
|
this.onChange.next('force');
|
1802
1804
|
}
|
1805
|
+
get showTrackChangesTip() {
|
1806
|
+
return this._showTrackChangesTip;
|
1807
|
+
}
|
1808
|
+
set showTrackChangesTip(value) {
|
1809
|
+
if (this._showTrackChangesTip === value) {
|
1810
|
+
return;
|
1811
|
+
}
|
1812
|
+
this._showTrackChangesTip = value;
|
1813
|
+
this.onChange.next('force');
|
1814
|
+
}
|
1803
1815
|
//医嘱打印模式,文字行模式,将表格多行对象转换为多个表格行对象
|
1804
1816
|
textRowLineMode = false;
|
1805
1817
|
editUser = { id: '', name: '' };
|
@@ -4463,6 +4475,7 @@ class TableCellFactory extends ElementFactory {
|
|
4463
4475
|
}
|
4464
4476
|
}
|
4465
4477
|
|
4478
|
+
const RowMinHeight = 20;
|
4466
4479
|
class TableRowElement extends BlockContainerElement {
|
4467
4480
|
//props: TableRowProps;
|
4468
4481
|
constructor() {
|
@@ -10607,6 +10620,9 @@ class TrackRunRenderObject extends InlineGroupRenderObject {
|
|
10607
10620
|
if (this.element.paintRenders.indexOf(this) !== 0) {
|
10608
10621
|
return;
|
10609
10622
|
}
|
10623
|
+
if (!event.options.showTrackChangesTip) {
|
10624
|
+
return;
|
10625
|
+
}
|
10610
10626
|
const opType = this.element.type === 'ins-run' ? '插入:' : '删除:';
|
10611
10627
|
const content = ElementSerialize.serializeString(this.element, { all: true });
|
10612
10628
|
const left = this.element.gotFocus ? -10 : 5;
|
@@ -10643,27 +10659,6 @@ class TrackRunRenderObject extends InlineGroupRenderObject {
|
|
10643
10659
|
};
|
10644
10660
|
event.addChangeTips(node);
|
10645
10661
|
}
|
10646
|
-
//根据时间显示中文日时间提示范围
|
10647
|
-
getTipsDate(date) {
|
10648
|
-
const now = new Date();
|
10649
|
-
const diff = now.getTime() - date.getTime();
|
10650
|
-
if (diff < 60 * 1000) {
|
10651
|
-
return '刚刚';
|
10652
|
-
}
|
10653
|
-
if (diff < 60 * 60 * 1000) {
|
10654
|
-
return `${Math.floor(diff / 60 / 1000)}分钟前`;
|
10655
|
-
}
|
10656
|
-
if (diff < 24 * 60 * 60 * 1000) {
|
10657
|
-
return `${Math.floor(diff / 60 / 60 / 1000)}小时前`;
|
10658
|
-
}
|
10659
|
-
if (diff < 30 * 24 * 60 * 60 * 1000) {
|
10660
|
-
return `${Math.floor(diff / 24 / 60 / 60 / 1000)}天前`;
|
10661
|
-
}
|
10662
|
-
if (diff < 12 * 30 * 24 * 60 * 60 * 1000) {
|
10663
|
-
return `${Math.floor(diff / 30 / 24 / 60 / 60 / 1000)}月前`;
|
10664
|
-
}
|
10665
|
-
return `${Math.floor(diff / 12 / 30 / 24 / 60 / 60 / 1000)}年前`;
|
10666
|
-
}
|
10667
10662
|
clone() {
|
10668
10663
|
const cloneRender = new TrackRunRenderObject(this.element);
|
10669
10664
|
cloneRender.rect = ElementUtil.cloneRect(this.rect);
|
@@ -13884,18 +13879,21 @@ class ParagraphMeasure {
|
|
13884
13879
|
* @param lineEmpty
|
13885
13880
|
*/
|
13886
13881
|
patchHandlePostPunctuation(render, i, inCloseBody, lineEmpty) {
|
13887
|
-
if (
|
13888
|
-
|
13889
|
-
i--;
|
13890
|
-
}
|
13891
|
-
else {
|
13892
|
-
i++;
|
13893
|
-
}
|
13882
|
+
if (i === 1 && lineEmpty) {
|
13883
|
+
return i;
|
13894
13884
|
}
|
13895
|
-
|
13896
|
-
|
13897
|
-
|
13898
|
-
|
13885
|
+
//判断当前行最后一个字符是否是后置标点
|
13886
|
+
//const currCharIsPostPunctuation = this.containPostPunctuation(render.textMeasures[i]?.char);
|
13887
|
+
//判断下一个字符是否是后置标点,如果不是,直接返回
|
13888
|
+
const nextCharIsPostPunctuation = this.containPostPunctuation(render.textMeasures[i]?.char);
|
13889
|
+
if (!nextCharIsPostPunctuation) {
|
13890
|
+
return i;
|
13891
|
+
}
|
13892
|
+
if (inCloseBody) {
|
13893
|
+
return ++i;
|
13894
|
+
}
|
13895
|
+
if (i > 0) {
|
13896
|
+
return --i;
|
13899
13897
|
}
|
13900
13898
|
return i;
|
13901
13899
|
}
|
@@ -14550,6 +14548,9 @@ class DocumentArrange {
|
|
14550
14548
|
// if (render.element.props.minHeight > 0 && render.rect.height < limitHeight) {
|
14551
14549
|
// return null;
|
14552
14550
|
// }
|
14551
|
+
if (limitHeight < RowMinHeight) {
|
14552
|
+
return null;
|
14553
|
+
}
|
14553
14554
|
render.remeasureState = true;
|
14554
14555
|
const cloneRowRender = render.element.createRenderObject();
|
14555
14556
|
if (cloneRowRender.minHeight > 0 && render.minHeight <= 0) {
|
@@ -27224,7 +27225,7 @@ class DocEditor {
|
|
27224
27225
|
rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
|
27225
27226
|
}
|
27226
27227
|
version() {
|
27227
|
-
return "2.1.
|
27228
|
+
return "2.1.26";
|
27228
27229
|
}
|
27229
27230
|
switchPageHeaderEditor() {
|
27230
27231
|
this.docCtx.document.switchPageHeaderEditor(this.selectionState, null);
|
@@ -27495,5 +27496,5 @@ function removeDuplicatesEvent(events) {
|
|
27495
27496
|
return arr;
|
27496
27497
|
}
|
27497
27498
|
|
27498
|
-
export { BlockContainerElement, BlockContainerRenderObject, BlockContentElement, BlockContentRenderObject, BlockLineRectRenderObject, BodyPartProps, BooleanEnum, BorderProps, BranchElement, BranchRenderObject, BreakElement, BreakFactory, BreakRenderObject, CheckBoxElement, CheckBoxFactory, CheckBoxProps, CheckBoxRenderObject, ColumnPatchUtil, CommContentBaseElement, CommContentBaseRenderObject, CommContentElement, CommContentProps, CommContentRenderObject, CommProps, CommentContentFactory, CommentElement, CommentFactory, CommentRenderObject, CommentsFactory, CommentsUtil, CommonUtil, CommsContainerElement, CommsContainerRenderObject, ContentMenuItem, ContextMenuElementEvent, CopyElementEvent, DOMEventSource, DOMSubscription, DataDecorateElement, DataDecorateProps, DataDecorateRenderObject, DataEleBaseProps, DataEleBaseTextProps, DataEleCheckProps, DataEleDateProps, DataEleImageProps, DataEleListProps, DataEleMHProps, DataElementBarcode, DataElementBarcodeFactory, DataElementBarcodeProps, DataElementBarcodeRenderObject, DataElementBaseFactory, DataElementCheck, DataElementCheckFactory, DataElementCheckRenderObject, DataElementDate, DataElementDateFactory, DataElementDateRenderObject, DataElementGroupElement, DataElementGroupFactory, DataElementGroupProps, DataElementGroupRenderObject, DataElementImage, DataElementImgFactory, DataElementInlineGroup, DataElementLeaf, DataElementList, DataElementListFactory, DataElementListRenderObject, DataElementMH, DataElementMHFactory, DataElementRenderObject, DataElementText, DataElementTextFactory, DataElementTextRenderObject, DataImageRenderObject, DataRenderMH, DocEditor, DocMode, DocumentBodyElement, DocumentBodyFactory, DocumentBodyPartElement, DocumentBodyPartFactory, DocumentBodyPartRenderObject, DocumentBodyRenderObject, DocumentChange, DocumentCombine, DocumentComment, DocumentContainerRender, DocumentContext, DocumentCursor, DocumentElement, DocumentEvalFunc, DocumentEvent, DocumentFactory, DocumentFooterElement, DocumentFooterFactory, DocumentFooterRenderObject, DocumentHeaderElement, DocumentHeaderFactory, DocumentHeaderRenderObject, DocumentInput, DocumentPaginator, DocumentPrintOffscreen, DocumentPrintOffscreenBase, DocumentProps, DocumentRenderObject, DocumentSelection, DocumentTemplate, DropElementEvent, EditMode, EditorContext, Element, ElementEvent, ElementFactory, ElementReader, ElementSerialize, ElementUtil, EventBus, EventMap, EventSourceCore$1 as EventSourceCore, FillNullSpaceElement, FillNullSpaceRenderObject, GetTrackTipsEvent, GotCursorEvent, IDispose, INotifyPropertyChanged, InlineBlockContainer, InlineGroupElement, InlineGroupInputElement, InlineGroupRenderObject, InlineMuiltBlockLineRenderObject, InputElementEvent, IsInSideDataElement, IsInSideInlineGroupInputElement, KeyboradElementEvent, LeafElement, LeafRenderObject, LostCursorEvent, MarginProps, ModifyFlag$1 as ModifyFlag, MouseElementEvent, MousedownElementEvent, MuiltBlockLineRenderObject, OnceSubject, PSymbolElement, PSymbolRenderObject, PaddingProps, PageBreakElement, PageBreakFactory, PageBreakRenderObject, PageOptions, PaintContent, ParagraphElement, ParagraphFactory, ParagraphLineRectRenderObject, ParagraphNumberType, ParagraphProps, ParagraphRenderObject, PasteElementEvent, PermanentTeethElement, PermanentTeethFactory, PermanentTeethProps, PermanentTeethRenderObject, PictureElement, PictureFactory, PictureProps, PictureRenderObject, RadioBoxElement, RadioBoxFactory, RadioBoxProps, RadioBoxRenderObject, RangeUtil, Rect, RenderContext, RenderObject, RenderObjectType, ResizeLeafRenderObject, RunElementFactory, SVGElement, SVGFactory, SVGProps, SVGRenderObject, SelectionOverlays, SelectionRange, SelectionState, Subject$1 as Subject, SubjectSubscription$1 as SubjectSubscription, Subscription$1 as Subscription, TabElement, TabFactory, TabRenderObject, TableCellElement, TableCellFactory, TableCellProps, TableCellRenderObject, TableElement, TableFactory, TableProps, TableRenderObject, TableRowElement, TableRowFactory, TableRowProps, TableRowRenderObject, TableSplitCell, TableUtil, TextGroupElement, TextGroupFactory, TextGroupRenderObject, TextProps, TextUnitsHolder, TrackRunElement, TrackRunProps, TrackRunRenderObject, TrackRunTypeEnum, ValidateCondition, ValidateElement, ValidateProps, ValidateRenderObject, ViewOptions, addReturn, clearChildrenRenderCache, clearTraces, cloneChildren, cloneElementBase, defaultParaHanging, deleteCurrentParagraph, docOpsMap, elementTypeEventHandler, exportDecoratorHTML, falseChar, fontMapFunc, formatEle, fromEvent, generatePatch, getCalleeName, getFocusTextSegment, inputText, insertEle, invokeTypeHandler, isDate, logUpdateEleProps, objectToString$4 as objectToString, onTableContextmenu, onceTask, parser, reactiveMap, removeEle, removeText, runTextLineRender, setChildrenModifyFlag, setDataElementProps, setNotifyChangedCallback, setTraceTrackingFlag, suppressTracking, targetMaps, textLineRenderMode, toRawType, toTypeString, trueChar, validateDataEle, validateDataEleRenderObj, validateInlineInputRenderObj, watchChanged };
|
27499
|
+
export { BlockContainerElement, BlockContainerRenderObject, BlockContentElement, BlockContentRenderObject, BlockLineRectRenderObject, BodyPartProps, BooleanEnum, BorderProps, BranchElement, BranchRenderObject, BreakElement, BreakFactory, BreakRenderObject, CheckBoxElement, CheckBoxFactory, CheckBoxProps, CheckBoxRenderObject, ColumnPatchUtil, CommContentBaseElement, CommContentBaseRenderObject, CommContentElement, CommContentProps, CommContentRenderObject, CommProps, CommentContentFactory, CommentElement, CommentFactory, CommentRenderObject, CommentsFactory, CommentsUtil, CommonUtil, CommsContainerElement, CommsContainerRenderObject, ContentMenuItem, ContextMenuElementEvent, CopyElementEvent, DOMEventSource, DOMSubscription, DataDecorateElement, DataDecorateProps, DataDecorateRenderObject, DataEleBaseProps, DataEleBaseTextProps, DataEleCheckProps, DataEleDateProps, DataEleImageProps, DataEleListProps, DataEleMHProps, DataElementBarcode, DataElementBarcodeFactory, DataElementBarcodeProps, DataElementBarcodeRenderObject, DataElementBaseFactory, DataElementCheck, DataElementCheckFactory, DataElementCheckRenderObject, DataElementDate, DataElementDateFactory, DataElementDateRenderObject, DataElementGroupElement, DataElementGroupFactory, DataElementGroupProps, DataElementGroupRenderObject, DataElementImage, DataElementImgFactory, DataElementInlineGroup, DataElementLeaf, DataElementList, DataElementListFactory, DataElementListRenderObject, DataElementMH, DataElementMHFactory, DataElementRenderObject, DataElementText, DataElementTextFactory, DataElementTextRenderObject, DataImageRenderObject, DataRenderMH, DocEditor, DocMode, DocumentBodyElement, DocumentBodyFactory, DocumentBodyPartElement, DocumentBodyPartFactory, DocumentBodyPartRenderObject, DocumentBodyRenderObject, DocumentChange, DocumentCombine, DocumentComment, DocumentContainerRender, DocumentContext, DocumentCursor, DocumentElement, DocumentEvalFunc, DocumentEvent, DocumentFactory, DocumentFooterElement, DocumentFooterFactory, DocumentFooterRenderObject, DocumentHeaderElement, DocumentHeaderFactory, DocumentHeaderRenderObject, DocumentInput, DocumentPaginator, DocumentPrintOffscreen, DocumentPrintOffscreenBase, DocumentProps, DocumentRenderObject, DocumentSelection, DocumentTemplate, DropElementEvent, EditMode, EditorContext, Element, ElementEvent, ElementFactory, ElementReader, ElementSerialize, ElementUtil, EventBus, EventMap, EventSourceCore$1 as EventSourceCore, FillNullSpaceElement, FillNullSpaceRenderObject, GetTrackTipsEvent, GotCursorEvent, IDispose, INotifyPropertyChanged, InlineBlockContainer, InlineGroupElement, InlineGroupInputElement, InlineGroupRenderObject, InlineMuiltBlockLineRenderObject, InputElementEvent, IsInSideDataElement, IsInSideInlineGroupInputElement, KeyboradElementEvent, LeafElement, LeafRenderObject, LostCursorEvent, MarginProps, ModifyFlag$1 as ModifyFlag, MouseElementEvent, MousedownElementEvent, MuiltBlockLineRenderObject, OnceSubject, PSymbolElement, PSymbolRenderObject, PaddingProps, PageBreakElement, PageBreakFactory, PageBreakRenderObject, PageOptions, PaintContent, ParagraphElement, ParagraphFactory, ParagraphLineRectRenderObject, ParagraphNumberType, ParagraphProps, ParagraphRenderObject, PasteElementEvent, PermanentTeethElement, PermanentTeethFactory, PermanentTeethProps, PermanentTeethRenderObject, PictureElement, PictureFactory, PictureProps, PictureRenderObject, RadioBoxElement, RadioBoxFactory, RadioBoxProps, RadioBoxRenderObject, RangeUtil, Rect, RenderContext, RenderObject, RenderObjectType, ResizeLeafRenderObject, RowMinHeight, RunElementFactory, SVGElement, SVGFactory, SVGProps, SVGRenderObject, SelectionOverlays, SelectionRange, SelectionState, Subject$1 as Subject, SubjectSubscription$1 as SubjectSubscription, Subscription$1 as Subscription, TabElement, TabFactory, TabRenderObject, TableCellElement, TableCellFactory, TableCellProps, TableCellRenderObject, TableElement, TableFactory, TableProps, TableRenderObject, TableRowElement, TableRowFactory, TableRowProps, TableRowRenderObject, TableSplitCell, TableUtil, TextGroupElement, TextGroupFactory, TextGroupRenderObject, TextProps, TextUnitsHolder, TrackRunElement, TrackRunProps, TrackRunRenderObject, TrackRunTypeEnum, ValidateCondition, ValidateElement, ValidateProps, ValidateRenderObject, ViewOptions, addReturn, clearChildrenRenderCache, clearTraces, cloneChildren, cloneElementBase, defaultParaHanging, deleteCurrentParagraph, docOpsMap, elementTypeEventHandler, exportDecoratorHTML, falseChar, fontMapFunc, formatEle, fromEvent, generatePatch, getCalleeName, getFocusTextSegment, inputText, insertEle, invokeTypeHandler, isDate, logUpdateEleProps, objectToString$4 as objectToString, onTableContextmenu, onceTask, parser, reactiveMap, removeEle, removeText, runTextLineRender, setChildrenModifyFlag, setDataElementProps, setNotifyChangedCallback, setTraceTrackingFlag, suppressTracking, targetMaps, textLineRenderMode, toRawType, toTypeString, trueChar, validateDataEle, validateDataEleRenderObj, validateInlineInputRenderObj, watchChanged };
|
27499
27500
|
//# sourceMappingURL=index.js.map
|