hoeditor-web 3.2.27 → 3.2.28
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-CkGezwsU.mjs";
|
|
3
3
|
export {
|
|
4
4
|
i as HoDocs,
|
|
5
5
|
r as HoEditorProvide,
|
|
@@ -10072,31 +10072,32 @@ class DrawTableFormularChart extends DrawCombineNode {
|
|
|
10072
10072
|
this.dNode = n, this.hoEditfactoryId = r, n.formularType == FormularType$1.ftCurveChart && (this.dWidth = Number((s = n.formularProperty) == null ? void 0 : s.width) || 100, this.formularProperty = n.formularProperty, this.drawCurveChart());
|
|
10073
10073
|
}
|
|
10074
10074
|
getCell(r, o) {
|
|
10075
|
-
var
|
|
10075
|
+
var p, m, g;
|
|
10076
10076
|
const [n, s] = this.dNode.getRowColByCellAdress(o[0]), [l, c] = this.dNode.getRowColByCellAdress(o[1]);
|
|
10077
|
-
let d = !1;
|
|
10078
|
-
const
|
|
10077
|
+
let d = !1, u = !1;
|
|
10078
|
+
const f = [];
|
|
10079
10079
|
if (this.formularProperty) {
|
|
10080
|
-
let
|
|
10080
|
+
let y = [];
|
|
10081
10081
|
if (n >= 0 && s >= 0 && l >= 0 && c >= 0 && (n === l || s === c))
|
|
10082
|
-
for (let
|
|
10083
|
-
for (let
|
|
10084
|
-
const
|
|
10085
|
-
if (
|
|
10086
|
-
d =
|
|
10087
|
-
let
|
|
10088
|
-
d || (
|
|
10082
|
+
for (let w = n; w <= l; w++)
|
|
10083
|
+
for (let v = s; v <= c; v++) {
|
|
10084
|
+
const C = r.rows[w][v];
|
|
10085
|
+
if (C) {
|
|
10086
|
+
d = C.cellProperty.notAllowEdit || !1, u = C.cellProperty.isDisabled || !1;
|
|
10087
|
+
let _ = C.getCellText();
|
|
10088
|
+
d || u || (_ = _.replace(/\+|-/g, ""), _ && (_ > this.formularProperty.max ? (_ = "", (p = C.drawCell.drawPageCells[0]) == null || p.paintBackColor(!0), y.push(`【${w}行 ${v} 列】`)) : _ < this.formularProperty.min ? (_ = "", y.push(`【${w}行 ${v} 列】`), (m = C.drawCell.drawPageCells[0]) == null || m.paintBackColor(!0)) : (g = C.drawCell.drawPageCells[0]) == null || g.paintBackColor(!1))), f.push(_);
|
|
10089
10089
|
}
|
|
10090
10090
|
}
|
|
10091
|
-
|
|
10091
|
+
y.length > 0 && (message.destroy(), message.error(`以下单元格的值超出曲线图设置的范围【${this.formularProperty.min}~${this.formularProperty.max}】:${y.join("、")}`));
|
|
10092
10092
|
}
|
|
10093
10093
|
return {
|
|
10094
|
+
isDisabled: u,
|
|
10094
10095
|
notAllowEdit: d,
|
|
10095
10096
|
startRow: n,
|
|
10096
10097
|
startCol: s,
|
|
10097
10098
|
endRow: l,
|
|
10098
10099
|
endCol: c,
|
|
10099
|
-
list:
|
|
10100
|
+
list: f
|
|
10100
10101
|
};
|
|
10101
10102
|
}
|
|
10102
10103
|
drawCurveChart() {
|
|
@@ -14897,7 +14898,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
14897
14898
|
}
|
|
14898
14899
|
}
|
|
14899
14900
|
}
|
|
14900
|
-
const version = "3.2.
|
|
14901
|
+
const version = "3.2.28";
|
|
14901
14902
|
var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
|
|
14902
14903
|
class SignNode extends BaseNode {
|
|
14903
14904
|
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) {
|
|
@@ -17204,7 +17205,8 @@ class CellNode extends RectNode {
|
|
|
17204
17205
|
diagonalType: this.cellProperty.diagonalType,
|
|
17205
17206
|
formula: this.cellProperty.formula,
|
|
17206
17207
|
isSignLock: this.cellProperty.isSignLock,
|
|
17207
|
-
notAllowEdit: this.cellProperty.notAllowEdit
|
|
17208
|
+
notAllowEdit: this.cellProperty.notAllowEdit,
|
|
17209
|
+
isDisabled: this.cellProperty.isDisabled
|
|
17208
17210
|
}, u = JSON.parse(JSON.stringify(d)), f = Object.keys(s);
|
|
17209
17211
|
for (let v = 0; v < f.length; v++)
|
|
17210
17212
|
f[v] === "customProperties" ? this.cellProperty.customProperties ? this.cellProperty.customProperties.length === 0 && delete u.customProperties : delete u.customProperties : f[v] === "cellInnerMargin" ? u.cellInnerMargin === "0,0,0.1,0.1" && delete u.cellInnerMargin : f[v] === "gridLinesColor" ? u.gridLinesColor === "#000000,#000000,#000000,#000000" && delete u.gridLinesColor : f[v] === "gridLineDisplay" ? u.gridLineDisplay === "true,true,true,true" && delete u.gridLineDisplay : f[v] === "backColor" ? u.backColor.toString().toLowerCase() === s.backColor.toString().toLowerCase() && delete u.backColor : u[f[v]] === s[f[v]] && delete u[f[v]];
|
|
@@ -19285,7 +19287,7 @@ class ColProperty {
|
|
|
19285
19287
|
}
|
|
19286
19288
|
var GridLinesStyle = /* @__PURE__ */ ((a) => (a[a.solid = 0] = "solid", a[a.dash = 1] = "dash", a[a.dashdot = 2] = "dashdot", a[a.dashdotdo = 3] = "dashdotdo", a[a.dot = 4] = "dot", a))(GridLinesStyle || {}), ObliqueSplitLine = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.TopLeftOneLine = 1] = "TopLeftOneLine", a[a.TopLeftTwoLine = 2] = "TopLeftTwoLine", a[a.TopRightOneLine = 3] = "TopRightOneLine", a[a.TopRightTwoLine = 4] = "TopRightTwoLine", a[a.BottomLeftOneLine = 5] = "BottomLeftOneLine", a[a.BottomLeftTwoLine = 6] = "BottomLeftTwoLine", a[a.BottomRightOneLine = 7] = "BottomRightOneLine", a[a.BottomRightTwoLine = 8] = "BottomRightTwoLine", a[a.TwoDiagonal = 9] = "TwoDiagonal", a))(ObliqueSplitLine || {}), DiagonalType = /* @__PURE__ */ ((a) => (a[a.None = 0] = "None", a[a.Left = 1] = "Left", a[a.Right = 2] = "Right", a))(DiagonalType || {});
|
|
19287
19289
|
class CellProperty {
|
|
19288
|
-
|
|
19290
|
+
//是否禁用
|
|
19289
19291
|
constructor(objectValues) {
|
|
19290
19292
|
//private _lightCellBorders = false;//突出显示单元格边框
|
|
19291
19293
|
b(this, "_customProperties", []);
|
|
@@ -19323,6 +19325,8 @@ class CellProperty {
|
|
|
19323
19325
|
b(this, "signed", /* @__PURE__ */ new Map());
|
|
19324
19326
|
//是否已签名 运行时属性
|
|
19325
19327
|
b(this, "notAllowEdit", !1);
|
|
19328
|
+
//是否禁止编辑
|
|
19329
|
+
b(this, "isDisabled", !1);
|
|
19326
19330
|
if (objectValues !== "") {
|
|
19327
19331
|
const valuesObj = eval("(" + objectValues + ")"), assignvalue = (target, source) => {
|
|
19328
19332
|
Object.keys(source).forEach((value) => {
|
|
@@ -38106,73 +38110,75 @@ const scaleXY = DrawConfig.instance().scale, defaultWidth = Math.floor(793 * sca
|
|
|
38106
38110
|
* 鼠标click事件
|
|
38107
38111
|
*/
|
|
38108
38112
|
mouseClickEvent(a) {
|
|
38109
|
-
var
|
|
38113
|
+
var l, c, d;
|
|
38110
38114
|
const t = HOEditorFactorys.instance().getFactory(this.hoEditorId);
|
|
38111
38115
|
if (!a.clickType || a.clickType === "move") return !1;
|
|
38112
38116
|
const r = document.querySelector("#ho_paragrapgh_tip");
|
|
38113
|
-
r && ((
|
|
38117
|
+
r && ((l = r.parentNode) == null || l.removeChild(r));
|
|
38114
38118
|
const o = a.node, n = t.drawTree.paintStatus;
|
|
38115
|
-
if (this.selectMarkStyle.display = "none", this.poperClose(),
|
|
38116
|
-
|
|
38117
|
-
|
|
38118
|
-
|
|
38119
|
-
|
|
38120
|
-
|
|
38121
|
-
|
|
38122
|
-
|
|
38123
|
-
|
|
38124
|
-
|
|
38125
|
-
|
|
38126
|
-
|
|
38127
|
-
|
|
38128
|
-
|
|
38129
|
-
|
|
38130
|
-
|
|
38131
|
-
|
|
38132
|
-
|
|
38133
|
-
|
|
38134
|
-
|
|
38135
|
-
|
|
38136
|
-
|
|
38137
|
-
|
|
38138
|
-
|
|
38139
|
-
|
|
38140
|
-
|
|
38141
|
-
|
|
38142
|
-
|
|
38143
|
-
|
|
38144
|
-
|
|
38145
|
-
|
|
38146
|
-
|
|
38147
|
-
|
|
38148
|
-
|
|
38149
|
-
|
|
38150
|
-
|
|
38151
|
-
|
|
38152
|
-
|
|
38153
|
-
|
|
38154
|
-
|
|
38155
|
-
|
|
38156
|
-
|
|
38157
|
-
|
|
38158
|
-
|
|
38159
|
-
|
|
38160
|
-
|
|
38161
|
-
|
|
38162
|
-
|
|
38163
|
-
|
|
38164
|
-
|
|
38165
|
-
|
|
38166
|
-
|
|
38167
|
-
|
|
38168
|
-
|
|
38169
|
-
|
|
38170
|
-
|
|
38119
|
+
if (this.selectMarkStyle.display = "none", this.poperClose(), (n == PaintState.psEdit || n == PaintState.psTrace) && this.isCanEdit())
|
|
38120
|
+
return;
|
|
38121
|
+
if (((d = (c = o == null ? void 0 : o._parentNode) == null ? void 0 : c.cellProperty) == null ? void 0 : d.isDisabled) || !1)
|
|
38122
|
+
return this.$message.error("当前单元格已禁止编辑!"), !0;
|
|
38123
|
+
if (o && o !== null) {
|
|
38124
|
+
const u = a.pageIndex;
|
|
38125
|
+
if (a.clickType === "dblclick")
|
|
38126
|
+
o instanceof BaseNode && setTimeout(() => {
|
|
38127
|
+
this.dblclickModal(o, "dblclick", u);
|
|
38128
|
+
}, 150);
|
|
38129
|
+
else if (a.clickType === "leftclick" && o instanceof BaseNode) {
|
|
38130
|
+
if (this.selectMarkStyle = { display: "none" }, n === PaintState.psReadOnly)
|
|
38131
|
+
return !1;
|
|
38132
|
+
this.textStyles.changeCount++, this.$emit("setFontStyles", {});
|
|
38133
|
+
const f = t.vueController.getDomRange(), [p, m] = f.inSameTable();
|
|
38134
|
+
if (this.nextCellButton = !1, p && (n == PaintState.psDesign || n == PaintState.psEdit || n == PaintState.psTrace) ? (this.cellButton || this.createAddCellButton(o, u), this.createAddNextCellButton(o, u)) : this.cellButton = !1, (n == PaintState.psEdit || n == PaintState.psTrace) && (o.nodeType == 18 ? this.$emit("leftclick", {
|
|
38135
|
+
name: o.name,
|
|
38136
|
+
linkId: o.fileId,
|
|
38137
|
+
nodeType: o.nodeType,
|
|
38138
|
+
type: "link"
|
|
38139
|
+
}) : (o instanceof TextNode || o instanceof MarkNode && o.MarkNodeType !== 2) && o.parentNode && o.parentNode instanceof TextInputFieldNode && (this.$emit("leftclick", {
|
|
38140
|
+
name: o.parentNode.name,
|
|
38141
|
+
nodeType: o.parentNode.nodeType,
|
|
38142
|
+
type: "TextInputFieldNode"
|
|
38143
|
+
}), this.$nextTick(() => {
|
|
38144
|
+
this.createSelectMark(o, t.drawTree.paintStatus, u);
|
|
38145
|
+
}))), n == PaintState.psEdit && t.emitClickEvent) {
|
|
38146
|
+
const g = o.parentNode;
|
|
38147
|
+
if (g && g instanceof TextInputFieldNode && g.canModifyContent) {
|
|
38148
|
+
let y = `${g.id}-${g.name}-${g.dataId}-${g.innerIdentifier}`;
|
|
38149
|
+
this.currentElement != y && (this.currentElement = y, this.$emit("clickEvents", {
|
|
38150
|
+
id: g.id,
|
|
38151
|
+
name: g.name,
|
|
38152
|
+
dataId: g.dataId,
|
|
38153
|
+
innerIdentifier: g.innerIdentifier,
|
|
38154
|
+
pageIndex: u,
|
|
38155
|
+
x: t.drawTree.caret.X,
|
|
38156
|
+
y: t.drawTree.caret.Y,
|
|
38157
|
+
height: t.drawTree.caret.height,
|
|
38158
|
+
caretId: "ho_caret",
|
|
38159
|
+
parentName: "edit-container",
|
|
38160
|
+
isInElement: !0
|
|
38161
|
+
}));
|
|
38162
|
+
} else {
|
|
38163
|
+
let y = "";
|
|
38164
|
+
this.currentElement != y && (this.currentElement = y, this.$emit("clickEvents", {
|
|
38165
|
+
id: "",
|
|
38166
|
+
name: "",
|
|
38167
|
+
dataId: "",
|
|
38168
|
+
innerIdentifier: "",
|
|
38169
|
+
pageIndex: u,
|
|
38170
|
+
x: t.drawTree.caret.X,
|
|
38171
|
+
y: t.drawTree.caret.Y,
|
|
38172
|
+
height: t.drawTree.caret.height,
|
|
38173
|
+
caretId: "ho_caret",
|
|
38174
|
+
parentName: "edit-container",
|
|
38175
|
+
isInElement: !1
|
|
38176
|
+
}));
|
|
38171
38177
|
}
|
|
38172
|
-
}
|
|
38173
|
-
}
|
|
38174
|
-
return !0;
|
|
38178
|
+
}
|
|
38179
|
+
} else a.clickType;
|
|
38175
38180
|
}
|
|
38181
|
+
return !0;
|
|
38176
38182
|
},
|
|
38177
38183
|
getCurrentSelectNode() {
|
|
38178
38184
|
var o;
|
|
@@ -38334,7 +38340,7 @@ const scaleXY = DrawConfig.instance().scale, defaultWidth = Math.floor(793 * sca
|
|
|
38334
38340
|
const s = (p) => {
|
|
38335
38341
|
this.computedPoperPosition(a, o), Array.isArray(p) && p.length > 0 ? this.poperSelectList = Object.freeze(p) : this.poperSelectList = n.filter((m) => m.value || m.text), this.poperType = "selectPoper";
|
|
38336
38342
|
};
|
|
38337
|
-
t.customProperty && t.customProperty.hasThirdData == !0 ? this.$emit("dblNodeClick", { setActiveDoc: this.setActiveDocIndex, node: this.getCurrentSelectNode, type: "textlist", callback: s, paintStatus: r }) : s(void 0);
|
|
38343
|
+
t.customProperty && t.customProperty.hasThirdData == !0 ? this.$emit("dblNodeClick", { setActiveDoc: this.setActiveDocIndex, node: this.getCurrentSelectNode, type: "textlist", callback: s, paintStatus: r }) : (this.$emit("dblNodeClick", { setActiveDoc: this.setActiveDocIndex, node: this.getCurrentSelectNode, type: "edit_text_list", paintStatus: r }), s(void 0));
|
|
38338
38344
|
},
|
|
38339
38345
|
createAddCellButton(a, t) {
|
|
38340
38346
|
let r = null;
|
|
@@ -49268,6 +49274,9 @@ class VueController {
|
|
|
49268
49274
|
const l = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), c = l.docTree.curDomRange, d = c.normalize().startPath, u = c.normalize().endPath, f = new NodeChangingEvent(DocAction.daInsert, d, u, OperType.openXml);
|
|
49269
49275
|
l.openXmled = !0, l.docTree.changing(f) && (await l.docController.initBlankDoc(), l.drawTree.inViewPages = [0], t || (t = this.emptyXml), t && t.includes("<?xml version") ? await l.structureConvert.openXml(t, r, o, s) : t && await l.structureConvert.openXml(Base64.decode(t), r, o, s));
|
|
49270
49276
|
}
|
|
49277
|
+
useFixedOpenXml(t) {
|
|
49278
|
+
this.setHoEditorFactoryParams({ useFixTableMerge: !0 }, void 0), this.openXml(t);
|
|
49279
|
+
}
|
|
49271
49280
|
getSubDocImg(t, r) {
|
|
49272
49281
|
const o = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID);
|
|
49273
49282
|
let n = o.subDocManger.getSubDocCopyDrawArea(t, r);
|
|
@@ -52921,6 +52930,8 @@ class EditController {
|
|
|
52921
52930
|
message.destroy();
|
|
52922
52931
|
const d = t.docTree.getFinalParentNode(n.startPath);
|
|
52923
52932
|
if (d && d instanceof CellNode) {
|
|
52933
|
+
if (d.cellProperty.isDisabled)
|
|
52934
|
+
return message.error("当前单元格已禁止编辑!"), !1;
|
|
52924
52935
|
if (d.cellProperty.notAllowEdit)
|
|
52925
52936
|
return message.error("当前单元格已设置不允许编辑!"), !1;
|
|
52926
52937
|
if (d.table.tableProperty.isSignLock) {
|
|
@@ -64161,7 +64172,7 @@ WebPDecoder.prototype.getData = function() {
|
|
|
64161
64172
|
(function(a) {
|
|
64162
64173
|
function t() {
|
|
64163
64174
|
return function() {
|
|
64164
|
-
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-
|
|
64175
|
+
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-DJ05PGDj.mjs");
|
|
64165
64176
|
}().catch(function(r) {
|
|
64166
64177
|
return Promise.reject(new Error("Could not load canvg: " + r));
|
|
64167
64178
|
}).then(function(r) {
|
|
@@ -85578,7 +85589,7 @@ var _sfc_render$3 = function a() {
|
|
|
85578
85589
|
var t = this, r = t._self._c;
|
|
85579
85590
|
return t._self._setupProxy, r("div", { ref: "hoEmrToolBarBox", staticClass: "ho-emr-toolbar-box ho-toolbar-box" }, [r("div", { ref: "hoEmrToolLeft", staticClass: "ho-emr-tool-left" }, [t._t("HoToolLeft")], 2), r("div", { staticClass: "ho-emr-tool-list ho-emr-tool-center" }, [t._l(t.toolList, function(o, n) {
|
|
85580
85591
|
return [r("HoToolItem", { key: n, attrs: { tool: o, fontInfo: t.fontInfo, vueController: t.vueController } })];
|
|
85581
|
-
}), r("div", { staticClass: "ho-emr-tool-item" }, [r("a-dropdown", { ref: "hoEmrToolMore", attrs: { trigger: ["hover"], overlayClassName: "ho-emr-tool-more-dropdown", placement: "
|
|
85592
|
+
}), r("div", { staticClass: "ho-emr-tool-item" }, [r("a-dropdown", { ref: "hoEmrToolMore", attrs: { trigger: ["hover"], overlayClassName: "ho-emr-tool-more-dropdown", placement: "bottomCenter", arrow: "" }, model: { value: t.moreVisible, callback: function(o) {
|
|
85582
85593
|
t.moreVisible = o;
|
|
85583
85594
|
}, expression: "moreVisible" } }, [r("a", { staticClass: "ant-dropdown-link", on: { click: (o) => o.preventDefault() } }, [r("a-icon", { attrs: { type: "ellipsis" } })], 1), r("div", { staticClass: "ho-emr-tool-more", attrs: { slot: "overlay" }, slot: "overlay" }, [r("div", { staticClass: "ho-emr-tool-list", on: { click: t.hoEmrToolMoreItemClick } }, [t._l(t.moreList, function(o) {
|
|
85584
85595
|
return [r("HoToolItem", { key: o.name, attrs: { tool: o, fontInfo: t.fontInfo, vueController: t.vueController } })];
|