hoeditor-web 3.3.3-beta.15 → 3.3.3-beta.17

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-FRvtZM9_.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-BY_nkxbf.mjs";
3
3
  export {
4
4
  i as HoDocs,
5
5
  r as HoEditorProvide,
@@ -11087,13 +11087,7 @@ class DrawPageTable extends DrawRect {
11087
11087
  const m = c.partRowHeights.get(p);
11088
11088
  m && (f += m.rowHeight);
11089
11089
  }
11090
- r.dHeight = f, r.maxHeight = f, r.update(
11091
- o,
11092
- r.cell.drawCell.drawLines,
11093
- l,
11094
- r.valignTop,
11095
- f
11096
- ), c.paintCellBorder(r, n, s, f);
11090
+ r.dHeight = f, r.maxHeight = f, r.update(o, r.cell.drawCell.drawLines, l, r.valignTop, f), c.paintCellBorder(r, n, s, f);
11097
11091
  }
11098
11092
  updatePartCellHeight(r, o, n, s, l, c) {
11099
11093
  let d = l;
@@ -11193,13 +11187,7 @@ class DrawPageTable extends DrawRect {
11193
11187
  const z = D.drawCell.getDrawPageCell(this._table.drawTable.drawPageTables[u - 1]);
11194
11188
  z && (k = D.drawCell.getCellRestHeight(D.drawCell.drawPageCells.indexOf(z) - 1), z.isEndLineFinished() ? z.endDline == -2 ? M = 0 : M = z.endDline + 1 : M = z.endDline);
11195
11189
  } else D.drawCell.drawPageCells.length > 0 && (D.drawCell.drawPageCells.length = 0);
11196
- I = Math.min(k, c), D.drawCell.paintCell(
11197
- this,
11198
- L,
11199
- I,
11200
- H,
11201
- M
11202
- );
11190
+ I = Math.min(k, c), D.drawCell.paintCell(this, L, I, H, M);
11203
11191
  }
11204
11192
  }
11205
11193
  if (g = Math.min(this.getAndUpdatePartRowHeight(y), c), this._endRow = y, this.updateRowPartCellHeight(y, g), s += g + m, l += g + m, c -= g + m, m = 0, this.isEndRowFinished())
