hoeditor-web 3.3.6-beta.8 → 3.3.6-beta.9

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/hoeditor.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "vue";
2
- import { H as i, d as r, b as e, a as l, e as t, T as H, f as d, i as f } from "./index-CJWk6KWR.mjs";
2
+ import { H as i, d as r, b as e, a as l, e as t, T as H, f as d, i as f } from "./index-BdYBlxkt.mjs";
3
3
  export {
4
4
  i as HoDocs,
5
5
  r as HoEditorProvide,
@@ -9396,6 +9396,8 @@ class DrawPageCell extends DrawArea {
9396
9396
  b(this, "_rightLine");
9397
9397
  b(this, "backColor");
9398
9398
  b(this, "_anchorLine");
9399
+ // 空单元格占位短横线
9400
+ b(this, "_emptyPlaceholder", null);
9399
9401
  //实现接口部分
9400
9402
  b(this, "_node");
9401
9403
  b(this, "_discriminator");
@@ -9763,7 +9765,37 @@ class DrawPageCell extends DrawArea {
9763
9765
  this.backColor.graphics.clear(), this.backColor.alpha = 0.5, r && o.drawTree.paintStatus != PaintState.psPrint && o.drawTree.paintStatus != PaintState.psPreview && (this.backColor.graphics.beginFill("#f00").drawRect(0, 0, this._dWidth, this._dHeight), this.children.includes(this.backColor) ? this.setChildIndex(this.backColor, 0) : this.addChildAt(this.backColor, 0));
9764
9766
  }
9765
9767
  paintCellBackground(r, o, n) {
9766
- this._backImg.x = 0, this._backImg.y = 0, this._backImg.graphics.beginFill(this._cell.cellProperty.backColor === "#FFFFFF" ? "transparent" : this._cell.cellProperty.backColor), this._backImg.graphics.rect(1, 1, this.dWidth - 1, this.dHeight - 1), this._backImg.graphics.endFill(), this.children.includes(this._backImg) ? this.setChildIndex(this._backImg, 0) : this.addChildAt(this._backImg, 0), this.paintCellBorders(r, o, n), this._cell.needPaintLineGrid() && this.paintLineGrid(), this.setBounds(0, 0, this._dWidth, r);
9768
+ this._backImg.x = 0, this._backImg.y = 0, this._backImg.graphics.beginFill(this._cell.cellProperty.backColor === "#FFFFFF" ? "transparent" : this._cell.cellProperty.backColor), this._backImg.graphics.rect(1, 1, this.dWidth - 1, this.dHeight - 1), this._backImg.graphics.endFill(), this.children.includes(this._backImg) ? this.setChildIndex(this._backImg, 0) : this.addChildAt(this._backImg, 0), this.paintCellBorders(r, o, n), this._cell.needPaintLineGrid() && this.paintLineGrid(), this.paintEmptyPlaceholder(), this.setBounds(0, 0, this._dWidth, r);
9769
+ }
9770
+ /**
9771
+ * 打印/预览态下,若单元格无任何内容(无 DrawLine/DrawPageTable 子节点),
9772
+ * 在单元格内绘制一条从左上角到右下角的对角线作为占位。
9773
+ */
9774
+ paintEmptyPlaceholder() {
9775
+ const o = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).drawTree.paintStatus;
9776
+ if (o !== PaintState.psPreview && o !== PaintState.psPrint || !this.isCellContentEmpty() || !this._cell.cellProperty.emptyPlaceholderLine) {
9777
+ this.clearEmptyPlaceholder();
9778
+ return;
9779
+ }
9780
+ this._emptyPlaceholder || (this._emptyPlaceholder = new createjs$1.Shape(), this._emptyPlaceholder.name = "emptyPlaceholder"), this._emptyPlaceholder.graphics.clear().beginStroke("#999999").setStrokeStyle(1).moveTo(this.dWidth, 0).lineTo(0, this.dHeight).endStroke(), this._emptyPlaceholder.x = 0, this._emptyPlaceholder.y = 0, this._emptyPlaceholder.rotation = 0, this.contains(this._emptyPlaceholder) ? this.setChildIndex(this._emptyPlaceholder, this.numChildren - 1) : this.addChild(this._emptyPlaceholder);
9781
+ }
9782
+ /**
9783
+ * 判断单元格是否无任何内容。
9784
+ * 注意:空单元格(无文字)仍会存在一个空的段落 DrawLine(drawItems 为空),
9785
+ * 因此不能用 isEmpty()(其要求完全无 DrawLine/DrawPageTable 子节点),
9786
+ * 而需按“所有行都无 drawItems”来判断。
9787
+ */
9788
+ isCellContentEmpty() {
9789
+ const r = this._cell.drawCell.drawLines;
9790
+ if (r.length === 0)
9791
+ return !0;
9792
+ for (const o of r)
9793
+ if (o instanceof DrawTable || o.drawItems.length > 0)
9794
+ return !1;
9795
+ return !0;
9796
+ }
9797
+ clearEmptyPlaceholder() {
9798
+ this._emptyPlaceholder && this.contains(this._emptyPlaceholder) && this.removeChild(this._emptyPlaceholder);
9767
9799
  }
9768
9800
  paintLineGrid() {
9769
9801
  const r = this._cell.drawCell.drawLines;
@@ -23012,7 +23044,7 @@ WebPDecoder.prototype.getData = function() {
23012
23044
  (function(a) {
23013
23045
  function t() {
23014
23046
  return function() {
23015
- return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-D-_c3pZ0.mjs");
23047
+ return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-B4h1UsCg.mjs");
23016
23048
  }().catch(function(r) {
23017
23049
  return Promise.reject(new Error("Could not load canvg: " + r));
23018
23050
  }).then(function(r) {
@@ -24602,7 +24634,7 @@ class DrawSignNode extends DrawCombineNode {
24602
24634
  }
24603
24635
  }
24604
24636
  }
24605
- const version = "3.3.6-beta.8";
24637
+ const version = "3.3.6-beta.9";
24606
24638
  var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
24607
24639
  class SignNode extends BaseNode {
24608
24640
  constructor(hoEditorFactoryID, rootNodes, pNode, nodeType, number, type, name, signType, signFormat, signor, signTime, signTimeFormat, imgSrc, imgWidth, imgHeight, customProperty, isTemplate, styleIndex, connectMode, isFront, allowEditSignTime, fingerPrintSrc, fingerPosition, attribute, connectChar, otherProperties, dataId, associatedElement, associatedPatientElement, isTemp, innerIdentifier) {
@@ -27704,7 +27736,8 @@ class CellNode extends RectNode {
27704
27736
  isSignLock: this.cellProperty.isSignLock,
27705
27737
  notAllowEdit: this.cellProperty.notAllowEdit,
27706
27738
  isTruncated: this.cellProperty.isTruncated,
27707
- isDisabled: this.cellProperty.isDisabled
27739
+ isDisabled: this.cellProperty.isDisabled,
27740
+ emptyPlaceholderLine: this.cellProperty.emptyPlaceholderLine
27708
27741
  }, u = JSON.parse(JSON.stringify(d)), f = Object.keys(s);
27709
27742
  for (let v = 0; v < f.length; v++)
27710
27743
  f[v] === "customProperties" ? this.cellProperty.customProperties ? this.cellProperty.customProperties.length === 0 && delete u.customProperties : delete u.customProperties : f[v] === "cellInnerMargin" ? u.cellInnerMargin === "0,0,0.1,0.1" && delete u.cellInnerMargin : f[v] === "gridLinesColor" ? u.gridLinesColor === "#000000,#000000,#000000,#000000" && delete u.gridLinesColor : f[v] === "gridLineDisplay" ? u.gridLineDisplay === "true,true,true,true" && delete u.gridLineDisplay : f[v] === "backColor" ? u.backColor.toString().toLowerCase() === s.backColor.toString().toLowerCase() && delete u.backColor : u[f[v]] === s[f[v]] && delete u[f[v]];
@@ -28747,6 +28780,7 @@ class TableNode extends RectNode {
28747
28780
  isSignLock: !1,
28748
28781
  notAllowEdit: !1,
28749
28782
  isTruncated: !1,
28783
+ emptyPlaceholderLine: !1,
28750
28784
  formula: ""
28751
28785
  }, E = JSON.parse(JSON.stringify(D)), T = new Array(), I = new Array();
28752
28786
  for (let V = u.row; V <= y; V++) {
@@ -29786,7 +29820,7 @@ class ColProperty {
29786
29820
  }
29787
29821
  var GridLinesStyle = /* @__PURE__ */ ((a) => (a[a.solid = 0] = "solid", a[a.dash = 1] = "dash", a[a.dashdot = 2] = "dashdot", a[a.dashdotdo = 3] = "dashdotdo", a[a.dot = 4] = "dot", a))(GridLinesStyle || {}), ObliqueSplitLine = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.TopLeftOneLine = 1] = "TopLeftOneLine", a[a.TopLeftTwoLine = 2] = "TopLeftTwoLine", a[a.TopRightOneLine = 3] = "TopRightOneLine", a[a.TopRightTwoLine = 4] = "TopRightTwoLine", a[a.BottomLeftOneLine = 5] = "BottomLeftOneLine", a[a.BottomLeftTwoLine = 6] = "BottomLeftTwoLine", a[a.BottomRightOneLine = 7] = "BottomRightOneLine", a[a.BottomRightTwoLine = 8] = "BottomRightTwoLine", a[a.TwoDiagonal = 9] = "TwoDiagonal", a))(ObliqueSplitLine || {}), DiagonalType = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.Left = 1] = "Left", a[a.Right = 2] = "Right", a))(DiagonalType || {});
29788
29822
  class CellProperty {
29789
- //是否禁用
29823
+ //空单元格占位斜线
29790
29824
  constructor(objectValues) {
29791
29825
  //private _lightCellBorders = false;//突出显示单元格边框
29792
29826
  b(this, "_customProperties", []);
@@ -29828,6 +29862,8 @@ class CellProperty {
29828
29862
  b(this, "isTruncated", !1);
29829
29863
  //超出内容隐藏
29830
29864
  b(this, "isDisabled", !1);
29865
+ //是否禁用
29866
+ b(this, "emptyPlaceholderLine", !1);
29831
29867
  if (objectValues !== "") {
29832
29868
  const valuesObj = eval("(" + objectValues + ")"), assignvalue = (target, source) => {
29833
29869
  Object.keys(source).forEach((value) => {
@@ -62072,7 +62108,8 @@ class VueController {
62072
62108
  t.otherProperties,
62073
62109
  t.dataId || "",
62074
62110
  t.associatedElement,
62075
- void 0,
62111
+ t.associatedPatientElement,
62112
+ t.isTemp,
62076
62113
  t.innerIdentifier
62077
62114
  );
62078
62115
  r.undoService.begin();
@@ -70851,8 +70888,11 @@ class DocController {
70851
70888
  l.attribute,
70852
70889
  l.connectChar,
70853
70890
  l.otherProperties,
70854
- void 0,
70855
- l.associatedElement
70891
+ l.dataId || "",
70892
+ l.associatedElement,
70893
+ l.associatedPatientElement,
70894
+ l.isTemplate,
70895
+ l.innerIdentifier
70856
70896
  );
70857
70897
  if (t.undoService.begin(), t.undoService.add(new NodeDeleteUndoUnit(this._hoEditorFactoryID, l, a)), t.undoService.add(new NodeInsertUndoUnit(this._hoEditorFactoryID, p, m)), t.undoService.commit(), l.parentNode instanceof CellNode) {
70858
70898
  const g = l.parentNode.table;
@@ -72752,8 +72792,10 @@ class DocController {
72752
72792
  p || a.otherProperties,
72753
72793
  a.dataId || "",
72754
72794
  a.associatedElement,
72755
- a.isTemplate
72795
+ a.associatedPatientElement,
72796
+ a.isTemplate,
72756
72797
  // 更新签名时带上第一次签名的isTemplate属性 后续只用来判断是否为模板 不涉及绘制处理
72798
+ a.innerIdentifier
72757
72799
  );
72758
72800
  m.undoService.begin(), m.undoService.add(new NodeInsertUndoUnit(this._hoEditorFactoryID, y, v)), m.undoService.commit(), m.useSignLockTable && m.vueController.updateTableSignLocked(v), this.operateElementAfter(HistoryEditType.hetModify, v);
72759
72801
  }
@@ -77551,6 +77593,8 @@ const HoColorPicker = __component__$U.exports, columns = [
77551
77593
  // 是否允许编辑
77552
77594
  isTruncated: !1,
77553
77595
  // 超出内容分隐藏
77596
+ emptyPlaceholderLine: !1,
77597
+ // 空单元格占位斜线
77554
77598
  cellTop: 0,
77555
77599
  cellBottom: 0,
77556
77600
  cellLeft: 0,
@@ -77594,7 +77638,7 @@ const HoColorPicker = __component__$U.exports, columns = [
77594
77638
  this.endPath = t.docTree.curDomRange.normalize().endPath;
77595
77639
  const r = this.getCellNodes();
77596
77640
  if (r !== null) {
77597
- this.lightCellBorders = r.cellProperty.lightCellBorders, this.title = r.cellProperty.title ? r.cellProperty.title : "", this.align = r.cellProperty.align, this.isDrawGridlines = r.cellProperty.isDrawGridlines, Array.isArray(r.cellProperty.gridLinesColor) ? this.gridLinesColor = [...r.cellProperty.gridLinesColor] : this.gridLinesColor = ["#000000", "#000000", "#000000", "#000000"], Array.isArray(r.cellProperty.gridLineDisplay) ? this.gridLineDisplay = [...r.cellProperty.gridLineDisplay].map((c) => c == !0 || c == "true") : this.gridLineDisplay = [!0, !0, !0, !0], this.formula = r.cellProperty.formula, this.backColor = r.cellProperty.backColor ? r.cellProperty.backColor : "#ffffff", this.gridLinesStyle = r.cellProperty.gridLinesStyle, this.span = r.cellProperty.span, this.alignTextToGridline = r.cellProperty.alignTextToGridline, this.printGridLines = r.cellProperty.printGridLines, this.isSignLock = r.cellProperty.isSignLock ? r.cellProperty.isSignLock : !1, this.notAllowEdit = r.cellProperty.notAllowEdit ? r.cellProperty.notAllowEdit : !1, this.isTruncated = r.cellProperty.isTruncated ? r.cellProperty.isTruncated : !1, [this.cellTop, this.cellBottom, this.cellLeft, this.cellRight] = r.cellProperty.cellInnerMargin ? r.cellProperty.cellInnerMargin : [0, 0, 0, 0], this.editorProperty = r.cellProperty.editorProperty;
77641
+ this.lightCellBorders = r.cellProperty.lightCellBorders, this.title = r.cellProperty.title ? r.cellProperty.title : "", this.align = r.cellProperty.align, this.isDrawGridlines = r.cellProperty.isDrawGridlines, Array.isArray(r.cellProperty.gridLinesColor) ? this.gridLinesColor = [...r.cellProperty.gridLinesColor] : this.gridLinesColor = ["#000000", "#000000", "#000000", "#000000"], Array.isArray(r.cellProperty.gridLineDisplay) ? this.gridLineDisplay = [...r.cellProperty.gridLineDisplay].map((c) => c == !0 || c == "true") : this.gridLineDisplay = [!0, !0, !0, !0], this.formula = r.cellProperty.formula, this.backColor = r.cellProperty.backColor ? r.cellProperty.backColor : "#ffffff", this.gridLinesStyle = r.cellProperty.gridLinesStyle, this.span = r.cellProperty.span, this.alignTextToGridline = r.cellProperty.alignTextToGridline, this.printGridLines = r.cellProperty.printGridLines, this.isSignLock = r.cellProperty.isSignLock ? r.cellProperty.isSignLock : !1, this.notAllowEdit = r.cellProperty.notAllowEdit ? r.cellProperty.notAllowEdit : !1, this.isTruncated = r.cellProperty.isTruncated ? r.cellProperty.isTruncated : !1, this.emptyPlaceholderLine = r.cellProperty.emptyPlaceholderLine ? r.cellProperty.emptyPlaceholderLine : !1, [this.cellTop, this.cellBottom, this.cellLeft, this.cellRight] = r.cellProperty.cellInnerMargin ? r.cellProperty.cellInnerMargin : [0, 0, 0, 0], this.editorProperty = r.cellProperty.editorProperty;
77598
77642
  const n = [{ value: "", text: "", id: this.getKeyId(0) }], s = r.cellProperty.downListProperty;
77599
77643
  s ? (this.listItems = safeJsonParse(s.listItems) ? [...safeJsonParse(s.listItems), ...n] : [...n], this.source = s.source ? s.source : "", this.canModifyContent = s.canModifyContent !== void 0 ? s.canModifyContent : !0, this.isAllowDel = s.isAllowDel !== void 0 ? s.isAllowDel : !0, this.allowMultiSelected = s.allowMultiSelected !== void 0 ? s.allowMultiSelected : !1, this.splitCharacter = s.splitCharacter ? s.splitCharacter : ",") : this.listItems = [...n];
77600
77644
  const l = r.cellProperty.dateTimeProperty;
@@ -77680,6 +77724,7 @@ const HoColorPicker = __component__$U.exports, columns = [
77680
77724
  isSignLock: this.isSignLock,
77681
77725
  notAllowEdit: this.notAllowEdit,
77682
77726
  isTruncated: this.isTruncated,
77727
+ emptyPlaceholderLine: this.emptyPlaceholderLine,
77683
77728
  obliqueSplitLine: this.obliqueSplitLine,
77684
77729
  editorProperty: this.editorProperty
77685
77730
  };
@@ -77750,7 +77795,9 @@ var _sfc_render$T = function a() {
77750
77795
  t.notAllowEdit = o;
77751
77796
  }, expression: "notAllowEdit" } }, [t._v("不允许编辑单元格")])], 1), r("li", { staticClass: "control-item" }, [r("a-checkbox", { model: { value: t.isTruncated, callback: function(o) {
77752
77797
  t.isTruncated = o;
77753
- }, expression: "isTruncated" } }, [t._v("超出内容隐藏")])], 1)], 1)])])]), r("a-tab-pane", { key: "1", attrs: { tab: i18nHelper("04-001-009-EMR.3.3.41", null, "双击属性") } }, [r("ul", { staticClass: "control-list" }, [r("li", { staticClass: "control-item" }, [r("span", { staticClass: "label" }, [t._v(i18nHelper("04-001-009-EMR.3.3.71", null, "编辑器属性"))]), r("a-select", { staticStyle: { "text-align": "left" }, attrs: { getPopupContainer: (o) => o.parentNode, placeholder: i18nHelper("04-001-009-EMR.3.3.71", null, "编辑器属性"), size: "small" }, model: { value: t.editorProperty, callback: function(o) {
77798
+ }, expression: "isTruncated" } }, [t._v("超出内容隐藏")])], 1), r("li", { staticClass: "control-item" }, [r("a-checkbox", { model: { value: t.emptyPlaceholderLine, callback: function(o) {
77799
+ t.emptyPlaceholderLine = o;
77800
+ }, expression: "emptyPlaceholderLine" } }, [t._v("空单元格占位斜线(打印)")])], 1)], 1)])])]), r("a-tab-pane", { key: "1", attrs: { tab: i18nHelper("04-001-009-EMR.3.3.41", null, "双击属性") } }, [r("ul", { staticClass: "control-list" }, [r("li", { staticClass: "control-item" }, [r("span", { staticClass: "label" }, [t._v(i18nHelper("04-001-009-EMR.3.3.71", null, "编辑器属性"))]), r("a-select", { staticStyle: { "text-align": "left" }, attrs: { getPopupContainer: (o) => o.parentNode, placeholder: i18nHelper("04-001-009-EMR.3.3.71", null, "编辑器属性"), size: "small" }, model: { value: t.editorProperty, callback: function(o) {
77754
77801
  t.editorProperty = o;
77755
77802
  }, expression: "editorProperty" } }, [r("a-select-option", { attrs: { value: 0 } }, [t._v(i18nHelper("04-001-009-EMR.3.3.70", null, "无"))]), r("a-select-option", { attrs: { value: 1 } }, [t._v(i18nHelper("04-001-009-EMR.3.3.161", null, "下拉列表"))]), r("a-select-option", { attrs: { value: 2 } }, [t._v(i18nHelper("04-001-009-EMR.3.3.69", null, "日期"))]), r("a-select-option", { attrs: { value: 7 } }, [t._v(i18nHelper("04-001-009-EMR.3.3.510", null, "计算公式"))])], 1)], 1), t.editorProperty === 1 ? [r("li", { staticClass: "control-item" }, [r("div", { staticClass: "control-item" }, [r("span", { staticClass: "label" }, [t._v(i18nHelper("04-001-009-EMR.3.3.345", null, "分隔符"))]), r("a-select", { staticStyle: { "text-align": "left", "font-size": "20px" }, attrs: { getPopupContainer: (o) => o.parentNode, placeholder: i18nHelper("04-001-009-EMR.3.3.345", null, "分隔符"), size: "small" }, model: { value: t.splitCharacter, callback: function(o) {
77756
77803
  t.splitCharacter = o;
@@ -87247,7 +87294,7 @@ var _sfc_render$6 = function a() {
87247
87294
  return [r("a-menu", t._l(t.paragraph, function(o) {
87248
87295
  return r("a-menu-item", { key: "line-height-" + o.svg, class: o.align === t.aligned ? "selected" : "", nativeOn: { click: function(n) {
87249
87296
  return t.setAlign(o);
87250
- } } }, [r("Poper", { attrs: { title: o.title, svg: o.svg, selected: t.aligned === o.align } })], 1);
87297
+ } } }, [r("Poper", { style: o.eventName === "alignedRight" ? { transform: "scaleX(-1)" } : {}, attrs: { title: o.title, svg: o.svg, selected: t.aligned === o.align } })], 1);
87251
87298
  }), 1)];
87252
87299
  }, proxy: !0 }]) }, [r("p", { staticClass: "ant-dropdown-link ant-dropdown-link-text", on: { click: function(o) {
87253
87300
  o.preventDefault();
@@ -1,4 +1,4 @@
1
- import { c as Da, _ as Va, g as il } from "./index-CJWk6KWR.mjs";
1
+ import { c as Da, _ as Va, g as il } from "./index-BdYBlxkt.mjs";
2
2
  var fn = {}, cn = {}, cr, vn;
3
3
  function Q() {
4
4
  if (vn) return cr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hoeditor-web",
3
- "version": "3.3.6-beta.8",
3
+ "version": "3.3.6-beta.9",
4
4
  "private": false,
5
5
  "main": "lib/hoeditor.mjs",
6
6
  "typings": "types/index.d.ts",