hoeditor-web 3.3.1-beta.3 → 3.3.1-beta.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/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-
|
|
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-f-jWLkj2.mjs";
|
|
3
3
|
export {
|
|
4
4
|
i as HoDocs,
|
|
5
5
|
r as HoEditorProvide,
|
|
@@ -15190,7 +15190,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
15190
15190
|
}
|
|
15191
15191
|
}
|
|
15192
15192
|
}
|
|
15193
|
-
const version = "3.3.1-beta.
|
|
15193
|
+
const version = "3.3.1-beta.4";
|
|
15194
15194
|
var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
|
|
15195
15195
|
class SignNode extends BaseNode {
|
|
15196
15196
|
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) {
|
|
@@ -36926,8 +36926,9 @@ const columns$1 = [
|
|
|
36926
36926
|
if (!this.isAllowMultiSelect)
|
|
36927
36927
|
this.poperSelectList.map((t, r) => (t.selected = a.id == t.id, t)), this.isSelected = !0, this.sureSelect(a.input);
|
|
36928
36928
|
else {
|
|
36929
|
-
|
|
36930
|
-
|
|
36929
|
+
const t = [];
|
|
36930
|
+
let r = [];
|
|
36931
|
+
this.currentList.map((o) => (a.id == o.id && (!this.mutexType || this.mutexType == o.type) && (o.selected = !o.selected), o.selected && (r.push(o.type), t.push(o)), o)), this.mutexType = r[0] ? r[0] : "", this.selectedList = [...t], this.$forceUpdate();
|
|
36931
36932
|
}
|
|
36932
36933
|
},
|
|
36933
36934
|
selectItems(a, t) {
|
|
@@ -36957,10 +36958,6 @@ const columns$1 = [
|
|
|
36957
36958
|
let t = "", r = "", o = "", n = [], s = "";
|
|
36958
36959
|
const l = this.getCurrentPoperNode();
|
|
36959
36960
|
let c = this.isAllowMultiSelect && this.isCanSearch ? this.selectedList : this.poperSelectList.filter((f) => f.selected);
|
|
36960
|
-
if (!c.length) {
|
|
36961
|
-
const f = this.poperSelectList.filter((p) => p.selected);
|
|
36962
|
-
f.length && (c = f);
|
|
36963
|
-
}
|
|
36964
36961
|
if (c.length === 0)
|
|
36965
36962
|
l instanceof DownListNode ? t = l.name ? l.name : " " : l instanceof TextInputFieldNode && (t = l.name ? l.name : " ", n.push(t));
|
|
36966
36963
|
else {
|
|
@@ -38517,6 +38514,7 @@ const scaleXY = DrawConfig.instance().scale, defaultWidth = Math.floor(793 * sca
|
|
|
38517
38514
|
version,
|
|
38518
38515
|
isHideComments: !1,
|
|
38519
38516
|
showCommentsBtn: !1,
|
|
38517
|
+
showEditBtn: !1,
|
|
38520
38518
|
domRange: {
|
|
38521
38519
|
startPath: "",
|
|
38522
38520
|
endPath: ""
|
|
@@ -39011,7 +39009,7 @@ const scaleXY = DrawConfig.instance().scale, defaultWidth = Math.floor(793 * sca
|
|
|
39011
39009
|
}
|
|
39012
39010
|
}
|
|
39013
39011
|
}
|
|
39014
|
-
if (t.drawTree.paintStatus !== PaintState.psDesign && t.drawTree.paintStatus !== PaintState.psEdit && t.drawTree.paintStatus !== PaintState.psTrace) {
|
|
39012
|
+
if (t.saveDocLog && t.drawTree.paintStatus === PaintState.psReadOnly && (this.showEditBtn = !0), t.drawTree.paintStatus !== PaintState.psDesign && t.drawTree.paintStatus !== PaintState.psEdit && t.drawTree.paintStatus !== PaintState.psTrace) {
|
|
39015
39013
|
if (this.isCreateRightMenuModal = !0, t.drawTree.paintStatus === PaintState.psReview && n instanceof SignNode) {
|
|
39016
39014
|
this.isCreateRightMenuModal = !1, this.hoEditorProvider.setRightClickNodeValue(n), t.drawTree.selectRange.beginRangeSelect = !1, this.$emit("rightClickEventIn", r);
|
|
39017
39015
|
return;
|
|
@@ -39029,6 +39027,14 @@ const scaleXY = DrawConfig.instance().scale, defaultWidth = Math.floor(793 * sca
|
|
|
39029
39027
|
t.drawTree.editor.input.blur();
|
|
39030
39028
|
}, 100), this.isCreateRightMenuModal = !1;
|
|
39031
39029
|
},
|
|
39030
|
+
toEdit(a) {
|
|
39031
|
+
const t = HOEditorFactorys.instance().getFactory(this.hoEditorId), r = t.vueController.getCurrentDocId(t.drawTree.selectRange.spEnd.path);
|
|
39032
|
+
r && this.$emit("rightClickEventIn", {
|
|
39033
|
+
node: r,
|
|
39034
|
+
type: "right-click-event",
|
|
39035
|
+
action: "toEdit"
|
|
39036
|
+
}), this.isCreateRightMenuModal = !1;
|
|
39037
|
+
},
|
|
39032
39038
|
/**
|
|
39033
39039
|
* 打开和隐藏批注
|
|
39034
39040
|
*/
|
|
@@ -39078,7 +39084,7 @@ var _sfc_render$1c = function a() {
|
|
|
39078
39084
|
}, proxy: !0 }, { key: "hoPageExtra", fn: function() {
|
|
39079
39085
|
return [t._t("hoDocExtra", null, { data: { pgIndex: o - 1 } })];
|
|
39080
39086
|
}, proxy: !0 }], null, !0) })];
|
|
39081
|
-
})], 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.
|
|
39087
|
+
})], 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" }, [t.showEditBtn ? r("li", { staticClass: "mouse-menu-item", staticStyle: { "justify-content": "space-between" }, on: { click: t.toEdit } }, [r("span", [t._v("去编辑")])]) : t._e(), 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);
|
|
39082
39088
|
}, _sfc_staticRenderFns$1c = [], __component__$1c = /* @__PURE__ */ normalizeComponent$1(
|
|
39083
39089
|
_sfc_main$1c,
|
|
39084
39090
|
_sfc_render$1c,
|
|
@@ -46040,7 +46046,7 @@ class StructureConvert {
|
|
|
46040
46046
|
if (n.firstLoad = !0, r && r({ text: n.vueController.getDocTitle(), count: 0 }), t) {
|
|
46041
46047
|
const s = (f, p) => {
|
|
46042
46048
|
const m = f[0];
|
|
46043
|
-
m instanceof ParagraphNode && p instanceof ParagraphNode && (m.paraNo !== 0 && (p.paraNo = m.paraNo), m.customProperty && (p.customProperty = m.customProperty));
|
|
46049
|
+
m instanceof ParagraphNode && p instanceof ParagraphNode && (m.paraNo !== 0 && (p.paraNo = m.paraNo), m.customProperty && (p.customProperty = m.customProperty), m.docInfo && (p.docInfo = m.docInfo));
|
|
46044
46050
|
for (let g = 1; g < f.length; g++) {
|
|
46045
46051
|
const y = f[g];
|
|
46046
46052
|
if (y instanceof TextNode && (y.text.length === 0 || y.text == "" || y.text == "" || y.text == "" || y.text == "" || y.text == "") || y instanceof SignNode && y.number == 0 && y.type == 0 && y.name == "")
|
|
@@ -49914,12 +49920,12 @@ class VueController {
|
|
|
49914
49920
|
JSON.stringify(p.styles.paraStyle[C]) == '""' ? u.push(JSON.stringify(g)) : u.push(JSON.stringify(p.styles.paraStyle[C]));
|
|
49915
49921
|
if (!p)
|
|
49916
49922
|
return;
|
|
49917
|
-
const y = (C) => {
|
|
49918
|
-
r &&
|
|
49919
|
-
docId:
|
|
49923
|
+
const y = (C, _) => {
|
|
49924
|
+
r && _[0].nodeType === "ntParagraph" && (o.saveDocLog = !0, _[0].docInfo = {
|
|
49925
|
+
docId: C
|
|
49920
49926
|
});
|
|
49921
49927
|
};
|
|
49922
|
-
y(p.main);
|
|
49928
|
+
y(t[0][3], p.main);
|
|
49923
49929
|
const v = (C, _, D) => {
|
|
49924
49930
|
for (let E = 0; E < C.length; E++) {
|
|
49925
49931
|
const T = C[E];
|
|
@@ -49987,7 +49993,7 @@ class VueController {
|
|
|
49987
49993
|
const W = o.gernerateCode.generateID("DocId");
|
|
49988
49994
|
E.header[0].beginPath = W, E.header[0].pageIndex = -1, p.header.push(E.header[0]), Array.isArray(E.main) ? (E.main[0].forceChangeHeader = "true", E.main[0].docId = W) : (Array(E.main)[0].forceChangeHeader = "true", Array(E.main)[0].docId = W);
|
|
49989
49995
|
}
|
|
49990
|
-
y(E.main), Array.isArray(E.main) ? p.main.push(...E.main) : p.main.push(...Array(E.main));
|
|
49996
|
+
y(t[C][3], E.main), Array.isArray(E.main) ? p.main.push(...E.main) : p.main.push(...Array(E.main));
|
|
49991
49997
|
}
|
|
49992
49998
|
const w = await o.structureConvert.json2Doc(p);
|
|
49993
49999
|
await o.drawTree.updateDrawTreeFirstLine(), await o.structureConvert.openJson2Doc(w);
|
|
@@ -53155,10 +53161,29 @@ class VueController {
|
|
|
53155
53161
|
d && (d.innerHTML = ""), s && c && ((m = l == null ? void 0 : l.childNodes) == null || m.forEach((g, y) => {
|
|
53156
53162
|
var v, w;
|
|
53157
53163
|
(w = (v = g == null ? void 0 : g.drawCell) == null ? void 0 : v.drawPageCells[0]) == null || w.updateHtmlTouchArea(g);
|
|
53158
|
-
}))
|
|
53159
|
-
|
|
53160
|
-
|
|
53161
|
-
|
|
53164
|
+
}));
|
|
53165
|
+
}
|
|
53166
|
+
getCurrentDocId(t) {
|
|
53167
|
+
const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
53168
|
+
if (r.saveDocLog) {
|
|
53169
|
+
const o = [];
|
|
53170
|
+
if (r.docTree.mainNodes.filter((n) => {
|
|
53171
|
+
if (n instanceof ParagraphNode && n.docInfo) {
|
|
53172
|
+
const s = r.docTree.getNodeLastPath(n);
|
|
53173
|
+
return o.push({ node: n, path: s }), !0;
|
|
53174
|
+
}
|
|
53175
|
+
}), o.length) {
|
|
53176
|
+
o.sort((s, l) => NodePosition.treePathCompare(s.path, l.path));
|
|
53177
|
+
let n = null;
|
|
53178
|
+
for (const s of o)
|
|
53179
|
+
if (NodePosition.treePathCompare(s.path, t) < 0)
|
|
53180
|
+
n = s;
|
|
53181
|
+
else
|
|
53182
|
+
break;
|
|
53183
|
+
return n;
|
|
53184
|
+
}
|
|
53185
|
+
}
|
|
53186
|
+
return "";
|
|
53162
53187
|
}
|
|
53163
53188
|
}
|
|
53164
53189
|
class BaseController {
|
|
@@ -65109,7 +65134,7 @@ WebPDecoder.prototype.getData = function() {
|
|
|
65109
65134
|
(function(a) {
|
|
65110
65135
|
function t() {
|
|
65111
65136
|
return function() {
|
|
65112
|
-
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-
|
|
65137
|
+
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-nnsY3-aA.mjs");
|
|
65113
65138
|
}().catch(function(r) {
|
|
65114
65139
|
return Promise.reject(new Error("Could not load canvg: " + r));
|
|
65115
65140
|
}).then(function(r) {
|
|
@@ -84136,6 +84161,10 @@ const FindReplaceDialog = __component__$t.exports, fontFamilys = [{ ch: "宋体"
|
|
|
84136
84161
|
* 右键菜单触发
|
|
84137
84162
|
*/
|
|
84138
84163
|
rightClickEventIn(a) {
|
|
84164
|
+
if (a.type === "right-click-event") {
|
|
84165
|
+
this.$emit("rightClickEvent", a);
|
|
84166
|
+
return;
|
|
84167
|
+
}
|
|
84139
84168
|
this.setFontStyle();
|
|
84140
84169
|
const t = {
|
|
84141
84170
|
node: () => this.hoEditorProvider.getUpdateNode(),
|