hoeditor-web 3.3.5-beta.0 → 3.3.5-beta.1

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-BFSa6MR8.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-fr6aXdHM.mjs";
3
3
  export {
4
4
  i as HoDocs,
5
5
  r as HoEditorProvide,
@@ -12647,21 +12647,22 @@ class DrawPageCell extends DrawArea {
12647
12647
  }
12648
12648
  // 绘制html触碰区
12649
12649
  updateHtmlTouchArea(r) {
12650
- var c, d, u, f;
12651
- const n = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).pageProperty.heightPixes, s = this.localToGlobal(0, 0), l = document.querySelector(".x-editor-table-table-tool__border");
12652
- if (l) {
12653
- const p = r.table.rows.indexOf(r.row) <= 0 ? 0 : r.table.rows.indexOf(r.row) - 1, m = r.row.indexOf(r) <= 0 ? 0 : r.row.indexOf(r) - 1, y = (((d = (c = this.parent) == null ? void 0 : c.parent) == null ? void 0 : d.pageIndex) || ((f = (u = this.parent) == null ? void 0 : u.parent) == null ? void 0 : f.index) || 0) * (n + 20) + s.y, w = (_, D = !1) => {
12654
- const E = D ? p + 1 : p, T = D ? m + 1 : m, I = document.createElement("div");
12650
+ var d, u, f, p;
12651
+ HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).pageProperty.heightPixes;
12652
+ const n = this.localToGlobal(0, 0), s = ((u = (d = this.parent) == null ? void 0 : d.parent) == null ? void 0 : u.pageIndex) || ((p = (f = this.parent) == null ? void 0 : f.parent) == null ? void 0 : p.index) || 0, c = document.querySelectorAll(".x-editor-table-table-tool__border")[s];
12653
+ if (c) {
12654
+ const m = r.table.rows.indexOf(r.row) <= 0 ? 0 : r.table.rows.indexOf(r.row) - 1, g = r.row.indexOf(r) <= 0 ? 0 : r.row.indexOf(r) - 1, y = n.y, w = (_, D = !1) => {
12655
+ const E = D ? m + 1 : m, T = D ? g + 1 : g, I = document.createElement("div");
12655
12656
  I.classList.add(`x-editor-table-table-tool__border__${_ === "row" ? "row" : "col"}`);
12656
12657
  const M = {
12657
12658
  width: this._dWidth,
12658
12659
  height: 4,
12659
12660
  top: y - 2,
12660
- left: s.x
12661
+ left: n.x
12661
12662
  };
12662
- _ === "col" && (M.width = 4, M.height = this._dHeight, M.top = y, M.left = s.x - 2), D && _ === "row" && (M.top += this._dHeight), D && _ === "col" && (M.left += this._dWidth), I.style.width = `${M.width}px`, I.style.height = `${M.height}px`, I.style.top = `${M.top}px`, I.style.left = `${M.left}px`, I.onmousedown = (k) => {
12663
+ _ === "col" && (M.width = 4, M.height = this._dHeight, M.top = y, M.left = n.x - 2), D && _ === "row" && (M.top += this._dHeight), D && _ === "col" && (M.left += this._dWidth), I.style.width = `${M.width}px`, I.style.height = `${M.height}px`, I.style.top = `${M.top}px`, I.style.left = `${M.left}px`, I.onmousedown = (k) => {
12663
12664
  this._mousedown({
12664
- borderTableContainer: l,
12665
+ borderTableContainer: c,
12665
12666
  left: M.left,
12666
12667
  top: M.top,
12667
12668
  evt: k,
@@ -12671,7 +12672,7 @@ class DrawPageCell extends DrawArea {
12671
12672
  order: _,
12672
12673
  end: D
12673
12674
  });
12674
- }, l == null || l.appendChild(I);
12675
+ }, c == null || c.appendChild(I);
12675
12676
  };
12676
12677
  w(
12677
12678
  "row"
@@ -12710,10 +12711,15 @@ class DrawPageCell extends DrawArea {
12710
12711
  }
12711
12712
  (M = this._anchorLine) == null || M.remove(), document.removeEventListener("mousemove", E), setTimeout(() => {
12712
12713
  var L, H;
12713
- const k = document.querySelector(".x-editor-table-table-tool__border");
12714
- k && (k.innerHTML = ""), (H = (L = d.table) == null ? void 0 : L.childNodes) == null || H.forEach((z) => {
12715
- var Z, j;
12716
- (j = (Z = z == null ? void 0 : z.drawCell) == null ? void 0 : Z.drawPageCells[0]) == null || j.updateHtmlTouchArea(z);
12714
+ document.querySelectorAll(".x-editor-table-table-tool__border").forEach((z) => {
12715
+ z.innerHTML = "";
12716
+ });
12717
+ const k = (H = (L = d.table) == null ? void 0 : L.drawTable) == null ? void 0 : H.drawPageTables;
12718
+ k && k.forEach((z) => {
12719
+ for (let Z = 0; Z < z.getNumChildren(); Z++) {
12720
+ const j = z.getChildAt(Z);
12721
+ j instanceof DrawPageCell && j.updateHtmlTouchArea(j.cell);
12722
+ }
12717
12723
  });
12718
12724
  }, 10);
12719
12725
  };
@@ -15210,7 +15216,7 @@ class DrawSignNode extends DrawCombineNode {
15210
15216
  }
15211
15217
  }
15212
15218
  }
15213
- const version = "3.3.5-beta.0";
15219
+ const version = "3.3.5-beta.1";
15214
15220
  var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
15215
15221
  class SignNode extends BaseNode {
15216
15222
  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) {
@@ -32584,7 +32590,7 @@ const AiModels = __component__$1j.exports, _sfc_main$1i = defineComponent({
32584
32590
  });
32585
32591
  var _sfc_render$1i = function a() {
32586
32592
  var t = this, r = t._self._c;
32587
- return t._self._setupProxy, r("div", { ref: "hoPage", class: t.pageClassNames, style: { height: t.normalHeight + "px", width: t.normalWidth + t.commentWidth + "px" } }, [r("div", { staticClass: "x-editor-table-table-tool__border" }), t.historyPosition == 0 ? r("div", { class: t.commentCanvasName, style: { height: t.normalHeight + "px", width: t.commentWidth + "px" }, attrs: { id: "ho-comment-box-" + t.index } }) : t._e(), r("canvas", { ref: "domcanvas", class: t.domCanvasName, style: { height: t.normalHeight + "px", width: t.normalWidth + "px" }, attrs: { width: t.scaleWidth, height: t.scaleHeight } }), r("canvas", { ref: "selectcanvas", staticClass: "selectcanvas", style: { height: t.normalHeight + "px", width: t.normalWidth + "px", left: t.historyPosition == 0 ? t.commentWidth + "px" : "0px" }, attrs: { width: t.scaleWidth, height: t.scaleHeight }, on: { contextmenu: function(o) {
32593
+ return t._self._setupProxy, r("div", { ref: "hoPage", class: t.pageClassNames, style: { height: t.normalHeight + "px", width: t.normalWidth + t.commentWidth + "px" } }, [r("div", { staticClass: "x-editor-table-table-tool__border", staticStyle: { position: "relative" } }), t.historyPosition == 0 ? r("div", { class: t.commentCanvasName, style: { height: t.normalHeight + "px", width: t.commentWidth + "px" }, attrs: { id: "ho-comment-box-" + t.index } }) : t._e(), r("canvas", { ref: "domcanvas", class: t.domCanvasName, style: { height: t.normalHeight + "px", width: t.normalWidth + "px" }, attrs: { width: t.scaleWidth, height: t.scaleHeight } }), r("canvas", { ref: "selectcanvas", staticClass: "selectcanvas", style: { height: t.normalHeight + "px", width: t.normalWidth + "px", left: t.historyPosition == 0 ? t.commentWidth + "px" : "0px" }, attrs: { width: t.scaleWidth, height: t.scaleHeight }, on: { contextmenu: function(o) {
32588
32594
  return t.canvasRightClick.apply(null, arguments);
32589
32595
  } } }), t.historyPosition == 1 ? r("div", { class: t.commentCanvasName, style: { height: t.normalHeight + "px", width: t.commentWidth + "px" }, attrs: { id: "ho-comment-box-" + t.index } }) : t._e(), [t._t("hoAddCellButton")], [t._t("hoAddSelectMark")], [t._t("hoAddNextCellButton")], t.index === t.aiInfo.pageIndex && t.aiInfo.aiText ? r("AiModel", { attrs: { textStyles: t.textStyles, scaleWidth: t.canvasWidth, hoEditorFactoryId: t.hoEditorId, aiInfo: t.aiInfo } }) : t._e(), t.isHeadFoot === "header" || t.isHeadFoot === "footer" ? r("ho-head-foot", { attrs: { headerFooterPosition: t.canvasHeadFootPos, isHeadFoot: t.isHeadFoot }, scopedSlots: t._u([{ key: "head", fn: function() {
32590
32596
  return [t._t("hoPageHead")];
@@ -39447,39 +39453,39 @@ class DrawPageTree {
39447
39453
  this._oldPageCount === 0 && (this._oldPageCount = c.drawTree.drawPages.length);
39448
39454
  let d = n, u = !1, f = 0;
39449
39455
  if (d === s && r[d] instanceof DrawTable && (u = !0, d < r.length - 1)) {
39450
- const w = r[d + 1];
39451
- let v;
39452
- w instanceof DrawTable ? v = w.drawPageTables[0] : v = w, f = v.y;
39456
+ const y = r[d + 1];
39457
+ let w;
39458
+ y instanceof DrawTable ? w = y.drawPageTables[0] : w = y, f = w.y;
39453
39459
  }
39454
39460
  const p = r.length - 1;
39455
39461
  let m = 1 / 0;
39456
39462
  t.allowAcrossPage && (m = t.maxHeight - o);
39457
39463
  let g = null;
39458
39464
  if (t instanceof DrawPageMainDoc) {
39459
- const w = this._drawMainDocs.indexOf(t);
39460
- w > 0 && (g = this._drawMainDocs[w - 1]);
39465
+ const y = this._drawMainDocs.indexOf(t);
39466
+ y > 0 && (g = this._drawMainDocs[y - 1]);
39461
39467
  }
39462
39468
  do {
39463
39469
  if (!t)
39464
39470
  return;
39465
39471
  if (t.update(g, r, d, o, m), this.afterAreaFinishPaint(t), this._startNeedUpdatePage = Math.min(t.index, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage), this._endNeedUpdatePage = Math.max(t.index, this._endNeedUpdatePage), d = t.endDline, u && d > s + 1) {
39466
- const w = r[s + 1];
39467
- let v;
39468
- if (w instanceof DrawTable ? v = w.drawPageTables[0] : v = w, v.y === f)
39472
+ const y = r[s + 1];
39473
+ let w;
39474
+ if (y instanceof DrawTable ? w = y.drawPageTables[0] : w = y, w.y === f)
39469
39475
  return;
39470
39476
  }
39471
39477
  if (t.isEndLineFinished() && (d += 1), t instanceof DrawPageMainDoc && (d <= p && (g = t, t = this.getNextDrawArea(t)[0], o = 0, t.allowAcrossPage && (m = t.maxHeight)), d === r.length - 1)) {
39472
- const w = this._drawMainDocs.indexOf(t);
39473
- c.drawTree.drawPages.splice(w + 1, this._drawMainDocs.length), this._drawMainDocs.splice(w + 1, this._drawMainDocs.length), c.drawTree.drawPageCount.count = c.drawTree.drawPages.length;
39478
+ const y = this._drawMainDocs.indexOf(t);
39479
+ c.drawTree.drawPages.splice(y + 1, this._drawMainDocs.length), this._drawMainDocs.splice(y + 1, this._drawMainDocs.length), c.drawTree.drawPageCount.count = c.drawTree.drawPages.length;
39474
39480
  }
39475
39481
  } while (d <= p);
39476
39482
  if (t instanceof DrawPageMainDoc && p === r.length - 1) {
39477
- const w = this._drawMainDocs.indexOf(t);
39478
- c.drawTree.drawPages.splice(w + 1, this._drawMainDocs.length), this._drawMainDocs.splice(w + 1, this._drawMainDocs.length);
39483
+ const y = this._drawMainDocs.indexOf(t);
39484
+ c.drawTree.drawPages.splice(y + 1, this._drawMainDocs.length), this._drawMainDocs.splice(y + 1, this._drawMainDocs.length);
39479
39485
  }
39480
- c.drawTree.drawPageCount.count = c.drawTree.drawPages.length, this.afterAreaFinishPaint(t), this._startNeedUpdatePage = Math.min(t.index, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage), this._endNeedUpdatePage = Math.max(t.index, this._endNeedUpdatePage);
39481
- const y = document.querySelector(".x-editor-table-table-tool__border");
39482
- y && (y.innerHTML = "");
39486
+ c.drawTree.drawPageCount.count = c.drawTree.drawPages.length, this.afterAreaFinishPaint(t), this._startNeedUpdatePage = Math.min(t.index, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage), this._endNeedUpdatePage = Math.max(t.index, this._endNeedUpdatePage), document.querySelectorAll(".x-editor-table-table-tool__border").forEach((y) => {
39487
+ y.innerHTML = "";
39488
+ });
39483
39489
  } finally {
39484
39490
  this._oldPageCount !== c.drawTree.drawPages.length && c.drawTree.updatePageCountNodes(), l || c.drawTree.inViewPages.forEach((d) => {
39485
39491
  this.updateDrawPage(d);
@@ -51273,7 +51279,7 @@ class VueController {
51273
51279
  const s = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
51274
51280
  t.length == 1 && o && (o = !0);
51275
51281
  let l = [], c = [];
51276
- t.map((g) => (g.name = g.name || "", g.id = g.id || "", g.dataId = g.dataId || "", g.innerIdentifier = g.innerIdentifier || "", g.text ? c.push(g.text) : l.push(g), g));
51282
+ t.map((g) => (g.name = g.name || "", g.id = g.id || "", g.dataId = g.dataId || "", g.innerIdentifier = g.innerIdentifier || "", g.priorityText || g.text ? c.push(g) : l.push(g), g));
51277
51283
  let d = null;
51278
51284
  const u = (g) => {
51279
51285
  for (let y = 0; y < g.length; y++) {
@@ -51296,9 +51302,18 @@ class VueController {
51296
51302
  const m = s.subDocManger.footerDocTree;
51297
51303
  for (let g = 0; g < m.length; g++)
51298
51304
  u(m[g].subDocNodes);
51299
- if (c.length && c.forEach((g) => {
51300
- const y = this.searchText(g);
51301
- y.length > 0 && (n = n.concat(y));
51305
+ if (c.forEach((g) => {
51306
+ if (g.priorityText) {
51307
+ const y = this.searchText(g.priorityText);
51308
+ if (y.length > 0) {
51309
+ n = n.concat(y);
51310
+ return;
51311
+ }
51312
+ }
51313
+ if (g.text) {
51314
+ const y = this.searchText(g.text);
51315
+ y.length > 0 && (n = n.concat(y));
51316
+ }
51302
51317
  }), n.length > 0 && (s.drawTree.drawMultiCustomRange(n, r, !0), o)) {
51303
51318
  let g = n[n.length - 1].spEnd.path;
51304
51319
  d && (g = s.docTree.getNodeFirstPath(d)), this.moveCaret(g);
@@ -53147,22 +53162,30 @@ class VueController {
53147
53162
  }
53148
53163
  // 绑定表格拖拽辅助线
53149
53164
  bindTableLineDrag(t) {
53150
- var u, f, p, m;
53165
+ var d, u, f, p;
53151
53166
  if (!t) return;
53152
- const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), o = (u = r.vueController.findNodebyPath(t)) == null ? void 0 : u.node, n = (g) => {
53153
- if (!g) return { isTable: !1, tableNode: null };
53154
- let y = g;
53155
- for (; y; ) {
53156
- if (y instanceof TableNode)
53157
- return { isTable: !0, tableNode: y };
53158
- y = y.parentNode;
53167
+ const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), o = (d = r.vueController.findNodebyPath(t)) == null ? void 0 : d.node, n = (m) => {
53168
+ if (!m) return { isTable: !1, tableNode: null };
53169
+ let g = m;
53170
+ for (; g; ) {
53171
+ if (g instanceof TableNode)
53172
+ return { isTable: !0, tableNode: g };
53173
+ g = g.parentNode;
53159
53174
  }
53160
53175
  return { isTable: !1, tableNode: null };
53161
- }, { isTable: s, tableNode: l } = n(o), c = r.drawTree.paintStatus === PaintState.psEdit && ((f = l == null ? void 0 : l.tableProperty) == null ? void 0 : f.canAdjustRowHeight) || ((p = l == null ? void 0 : l.tableProperty) == null ? void 0 : p.canAdjustRowWidth) || r.drawTree.paintStatus === PaintState.psDesign, d = document.querySelector(".x-editor-table-table-tool__border");
53162
- d && (d.innerHTML = ""), s && c && ((m = l == null ? void 0 : l.childNodes) == null || m.forEach((g, y) => {
53163
- var w, v;
53164
- (v = (w = g == null ? void 0 : g.drawCell) == null ? void 0 : w.drawPageCells[0]) == null || v.updateHtmlTouchArea(g);
53165
- }));
53176
+ }, { isTable: s, tableNode: l } = n(o), c = r.drawTree.paintStatus === PaintState.psEdit && ((u = l == null ? void 0 : l.tableProperty) == null ? void 0 : u.canAdjustRowHeight) || ((f = l == null ? void 0 : l.tableProperty) == null ? void 0 : f.canAdjustRowWidth) || r.drawTree.paintStatus === PaintState.psDesign;
53177
+ if (document.querySelectorAll(".x-editor-table-table-tool__border").forEach((m) => {
53178
+ m.innerHTML = "";
53179
+ }), s && c) {
53180
+ const m = (p = l == null ? void 0 : l.drawTable) == null ? void 0 : p.drawPageTables;
53181
+ m && m.forEach((g) => {
53182
+ const y = g.getNumChildren();
53183
+ for (let w = 0; w < y; w++) {
53184
+ const v = g.getChildAt(w);
53185
+ v instanceof DrawPageCell && v.updateHtmlTouchArea(v.cell);
53186
+ }
53187
+ });
53188
+ }
53166
53189
  }
53167
53190
  getCurrentDocId(t) {
53168
53191
  const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
@@ -65135,7 +65158,7 @@ WebPDecoder.prototype.getData = function() {
65135
65158
  (function(a) {
65136
65159
  function t() {
65137
65160
  return function() {
65138
- return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-DNV87B__.mjs");
65161
+ return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-DtWmFjfn.mjs");
65139
65162
  }().catch(function(r) {
65140
65163
  return Promise.reject(new Error("Could not load canvg: " + r));
65141
65164
  }).then(function(r) {
@@ -1,4 +1,4 @@
1
- import { c as Da, _ as Va, g as il } from "./index-BFSa6MR8.mjs";
1
+ import { c as Da, _ as Va, g as il } from "./index-fr6aXdHM.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.5-beta.0",
3
+ "version": "3.3.5-beta.1",
4
4
  "private": false,
5
5
  "main": "lib/hoeditor.mjs",
6
6
  "typings": "types/index.d.ts",