hoeditor-web 3.3.3-beta.10 → 3.3.3-beta.11
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-CxgS-8my.mjs";
|
|
3
3
|
export {
|
|
4
4
|
i as HoDocs,
|
|
5
5
|
r as HoEditorProvide,
|
|
@@ -15242,7 +15242,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
15242
15242
|
}
|
|
15243
15243
|
}
|
|
15244
15244
|
}
|
|
15245
|
-
const version = "3.3.3-beta.
|
|
15245
|
+
const version = "3.3.3-beta.11";
|
|
15246
15246
|
var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
|
|
15247
15247
|
class SignNode extends BaseNode {
|
|
15248
15248
|
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) {
|
|
@@ -47732,7 +47732,7 @@ class VueController {
|
|
|
47732
47732
|
}
|
|
47733
47733
|
/**
|
|
47734
47734
|
* 更新 Pop-Q评分
|
|
47735
|
-
* @param popQScoreRequest
|
|
47735
|
+
* @param popQScoreRequest
|
|
47736
47736
|
*/
|
|
47737
47737
|
updatePopQScore(t) {
|
|
47738
47738
|
const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), o = r.docTree.curDomRange, n = o.normalize().startPath, s = o.normalize().endPath, l = new NodeChangingEvent(DocAction.daInsert, n, s, OperType.updatePopQScore);
|
|
@@ -48097,19 +48097,7 @@ class VueController {
|
|
|
48097
48097
|
*/
|
|
48098
48098
|
insertQrcode(t, r, o, n, s, l, c, d, u, f) {
|
|
48099
48099
|
const p = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), m = p.docTree.curDomRange, g = m.normalize().startPath, y = m.normalize().endPath, w = new NodeChangingEvent(DocAction.daInsert, g, y, OperType.insertQrcode);
|
|
48100
|
-
p.docTree.changing(w) && p.docController.insertQrcode(
|
|
48101
|
-
"add",
|
|
48102
|
-
m,
|
|
48103
|
-
r,
|
|
48104
|
-
o,
|
|
48105
|
-
n,
|
|
48106
|
-
s,
|
|
48107
|
-
l,
|
|
48108
|
-
c,
|
|
48109
|
-
d,
|
|
48110
|
-
u,
|
|
48111
|
-
f
|
|
48112
|
-
);
|
|
48100
|
+
p.docTree.changing(w) && p.docController.insertQrcode("add", m, r, o, n, s, l, c, d, u, f);
|
|
48113
48101
|
}
|
|
48114
48102
|
/**
|
|
48115
48103
|
* 修改二维码
|
|
@@ -48129,19 +48117,7 @@ class VueController {
|
|
|
48129
48117
|
*/
|
|
48130
48118
|
updateQrcode(t, r, o, n, s, l, c, d, u) {
|
|
48131
48119
|
const f = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), p = f.docTree.curDomRange, m = p.normalize().startPath, g = p.normalize().endPath, y = new NodeChangingEvent(DocAction.daInsert, m, g, OperType.updateQrcode);
|
|
48132
|
-
f.docTree.changing(y) && HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docController.insertQrcode(
|
|
48133
|
-
"update",
|
|
48134
|
-
p,
|
|
48135
|
-
t,
|
|
48136
|
-
r,
|
|
48137
|
-
o,
|
|
48138
|
-
n,
|
|
48139
|
-
s,
|
|
48140
|
-
l,
|
|
48141
|
-
c,
|
|
48142
|
-
d,
|
|
48143
|
-
u
|
|
48144
|
-
);
|
|
48120
|
+
f.docTree.changing(y) && HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docController.insertQrcode("update", p, t, r, o, n, s, l, c, d, u);
|
|
48145
48121
|
}
|
|
48146
48122
|
/**
|
|
48147
48123
|
* 插入单、复选框控件
|
|
@@ -49112,10 +49088,28 @@ class VueController {
|
|
|
49112
49088
|
if (y.iszw) {
|
|
49113
49089
|
let w = u, v = f;
|
|
49114
49090
|
f.combineStyle.font != "himalaya" && (w = f.changeStyleString("fontFormat", "himalaya"), v = n.docTree.styles[w]);
|
|
49115
|
-
const C = n.docTree.styleCompare(v), _ = new TextNode(
|
|
49091
|
+
const C = n.docTree.styleCompare(v), _ = new TextNode(
|
|
49092
|
+
this._hoEditorFactoryID,
|
|
49093
|
+
c.roots,
|
|
49094
|
+
c.node.parentNode,
|
|
49095
|
+
NodeType$1.ntText,
|
|
49096
|
+
y.text,
|
|
49097
|
+
C,
|
|
49098
|
+
void 0,
|
|
49099
|
+
y.combination
|
|
49100
|
+
);
|
|
49116
49101
|
d.push(_);
|
|
49117
49102
|
} else {
|
|
49118
|
-
const w = new TextNode(
|
|
49103
|
+
const w = new TextNode(
|
|
49104
|
+
this._hoEditorFactoryID,
|
|
49105
|
+
c.roots,
|
|
49106
|
+
c.node.parentNode,
|
|
49107
|
+
NodeType$1.ntText,
|
|
49108
|
+
y.text,
|
|
49109
|
+
u,
|
|
49110
|
+
void 0,
|
|
49111
|
+
y.combination
|
|
49112
|
+
);
|
|
49119
49113
|
d.push(w);
|
|
49120
49114
|
}
|
|
49121
49115
|
}), m < p.length - 2 || m == p.length - 2 && p[p.length - 1] != "") {
|
|
@@ -49960,10 +49954,10 @@ class VueController {
|
|
|
49960
49954
|
return r ? (this.insertXml(t, "header"), this.insertXml(t, "footer"), this.insertXml(t, "main", r, n)) : this.insertXml(t, "main", void 0, n), o && o(), !0;
|
|
49961
49955
|
}
|
|
49962
49956
|
/**
|
|
49963
|
-
*
|
|
49957
|
+
*
|
|
49964
49958
|
* @param list docs
|
|
49965
49959
|
* @param docLog 记录文档信息
|
|
49966
|
-
* @returns
|
|
49960
|
+
* @returns
|
|
49967
49961
|
*/
|
|
49968
49962
|
async openDocsForPrint(t, r) {
|
|
49969
49963
|
if (t.length == 0)
|
|
@@ -50494,7 +50488,21 @@ class VueController {
|
|
|
50494
50488
|
updateEmptySignNode(t, r, o, n, s, l, c, d, u, f, p, m, g) {
|
|
50495
50489
|
if (t.type !== 0)
|
|
50496
50490
|
return;
|
|
50497
|
-
HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docController.updateEmptySignNode(
|
|
50491
|
+
HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docController.updateEmptySignNode(
|
|
50492
|
+
t,
|
|
50493
|
+
r,
|
|
50494
|
+
o,
|
|
50495
|
+
n,
|
|
50496
|
+
s,
|
|
50497
|
+
l,
|
|
50498
|
+
c,
|
|
50499
|
+
d,
|
|
50500
|
+
u,
|
|
50501
|
+
f,
|
|
50502
|
+
p,
|
|
50503
|
+
m,
|
|
50504
|
+
g
|
|
50505
|
+
);
|
|
50498
50506
|
}
|
|
50499
50507
|
/**
|
|
50500
50508
|
* 更新签名时间
|
|
@@ -50860,14 +50868,7 @@ class VueController {
|
|
|
50860
50868
|
if (_)
|
|
50861
50869
|
if (_.styleIndex !== void 0 && (_.styleIndex = u), _ instanceof TextNode)
|
|
50862
50870
|
if (_.text.length > [..._.text].length) {
|
|
50863
|
-
const D = new RareCharNode(
|
|
50864
|
-
d.hoEditorFactoryID,
|
|
50865
|
-
_.rootNodes,
|
|
50866
|
-
d,
|
|
50867
|
-
NodeType$1.ntRareChar,
|
|
50868
|
-
_.text,
|
|
50869
|
-
_.styleIndex
|
|
50870
|
-
);
|
|
50871
|
+
const D = new RareCharNode(d.hoEditorFactoryID, _.rootNodes, d, NodeType$1.ntRareChar, _.text, _.styleIndex);
|
|
50871
50872
|
p.push(D);
|
|
50872
50873
|
} else
|
|
50873
50874
|
_.text !== "" && _.text !== "" && _.text !== "" && _.text !== "" && _.text !== "" && _.text !== "" && p.push(_);
|
|
@@ -50879,14 +50880,7 @@ class VueController {
|
|
|
50879
50880
|
if (C)
|
|
50880
50881
|
if (C.styleIndex !== void 0 && (C.styleIndex = u), C instanceof TextNode)
|
|
50881
50882
|
if (C.text.length > [...C.text].length) {
|
|
50882
|
-
const _ = new RareCharNode(
|
|
50883
|
-
d.hoEditorFactoryID,
|
|
50884
|
-
C.rootNodes,
|
|
50885
|
-
d,
|
|
50886
|
-
NodeType$1.ntRareChar,
|
|
50887
|
-
C.text,
|
|
50888
|
-
C.styleIndex
|
|
50889
|
-
);
|
|
50883
|
+
const _ = new RareCharNode(d.hoEditorFactoryID, C.rootNodes, d, NodeType$1.ntRareChar, C.text, C.styleIndex);
|
|
50890
50884
|
p.push(_);
|
|
50891
50885
|
} else
|
|
50892
50886
|
C.text !== "" && C.text !== "" && C.text !== "" && C.text !== "" && C.text !== "" && C.text !== "" && p.push(C);
|
|
@@ -50932,14 +50926,7 @@ class VueController {
|
|
|
50932
50926
|
if (v)
|
|
50933
50927
|
if (v instanceof TextNode)
|
|
50934
50928
|
if (v.text.length > [...v.text].length) {
|
|
50935
|
-
const C = new RareCharNode(
|
|
50936
|
-
c.hoEditorFactoryID,
|
|
50937
|
-
v.rootNodes,
|
|
50938
|
-
c,
|
|
50939
|
-
NodeType$1.ntRareChar,
|
|
50940
|
-
v.text,
|
|
50941
|
-
v.styleIndex
|
|
50942
|
-
);
|
|
50929
|
+
const C = new RareCharNode(c.hoEditorFactoryID, v.rootNodes, c, NodeType$1.ntRareChar, v.text, v.styleIndex);
|
|
50943
50930
|
u.push(C);
|
|
50944
50931
|
} else
|
|
50945
50932
|
v.text !== "" && v.text !== "" && v.text !== "" && v.text !== "" && v.text !== "" && v.text !== "" && u.push(v);
|
|
@@ -50951,14 +50938,7 @@ class VueController {
|
|
|
50951
50938
|
if (w)
|
|
50952
50939
|
if (w instanceof TextNode)
|
|
50953
50940
|
if (w.text.length > [...w.text].length) {
|
|
50954
|
-
const v = new RareCharNode(
|
|
50955
|
-
c.hoEditorFactoryID,
|
|
50956
|
-
w.rootNodes,
|
|
50957
|
-
c,
|
|
50958
|
-
NodeType$1.ntRareChar,
|
|
50959
|
-
w.text,
|
|
50960
|
-
w.styleIndex
|
|
50961
|
-
);
|
|
50941
|
+
const v = new RareCharNode(c.hoEditorFactoryID, w.rootNodes, c, NodeType$1.ntRareChar, w.text, w.styleIndex);
|
|
50962
50942
|
u.push(v);
|
|
50963
50943
|
} else
|
|
50964
50944
|
w.text !== "" && w.text !== "" && w.text !== "" && w.text !== "" && w.text !== "" && w.text !== "" && u.push(w);
|
|
@@ -51106,19 +51086,21 @@ class VueController {
|
|
|
51106
51086
|
/**
|
|
51107
51087
|
* 批量获取节点位置
|
|
51108
51088
|
* @param type type bottom:页左下角坐标点(0,0)↑→ top:页左上角坐标点(0,0)↓→
|
|
51109
|
-
* @param nodes
|
|
51089
|
+
* @param nodes
|
|
51110
51090
|
*/
|
|
51111
51091
|
async getBatchPosition(t, r, o = 200) {
|
|
51112
51092
|
const n = [], s = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), l = (c) => new Promise((d) => {
|
|
51113
51093
|
let u = s.docTree.getNodeLastPath(c);
|
|
51114
|
-
this.moveCaretToPath(u)
|
|
51115
|
-
|
|
51116
|
-
const
|
|
51117
|
-
|
|
51118
|
-
|
|
51119
|
-
|
|
51120
|
-
|
|
51121
|
-
|
|
51094
|
+
this.moveCaretToPath(u), setTimeout(() => {
|
|
51095
|
+
this.moveCaretToPath(u);
|
|
51096
|
+
const f = setTimeout(() => {
|
|
51097
|
+
const p = this.getPosition3(t);
|
|
51098
|
+
n.push({
|
|
51099
|
+
node: c,
|
|
51100
|
+
position: p
|
|
51101
|
+
}), clearTimeout(f), d(p);
|
|
51102
|
+
}, o);
|
|
51103
|
+
}, o / 10);
|
|
51122
51104
|
});
|
|
51123
51105
|
for (let c = 0; c < r.length; c++) {
|
|
51124
51106
|
const d = r[c];
|
|
@@ -51940,7 +51922,7 @@ class VueController {
|
|
|
51940
51922
|
}
|
|
51941
51923
|
/**
|
|
51942
51924
|
* 获取所有患者签名
|
|
51943
|
-
* @returns
|
|
51925
|
+
* @returns
|
|
51944
51926
|
*/
|
|
51945
51927
|
getAllPatientSignNode() {
|
|
51946
51928
|
const t = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), r = [], o = t.docTree.mainNodes, n = (s) => {
|
|
@@ -52746,23 +52728,21 @@ class VueController {
|
|
|
52746
52728
|
verifyRadioAndCheckBoxs(t) {
|
|
52747
52729
|
const r = HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID), o = r.docTree.radioAndCheckBoxsMap;
|
|
52748
52730
|
let n = [], s = [], l = [];
|
|
52749
|
-
if (o.forEach(
|
|
52750
|
-
(c)
|
|
52751
|
-
|
|
52752
|
-
|
|
52753
|
-
|
|
52754
|
-
|
|
52755
|
-
|
|
52756
|
-
break;
|
|
52757
|
-
}
|
|
52758
|
-
if (!d) {
|
|
52759
|
-
n.push(c.groupName), s.push(c);
|
|
52760
|
-
for (let u of o.values())
|
|
52761
|
-
u.controlStyle === c.controlStyle && u.groupName === c.groupName && u.id !== c.id && s.push(u);
|
|
52731
|
+
if (o.forEach((c) => {
|
|
52732
|
+
if (c.groupHasOptions && !c.isSelected && c.groupName !== "") {
|
|
52733
|
+
let d = !1;
|
|
52734
|
+
for (let u of o.values())
|
|
52735
|
+
if (u.controlStyle === c.controlStyle && u.groupName === c.groupName && u.isSelected) {
|
|
52736
|
+
d = !0;
|
|
52737
|
+
break;
|
|
52762
52738
|
}
|
|
52739
|
+
if (!d) {
|
|
52740
|
+
n.push(c.groupName), s.push(c);
|
|
52741
|
+
for (let u of o.values())
|
|
52742
|
+
u.controlStyle === c.controlStyle && u.groupName === c.groupName && u.id !== c.id && s.push(u);
|
|
52763
52743
|
}
|
|
52764
52744
|
}
|
|
52765
|
-
), n.length > 0 && (l = n.filter((d, u, f) => f.indexOf(d) === u)), s.length > 0) {
|
|
52745
|
+
}), n.length > 0 && (l = n.filter((d, u, f) => f.indexOf(d) === u)), s.length > 0) {
|
|
52766
52746
|
const c = s.filter((u, f, p) => p.indexOf(u) === f);
|
|
52767
52747
|
let d = [];
|
|
52768
52748
|
for (let u = 0; u < c.length; u++) {
|
|
@@ -65233,7 +65213,7 @@ WebPDecoder.prototype.getData = function() {
|
|
|
65233
65213
|
(function(a) {
|
|
65234
65214
|
function t() {
|
|
65235
65215
|
return function() {
|
|
65236
|
-
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-
|
|
65216
|
+
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-DqgjYlKP.mjs");
|
|
65237
65217
|
}().catch(function(r) {
|
|
65238
65218
|
return Promise.reject(new Error("Could not load canvg: " + r));
|
|
65239
65219
|
}).then(function(r) {
|
|
@@ -72939,7 +72919,7 @@ class HOEditorFactory {
|
|
|
72939
72919
|
b(this, "drawRadioAndCheckBoxMode", 1);
|
|
72940
72920
|
this._hoEditorFactoryId = t;
|
|
72941
72921
|
}
|
|
72942
|
-
// 绘制模式 1:
|
|
72922
|
+
// 绘制模式 1: Unicode 转义 2: 字形
|
|
72943
72923
|
/**
|
|
72944
72924
|
* Getter hoLocalStorage
|
|
72945
72925
|
* @return {HoLocalStorage}
|