hoeditor-web 3.2.36 → 3.2.38
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-jywwGYdm.mjs";
|
|
3
3
|
export {
|
|
4
4
|
i as HoDocs,
|
|
5
5
|
r as HoEditorProvide,
|
|
@@ -9954,7 +9954,7 @@ class RadioAndCheckBoxNode extends ControlNode {
|
|
|
9954
9954
|
const d = this._drawNodes[0];
|
|
9955
9955
|
let u = "#000";
|
|
9956
9956
|
const f = c.docTree.styles[this.styleIndex];
|
|
9957
|
-
c.drawTree.paintStatus === PaintState.psTrace && f.modifierIndex !== void 0 && f.modifierIndex >= 0 && (u = f.combineStyle.color), d._dBox.color = u;
|
|
9957
|
+
(c.drawTree.paintStatus === PaintState.psTrace || c.enableChangeTracking) && f.modifierIndex !== void 0 && f.modifierIndex >= 0 && (u = f.combineStyle.color), d._dBox.color = u;
|
|
9958
9958
|
for (let g = 0; g < d.children.length; g++) {
|
|
9959
9959
|
const m = d.children[g];
|
|
9960
9960
|
(m.name === "box" || m.name === "text") && (m.color = u);
|
|
@@ -14904,7 +14904,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
14904
14904
|
}
|
|
14905
14905
|
}
|
|
14906
14906
|
}
|
|
14907
|
-
const version = "3.2.
|
|
14907
|
+
const version = "3.2.38";
|
|
14908
14908
|
var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
|
|
14909
14909
|
class SignNode extends BaseNode {
|
|
14910
14910
|
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) {
|
|
@@ -20536,7 +20536,10 @@ class DrawTextNode extends DrawCombineNode {
|
|
|
20536
20536
|
let s = !1;
|
|
20537
20537
|
if (o.drawTree.paintStatus === PaintState.psTrace) {
|
|
20538
20538
|
const c = this._textNode.dCombineStyle.creatorIndex, d = this._textNode.dCombineStyle.deleterIndex, u = this._textNode.dCombineStyle.modifierIndex;
|
|
20539
|
-
(c >= 0 || d >= 0 || u >= 0)
|
|
20539
|
+
if (c >= 0 || d >= 0 || u >= 0) {
|
|
20540
|
+
const f = c >= 0 ? 201 : d >= 0 ? 202 : 20;
|
|
20541
|
+
r = o.option.getColorByLevel(f), s = !0;
|
|
20542
|
+
}
|
|
20540
20543
|
}
|
|
20541
20544
|
if (o.drawTree.paintStatus === PaintState.psEdit && !o.isHideComments) {
|
|
20542
20545
|
const c = this._textNode.dCombineStyle.commentID, d = o.drawTree.commentsMap.get(
|
|
@@ -24926,7 +24929,7 @@ class NodesDeleteUndoUnit {
|
|
|
24926
24929
|
).normalize(), r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
24927
24930
|
r.docTree.curDomRange = t;
|
|
24928
24931
|
const o = r.drawTree.paintStatus;
|
|
24929
|
-
if ((o === PaintState.psReview || o === PaintState.psTrace) && t.npEnd.node && t.npEnd.node instanceof TextNode && r.docTree.styles[t.npEnd.node.styleIndex].strikeout && t.npEnd.node.text.length > 0) {
|
|
24932
|
+
if ((o === PaintState.psReview || o === PaintState.psTrace || r.enableChangeTracking) && t.npEnd.node && t.npEnd.node instanceof TextNode && r.docTree.styles[t.npEnd.node.styleIndex].strikeout && t.npEnd.node.text.length > 0) {
|
|
24930
24933
|
message.warn("该内容当前已处于删除状态!"), this._isError = !0;
|
|
24931
24934
|
return;
|
|
24932
24935
|
}
|
|
@@ -28049,9 +28052,11 @@ class DrawTree {
|
|
|
28049
28052
|
const w = DomRange.getSelectDomNodesForUpdate(this._hoEditorFactoryID, r, d);
|
|
28050
28053
|
for (let C = 0; C < w.length; C++)
|
|
28051
28054
|
if (c = w[C], c instanceof ParagraphNode) {
|
|
28055
|
+
let _ = f.docTree.styles[c.styleIndex];
|
|
28056
|
+
if (_ || (_ = f.docTree.styles[0]), !((_ == null ? void 0 : _.deleterIndex) === void 0 || (_ == null ? void 0 : _.deleterIndex) === -1)) continue;
|
|
28052
28057
|
if (n && c.refreshParaStyle(), s.paragraphNode !== c ? (s instanceof DrawLine && (s.fitLines(), s.paragraphNode.updateDrawLineStyle()), s.paragraphNode.updateDrawInfos(), c.clear(), c.node2DrawNode(), c.placeDNodeAfterDline(s)) : s.paragraphNode.drootNodes.indexOf(s) < 0 && c.placeDNodeAfterDline(null), s = c.drawlines[0], l = c, s.paragraphNode.parentNode instanceof CellNode) {
|
|
28053
|
-
const
|
|
28054
|
-
|
|
28058
|
+
const E = s.paragraphNode.parentNode;
|
|
28059
|
+
E && (E.drawCell.needUpdate = !0, u.indexOf(E.table) < 0 && u.push(E.table));
|
|
28055
28060
|
}
|
|
28056
28061
|
} else {
|
|
28057
28062
|
if (s instanceof DrawTable)
|
|
@@ -39265,9 +39270,13 @@ class Option {
|
|
|
39265
39270
|
b(this, "_warnColor", "#FF0000");
|
|
39266
39271
|
//提醒颜色
|
|
39267
39272
|
b(this, "_traceColor", "#FD010B");
|
|
39273
|
+
//留痕颜色
|
|
39274
|
+
b(this, "_traceCreateColor", "#87d068");
|
|
39275
|
+
//留痕创建颜色
|
|
39276
|
+
b(this, "_traceDeleteColor", "#FD010B");
|
|
39268
39277
|
this._hoEditorFactoryID = t;
|
|
39269
39278
|
}
|
|
39270
|
-
|
|
39279
|
+
//留痕删除颜色
|
|
39271
39280
|
get hoEditorFactoryID() {
|
|
39272
39281
|
return this._hoEditorFactoryID;
|
|
39273
39282
|
}
|
|
@@ -39344,7 +39353,7 @@ class Option {
|
|
|
39344
39353
|
t && (this._reviewLev1Color = t), r && (this._reviewLev2Color = r), o && (this._reviewLev3Color = o), n && (this._fieldColor = n), s && (this._dateTimeColor = s), l && (this._downListColor = l), c && (this._downListColor2 = c), d && (this._signColor = d), u && (this._labelColor = u), f && (this._warnColor = f);
|
|
39345
39354
|
}
|
|
39346
39355
|
getColorByLevel(t) {
|
|
39347
|
-
return t === 10 ? this._fieldColor : t === 11 ? this._dateTimeColor : t === 12 ? this._downListColor2 : t === 120 ? this._downListColor : t === 1 ? this._reviewLev1Color : t === 2 ? this._reviewLev2Color : t === 3 ? this._reviewLev3Color : t === 13 ? this._signColor : t === 14 ? this._labelColor : t === 15 ? this._warnColor : t === 20 ? this._traceColor : "transparent";
|
|
39356
|
+
return t === 10 ? this._fieldColor : t === 11 ? this._dateTimeColor : t === 12 ? this._downListColor2 : t === 120 ? this._downListColor : t === 1 ? this._reviewLev1Color : t === 2 ? this._reviewLev2Color : t === 3 ? this._reviewLev3Color : t === 13 ? this._signColor : t === 14 ? this._labelColor : t === 15 ? this._warnColor : t === 20 ? this._traceColor : t === 201 ? this._traceCreateColor : t === 202 ? this._traceDeleteColor : "transparent";
|
|
39348
39357
|
}
|
|
39349
39358
|
}
|
|
39350
39359
|
class TimeStamp {
|
|
@@ -44965,7 +44974,7 @@ class StructureConvert {
|
|
|
44965
44974
|
const p = this.doc2Json("comments", "xml", l, n);
|
|
44966
44975
|
l += c.js2xml(p), l += "</comments>", l += "<userHistories>";
|
|
44967
44976
|
const g = this.doc2Json("userHistories");
|
|
44968
|
-
return l += c.js2xml(g), l += "</userHistories>", l += "<headers>", l = this.doc2Json("header", "xml", l, n), l += "</headers>", l += "<main>", l = this.doc2Json("main", "xml", l, n), l += "</main>", l += "<footers>", l = this.doc2Json("footer", "xml", l, n), l += "</footers>", l += "<docText>", l += s.vueController.getMainDocText(), l += "</docText>", l += "</root>", l = s.unitConvert.replaceAll(l, "<TempNode>", ""), l = s.unitConvert.replaceAll(l, "</TempNode>", ""), s.isThrowError = !0, r ? xmlBeauty(l) : l;
|
|
44977
|
+
return l += c.js2xml(g), l += "</userHistories>", l += "<headers>", l = this.doc2Json("header", "xml", l, n), l += "</headers>", l += "<main>", l = this.doc2Json("main", "xml", l, n), l += "</main>", l += "<footers>", l = this.doc2Json("footer", "xml", l, n), l += "</footers>", l += "<docText>", s.compressXml || (l += s.vueController.getMainDocText()), l += "</docText>", l += "</root>", l = s.unitConvert.replaceAll(l, "<TempNode>", ""), l = s.unitConvert.replaceAll(l, "</TempNode>", ""), s.isThrowError = !0, r ? xmlBeauty(l) : l;
|
|
44969
44978
|
}
|
|
44970
44979
|
}
|
|
44971
44980
|
xmlBeauty(t) {
|
|
@@ -45118,95 +45127,118 @@ class StructureConvert {
|
|
|
45118
45127
|
return r.docTree.isSaveValid = !1, o;
|
|
45119
45128
|
}
|
|
45120
45129
|
doc2Json(t, r, o, n) {
|
|
45121
|
-
const s = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), l = new X2JS({ stripWhitespaces: !1, arrayAccessForm: "property" });
|
|
45130
|
+
const s = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), l = new X2JS({ stripWhitespaces: !1, arrayAccessForm: "property" }), c = (f, p) => s.compressXml ? (s.compressJSONData[f] = p, {}) : p;
|
|
45122
45131
|
if (t === "docProperty") {
|
|
45123
|
-
const
|
|
45124
|
-
return
|
|
45132
|
+
const f = s.docTree.docProperty, p = JSON.parse(JSON.stringify(f, DocProperty.whiteList()));
|
|
45133
|
+
return c(t, p);
|
|
45125
45134
|
}
|
|
45126
45135
|
if (t === "pageSettings") {
|
|
45127
|
-
const
|
|
45128
|
-
return
|
|
45136
|
+
const f = s.pageProperty, p = JSON.parse(JSON.stringify(f, PageProperty.whiteList()));
|
|
45137
|
+
return c(t, p);
|
|
45129
45138
|
}
|
|
45130
45139
|
if (t === "styles") {
|
|
45131
|
-
const
|
|
45132
|
-
for (let
|
|
45133
|
-
const
|
|
45134
|
-
(
|
|
45135
|
-
}
|
|
45136
|
-
const
|
|
45137
|
-
for (let
|
|
45138
|
-
const
|
|
45139
|
-
(
|
|
45140
|
-
}
|
|
45141
|
-
return {
|
|
45142
|
-
defaultFont:
|
|
45143
|
-
fontStyle:
|
|
45144
|
-
defaultPara:
|
|
45145
|
-
paraStyle:
|
|
45146
|
-
};
|
|
45140
|
+
const f = [], p = s.docTree.styles, g = p[0].combineStyle, m = JSON.parse(JSON.stringify(g, CombineStyle.whiteList()));
|
|
45141
|
+
for (let _ = 1; _ < p.length; _++) {
|
|
45142
|
+
const D = p[_], E = D.combineStyle, T = JSON.parse(JSON.stringify(E, CombineStyle.whiteList()));
|
|
45143
|
+
(D.size === void 0 || D.size === g.size) && delete T.size, (D.font === void 0 || D.font === g.font) && delete T.font, (D.color === void 0 || D.color === g.color) && delete T.color, (D.backColor === void 0 || D.backColor === g.backColor) && delete T.backColor, (D.bold === void 0 || D.bold === g.bold) && delete T.bold, (D.italic === void 0 || D.italic === g.italic) && delete T.italic, (D.underline === void 0 || D.underline === g.underline) && delete T.underline, (D.strikeout === void 0 || D.strikeout === g.strikeout) && delete T.strikeout, (D.script === void 0 || D.script === g.script) && delete T.script, (D.deleterIndex === -1 || D.deleterIndex === void 0 || D.deleterIndex === g.deleterIndex) && delete T.deleterIndex, (D.creatorIndex === -1 || D.creatorIndex === void 0 || D.creatorIndex === g.creatorIndex) && delete T.creatorIndex, (D.modifierIndex === -1 || D.modifierIndex === void 0 || D.modifierIndex === g.modifierIndex) && delete T.modifierIndex, n && D.commentID !== "0" && D.commentID !== void 0 && (D.commentID = "0"), (D.commentID === "0" || D.commentID === void 0 || D.commentID === g.commentID) && delete T.commentID, f.push(T);
|
|
45144
|
+
}
|
|
45145
|
+
const y = [], w = s.docTree.paragraphs, v = w[0].combineStyle, C = JSON.parse(JSON.stringify(v, CombineParagraph.whiteList()));
|
|
45146
|
+
for (let _ = 1; _ < w.length; _++) {
|
|
45147
|
+
const D = w[_], E = D.combineStyle, T = JSON.parse(JSON.stringify(E, CombineParagraph.whiteList()));
|
|
45148
|
+
(D.charSpace === void 0 || D.charSpace === v.charSpace) && delete T.charSpace, (D.lineSpace === void 0 || D.lineSpace === v.lineSpace) && delete T.lineSpace, (D.leftMargin === void 0 || D.leftMargin === v.leftMarginMm) && delete T.leftMarginMm, (D.rightMargin === void 0 || D.rightMargin === v.rightMarginMm) && delete T.rightMarginMm, (D.topMargin === void 0 || D.topMargin === v.topMarginMm) && delete T.topMarginMm, (D.bottomMargin === void 0 || D.bottomMargin === v.bottomMarginMm) && delete T.bottomMarginMm, (D.align === void 0 || D.align === v.align) && delete T.align, y.push(T);
|
|
45149
|
+
}
|
|
45150
|
+
return c(t, {
|
|
45151
|
+
defaultFont: m,
|
|
45152
|
+
fontStyle: f,
|
|
45153
|
+
defaultPara: C,
|
|
45154
|
+
paraStyle: y
|
|
45155
|
+
});
|
|
45147
45156
|
}
|
|
45148
45157
|
if (t === "comments") {
|
|
45149
|
-
const
|
|
45150
|
-
return n || s.drawTree.commentsMap.forEach((
|
|
45151
|
-
const
|
|
45152
|
-
|
|
45153
|
-
}), { comment:
|
|
45158
|
+
const f = [];
|
|
45159
|
+
return n || s.drawTree.commentsMap.forEach((g) => {
|
|
45160
|
+
const m = JSON.parse(JSON.stringify(g, Comment.whiteList()));
|
|
45161
|
+
m.customProperty = g.customProperty, f.push(m);
|
|
45162
|
+
}), c(t, { comment: f });
|
|
45154
45163
|
}
|
|
45155
45164
|
if (t === "userHistories") {
|
|
45156
|
-
const
|
|
45157
|
-
for (let
|
|
45158
|
-
const
|
|
45159
|
-
|
|
45160
|
-
}
|
|
45161
|
-
return { userHistory:
|
|
45162
|
-
}
|
|
45163
|
-
const
|
|
45164
|
-
|
|
45165
|
-
|
|
45166
|
-
|
|
45167
|
-
|
|
45168
|
-
|
|
45165
|
+
const f = [], p = s.docTree.userHistories;
|
|
45166
|
+
for (let g = 0; g < p.length; g++) {
|
|
45167
|
+
const m = p[g], y = JSON.parse(JSON.stringify(m, UserHistory.whiteList()));
|
|
45168
|
+
f.push(y);
|
|
45169
|
+
}
|
|
45170
|
+
return c(t, { userHistory: f });
|
|
45171
|
+
}
|
|
45172
|
+
const d = (f, p, g) => {
|
|
45173
|
+
var m;
|
|
45174
|
+
return s.compressXml && (s.compressJSONData[f] || (s.compressJSONData[f] = []), p[g] && ((m = p[g].childNodes) != null && m.TempNode && (p[g].childNodes = p[g].childNodes.TempNode), g === "TableNode" ? (s.compressJSONData[f].push(p[g]), p = {
|
|
45175
|
+
TableNode: {
|
|
45176
|
+
// tableProperty: jsonData.TableNode.tableProperty,
|
|
45177
|
+
tableProperty: {}
|
|
45178
|
+
}
|
|
45179
|
+
}) : g === "TextInputFieldNode" ? (s.compressJSONData[f].push(p[g]), p = {
|
|
45180
|
+
TextInputFieldNode: {
|
|
45181
|
+
id: p.TextInputFieldNode.id,
|
|
45182
|
+
dataId: p.TextInputFieldNode.dataId
|
|
45183
|
+
}
|
|
45184
|
+
}) : g === "SignNode" ? (s.compressJSONData[f].push(p[g]), p = {
|
|
45185
|
+
SignNode: {
|
|
45186
|
+
id: p.SignNode.id,
|
|
45187
|
+
dataId: p.SignNode.dataId
|
|
45188
|
+
}
|
|
45189
|
+
}) : g === "DateTimeNode" && (s.compressJSONData[f].push(p[g]), p = {
|
|
45190
|
+
DateTimeNode: {
|
|
45191
|
+
id: p.DateTimeNode.id,
|
|
45192
|
+
dataId: p.DateTimeNode.dataId
|
|
45193
|
+
}
|
|
45194
|
+
}))), p;
|
|
45195
|
+
}, u = (f, p) => {
|
|
45196
|
+
const g = [];
|
|
45197
|
+
for (let m = 0; m < f.length; m++) {
|
|
45198
|
+
const y = f[m];
|
|
45199
|
+
let w;
|
|
45200
|
+
p === "json" && (y instanceof TableNode || y instanceof TextInputFieldNode) ? w = this.delStyle(y.node2Json(void 0, void 0, "json")) : p === "json" ? w = this.delStyle(y.node2Json()) : y instanceof TableNode || y instanceof TextInputFieldNode ? (w = y.node2Json(void 0, void 0, void 0, n), w = d(t, w, y instanceof TableNode ? "TableNode" : "TextInputFieldNode")) : y instanceof SignNode ? (n ? y.isTemplate && (w = y.node2Json(void 0, void 0, void 0, n)) : w = y.node2Json(), w = d(t, w, "SignNode")) : y instanceof DateTimeNode && n || y instanceof QrcodeNode && n ? w = y.node2Json(void 0, void 0, void 0, n) : y instanceof DateTimeNode ? w = d(t, y.node2Json(), "DateTimeNode") : w = y.node2Json(), p === "xml" ? o += l.js2xml(w) : g.push(w);
|
|
45169
45201
|
}
|
|
45170
45202
|
if (r === "json")
|
|
45171
|
-
return
|
|
45203
|
+
return g;
|
|
45172
45204
|
};
|
|
45173
45205
|
if (t === "header") {
|
|
45174
|
-
const
|
|
45175
|
-
for (let
|
|
45176
|
-
const
|
|
45177
|
-
if (
|
|
45206
|
+
const f = s.subDocManger.getHeaderPageNodes(), p = [];
|
|
45207
|
+
for (let g = 0; g < f.length; g++) {
|
|
45208
|
+
const m = f[g];
|
|
45209
|
+
if (m && m.length > 0)
|
|
45178
45210
|
if (r === "xml")
|
|
45179
|
-
o += "<header>", o += l.js2xml({ index:
|
|
45211
|
+
o += "<header>", o += l.js2xml({ index: g }), u(m, r), o += "</header>";
|
|
45180
45212
|
else {
|
|
45181
|
-
const
|
|
45182
|
-
|
|
45213
|
+
const y = { header: u(m, "json") };
|
|
45214
|
+
p.push(y);
|
|
45183
45215
|
}
|
|
45184
45216
|
}
|
|
45185
45217
|
if (r === "xml")
|
|
45186
45218
|
return o;
|
|
45187
45219
|
if (r === "json")
|
|
45188
|
-
return
|
|
45220
|
+
return p;
|
|
45189
45221
|
}
|
|
45190
45222
|
if (t === "footer") {
|
|
45191
|
-
const
|
|
45192
|
-
for (let
|
|
45193
|
-
const
|
|
45194
|
-
if (
|
|
45223
|
+
const f = s.subDocManger.getFooterPageNodes(), p = [];
|
|
45224
|
+
for (let g = 0; g < f.length; g++) {
|
|
45225
|
+
const m = f[g];
|
|
45226
|
+
if (m && m.length > 0)
|
|
45195
45227
|
if (r === "xml")
|
|
45196
|
-
o += "<footer>", o += l.js2xml({ index:
|
|
45228
|
+
o += "<footer>", o += l.js2xml({ index: g }), u(m, r), o += "</footer>";
|
|
45197
45229
|
else {
|
|
45198
|
-
const
|
|
45199
|
-
|
|
45230
|
+
const y = { footer: u(m, "json") };
|
|
45231
|
+
p.push(y);
|
|
45200
45232
|
}
|
|
45201
45233
|
}
|
|
45202
45234
|
if (r === "xml")
|
|
45203
45235
|
return o;
|
|
45204
45236
|
if (r === "json")
|
|
45205
|
-
return
|
|
45237
|
+
return p;
|
|
45206
45238
|
}
|
|
45207
45239
|
if (t === "main") {
|
|
45208
|
-
const
|
|
45209
|
-
return r === "xml" ? (
|
|
45240
|
+
const f = s.docTree.mainNodes;
|
|
45241
|
+
return r === "xml" ? (u(f, r), o) : u(f, "json");
|
|
45210
45242
|
}
|
|
45211
45243
|
}
|
|
45212
45244
|
json2Doc(t, r) {
|
|
@@ -45568,8 +45600,8 @@ class StructureConvert {
|
|
|
45568
45600
|
for (let I = 0; I < T.length; I++)
|
|
45569
45601
|
T[I].update();
|
|
45570
45602
|
n.vueController.getPreDoctorSign(void 0, 0, !1).filter((I) => {
|
|
45571
|
-
var k;
|
|
45572
|
-
return (k = I.otherProperties) == null ? void 0 : k.lockContentBeforeSign;
|
|
45603
|
+
var k, A;
|
|
45604
|
+
return ((A = (k = I.otherProperties) == null ? void 0 : k.lockContentBeforeSign) == null ? void 0 : A.toString()) === "true";
|
|
45573
45605
|
}).length > 0 ? (n.isLockContentBeforeSign = !0, n.vueController.paintLockMask(!0)) : this._superiorSign.length > 0 && (n.drawTree.paintStatus === PaintState.psEdit || n.drawTree.paintStatus === PaintState.psReview ? n.vueController.hiddenMask(!1) : n.vueController.hiddenMask(!0)), n.vueController.getCurTextStyle(), r && r({ text: n.vueController.getDocTitle(), count: 0 }), n.isThrowError = !0, n.vueController.initTableSignLocked();
|
|
45574
45606
|
}
|
|
45575
45607
|
}
|
|
@@ -47726,6 +47758,35 @@ class VueController {
|
|
|
47726
47758
|
}
|
|
47727
47759
|
return s;
|
|
47728
47760
|
}
|
|
47761
|
+
/**
|
|
47762
|
+
* 获取文档的json
|
|
47763
|
+
* json数据与xml分离
|
|
47764
|
+
* @param beauty 是否美化
|
|
47765
|
+
* @param isValidStyle 是否校验样式
|
|
47766
|
+
*/
|
|
47767
|
+
getDocJosnXml(t, r) {
|
|
47768
|
+
const o = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
47769
|
+
if (o.compressXml = !0, o.compressJSONData = {}, r) {
|
|
47770
|
+
o.contentIsModify.isModify = !1;
|
|
47771
|
+
const c = o.undoService.stack;
|
|
47772
|
+
if (c.length > 0) {
|
|
47773
|
+
const u = c[c.length - 1].undoUnits, f = u[u.length - 1];
|
|
47774
|
+
o.lastSaveTime = f.opTime;
|
|
47775
|
+
} else
|
|
47776
|
+
o.lastSaveTime = new Date(Date.now());
|
|
47777
|
+
}
|
|
47778
|
+
let n = o.structureConvert.doc2Xml("xml", t, r, !1), s = [];
|
|
47779
|
+
const l = setTimeout(() => {
|
|
47780
|
+
clearTimeout(l), o.compressXml = !1, o.compressJSONData = {};
|
|
47781
|
+
}, 20);
|
|
47782
|
+
try {
|
|
47783
|
+
typeof o.cleanUpChar == "string" && (s = JSON.parse(o.cleanUpChar)), Array.isArray(s) && s.forEach((c) => {
|
|
47784
|
+
n = n.replace(new RegExp(c, "g"), "");
|
|
47785
|
+
});
|
|
47786
|
+
} catch {
|
|
47787
|
+
}
|
|
47788
|
+
return { xml: n, compressJSONData: o.compressJSONData };
|
|
47789
|
+
}
|
|
47729
47790
|
/**
|
|
47730
47791
|
* 返回编辑后的表单json数据
|
|
47731
47792
|
*/
|
|
@@ -48035,8 +48096,8 @@ class VueController {
|
|
|
48035
48096
|
r.drawPageTree.updateDrawPage(d);
|
|
48036
48097
|
}
|
|
48037
48098
|
const o = this.getPreDoctorSign(void 0, 1, !1).filter((d) => {
|
|
48038
|
-
var u;
|
|
48039
|
-
return (u = d.otherProperties) == null ? void 0 : u.lockContentBeforeSign;
|
|
48099
|
+
var u, f;
|
|
48100
|
+
return ((f = (u = d.otherProperties) == null ? void 0 : u.lockContentBeforeSign) == null ? void 0 : f.toString()) === "true";
|
|
48040
48101
|
});
|
|
48041
48102
|
if (!o.length) return;
|
|
48042
48103
|
const s = o[o.length - 1].drawNodes[0], l = r.drawPageTree.getMainRootArea(s), c = r.drawPageTree.drawHeaders[0].displayHeight;
|
|
@@ -49412,6 +49473,7 @@ class VueController {
|
|
|
49412
49473
|
}
|
|
49413
49474
|
}
|
|
49414
49475
|
deleteNode(t) {
|
|
49476
|
+
var c;
|
|
49415
49477
|
const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
49416
49478
|
if (!t || t.parentNode && t.parentNode instanceof CellNode && !t.parentNode.delCellNodeText() || t instanceof CellNode && !t.delCellNodeText())
|
|
49417
49479
|
return;
|
|
@@ -49419,8 +49481,8 @@ class VueController {
|
|
|
49419
49481
|
let n = r.docTree.getNodeLastPath(o);
|
|
49420
49482
|
const s = r.docTree.getNodeLastPath(t);
|
|
49421
49483
|
if (r.drawTree.paintStatus === PaintState.psReview && t instanceof SignNode) {
|
|
49422
|
-
const
|
|
49423
|
-
if (r.userInfo.id !=
|
|
49484
|
+
const d = t.customProperty.bce01;
|
|
49485
|
+
if (r.userInfo.id != d) {
|
|
49424
49486
|
message.warn(/* @__PURE__ */ i18nHelper("04-001-009-EMR.3.3.477", null, "不是本人签名,不允许删除!"));
|
|
49425
49487
|
return;
|
|
49426
49488
|
}
|
|
@@ -49431,7 +49493,7 @@ class VueController {
|
|
|
49431
49493
|
}
|
|
49432
49494
|
if (t instanceof SignNode) {
|
|
49433
49495
|
if (t.oldNodePath = t.getNodePath(), (t.imgSrc !== "" || t.fingerPrintSrc !== "") && t.isTemplate) {
|
|
49434
|
-
const
|
|
49496
|
+
const u = new SignNode(
|
|
49435
49497
|
this._hoEditorFactoryID,
|
|
49436
49498
|
t.rootNodes,
|
|
49437
49499
|
t.parentNode,
|
|
@@ -49462,19 +49524,19 @@ class VueController {
|
|
|
49462
49524
|
t.associatedElement
|
|
49463
49525
|
);
|
|
49464
49526
|
r.undoService.begin();
|
|
49465
|
-
let
|
|
49466
|
-
if (
|
|
49467
|
-
const
|
|
49468
|
-
if (
|
|
49469
|
-
|
|
49527
|
+
let f = new NodeDeleteUndoUnit(this._hoEditorFactoryID, t, s);
|
|
49528
|
+
if (f.repaintImmediate = !1, r.undoService.add(f), r.undoService.add(new NodeInsertUndoUnit(this._hoEditorFactoryID, n, u)), r.undoService.commit(), t.parentNode instanceof CellNode) {
|
|
49529
|
+
const p = t.parentNode.table;
|
|
49530
|
+
if (p.tableProperty.isSignLock && p.tableProperty.isLock)
|
|
49531
|
+
p.tableProperty.isLock = !1;
|
|
49470
49532
|
else {
|
|
49471
|
-
const
|
|
49472
|
-
|
|
49533
|
+
const g = t.parentNode.row.indexOf(t.parentNode), m = p.colInfos[g].colProperty;
|
|
49534
|
+
m.isSignLock && m.isLock && (m.isLock = !1);
|
|
49473
49535
|
}
|
|
49474
49536
|
}
|
|
49475
49537
|
} else
|
|
49476
49538
|
t.connectMode == /* @__PURE__ */ i18nHelper("04-001-009-EMR.3.3.119", null, "换行") && o instanceof ParagraphNode && (n = r.docTree.getNodeLastPath(o.previousLeaf())), r.undoService.begin(), r.undoService.add(new NodesDeleteUndoUnit(this._hoEditorFactoryID, n, s, !0)), r.undoService.commit();
|
|
49477
|
-
(t.otherProperties || {}).lockContentBeforeSign ? this.paintLockMask(!0) : r.structureConvert._superiorSign.length > 0 && this.updateHiddenMask(), r.drawTree.paintStatus === PaintState.psEdit && r.useSignLockTable && this.updateTableSignLocked(t, t.dataId);
|
|
49539
|
+
((c = (t.otherProperties || {}).lockContentBeforeSign) == null ? void 0 : c.toString()) === "true" ? this.paintLockMask(!0) : r.structureConvert._superiorSign.length > 0 && this.updateHiddenMask(), r.drawTree.paintStatus === PaintState.psEdit && r.useSignLockTable && this.updateTableSignLocked(t, t.dataId);
|
|
49478
49540
|
return;
|
|
49479
49541
|
}
|
|
49480
49542
|
r.undoService.begin(), r.undoService.add(new NodeDeleteUndoUnit(this._hoEditorFactoryID, t)), r.undoService.commit(), r.drawTree.moveCaretToPath(n);
|
|
@@ -53096,7 +53158,7 @@ class ElementController {
|
|
|
53096
53158
|
return;
|
|
53097
53159
|
}
|
|
53098
53160
|
let c = !1;
|
|
53099
|
-
l.drawTree.paintStatus === PaintState.psTrace && (c = !0);
|
|
53161
|
+
(l.drawTree.paintStatus === PaintState.psTrace || l.enableChangeTracking) && (c = !0);
|
|
53100
53162
|
let d = Promise.resolve();
|
|
53101
53163
|
d = d.then((u) => new Promise(async (f) => {
|
|
53102
53164
|
if (t instanceof TextInputFieldNode && (await t.setFieldText(r, o, n, s, c), t.rootPath.includes("header"))) {
|
|
@@ -64258,7 +64320,7 @@ WebPDecoder.prototype.getData = function() {
|
|
|
64258
64320
|
(function(a) {
|
|
64259
64321
|
function t() {
|
|
64260
64322
|
return function() {
|
|
64261
|
-
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-
|
|
64323
|
+
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-BGJ_MJMK.mjs");
|
|
64262
64324
|
}().catch(function(r) {
|
|
64263
64325
|
return Promise.reject(new Error("Could not load canvg: " + r));
|
|
64264
64326
|
}).then(function(r) {
|
|
@@ -66489,13 +66551,14 @@ class NodeStyleUndoUnit {
|
|
|
66489
66551
|
repaint(t, r, o) {
|
|
66490
66552
|
const n = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
66491
66553
|
if (r === "") return;
|
|
66492
|
-
n.docTree.curDomRange.startPath = t
|
|
66554
|
+
n.docTree.curDomRange.startPath = t;
|
|
66555
|
+
const s = t;
|
|
66556
|
+
let l = r;
|
|
66557
|
+
if (n.docTree.curDomRange.endPath = r, new DomRange(
|
|
66493
66558
|
this._hoEditorFactoryID,
|
|
66494
66559
|
t,
|
|
66495
66560
|
r
|
|
66496
|
-
).normalize()
|
|
66497
|
-
const s = t, l = r;
|
|
66498
|
-
if (s !== l) {
|
|
66561
|
+
).normalize(), s !== l) {
|
|
66499
66562
|
const f = new NodeChangeEvent(
|
|
66500
66563
|
this._hoEditorFactoryID,
|
|
66501
66564
|
DocAction.daModifyStyle,
|
|
@@ -66509,10 +66572,10 @@ class NodeStyleUndoUnit {
|
|
|
66509
66572
|
t,
|
|
66510
66573
|
r
|
|
66511
66574
|
), d = n.docTree.getFinalParentNode(l);
|
|
66512
|
-
d && d instanceof CellNode && (d.drawCell.needUpdate = !0, d.table.update()), d && d instanceof TextInputFieldNode && d.update();
|
|
66575
|
+
d && d instanceof CellNode && (d.drawCell.needUpdate = !0, d.table.update()), d && d instanceof TextInputFieldNode && d.update(), n.enableChangeTracking && this._operate instanceof Operate && this._operate.act == "reviewDelete" && (l = t, t = t, r = t);
|
|
66513
66576
|
const u = new SelectionChangeEvent(
|
|
66514
66577
|
c,
|
|
66515
|
-
|
|
66578
|
+
new DomRange(this._hoEditorFactoryID, l, l)
|
|
66516
66579
|
);
|
|
66517
66580
|
n.docTree.selectChange(u), n.drawTree.moveCaretToPath(r);
|
|
66518
66581
|
}
|
|
@@ -69035,6 +69098,13 @@ class DocController {
|
|
|
69035
69098
|
b(this, "_count", 0);
|
|
69036
69099
|
b(this, "_hoEditorFactoryID");
|
|
69037
69100
|
b(this, "_onInsertNodeByID");
|
|
69101
|
+
b(this, "findNodeWithDeleterIndex", (a) => {
|
|
69102
|
+
var o, n, s, l;
|
|
69103
|
+
let r = (o = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.findNodePositionByPath(a)) == null ? void 0 : o.node;
|
|
69104
|
+
for (; r && !(!((n = r._dCombineStyle) != null && n.deleterIndex) || ((s = r._dCombineStyle) == null ? void 0 : s.deleterIndex) === -1); )
|
|
69105
|
+
r = (l = r.previousLeaf) == null ? void 0 : l.call(r);
|
|
69106
|
+
return r;
|
|
69107
|
+
});
|
|
69038
69108
|
this._hoEditorFactoryID = a, this._onInsertNodeByID = null;
|
|
69039
69109
|
}
|
|
69040
69110
|
// public static get instance() {
|
|
@@ -69066,18 +69136,18 @@ class DocController {
|
|
|
69066
69136
|
deleteRange(a, t, r) {
|
|
69067
69137
|
let o = a;
|
|
69068
69138
|
t || (o = a.normalize());
|
|
69069
|
-
const n = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
69070
|
-
let
|
|
69071
|
-
if ((n.drawTree.paintStatus === PaintState.psReview || n.drawTree.paintStatus === PaintState.psTrace) && o.npEnd.node instanceof TextNode) {
|
|
69072
|
-
const
|
|
69073
|
-
|
|
69139
|
+
const n = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), s = n.enableChangeTracking;
|
|
69140
|
+
let l = -1;
|
|
69141
|
+
if ((n.drawTree.paintStatus === PaintState.psReview || n.drawTree.paintStatus === PaintState.psTrace || s) && o.npEnd.node instanceof TextNode) {
|
|
69142
|
+
const c = n.docTree.styles[o.npEnd.node.styleIndex];
|
|
69143
|
+
l = c.creatorIndex === void 0 ? -1 : c.creatorIndex;
|
|
69074
69144
|
}
|
|
69075
|
-
if ((n.drawTree.paintStatus === PaintState.psReview || n.drawTree.paintStatus === PaintState.psTrace) && r !== "update" &&
|
|
69145
|
+
if ((n.drawTree.paintStatus === PaintState.psReview || n.drawTree.paintStatus === PaintState.psTrace || s) && r !== "update" && l === -1)
|
|
69076
69146
|
n.undoService.begin(), n.undoService.add(new NodeStyleUndoUnit(this._hoEditorFactoryID, o.startPath, o.endPath, new Operate("reviewDelete", "string"))), n.undoService.commit();
|
|
69077
69147
|
else {
|
|
69078
69148
|
n.undoService.begin();
|
|
69079
|
-
const
|
|
69080
|
-
return n.undoService.add(
|
|
69149
|
+
const c = new NodesDeleteUndoUnit(this._hoEditorFactoryID, o.startPath, o.endPath, r === "update");
|
|
69150
|
+
return n.undoService.add(c), n.undoService.commit(), c.isError;
|
|
69081
69151
|
}
|
|
69082
69152
|
}
|
|
69083
69153
|
//插入节点到指定位置
|
|
@@ -69153,14 +69223,14 @@ class DocController {
|
|
|
69153
69223
|
const f = new TextStyle(this._hoEditorFactoryID);
|
|
69154
69224
|
f.copyProperty(u, f);
|
|
69155
69225
|
const p = o.drawTree.paintStatus;
|
|
69156
|
-
if (p === PaintState.psReview || p === PaintState.psTrace) {
|
|
69226
|
+
if (p === PaintState.psReview || p === PaintState.psTrace || o.enableChangeTracking) {
|
|
69157
69227
|
const w = new UserHistory(this._hoEditorFactoryID, HistoryEditType.hetCreate).userCompare();
|
|
69158
69228
|
f.creatorIndex = w, f.combineStyle.strikeout && (f.strikeout = !1, f.deleterIndex = -1);
|
|
69159
69229
|
} else
|
|
69160
69230
|
f.creatorIndex = -1;
|
|
69161
69231
|
d = o.docTree.styleCompare(f), o.docTree.curStyleIndex = d, f.combineStyle.size = 24, f.size = 24;
|
|
69162
69232
|
let g = c.parentNode;
|
|
69163
|
-
if (g instanceof TextInputFieldNode && g.childNodes.indexOf(c) === 0 && p !== PaintState.psReview && (d = c.styleIndex, o.docTree.curStyleIndex = d), g && g instanceof TextInputFieldNode && c == g.last() && (g = g.parentNode), (p === PaintState.psReview || p === PaintState.psTrace) && u.strikeout) {
|
|
69233
|
+
if (g instanceof TextInputFieldNode && g.childNodes.indexOf(c) === 0 && p !== PaintState.psReview && (d = c.styleIndex, o.docTree.curStyleIndex = d), g && g instanceof TextInputFieldNode && c == g.last() && (g = g.parentNode), (p === PaintState.psReview || p === PaintState.psTrace || o.enableChangeTracking) && u.strikeout) {
|
|
69164
69234
|
const y = new TextStyle(this._hoEditorFactoryID);
|
|
69165
69235
|
y.copyProperty(u, y), y.strikeout = !1, y.deleterIndex = -1;
|
|
69166
69236
|
const v = new UserHistory(this._hoEditorFactoryID, HistoryEditType.hetCreate).userCompare();
|
|
@@ -69326,7 +69396,7 @@ class DocController {
|
|
|
69326
69396
|
});
|
|
69327
69397
|
else {
|
|
69328
69398
|
if (l = a.docTree.findNodePositionByPath(w).node, D[0] == 0 && l instanceof TextNode && c >= 0 && l.styleIndex == a.docTree.curStyleIndex)
|
|
69329
|
-
if (C !== PaintState.psReview && C !== PaintState.psTrace || (C === PaintState.psReview || C === PaintState.psTrace) && !s.combineStyle.strikeout)
|
|
69399
|
+
if (C !== PaintState.psReview && C !== PaintState.psTrace || (C === PaintState.psReview || C === PaintState.psTrace || a.enableChangeTracking) && !s.combineStyle.strikeout)
|
|
69330
69400
|
if (l.combination.length > 0) {
|
|
69331
69401
|
const A = new TextNode(this._hoEditorFactoryID, o, n, NodeType$1.ntText, k, a.docTree.curStyleIndex);
|
|
69332
69402
|
w = this.insertNodeByPath(w, A, p, !!(v && E >= 1));
|
|
@@ -69432,14 +69502,14 @@ class DocController {
|
|
|
69432
69502
|
let p = n.docTree.styles[u];
|
|
69433
69503
|
p.combineStyle.font == "himalaya" && (u = p.changeStyleString("fontFormat", /* @__PURE__ */ i18nHelper("04-001-009-EMR.3.3.548", null, "宋体")), p = n.docTree.styles[u]);
|
|
69434
69504
|
const g = new TextStyle(this._hoEditorFactoryID);
|
|
69435
|
-
if (g.copyProperty(p, g), n.drawTree.paintStatus === PaintState.psReview || n.drawTree.paintStatus === PaintState.psTrace) {
|
|
69505
|
+
if (g.copyProperty(p, g), n.drawTree.paintStatus === PaintState.psReview || n.drawTree.paintStatus === PaintState.psTrace || n.enableChangeTracking) {
|
|
69436
69506
|
const _ = new UserHistory(this._hoEditorFactoryID, HistoryEditType.hetCreate).userCompare();
|
|
69437
69507
|
g.creatorIndex = _, g.combineStyle.strikeout && (g.strikeout = !1, g.deleterIndex = -1);
|
|
69438
69508
|
} else
|
|
69439
69509
|
g.creatorIndex = -1;
|
|
69440
69510
|
u = n.docTree.styleCompare(g), n.docTree.curStyleIndex = u;
|
|
69441
69511
|
let m = d.parentNode;
|
|
69442
|
-
if (m instanceof TextInputFieldNode && m.childNodes.indexOf(d) === 0 && n.drawTree.paintStatus !== PaintState.psReview && (u = d.styleIndex, n.docTree.curStyleIndex = u), c.roots, m && m instanceof TextInputFieldNode && d == m.last() && (m.getParentNodes(), m = m.parentNode), (n.drawTree.paintStatus === PaintState.psReview || n.drawTree.paintStatus === PaintState.psTrace) && p.strikeout) {
|
|
69512
|
+
if (m instanceof TextInputFieldNode && m.childNodes.indexOf(d) === 0 && n.drawTree.paintStatus !== PaintState.psReview && (u = d.styleIndex, n.docTree.curStyleIndex = u), c.roots, m && m instanceof TextInputFieldNode && d == m.last() && (m.getParentNodes(), m = m.parentNode), (n.drawTree.paintStatus === PaintState.psReview || n.drawTree.paintStatus === PaintState.psTrace || n.enableChangeTracking) && p.strikeout) {
|
|
69443
69513
|
const C = new TextStyle(this._hoEditorFactoryID);
|
|
69444
69514
|
C.copyProperty(p, C), C.strikeout = !1, C.deleterIndex = -1;
|
|
69445
69515
|
const D = new UserHistory(this._hoEditorFactoryID, HistoryEditType.hetCreate).userCompare();
|
|
@@ -69492,7 +69562,8 @@ class DocController {
|
|
|
69492
69562
|
directionKey(a) {
|
|
69493
69563
|
const t = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), r = t.docTree.curDomRange.normalize();
|
|
69494
69564
|
t.docTree.curDomRange.clone();
|
|
69495
|
-
|
|
69565
|
+
let o = r.startPath;
|
|
69566
|
+
const n = r.endPath;
|
|
69496
69567
|
let s = r;
|
|
69497
69568
|
if (!r.isEmpty)
|
|
69498
69569
|
a === "left" || a === "up" ? s = new DomRange(this._hoEditorFactoryID, o, o) : s = new DomRange(this._hoEditorFactoryID, n, n);
|
|
@@ -71542,23 +71613,24 @@ class DocController {
|
|
|
71542
71613
|
* @param customProperty 自定义参数
|
|
71543
71614
|
*/
|
|
71544
71615
|
updateSignNode(a, t, r, o, n, s, l, c, d, u, f, p) {
|
|
71616
|
+
var w;
|
|
71545
71617
|
const g = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
71546
|
-
if ((a.otherProperties || {}).validatePriorSignatures && g.vueController.getPreDoctorSign(a, 2).length) {
|
|
71618
|
+
if (((w = (a.otherProperties || {}).validatePriorSignatures) == null ? void 0 : w.toString()) === "true" && g.vueController.getPreDoctorSign(a, 2).length) {
|
|
71547
71619
|
message.warn("请先完成前面的签名!");
|
|
71548
71620
|
return;
|
|
71549
71621
|
}
|
|
71550
71622
|
let y = g.docTree.getNodeLastPath(a.previousLeaf());
|
|
71551
71623
|
if (a.imgSrc === "") {
|
|
71552
|
-
const
|
|
71553
|
-
|
|
71624
|
+
const v = g.docTree.getNodeLastPath(a), C = new NodeChangeEvent(this._hoEditorFactoryID, DocAction.daModifyStyle, y, v);
|
|
71625
|
+
C.oldEndPath = v, C.afterChangePath = v, C.oldDrawLines = new SelectRange(this._hoEditorFactoryID).getRangeDrawLines(y, v, !0, !0), a.type = t, a.name = r, a.number = 1, a.signor = o, a.signTime = n, a.customProperty = d, a.imgWidth = l, a.imgHeight = c, a.fingerPrintSrc = u || "", a.fingerPosition = f || 0, a.otherProperties = p || a.otherProperties, a.imgSrc = s, g.docTree.change(C), g.useSignLockTable && g.vueController.updateTableSignLocked(a);
|
|
71554
71626
|
} else {
|
|
71555
71627
|
if (a.connectMode === /* @__PURE__ */ i18nHelper("04-001-009-EMR.3.3.119", null, "换行")) {
|
|
71556
71628
|
y = g.docTree.getNodeLastPath(a);
|
|
71557
|
-
const
|
|
71558
|
-
g.undoService.begin(), g.undoService.add(new NodeInsertUndoUnit(this._hoEditorFactoryID, y,
|
|
71629
|
+
const _ = g.drawTree.getDrawLineByDNode(a.drawNodes[0]).paragraphNode, D = new ParagraphNode(this._hoEditorFactoryID, a.rootNodes, a.parentNode, _.paraNo);
|
|
71630
|
+
g.undoService.begin(), g.undoService.add(new NodeInsertUndoUnit(this._hoEditorFactoryID, y, D)), g.undoService.commit(), y = D.getNodePath();
|
|
71559
71631
|
} else
|
|
71560
71632
|
a.isFront || (y = g.docTree.getNodeLastPath(a));
|
|
71561
|
-
const
|
|
71633
|
+
const v = new SignNode(
|
|
71562
71634
|
this._hoEditorFactoryID,
|
|
71563
71635
|
a.rootNodes,
|
|
71564
71636
|
a.parentNode,
|
|
@@ -71590,20 +71662,21 @@ class DocController {
|
|
|
71590
71662
|
a.isTemplate
|
|
71591
71663
|
// 更新签名时带上第一次签名的isTemplate属性 后续只用来判断是否为模板 不涉及绘制处理
|
|
71592
71664
|
);
|
|
71593
|
-
g.undoService.begin(), g.undoService.add(new NodeInsertUndoUnit(this._hoEditorFactoryID, y,
|
|
71665
|
+
g.undoService.begin(), g.undoService.add(new NodeInsertUndoUnit(this._hoEditorFactoryID, y, v)), g.undoService.commit(), g.useSignLockTable && g.vueController.updateTableSignLocked(v);
|
|
71594
71666
|
}
|
|
71595
71667
|
this.drawMask(a);
|
|
71596
71668
|
}
|
|
71597
71669
|
drawMask(a) {
|
|
71670
|
+
var o;
|
|
71598
71671
|
const t = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
71599
|
-
if ((a.otherProperties || {}).lockContentBeforeSign)
|
|
71672
|
+
if (((o = (a.otherProperties || {}).lockContentBeforeSign) == null ? void 0 : o.toString()) === "true")
|
|
71600
71673
|
t.vueController.paintLockMask();
|
|
71601
71674
|
else if (!t.isLockContentBeforeSign && t.forbidEditBeforeSign)
|
|
71602
71675
|
if (t.structureConvert._superiorSign.length === 0)
|
|
71603
71676
|
t.structureConvert._superiorSign[0] = a, t.vueController.hiddenMask(!1);
|
|
71604
71677
|
else {
|
|
71605
|
-
const
|
|
71606
|
-
NodePosition.treePathCompare(
|
|
71678
|
+
const s = t.structureConvert._superiorSign[0].getNodePath(), l = a.getNodePath();
|
|
71679
|
+
NodePosition.treePathCompare(s, l) <= 0 ? (t.structureConvert._superiorSign[0] = a, t.vueController.hiddenMask(!1)) : (t.vueController.hiddenMask(!1), t.drawTree.selectRange.clearAllSelectShape());
|
|
71607
71680
|
}
|
|
71608
71681
|
}
|
|
71609
71682
|
/**
|
|
@@ -71851,9 +71924,13 @@ class HOEditorFactory {
|
|
|
71851
71924
|
b(this, "errorImgurl", []);
|
|
71852
71925
|
// 错误图片地址
|
|
71853
71926
|
b(this, "historyPosition", HistoryComponentPosition.right);
|
|
71927
|
+
// 历史痕迹展示位置 默认右侧 单行工具栏启用时候需要调整位置避免被业务弹窗挡住
|
|
71928
|
+
b(this, "enableChangeTracking", !1);
|
|
71929
|
+
b(this, "compressXml", !1);
|
|
71930
|
+
// 压缩xml
|
|
71931
|
+
b(this, "compressJSONData", {});
|
|
71854
71932
|
this._hoEditorFactoryId = t;
|
|
71855
71933
|
}
|
|
71856
|
-
// 历史痕迹展示位置 默认右侧 单行工具栏启用时候需要调整位置避免被业务弹窗挡住
|
|
71857
71934
|
/**
|
|
71858
71935
|
* Getter hoLocalStorage
|
|
71859
71936
|
* @return {HoLocalStorage}
|