@hailin-zheng/editor-core 2.1.2 → 2.1.4

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 CHANGED
@@ -16370,10 +16370,10 @@ class PermanentTeethElement extends LeafElement {
16370
16370
  constructor() {
16371
16371
  super('permanent-teeth');
16372
16372
  this.props = new PermanentTeethProps();
16373
- this.props.topLeft = '87654321';
16374
- this.props.topRight = '12345678';
16375
- this.props.bottomLeft = '87654321';
16376
- this.props.bottomRight = '12345678';
16373
+ this.props.topLeft = '';
16374
+ this.props.topRight = '';
16375
+ this.props.bottomLeft = '';
16376
+ this.props.bottomRight = '';
16377
16377
  }
16378
16378
  clone(data) {
16379
16379
  const clone = new PermanentTeethElement();
@@ -21155,13 +21155,18 @@ class DocumentSvg {
21155
21155
  if (!this.viewOptions.virtualViewMode || this.mode === 'print') {
21156
21156
  return true;
21157
21157
  }
21158
+ const { scale } = this.viewOptions;
21158
21159
  const viewBoxRect = {
21159
21160
  x: this.viewOptions.pageOffset.x,
21160
21161
  y: this.viewOptions.pageOffset.y,
21161
21162
  width: this.viewOptions.viewSettings.width,
21162
21163
  height: this.viewOptions.viewSettings.height
21163
21164
  };
21164
- const eleRect = item.rect;
21165
+ const eleRect = { ...item.rect };
21166
+ eleRect.x = eleRect.x * scale;
21167
+ eleRect.y = eleRect.y * scale;
21168
+ eleRect.width = eleRect.width * scale;
21169
+ eleRect.height = eleRect.height * scale;
21165
21170
  return CommonUtil.isIntersect(viewBoxRect, eleRect);
21166
21171
  }
21167
21172
  getPageSvgVNode(item) {
@@ -26422,9 +26427,10 @@ class EditorCalendarVNode {
26422
26427
  this.currTime.value = null;
26423
26428
  this.selectedTime.value = null;
26424
26429
  }
26425
- render(position, dataValue) {
26430
+ render(position, dataValue, format = 'YYYY-MM-DD HH:mm:ss') {
26431
+ format = format ?? 'YYYY-MM-DD HH:mm:ss';
26426
26432
  if (!this.currentDate && dataValue) {
26427
- const currDataValue = moment__default["default"](dataValue);
26433
+ const currDataValue = moment__default["default"](dataValue, format);
26428
26434
  this.currYear.value = currDataValue.year();
26429
26435
  this.currMonth.value = currDataValue.month();
26430
26436
  this.selectedDate.value = currDataValue.format('YYYY-MM-DD');
@@ -28584,7 +28590,7 @@ class DocEditor {
28584
28590
  if (!dataEle.isValid(currVal)) {
28585
28591
  currVal = '';
28586
28592
  }
28587
- return calendar.render(position, currVal);
28593
+ return calendar.render(position, currVal, dataEle.props.format);
28588
28594
  }
28589
28595
  calendar.reset();
28590
28596
  return null;
@@ -28648,7 +28654,7 @@ class DocEditor {
28648
28654
  rule.setRuleOptions({ width: this.viewOptions.docPageSettings.width, pagePL, pagePR, docLeft });
28649
28655
  }
28650
28656
  version() {
28651
- return "2.1.2";
28657
+ return "2.1.4";
28652
28658
  }
28653
28659
  }
28654
28660