hoeditor-web 3.2.66 → 3.2.68

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-D8hAgq0S.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-DT_0SJmM.mjs";
3
3
  export {
4
4
  i as HoDocs,
5
5
  r as HoEditorProvide,
@@ -14966,7 +14966,7 @@ class DrawSignNode extends DrawCombineNode {
14966
14966
  }
14967
14967
  }
14968
14968
  }
14969
- const version = "3.2.66";
14969
+ const version = "3.2.68";
14970
14970
  var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
14971
14971
  class SignNode extends BaseNode {
14972
14972
  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) {
@@ -31429,7 +31429,7 @@ class DocTree {
31429
31429
  for (let I = 0; I < E; I++)
31430
31430
  p = p + u[I].dWidth;
31431
31431
  const T = _.charCount > 0 ? _.docWidth / _.charCount : 0;
31432
- p = p + (d - _.startIndex + 1) * T + (d - _.startIndex) * D.letterSpacing;
31432
+ p = p + (d - _.startIndex + 1) * T + (d - _.startIndex) * ((D == null ? void 0 : D.letterSpacing) || 0);
31433
31433
  }
31434
31434
  const m = (_) => {
31435
31435
  if (_ instanceof DrawLine)
@@ -32280,7 +32280,7 @@ var _sfc_render$1i = function a() {
32280
32280
  return [t._t("hoPageHead")];
32281
32281
  }, proxy: !0 }, { key: "foot", fn: function() {
32282
32282
  return [t._t("hoPageFoot")];
32283
- }, proxy: !0 }], null, !0) }) : t._e()], 2);
32283
+ }, proxy: !0 }], null, !0) }) : t._e(), [t._t("hoPageExtra")]], 2);
32284
32284
  }, _sfc_staticRenderFns$1i = [], __component__$1i = /* @__PURE__ */ normalizeComponent$1(
32285
32285
  _sfc_main$1i,
32286
32286
  _sfc_render$1i,
@@ -38727,6 +38727,8 @@ var _sfc_render$1c = function a() {
38727
38727
  } } }, [t._v("新增一行")]) : t._e()];
38728
38728
  }, proxy: !0 }, { key: "hoAddSelectMark", fn: function() {
38729
38729
  return [t.selectMarkStyle.pageIndex == o - 1 ? r("svg", { staticClass: "ho-select-mark-icon", style: t.selectMarkStyle, attrs: { pgIndex: o, viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "16" }, on: { click: t.selectMarkClick } }, [r("path", { attrs: { d: "M896 0H128a128 128 0 0 0-128 128v768a128 128 0 0 0 128 128h768a128 128 0 0 0 128-128V128a128 128 0 0 0-128-128z m64 896a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V128a64 64 0 0 1 64-64h768a64 64 0 0 1 64 64z" } }), r("path", { attrs: { d: "M535.04 609.28a32.64 32.64 0 0 1-45.44 0l-256-256-45.44 45.44 256 256a95.36 95.36 0 0 0 135.68 0l256-256-44.8-44.8z" } })]) : t._e()];
38730
+ }, proxy: !0 }, { key: "hoPageExtra", fn: function() {
38731
+ return [t._t("hoDocExtra", null, { data: { pgIndex: o - 1 } })];
38730
38732
  }, proxy: !0 }], null, !0) })];
38731
38733
  })], 2) : t._e(), t.poperType === "datePoper" || t.poperType === "selectPoper" ? r("PoperSelectModal", { attrs: { poperType: t.poperType, poperSelectList: t.poperSelectList, poperPos: t.poperPos, hoEditorId: t.hoEditorId, selectMarkStyle: t.selectMarkStyle }, on: { poperClose: t.poperClose } }) : t._e(), r("PoperMark", { directives: [{ name: "show", rawName: "v-show", value: t.poperType === "datePoper" || t.poperType === "selectPoper" || t.poperType === "table-cell-poper", expression: "poperType === 'datePoper' || poperType === 'selectPoper' || poperType === 'table-cell-poper'" }] }), t.poperType === "table-cell-poper" ? r("TableCellPoper", { attrs: { poperNode: t.nodeValue, poperPos: t.poperPos }, on: { poperClose: t.poperClose } }) : t._e(), r("HoToPage", { attrs: { hoEditorId: t.hoEditorId, inViewPages: t.inViewPages } }), r("PoperTipText", { attrs: { isPoperText: t.isPoperText, poperText: t.poperText, poperPos: t.poperTextPos }, on: { poperTextClose: t.poperTextClose } }), r("ul", { directives: [{ name: "click-outside", rawName: "v-click-outside", value: () => t.isCreateRightMenuModal = !1, expression: "() => (isCreateRightMenuModal = false)" }, { name: "show", rawName: "v-show", value: t.isCreateRightMenuModal, expression: "isCreateRightMenuModal" }], ref: "rightMenuModal", staticClass: "create-right-menu" }, [r("li", { staticClass: "mouse-menu-item", staticStyle: { "justify-content": "space-between" }, on: { click: t.hoCopy } }, [r("span", [t._v(i18nHelper("04-001-009-EMR.3.3.29", null, "复制"))]), r("span", [t._v("Ctrl + C")])]), t.showCommentsBtn ? r("li", { staticClass: "mouse-menu-item", on: { click: t.hideComments } }, [t._v(t._s(t.isHideComments ? i18nHelper("04-001-009-EMR.3.3.8", null, "显示批注") : i18nHelper("04-001-009-EMR.3.3.7", null, "隐藏批注")))]) : t._e(), t._t("hoBrowseRightMenu"), t.showDeleteSignMenu ? r("li", { staticClass: "mouse-menu-item", on: { click: t.deleteSignNode } }, [t._v("删除签名")]) : t._e(), r("li", { staticClass: "mouse-menu-item" }, [r("span", [t._v(i18nHelper("04-001-009-EMR.3.3.6", null, "编辑器版本:"))]), t._v("  "), r("span", { staticStyle: { "font-size": "14px", color: "#0a77e3" } }, [t._v("v " + t._s(t.version))])])], 2)], 1);
