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-
|
|
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
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
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:
|
|
12661
|
+
left: n.x
|
|
12661
12662
|
};
|
|
12662
|
-
_ === "col" && (M.width = 4, M.height = this._dHeight, M.top = y, M.left =
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
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.
|
|
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
|
|
39451
|
-
let
|
|
39452
|
-
|
|
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
|
|
39460
|
-
|
|
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
|
|
39467
|
-
let
|
|
39468
|
-
if (
|
|
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
|
|
39473
|
-
c.drawTree.drawPages.splice(
|
|
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
|
|
39478
|
-
c.drawTree.drawPages.splice(
|
|
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
|
-
|
|
39482
|
-
|
|
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
|
|
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.
|
|
51300
|
-
|
|
51301
|
-
|
|
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
|
|
53165
|
+
var d, u, f, p;
|
|
53151
53166
|
if (!t) return;
|
|
53152
|
-
const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), o = (
|
|
53153
|
-
if (!
|
|
53154
|
-
let
|
|
53155
|
-
for (;
|
|
53156
|
-
if (
|
|
53157
|
-
return { isTable: !0, tableNode:
|
|
53158
|
-
|
|
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 && ((
|
|
53162
|
-
|
|
53163
|
-
|
|
53164
|
-
|
|
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-
|
|
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) {
|