hoeditor-web 3.3.5-beta.1 → 3.3.5-beta.2
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-CK9irHre.mjs";
|
|
3
3
|
export {
|
|
4
4
|
i as HoDocs,
|
|
5
5
|
r as HoEditorProvide,
|
|
@@ -15216,7 +15216,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
15216
15216
|
}
|
|
15217
15217
|
}
|
|
15218
15218
|
}
|
|
15219
|
-
const version = "3.3.5-beta.
|
|
15219
|
+
const version = "3.3.5-beta.2";
|
|
15220
15220
|
var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
|
|
15221
15221
|
class SignNode extends BaseNode {
|
|
15222
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) {
|
|
@@ -51366,46 +51366,58 @@ class VueController {
|
|
|
51366
51366
|
return n = this.getSelectRanges(s, r, l), n;
|
|
51367
51367
|
}
|
|
51368
51368
|
searchText(t) {
|
|
51369
|
-
|
|
51370
|
-
|
|
51371
|
-
|
|
51372
|
-
|
|
51373
|
-
|
|
51374
|
-
|
|
51375
|
-
|
|
51376
|
-
|
|
51369
|
+
try {
|
|
51370
|
+
const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), s = r.docTree.curDomRange.normalize().npStart.node;
|
|
51371
|
+
let l = s;
|
|
51372
|
+
s && (l = s.rootNodes[0]);
|
|
51373
|
+
const c = r.docTree.findNodes(l, t, 0, !1);
|
|
51374
|
+
let d = [];
|
|
51375
|
+
for (const u of c.obj2.values()) {
|
|
51376
|
+
const f = this.getSelectRanges2(u, t, c.obj1);
|
|
51377
|
+
f && d.push(f);
|
|
51378
|
+
}
|
|
51379
|
+
return d;
|
|
51380
|
+
} catch {
|
|
51381
|
+
return [];
|
|
51382
|
+
}
|
|
51377
51383
|
}
|
|
51378
51384
|
getSelectRanges2(t, r, o) {
|
|
51379
51385
|
const n = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), s = t.split("|")[0], l = t.split("|")[1], c = parseInt(t.split("|")[2]);
|
|
51380
51386
|
let d = -1, u = -1;
|
|
51381
|
-
for (const
|
|
51382
|
-
const
|
|
51383
|
-
|
|
51387
|
+
for (const v of o.keys()) {
|
|
51388
|
+
const C = parseInt(v.split("|")[2]);
|
|
51389
|
+
v.split("|")[0] === s && v.split("|")[1] === l && (c >= C && C > d && (d = C), c + r.length >= C && C > u && (u = C));
|
|
51384
51390
|
}
|
|
51385
51391
|
const f = o.get(s + "|" + l + "|" + d.toString()), p = o.get(s + "|" + l + "|" + u.toString()), m = n.docTree.findNodePositionByPath(f);
|
|
51386
51392
|
m && m.node && (m.node instanceof TextNode || m.node instanceof DateTimeNode || m.node instanceof DownListNode) && m.node.styleIndex;
|
|
51387
51393
|
let g = "", y = "";
|
|
51388
51394
|
if (c - d - 1 >= 0) {
|
|
51389
|
-
const
|
|
51390
|
-
|
|
51395
|
+
const v = f.split("/");
|
|
51396
|
+
v[v.length - 1] = (c - d - 1).toString(), g = v.join("/");
|
|
51391
51397
|
} else if (m && m.node) {
|
|
51392
|
-
const
|
|
51393
|
-
|
|
51398
|
+
const v = m.node.previousLeaf();
|
|
51399
|
+
v && (g = n.docTree.getNodeLastPath(v));
|
|
51394
51400
|
}
|
|
51395
51401
|
if (m && (m.node instanceof DateTimeNode || m.node instanceof DownListNode))
|
|
51396
51402
|
y = n.docTree.getNodeLastPath(m.node);
|
|
51397
51403
|
else if (c + r.length - u - 1 >= 0) {
|
|
51398
|
-
const
|
|
51399
|
-
|
|
51404
|
+
const v = p.split("/");
|
|
51405
|
+
v[v.length - 1] = (c + r.length - u - 1).toString(), y = v.join("/");
|
|
51400
51406
|
} else {
|
|
51401
|
-
const
|
|
51402
|
-
if (
|
|
51403
|
-
const
|
|
51404
|
-
|
|
51407
|
+
const v = n.docTree.findNodePositionByPath(p);
|
|
51408
|
+
if (v && v.node) {
|
|
51409
|
+
const C = v.node.previousLeaf();
|
|
51410
|
+
C && (y = n.docTree.getNodeLastPath(C));
|
|
51405
51411
|
}
|
|
51406
51412
|
}
|
|
51407
|
-
const w = new SelectRange(this.hoEditorFactoryID)
|
|
51408
|
-
|
|
51413
|
+
const w = new SelectRange(this.hoEditorFactoryID);
|
|
51414
|
+
try {
|
|
51415
|
+
const v = StagePosition.getStagePosByPath(this._hoEditorFactoryID, g), C = StagePosition.getStagePosByPath(this._hoEditorFactoryID, y);
|
|
51416
|
+
w.spStart = v, w.spEnd = C;
|
|
51417
|
+
} catch {
|
|
51418
|
+
return null;
|
|
51419
|
+
}
|
|
51420
|
+
return w;
|
|
51409
51421
|
}
|
|
51410
51422
|
getSelectRanges(t, r, o) {
|
|
51411
51423
|
const n = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), s = [], l = /* @__PURE__ */ new Map();
|
|
@@ -65158,7 +65170,7 @@ WebPDecoder.prototype.getData = function() {
|
|
|
65158
65170
|
(function(a) {
|
|
65159
65171
|
function t() {
|
|
65160
65172
|
return function() {
|
|
65161
|
-
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-
|
|
65173
|
+
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-Z_zuMJTf.mjs");
|
|
65162
65174
|
}().catch(function(r) {
|
|
65163
65175
|
return Promise.reject(new Error("Could not load canvg: " + r));
|
|
65164
65176
|
}).then(function(r) {
|