38732
38734
  }, _sfc_staticRenderFns$1c = [], __component__$1c = /* @__PURE__ */ normalizeComponent$1(
@@ -52595,6 +52597,10 @@ class VueController {
52595
52597
  }
52596
52598
  });
52597
52599
  }
52600
+ getPathByNode(t) {
52601
+ const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), o = r.docTree.getNodeFirstPath(t), n = r.docTree.getNodeLastPath(t);
52602
+ return { startPath: o, endPath: n };
52603
+ }
52598
52604
  changeIsModify(t = !1) {
52599
52605
  const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
52600
52606
  r.contentIsModify.isModify = t;
@@ -64540,7 +64546,7 @@ WebPDecoder.prototype.getData = function() {
64540
64546
  (function(a) {
64541
64547
  function t() {
64542
64548
  return function() {
64543
- return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-CyIXJ_Ob.mjs");
64549
+ return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-ChUsPvOa.mjs");
64544
64550
  }().catch(function(r) {
64545
64551
  return Promise.reject(new Error("Could not load canvg: " + r));
64546
64552
  }).then(function(r) {
@@ -69796,6 +69802,21 @@ class DocController {
69796
69802
  const l = t.docTree.getToPath(a, o);
69797
69803
  s = new DomRange(this._hoEditorFactoryID, l, l);
69798
69804
  }
69805
+ if (t.shiftKeyPress && t.drawTree.selectRange.spStart && ["down", "up"].includes(a)) {
69806
+ const l = setTimeout(() => {
69807
+ clearTimeout(l);
69808
+ const c = t.docTree.getToPath(a, n);
69809
+ if (!c) return;
69810
+ let d, u;
69811
+ if (a === "down")
69812
+ d = o, u = c;
69813
+ else {
69814
+ const f = NodePosition.treePathCompare(o, c);
69815
+ d = f >= 0 ? c : o, u = f >= 0 ? n : c;
69816
+ }
69817
+ t.vueController.setDomRange(d, u), t.drawTree.selectRange.spStart = StagePosition.getStagePosByPath(this._hoEditorFactoryID, d), t.drawTree.selectRange.spEnd = StagePosition.getStagePosByPath(this._hoEditorFactoryID, u);
69818
+ }, 0);
69819
+ }
69799
69820
  t.docTree.curDomRange = s, t.drawTree.moveCaretToPath(s.endPath);
69800
69821
  }
69801
69822
  /**
@@ -83714,7 +83735,9 @@ var _sfc_render$s = function a() {
83714
83735
  return [t._t("hoFoot")];
83715
83736
  }, proxy: !0 }, { key: "hoBrowseRightMenu", fn: function() {
83716
83737
  return [t._t("hoBrowseMenu")];
83717
- }, proxy: !0 }], null, !0) })];
83738
+ }, proxy: !0 }, { key: "hoDocExtra", fn: function(s) {
83739
+ return [t._t("hoExtra", null, { data: s })];
83740
+ } }], null, !0) })];
83718
83741
  })], 2), t.notUseModal ? r("ControlModal", { directives: [{ name: "show", rawName: "v-show", value: t.hoEditorProvider.controlType, expression: "hoEditorProvider.controlType" }], attrs: { hoEditorFactoryId: t.hoEditorProvider.activeDocId, uploadImageParams: t.uploadImageParams }, on: { insertComments: t.insertComments, updateCommentContent: t.updateCommentContent, closeControlmodal: t.closeControlModal }, scopedSlots: t._u([{ key: "hoTextModal", fn: function() {
83719
83742
  return [t._t("hoTextField")];
83720
83743
  }, proxy: !0 }, { key: "hoParagraphModal", fn: function() {
@@ -1,4 +1,4 @@
1
- import { c as Da, _ as Va, g as il } from "./index-D8hAgq0S.mjs";
1
+ import { c as Da, _ as Va, g as il } from "./index-DT_0SJmM.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.2.66",
3
+ "version": "3.2.68",
4
4
  "private": false,
5
5
  "main": "lib/hoeditor.mjs",
6
6
  "typings": "types/index.d.ts",