@@ -11224,13 +11212,7 @@ class DrawPageTable extends DrawRect {
11224
11212
  if (r.rowSpan + o - 1 === s) {
11225
11213
  const d = r.drawCell.getDrawPageCell(this), u = HOEditorFactorys.instance().getFactory(this._table.hoEditorFactoryID);
11226
11214
  if (d) {
11227
- const f = u.unitConvert.mmConversionPx(
11228
- d.cell.cellProperty.cellInnerMargin[0] * 10,
11229
- !0
11230
- ), p = u.unitConvert.mmConversionPx(
11231
- d.cell.cellProperty.cellInnerMargin[1] * 10,
11232
- !0
11233
- );
11215
+ const f = u.unitConvert.mmConversionPx(d.cell.cellProperty.cellInnerMargin[0] * 10, !0), p = u.unitConvert.mmConversionPx(d.cell.cellProperty.cellInnerMargin[1] * 10, !0);
11234
11216
  let m = 0;
11235
11217
  const g = d.cell.drawCell.drawPageCells.indexOf(d), y = ((c = d.cell.table.rowInfos[o]) == null ? void 0 : c.rowProperty) || {};
11236
11218
  if (y.isLockRowHeight && y.rowHeight && y.rowHeight > 0 ? m = HOEditorFactorys.instance().getFactory(this.table.hoEditorFactoryID).unitConvert.mmConversionPx(this._table.rowInfos[s].rowProperty.rowHeight * 10, !1) : g == 0 || g == d.cell.drawCell.drawPageCells.length - 1 ? g == 0 && g == d.cell.drawCell.drawPageCells.length - 1 ? m = Math.max(gDefaultRowHeight, f + d.docHeight + p) : g == 0 ? m = Math.max(gDefaultRowHeight, f + d.docHeight) : g == d.cell.drawCell.drawPageCells.length - 1 && (m = Math.max(gDefaultRowHeight, p + d.docHeight)) : m = Math.max(gDefaultRowHeight, d.docHeight), (g === d.cell.drawCell.drawPageCells.length - 1 || this._table.rowInfos[o].rowProperty.repeatAsTitleAtPageTop) && r.table.rowInfos[s].rowProperty.isSpecifyHeight) {
@@ -11259,12 +11241,8 @@ class DrawPageTable extends DrawRect {
11259
11241
  const u = this.getPageCellTop(l), f = n - u, p = this._table.drawTable.drawPageTables.indexOf(this);
11260
11242
  let m = 0;
11261
11243
  if (p > 0 && c <= this._startRow) {
11262
- const y = l.drawCell.getDrawPageCell(
11263
- this._table.drawTable.drawPageTables[p - 1]
11264
- );
11265
- y && (l.drawCell.getCellRestHeight(
11266
- l.drawCell.drawPageCells.indexOf(y) - 1
11267
- ), y.isEndLineFinished() ? m = y.endDline + 1 : m = y.endDline);
11244
+ const y = l.drawCell.getDrawPageCell(this._table.drawTable.drawPageTables[p - 1]);
11245
+ y && (l.drawCell.getCellRestHeight(l.drawCell.drawPageCells.indexOf(y) - 1), y.isEndLineFinished() ? m = y.endDline + 1 : m = y.endDline);
11268
11246
  } else if (l.drawCell.drawPageCells.length > 0) {
11269
11247
  for (let y = l.drawCell.drawPageCells.length - 1; y >= 0; y--)
11270
11248
  l.drawCell.drawPageCells[y].parent.removeChild(l.drawCell.drawPageCells[y]);
@@ -11288,42 +11266,15 @@ class DrawPageTable extends DrawRect {
11288
11266
  if (c && c.rowSpan + d - 1 > o && u == l) {
11289
11267
  const f = this.getPageCellTop(c), p = s - f;
11290
11268
  let m = 0, g = -1, y = null;
11291
- r && d <= this._startRow && (y = c.drawCell.getDrawPageCell(r), y && (g = c.drawCell.drawPageCells.indexOf(
11292
- y
11293
- ), y.isEndLineFinished() ? m = y.endDline + 1 : m = y.endDline));
11269
+ r && d <= this._startRow && (y = c.drawCell.getDrawPageCell(r), y && (g = c.drawCell.drawPageCells.indexOf(y), y.isEndLineFinished() ? m = y.endDline + 1 : m = y.endDline));
11294
11270
  let w;
11295
11271
  const [v, C] = c.getLeftWidth();
11296
- g === c.drawCell.drawPageCells.length - 1 ? (w = new DrawPageCell(
11297
- this.table.hoEditorFactoryID,
11298
- this,
11299
- c,
11300
- v,
11301
- f,
11302
- C,
11303
- p,
11304
- g + 1,
11305
- m,
11306
- p
11307
- ), c.drawCell.drawPageCells.push(w), w.y = f, w.x = v, this.addChild(w), w.update(
11308
- y,
11309
- c.drawCell.drawLines,
11310
- m,
11311
- w.valignTop,
11312
- p
11313
- ), w.y = f) : (w = c.drawCell.drawPageCells[g + 1], w.parent !== this && (c.drawCell.needUpdate = !0, w.parent && w.parent.removeChild(w), w.drawPageTable = this, this.addChild(w)), (c.drawCell.needUpdate || m !== w.startDline || w.dHeight > p || w.y != f) && (c.drawCell.needUpdate || (c.drawCell.needUpdate = !0), o === d ? (w.maxHeight = p, w.dHeight = p) : w.maxHeight = s - f, w.update(
11314
- y,
11315
- c.drawCell.drawLines,
11316
- m,
11317
- w.valignTop,
11318
- p
11319
- )), w.y = f, w.x = v), this.updatePartCellHeight(c, d, u, o, n, !0);
11272
+ g === c.drawCell.drawPageCells.length - 1 ? (w = new DrawPageCell(this.table.hoEditorFactoryID, this, c, v, f, C, p, g + 1, m, p), c.drawCell.drawPageCells.push(w), w.y = f, w.x = v, this.addChild(w), w.update(y, c.drawCell.drawLines, m, w.valignTop, p), w.y = f) : (w = c.drawCell.drawPageCells[g + 1], w.parent !== this && (c.drawCell.needUpdate = !0, w.parent && w.parent.removeChild(w), w.drawPageTable = this, this.addChild(w)), (c.drawCell.needUpdate || m !== w.startDline || w.dHeight > p || w.y != f) && (c.drawCell.needUpdate || (c.drawCell.needUpdate = !0), o === d ? (w.maxHeight = p, w.dHeight = p) : w.maxHeight = s - f, w.update(y, c.drawCell.drawLines, m, w.valignTop, p)), w.y = f, w.x = v), this.updatePartCellHeight(c, d, u, o, n, !0);
11320
11273
  }
11321
11274
  }
11322
11275
  }
11323
11276
  getMainRestHeight() {
11324
- const r = HOEditorFactorys.instance().getFactory(this.table.hoEditorFactoryID), o = r.drawPageTree.getMainRootArea(
11325
- this
11326
- );
11277
+ const r = HOEditorFactorys.instance().getFactory(this.table.hoEditorFactoryID), o = r.drawPageTree.getMainRootArea(this);
11327
11278
  if (!o) return 0;
11328
11279
  const n = this.localToLocal(0, 0, o);
11329
11280
  let s = o.maxHeight - n.y, l = r.drawTree.getParentDrawArea(this);
@@ -11490,9 +11441,7 @@ class DrawPageTable extends DrawRect {
11490
11441
  var s;
11491
11442
  const r = (s = this._partRowHeights.get(this._startRow)) == null ? void 0 : s.rowHeight, o = HOEditorFactorys.instance().getFactory(this._table.hoEditorFactoryID);
11492
11443
  let n = null;
11493
- if (this.stage && (n = o.drawPageTree.getDrawPageByDNode(
11494
- this
11495
- )), r && n) {
11444
+ if (this.stage && (n = o.drawPageTree.getDrawPageByDNode(this)), r && n) {
11496
11445
  const l = this.localToGlobal(0, 0);
11497
11446
  return [n, l.x, l.y, r];
11498
11447
  } else
@@ -11523,7 +11472,7 @@ class DrawPageTable extends DrawRect {
11523
11472
  this.removeDrawCellAfterRow(C);
11524
11473
  break;
11525
11474
  }
11526
- if (s <= this._table.drawTable.getRowStartLineMaxHeight(C)) {
11475
+ if (s < this._table.drawTable.getRowStartLineMaxHeight(C)) {
11527
11476
  this.removeDrawCellAfterRow(C);
11528
11477
  break;
11529
11478
  }
@@ -11546,42 +11495,17 @@ class DrawPageTable extends DrawRect {
11546
11495
  const [T, I, M] = this._table.getMainCell(C, E);
11547
11496
  if (T && M === E && (I + T.rowSpan - 1 == C || m > s - 10 || s - m < n.defaultLineHeight)) {
11548
11497
  let k = 0, L = -1, H = null;
11549
- r && I <= this._startRow && (H = T.drawCell.getDrawPageCell(r), H && (L = T.drawCell.drawPageCells.indexOf(
11550
- H
11551
- ), H.isEndLineFinished() ? H.endDline == -2 ? k = 0 : k = H.endDline + 1 : k = H.endDline));
11498
+ r && I <= this._startRow && (H = T.drawCell.getDrawPageCell(r), H && (L = T.drawCell.drawPageCells.indexOf(H), H.isEndLineFinished() ? H.endDline == -2 ? k = 0 : k = H.endDline + 1 : k = H.endDline));
11552
11499
  let z;
11553
11500
  const [Z, j] = T.getLeftWidth();
11554
11501
  let Y = l, X = s;
11555
11502
  if (T.rowSpan > 1 && (Y = this.getPageCellTop(T), X = u - Y), L === T.drawCell.drawPageCells.length - 1) {
11556
- g = !0, z = new DrawPageCell(
11557
- this.table.hoEditorFactoryID,
11558
- this,
11559
- T,
11560
- Z,
11561
- Y,
11562
- j,
11563
- m,
11564
- L + 1,
11565
- k,
11566
- X
11567
- ), T.drawCell.drawPageCells.push(z), z.y = Y, M > 0 && (z.x = Z), this.addChild(z);
11568
- const O = z.update(
11569
- H,
11570
- T.drawCell.drawLines,
11571
- k,
11572
- z.valignTop,
11573
- X
11574
- );
11503
+ g = !0, z = new DrawPageCell(this.table.hoEditorFactoryID, this, T, Z, Y, j, m, L + 1, k, X), T.drawCell.drawPageCells.push(z), z.y = Y, M > 0 && (z.x = Z), this.addChild(z);
11504
+ const O = z.update(H, T.drawCell.drawLines, k, z.valignTop, X);
11575
11505
  z.y = Y, _ = _ && O;
11576
11506
  } else if (z = T.drawCell.drawPageCells[L + 1], z.parent !== this && (T.drawCell.needUpdate = !0, z.parent && z.parent.removeChild(z), z.drawPageTable = this, this.addChild(z)), z.y = Y, z.x = Z, T.drawCell.needUpdate || k !== z.startDline || z.dHeight > s || z.dHeight + n.defaultLineHeight < s && L + 1 < T.drawCell.drawPageCells.length - 1 && !this._table.rowInfos[C].rowProperty.repeatAsTitleAtPageTop) {
11577
11507
  T.drawCell.needUpdate || (T.drawCell.needUpdate = !0), C === I ? (z.maxHeight = s, z.dHeight = Math.min(m, s)) : z.maxHeight = u - Y, g = !0;
11578
- const O = z.update(
11579
- H,
11580
- T.drawCell.drawLines,
11581
- k,
11582
- z.valignTop,
11583
- X
11584
- );
11508
+ const O = z.update(H, T.drawCell.drawLines, k, z.valignTop, X);
11585
11509
  _ = _ && O;
11586
11510
  } else T.drawCell.drawPageCells.length > 1 && L + 1 < T.drawCell.drawPageCells.length - 1 && !this._table.rowInfos[C].rowProperty.repeatAsTitleAtPageTop && (_ = !1);
11587
11511
  }
@@ -11981,12 +11905,12 @@ class DrawArea extends DrawRect {
11981
11905
  let y = null;
11982
11906
  const w = g.getHeadHeight();
11983
11907
  let v = g.getDrawTableByParentArea(this);
11984
- if (w + gDefaultRowHeight > f || !g.isFirstRowCanFit(f)) {
11908
+ if (w + g.getRowStartLineMaxHeight((v == null ? void 0 : v.startRow) || 0) > f || !g.isFirstRowCanFit(f)) {
11985
11909
  v && v.parent.removeChild(v);
11986
11910
  break;
11987
11911
  }
11988
11912
  if (u === n && r && (y = g.getDrawTableByParentArea(r), y && (y.isEndRowFinished() ? y.endRow + 1 : y.endRow)), !v && g.drawPageTables.length > 0 && !y && (v = g.drawPageTables[0], g.needUpdate = !0), v)
11989
- g.needUpdate || v.dHeight - f > gDefaultRowHeight || g.drawPageTables.indexOf(v) < g.drawPageTables.length - 1 && l > v.dHeight + d.defaultLineHeight ? s = g.drawUpdate(this, y, s, f) : s = s + v.dHeight, this._lastDrawLine = v;
11913
+ g.needUpdate || v.dHeight - f > g.getRowStartLineMaxHeight((v == null ? void 0 : v.startRow) || 0) || g.drawPageTables.indexOf(v) < g.drawPageTables.length - 1 && l > v.dHeight + d.defaultLineHeight ? s = g.drawUpdate(this, y, s, f) : s = s + v.dHeight, this._lastDrawLine = v;
11990
11914
  else {
11991
11915
  let C = null, _ = 0;
11992
11916
  if (u === n && r && (C = g.getDrawTableByParentArea(r), C)) {
@@ -12502,17 +12426,7 @@ b(Wt, "_dashLine", new createjs$1.Shape());
12502
12426
  let ResizeDrawTableObj = Wt;
12503
12427
  class DrawPageCell extends DrawArea {
12504
12428
  constructor(r, o, n, s, l, c, d, u, f, p, m) {
12505
- super(
12506
- r,
12507
- n.rootPath,
12508
- u,
12509
- s,
12510
- l,
12511
- c,
12512
- d,
12513
- c,
12514
- d
12515
- );
12429
+ super(r, n.rootPath, u, s, l, c, d, c, d);
12516
12430
  b(this, "_backImg");
12517
12431
  b(this, "_touchArea");
12518
12432
  // private _crossShape: createjs.Shape | null;
@@ -12778,20 +12692,10 @@ class DrawPageCell extends DrawArea {
12778
12692
  var M;
12779
12693
  if (p === "row") {
12780
12694
  const k = d.table.rowInfos[u].rowHeight, L = k + C;
12781
- o.undoService.begin(), o.undoService.add(
12782
- new TableResizeRowUndoUnit(
12783
- o.hoEditorFactoryId,
12784
- d.table,
12785
- u,
12786
- k,
12787
- L
12788
- )
12789
- ), o.undoService.commit();
12695
+ o.undoService.begin(), o.undoService.add(new TableResizeRowUndoUnit(o.hoEditorFactoryId, d.table, u, k, L)), o.undoService.commit();
12790
12696
  } else {
12791
12697
  const L = d.table.colInfos[f].colWidth + v;
12792
- o.undoService.begin(), o.undoService.add(
12793
- new TableResizeColUndoUnit(o.hoEditorFactoryId, d.table, f, L)
12794
- ), o.undoService.commit();
12698
+ o.undoService.begin(), o.undoService.add(new TableResizeColUndoUnit(o.hoEditorFactoryId, d.table, f, L)), o.undoService.commit();
12795
12699
  }
12796
12700
  (M = this._anchorLine) == null || M.remove(), document.removeEventListener("mousemove", E), setTimeout(() => {
12797
12701
  var L, H;
@@ -12918,10 +12822,10 @@ class DrawPageCell extends DrawArea {
12918
12822
  for (let l = this.startDline; l < this._endDline; l++) {
12919
12823
  const c = r[l];
12920
12824
  let d = 1;
12921
- c instanceof DrawLine && (c.dHeight > o && (d = Math.ceil(c.dHeight / o)), s += d * o, this.dHeight - s > n && this._backImg.graphics.beginStroke("#000").setStrokeStyle(1).moveTo(0, Math.ceil(s) - 0.5).lineTo(this._dWidth, Math.ceil(s) - 0.5));
12825
+ c instanceof DrawLine && (c.dHeight > o && (d = Math.ceil(c.dHeight / o)), s += d * o, this.dHeight - s > n && (this._backImg.graphics.beginStroke("#000"), this._cell.cellProperty.gridLinesStyle != GridLinesStyle.solid ? this._backImg.graphics.setStrokeDash([2, 2]) : this.setStrokeStyle2(this._backImg.graphics, 1), this._backImg.graphics.moveTo(0, Math.ceil(s) - 0.5).lineTo(this._dWidth, Math.ceil(s) - 0.5)));
12922
12826
  }
12923
12827
  for (; s < this.dHeight + o; )
12924
- s += o, this.dHeight - s > n && this._backImg.graphics.beginStroke("#000").setStrokeStyle(1).moveTo(0, Math.ceil(s) - 0.5).lineTo(this._dWidth, Math.ceil(s) - 0.5);
12828
+ s += o, this.dHeight - s > n && (this._backImg.graphics.beginStroke("#000"), this._cell.cellProperty.gridLinesStyle != GridLinesStyle.solid ? this._backImg.graphics.setStrokeDash([2, 2]) : this.setStrokeStyle2(this._backImg.graphics, 1), this._backImg.graphics.moveTo(0, Math.ceil(s) - 0.5).lineTo(this._dWidth, Math.ceil(s) - 0.5));
12925
12829
  }
12926
12830
  paintCellAdress(r) {
12927
12831
  if (r) {
@@ -12963,12 +12867,7 @@ class DrawPageCell extends DrawArea {
12963
12867
  if (!r)
12964
12868
  throw new Error("表格绘制还未准备好");
12965
12869
  const o = this._cell.childNodes[0].combineParagraph, n = o.leftMarginPixes, s = o.topMarginPixes;
12966
- return new PagePaintPosition(
12967
- this._hoEditorFactoryID,
12968
- r.pageIndex,
12969
- n,
12970
- s
12971
- );
12870
+ return new PagePaintPosition(this._hoEditorFactoryID, r.pageIndex, n, s);
12972
12871
  }
12973
12872
  calcValignTop(r) {
12974
12873
  const o = this.cell.drawCell.drawPageCells.indexOf(this), n = this._cell.drawCell;
@@ -12995,13 +12894,7 @@ class DrawPageCell extends DrawArea {
12995
12894
  update(r, o, n, s, l) {
12996
12895
  let c = s;
12997
12896
  this._cell.cellProperty.align == VAlign.vabottom && (c = this.calcValignTop(l)[0], this._valignTop = c), this._startDline = n < -1 ? 0 : n;
12998
- const d = super.update(
12999
- r,
13000
- o,
13001
- this._startDline,
13002
- c,
13003
- l
13004
- );
12897
+ const d = super.update(r, o, this._startDline, c, l);
13005
12898
  return this.docHeight = Math.max(0, this.docHeight - c), this.updateDHeight(), d;
13006
12899
  }
13007
12900
  /**
@@ -15301,7 +15194,7 @@ class DrawSignNode extends DrawCombineNode {
15301
15194
  }
15302
15195
  }
15303
15196
  }
15304
- const version = "3.3.3-beta.15";
15197
+ const version = "3.3.3-beta.17";
15305
15198
  var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
15306
15199
  class SignNode extends BaseNode {
15307
15200
  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, isTemp, innerIdentifier) {
@@ -21267,7 +21160,7 @@ class DrawMedicalExpression extends DrawCombineNode {
21267
21160
  drawPermanentTeeth() {
21268
21161
  let r = this._arrValues[0].split(",").join(""), o = this._arrValues[1].split(",").join(""), n = this._arrValues[2].split(",").join(""), s = this._arrValues[3].split(",").join(""), l = this._textStyle.color, c = this._textStyle.color, d = this._textStyle.color, u = this._textStyle.color;
21269
21162
  const f = this.node.remark;
21270
- f == "teeth" && (r == "" && (r = "右上牙位", l = "#9B9E9E"), o == "" && (o = "左上牙位", c = "#9B9E9E"), n == "" && (n = "右下牙位", d = "#9B9E9E"), s == "" && (s = "左下牙位", u = "#9B9E9E"));
21163
+ f == "teeth" && (r == "" && (l = "#9B9E9E"), o == "" && (c = "#9B9E9E"), n == "" && (d = "#9B9E9E"), s == "" && (u = "#9B9E9E"));
21271
21164
  const p = new createjs$1.Text(r, this._textStyle.getStyleKey(), l), m = new createjs$1.Text(o, this._textStyle.getStyleKey(), c), g = new createjs$1.Text(n, this._textStyle.getStyleKey(), d), y = new createjs$1.Text(s, this._textStyle.getStyleKey(), u), w = new createjs$1.Shape(), v = new createjs$1.Shape(), C = Math.max(p.getMeasuredWidth(), m.getMeasuredWidth()) + Math.max(g.getMeasuredWidth(), y.getMeasuredWidth()) + 15, _ = Math.max(p.getMeasuredWidth() + m.getMeasuredWidth(), g.getMeasuredWidth() + y.getMeasuredWidth()) + 15, D = Math.max(C, _), E = Math.max(p.getMeasuredHeight(), g.getMeasuredHeight()) + Math.max(m.getMeasuredHeight(), y.getMeasuredHeight()) + 15, T = Math.max(p.getMeasuredWidth(), g.getMeasuredWidth());
21272
21165
  this.dWidth = D, this.dHeight < E && (this.dHeight = E);
21273
21166
  const I = T + 6 - 0.5;
@@ -27658,17 +27551,25 @@ class Print {
27658
27551
  }
27659
27552
  }
27660
27553
  static async printPage(t) {
27661
- const r = (window.top || window).document.createElement("iframe"), o = new Promise((n, s) => {
27554
+ var s;
27555
+ let r = null, o = !0;
27556
+ try {
27557
+ r = (window.top || window).document.createElement("iframe");
27558
+ } catch {
27559
+ o = !1, r = window.document.createElement("iframe");
27560
+ }
27561
+ if (!r) return;
27562
+ const n = new Promise((l, c) => {
27662
27563
  r.onload = function() {
27663
- var l, c;
27564
+ var d, u;
27664
27565
  try {
27665
- (l = r == null ? void 0 : r.contentWindow) == null || l.focus(), (c = r == null ? void 0 : r.contentWindow) == null || c.print(), n("print");
27666
- } catch (d) {
27667
- s(d);
27566
+ (d = r == null ? void 0 : r.contentWindow) == null || d.focus(), (u = r == null ? void 0 : r.contentWindow) == null || u.print(), l("print");
27567
+ } catch (f) {
27568
+ c(f);
27668
27569
  }
27669
27570
  };
27670
27571
  });
27671
- r.id = "Ho_Editor_Print_Iframe", r.style.position = "fixed", r.style.right = "0", r.style.bottom = "0", r.style.width = "0", r.style.height = "0", r.style.border = "0", r.src = t.output("bloburl"), (window.top || window).document.body.appendChild(r), await o;
27572
+ r.id = "Ho_Editor_Print_Iframe", r.style.position = "fixed", r.style.right = "0", r.style.bottom = "0", r.style.width = "0", r.style.height = "0", r.style.border = "0", r.src = t.output("bloburl"), o ? (s = window.top) == null || s.document.body.appendChild(r) : window.document.body.appendChild(r), await n;
27672
27573
  }
27673
27574
  static async printPageV2(t) {
27674
27575
  var n;
@@ -40252,9 +40153,7 @@ class HTMLconverter2 {
40252
40153
  }
40253
40154
  if (p)
40254
40155
  for (let g = 0; g < c.length; g++) {
40255
- const y = o.getParentWidth(), w = Math.floor(
40256
- (y - o.borderWidth * 2) / c.length
40257
- );
40156
+ const y = o.getParentWidth(), w = Math.floor((y - o.borderWidth * 2) / c.length);
40258
40157
  c[g].colWidth = w;
40259
40158
  }
40260
40159
  o.rowInfos = l, o.colInfos = c;
@@ -40312,14 +40211,7 @@ class HTMLconverter2 {
40312
40211
  w.push(...v), l.push(w);
40313
40212
  }
40314
40213
  }
40315
- const p = new TableNode(
40316
- this._hoEditorFactoryID,
40317
- o.docTree.activeNodes,
40318
- n,
40319
- c,
40320
- d,
40321
- this.generateTableProperty(t)
40322
- );
40214
+ const p = new TableNode(this._hoEditorFactoryID, o.docTree.activeNodes, n, c, d, this.generateTableProperty(t));
40323
40215
  if (l.length == 0)
40324
40216
  return [];
40325
40217
  {
@@ -40511,7 +40403,7 @@ class HTMLconverter2 {
40511
40403
  if (s) {
40512
40404
  s.rowSpan = parseInt(t.getAttribute("rowspan") || "1") || 1, s.colSpan = parseInt(t.getAttribute("colspan") || "1") || 1;
40513
40405
  const l = this.mergestyle(t.getAttribute("style") || "", "");
40514
- l.mso_diagonal_down && l.mso_diagonal_down != "none" && (s.crossLineType = CrossLineType.ct02), l.mso_diagonal_up && l.mso_diagonal_up != "none" && (s.crossLineType = CrossLineType.ct13), t.getAttribute("valign") == "top" ? s.cellProperty.align = VAlign.vatop : t.getAttribute("valign") == "bottom" ? s.cellProperty.align = VAlign.vabottom : s.cellProperty.align = VAlign.vacenter;
40406
+ l.mso_diagonal_down && l.mso_diagonal_down != "none" && (s.crossLineType = CrossLineType.ct02), l.mso_diagonal_up && l.mso_diagonal_up != "none" && (s.crossLineType = CrossLineType.ct13), (l.width === "0px" || l.width === "0pt") && (s.cellProperty.gridLineDisplay = [!1, !1, !1, !1]), t.getAttribute("valign") == "top" ? s.cellProperty.align = VAlign.vatop : t.getAttribute("valign") == "bottom" ? s.cellProperty.align = VAlign.vabottom : s.cellProperty.align = VAlign.vacenter;
40515
40407
  const c = Array();
40516
40408
  for (let d = 0; d < t.childNodes.length; d++) {
40517
40409
  const u = this.convert.get(t.childNodes[d].nodeName.toLowerCase());
@@ -65266,7 +65158,7 @@ WebPDecoder.prototype.getData = function() {
65266
65158
  (function(a) {
65267
65159
  function t() {
65268
65160
  return function() {
65269
- return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-DMa-GsZM.mjs");
65161
+ return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-CerdVBMW.mjs");
65270
65162
  }().catch(function(r) {
65271
65163
  return Promise.reject(new Error("Could not load canvg: " + r));
65272
65164
  }).then(function(r) {
@@ -1,4 +1,4 @@
1
- import { c as Da, _ as Va, g as il } from "./index-FRvtZM9_.mjs";
1
+ import { c as Da, _ as Va, g as il } from "./index-BY_nkxbf.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.3-beta.15",
3
+ "version": "3.3.3-beta.17",
4
4
  "private": false,
5
5
  "main": "lib/hoeditor.mjs",
6
6
  "typings": "types/index.d.ts",