@hailin-zheng/editor-core 2.0.12 → 2.0.13
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/index-cjs.js +61 -25
- package/index-cjs.js.map +1 -1
- package/index.js +61 -25
- package/index.js.map +1 -1
- package/med_editor/framework/document-context.d.ts +3 -3
- package/med_editor/framework/dynamic-executer.d.ts +3 -2
- package/med_editor/framework/impl/data-element/data-element-text-impl.d.ts +1 -1
- package/package.json +1 -1
package/index-cjs.js
CHANGED
@@ -6527,7 +6527,7 @@ class TableRenderObject extends MuiltBlockLineRenderObject {
|
|
6527
6527
|
if (prevVerticalLines) {
|
6528
6528
|
for (let k = 0; k < currVerticalLines.length; k++) {
|
6529
6529
|
const currVerticalLine = currVerticalLines[k];
|
6530
|
-
const matchItem = prevVerticalLines.find(item => item.x === currVerticalLine.x);
|
6530
|
+
const matchItem = prevVerticalLines.find(item => item.x === currVerticalLine.x && currVerticalLine.y === item.y + item.height);
|
6531
6531
|
if (matchItem) {
|
6532
6532
|
matchItem.height += currVerticalLine.height;
|
6533
6533
|
currVerticalLines[k] = matchItem;
|
@@ -10800,24 +10800,24 @@ class DataElementCheckRenderObject extends LeafRenderObject {
|
|
10800
10800
|
let { width, height } = this.rect;
|
10801
10801
|
width -= 4;
|
10802
10802
|
t.children = [];
|
10803
|
-
if (!props.drawStateChar || props.border) {
|
10804
|
-
t.children.push({
|
10805
|
-
sel: 'rect',
|
10806
|
-
data: {
|
10807
|
-
ns: "http://www.w3.org/2000/svg",
|
10808
|
-
attrs: {
|
10809
|
-
x: 2,
|
10810
|
-
y: 0,
|
10811
|
-
width,
|
10812
|
-
height,
|
10813
|
-
stroke: 'black',
|
10814
|
-
fill: 'none',
|
10815
|
-
'stroke-width': 1
|
10816
|
-
}
|
10817
|
-
}
|
10818
|
-
});
|
10819
|
-
}
|
10820
10803
|
if (props.drawStateChar) {
|
10804
|
+
if (props.border) {
|
10805
|
+
t.children.push({
|
10806
|
+
sel: 'rect',
|
10807
|
+
data: {
|
10808
|
+
ns: "http://www.w3.org/2000/svg",
|
10809
|
+
attrs: {
|
10810
|
+
x: 2,
|
10811
|
+
y: 0,
|
10812
|
+
width,
|
10813
|
+
height,
|
10814
|
+
stroke: 'black',
|
10815
|
+
fill: 'none',
|
10816
|
+
'stroke-width': 1
|
10817
|
+
}
|
10818
|
+
}
|
10819
|
+
});
|
10820
|
+
}
|
10821
10821
|
const str = props.checked ? props.trueChar : props.falseChar;
|
10822
10822
|
t.children.push({
|
10823
10823
|
sel: 'text',
|
@@ -10836,8 +10836,23 @@ class DataElementCheckRenderObject extends LeafRenderObject {
|
|
10836
10836
|
});
|
10837
10837
|
}
|
10838
10838
|
else {
|
10839
|
-
if (props.
|
10840
|
-
|
10839
|
+
if (props.multiSelect) {
|
10840
|
+
t.children.push({
|
10841
|
+
sel: 'rect',
|
10842
|
+
data: {
|
10843
|
+
ns: "http://www.w3.org/2000/svg",
|
10844
|
+
attrs: {
|
10845
|
+
x: 2,
|
10846
|
+
y: 0,
|
10847
|
+
width,
|
10848
|
+
height,
|
10849
|
+
stroke: 'black',
|
10850
|
+
fill: 'none',
|
10851
|
+
'stroke-width': 1
|
10852
|
+
}
|
10853
|
+
}
|
10854
|
+
});
|
10855
|
+
if (props.checked) {
|
10841
10856
|
const paths = ElementUtil.getCheckboxPath(2, 0, props.size, props.size);
|
10842
10857
|
t.children.push({
|
10843
10858
|
sel: 'path',
|
@@ -10854,7 +10869,23 @@ class DataElementCheckRenderObject extends LeafRenderObject {
|
|
10854
10869
|
}
|
10855
10870
|
});
|
10856
10871
|
}
|
10857
|
-
|
10872
|
+
}
|
10873
|
+
else {
|
10874
|
+
t.children.push({
|
10875
|
+
sel: 'circle',
|
10876
|
+
data: {
|
10877
|
+
ns: "http://www.w3.org/2000/svg",
|
10878
|
+
attrs: {
|
10879
|
+
cx: width / 2,
|
10880
|
+
cy: height / 2,
|
10881
|
+
r: width / 3,
|
10882
|
+
stroke: 'black',
|
10883
|
+
fill: 'none',
|
10884
|
+
'stroke-width': 1
|
10885
|
+
}
|
10886
|
+
}
|
10887
|
+
});
|
10888
|
+
if (props.checked) {
|
10858
10889
|
t.children.push({
|
10859
10890
|
sel: 'circle',
|
10860
10891
|
data: {
|
@@ -11456,6 +11487,9 @@ class DataElementText extends DataElementInlineGroup {
|
|
11456
11487
|
}
|
11457
11488
|
this.pubOnChange('self');
|
11458
11489
|
this.clearInnerItems();
|
11490
|
+
if (typeof val !== 'string') {
|
11491
|
+
val += '';
|
11492
|
+
}
|
11459
11493
|
if (val) {
|
11460
11494
|
const items = val.split('<br/>');
|
11461
11495
|
if (items.length) {
|
@@ -13576,9 +13610,11 @@ class DynamicContextParser {
|
|
13576
13610
|
getControlById(id) {
|
13577
13611
|
if (!this.cacheList) {
|
13578
13612
|
const ctx = new DocumentContext(this.doc, this.ss);
|
13579
|
-
this.cacheList = ctx.
|
13613
|
+
this.cacheList = ctx.getDataElementModelList();
|
13580
13614
|
}
|
13581
|
-
|
13615
|
+
const f = this.cacheList.find(item => item.id === id);
|
13616
|
+
return f;
|
13617
|
+
//return this.cacheList.find(item => item['props']['id'] === id);
|
13582
13618
|
}
|
13583
13619
|
getObject(id) {
|
13584
13620
|
new DocumentContext(this.doc, this.ss);
|
@@ -25943,7 +25979,7 @@ class EditorCalendarVNode {
|
|
25943
25979
|
this.currYear.value = new Date().getFullYear();
|
25944
25980
|
this.currMonth.value = new Date().getMonth();
|
25945
25981
|
this.currCalendarMode.value = 'day';
|
25946
|
-
this.selectedDate.value =
|
25982
|
+
this.selectedDate.value = moment__default["default"]().format('YYYY-MM-DD');
|
25947
25983
|
}
|
25948
25984
|
onClickDayYearPart() {
|
25949
25985
|
this.currCalendarMode.value = 'year';
|
@@ -26634,7 +26670,7 @@ class DocEditor {
|
|
26634
26670
|
children: [listVNode.render(), calendarFunc.render(), menuFunc.render()]
|
26635
26671
|
};
|
26636
26672
|
return {
|
26637
|
-
sel: 'div
|
26673
|
+
sel: 'div.svg-container',
|
26638
26674
|
data: {
|
26639
26675
|
style: {
|
26640
26676
|
cursor: this.viewOptions.cursor
|