hoeditor-web 3.2.14 → 3.2.15
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-076WsfWd.mjs";
|
|
3
3
|
export {
|
|
4
4
|
i as HoDocs,
|
|
5
5
|
r as HoEditorProvide,
|
|
@@ -10061,7 +10061,7 @@ class RadioAndCheckBoxNode extends ControlNode {
|
|
|
10061
10061
|
return "单复选框";
|
|
10062
10062
|
}
|
|
10063
10063
|
}
|
|
10064
|
-
var NodeType = /* @__PURE__ */ ((a) => (a[a.ntParagraph = 0] = "ntParagraph", a[a.ntTable = 1] = "ntTable", a[a.ntText = 2] = "ntText", a[a.ntCell = 3] = "ntCell", a[a.ntMedicalExpression = 4] = "ntMedicalExpression", a[a.ntMark = 5] = "ntMark", a[a.ntImage = 6] = "ntImage", a[a.ntField = 7] = "ntField", a[a.ntControl = 8] = "ntControl", a[a.ntSpecialChar = 9] = "ntSpecialChar", a[a.ntPageCount = 10] = "ntPageCount", a[a.ntPageNum = 11] = "ntPageNum", a[a.ntTableFormula = 12] = "ntTableFormula", a[a.ntSeparateChar = 13] = "ntSeparateChar", a[a.ntLabel = 14] = "ntLabel", a[a.ntSign = 15] = "ntSign", a[a.ntGestation = 16] = "ntGestation", a[a.ntRareChar = 17] = "ntRareChar", a[a.ntJumpButton = 18] = "ntJumpButton", a[a.ntTextBorder = 19] = "ntTextBorder", a[a.ntSlider = 20] = "ntSlider", a[a.ntFigure = 21] = "ntFigure", a))(NodeType || {}), FormularType$1 = /* @__PURE__ */ ((a) => (a[a.ftSum = 0] = "ftSum", a[a.ftFormular = 1] = "ftFormular", a[a.ftBMI = 2] = "ftBMI", a[a.ftLaborProcess = 3] = "ftLaborProcess", a[a.ftExpectedBirthDate = 4] = "ftExpectedBirthDate", a[a.ftPregnantWeeks = 5] = "ftPregnantWeeks", a[a.ftScoreMapping = 6] = "ftScoreMapping", a[a.ftBodySurfaceArea = 7] = "ftBodySurfaceArea", a[a.ftCalcDays = 8] = "ftCalcDays", a[a.ftCalcTime = 9] = "ftCalcTime", a[a.ftIdealWeight = 10] = "ftIdealWeight", a[a.ftISS = 11] = "ftISS", a[a.ftCurveChart = 12] = "ftCurveChart", a))(FormularType$1 || {}), SliderDecimalType = /* @__PURE__ */ ((a) => (a[a.Retain = 0] = "Retain", a[a.Rounding = 1] = "Rounding", a[a.Remove = 2] = "Remove", a))(SliderDecimalType || {}), SliderFigureType = /* @__PURE__ */ ((a) => (a[a.Figure = 0] = "Figure", a[a.Skin = 1] = "Skin", a[a.Joint = 2] = "Joint", a[a.Mases = 3] = "Mases", a))(SliderFigureType || {}), PaintState$1 = /* @__PURE__ */ ((a) => (a[a.psDesign = 0] = "psDesign", a[a.psEdit = 1] = "psEdit", a[a.psPreview = 2] = "psPreview", a[a.psPrint = 3] = "psPrint", a[a.psReview = 4] = "psReview", a[a.psReadOnly = 5] = "psReadOnly", a[a.psTrace = 6] = "psTrace", a))(PaintState$1 || {});
|
|
10064
|
+
var NodeType = /* @__PURE__ */ ((a) => (a[a.ntParagraph = 0] = "ntParagraph", a[a.ntTable = 1] = "ntTable", a[a.ntText = 2] = "ntText", a[a.ntCell = 3] = "ntCell", a[a.ntMedicalExpression = 4] = "ntMedicalExpression", a[a.ntMark = 5] = "ntMark", a[a.ntImage = 6] = "ntImage", a[a.ntField = 7] = "ntField", a[a.ntControl = 8] = "ntControl", a[a.ntSpecialChar = 9] = "ntSpecialChar", a[a.ntPageCount = 10] = "ntPageCount", a[a.ntPageNum = 11] = "ntPageNum", a[a.ntTableFormula = 12] = "ntTableFormula", a[a.ntSeparateChar = 13] = "ntSeparateChar", a[a.ntLabel = 14] = "ntLabel", a[a.ntSign = 15] = "ntSign", a[a.ntGestation = 16] = "ntGestation", a[a.ntRareChar = 17] = "ntRareChar", a[a.ntJumpButton = 18] = "ntJumpButton", a[a.ntTextBorder = 19] = "ntTextBorder", a[a.ntSlider = 20] = "ntSlider", a[a.ntFigure = 21] = "ntFigure", a))(NodeType || {}), FormularType$1 = /* @__PURE__ */ ((a) => (a[a.ftSum = 0] = "ftSum", a[a.ftFormular = 1] = "ftFormular", a[a.ftBMI = 2] = "ftBMI", a[a.ftLaborProcess = 3] = "ftLaborProcess", a[a.ftExpectedBirthDate = 4] = "ftExpectedBirthDate", a[a.ftPregnantWeeks = 5] = "ftPregnantWeeks", a[a.ftScoreMapping = 6] = "ftScoreMapping", a[a.ftBodySurfaceArea = 7] = "ftBodySurfaceArea", a[a.ftCalcDays = 8] = "ftCalcDays", a[a.ftCalcTime = 9] = "ftCalcTime", a[a.ftIdealWeight = 10] = "ftIdealWeight", a[a.ftISS = 11] = "ftISS", a[a.ftCurveChart = 12] = "ftCurveChart", a))(FormularType$1 || {}), SliderDecimalType = /* @__PURE__ */ ((a) => (a[a.Retain = 0] = "Retain", a[a.Rounding = 1] = "Rounding", a[a.Remove = 2] = "Remove", a))(SliderDecimalType || {}), SliderFigureType = /* @__PURE__ */ ((a) => (a[a.Figure = 0] = "Figure", a[a.Skin = 1] = "Skin", a[a.Joint = 2] = "Joint", a[a.Mases = 3] = "Mases", a))(SliderFigureType || {}), PaintState$1 = /* @__PURE__ */ ((a) => (a[a.psDesign = 0] = "psDesign", a[a.psEdit = 1] = "psEdit", a[a.psPreview = 2] = "psPreview", a[a.psPrint = 3] = "psPrint", a[a.psReview = 4] = "psReview", a[a.psReadOnly = 5] = "psReadOnly", a[a.psTrace = 6] = "psTrace", a))(PaintState$1 || {}), HistoryComponentPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.right = 1] = "right", a))(HistoryComponentPosition || {});
|
|
10065
10065
|
class DrawTableFormularChart extends DrawCombineNode {
|
|
10066
10066
|
constructor(r, o, n) {
|
|
10067
10067
|
var s;
|
|
@@ -14897,7 +14897,7 @@ class DrawSignNode extends DrawCombineNode {
|
|
|
14897
14897
|
}
|
|
14898
14898
|
}
|
|
14899
14899
|
}
|
|
14900
|
-
const version = "3.2.
|
|
14900
|
+
const version = "3.2.15";
|
|
14901
14901
|
var FingerPosition = /* @__PURE__ */ ((a) => (a[a.left = 0] = "left", a[a.center = 1] = "center", a[a.right = 2] = "right", a))(FingerPosition || {});
|
|
14902
14902
|
class SignNode extends BaseNode {
|
|
14903
14903
|
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) {
|
|
@@ -31951,7 +31951,8 @@ const AiModels = __component__$1j.exports, _sfc_main$1i = defineComponent({
|
|
|
31951
31951
|
return {
|
|
31952
31952
|
isHeadFoot: "",
|
|
31953
31953
|
// 页眉页脚是否应该出现
|
|
31954
|
-
topMarginPixes: 0
|
|
31954
|
+
topMarginPixes: 0,
|
|
31955
|
+
historyPosition: 1
|
|
31955
31956
|
};
|
|
31956
31957
|
},
|
|
31957
31958
|
computed: {
|
|
@@ -31984,11 +31985,15 @@ const AiModels = __component__$1j.exports, _sfc_main$1i = defineComponent({
|
|
|
31984
31985
|
a.indexOf(this.index) === -1 ? this.$refs.selectcanvas.removeEventListener("dblclick", this.addEventerDblClick, !0) : this.$refs.selectcanvas.addEventListener("dblclick", this.addEventerDblClick, !0);
|
|
31985
31986
|
}
|
|
31986
31987
|
},
|
|
31988
|
+
created() {
|
|
31989
|
+
const a = HOEditorFactorys.instance().getFactory(this.hoEditorId);
|
|
31990
|
+
this.historyPosition = a.historyPosition;
|
|
31991
|
+
},
|
|
31987
31992
|
mounted() {
|
|
31988
|
-
|
|
31989
|
-
o.init(t, r), this.$emit("pageReady", o), this.$nextTick(() => {
|
|
31993
|
+
this.$nextTick(() => {
|
|
31990
31994
|
var n;
|
|
31991
|
-
|
|
31995
|
+
const a = HOEditorFactorys.instance().getFactory(this.hoEditorId), t = new DrawDomLevel(this.hoEditorId, this.index, this.$refs.domcanvas), r = new DrawSelectLevel(this.hoEditorId, this.index, this.$refs.selectcanvas, this.docIndex, this.index), o = a.drawTree.drawPages[this.index];
|
|
31996
|
+
o.init(t, r), this.$emit("pageReady", o), (n = this.viewableAreaObserver) == null || n.observe(this.$refs.hoPage);
|
|
31992
31997
|
});
|
|
31993
31998
|
},
|
|
31994
31999
|
methods: {
|
|
@@ -32019,9 +32024,9 @@ const AiModels = __component__$1j.exports, _sfc_main$1i = defineComponent({
|
|
|
32019
32024
|
});
|
|
32020
32025
|
var _sfc_render$1i = function a() {
|
|
32021
32026
|
var t = this, r = t._self._c;
|
|
32022
|
-
return t._self._setupProxy, r("div", { ref: "hoPage", class: t.pageClassNames, style: { height: t.normalHeight + "px", width: t.normalWidth + t.commentWidth + "px" } }, [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" }, attrs: { width: t.scaleWidth, height: t.scaleHeight }, on: { contextmenu: function(o) {
|
|
32027
|
+
return t._self._setupProxy, r("div", { ref: "hoPage", class: t.pageClassNames, style: { height: t.normalHeight + "px", width: t.normalWidth + t.commentWidth + "px" } }, [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) {
|
|
32023
32028
|
return t.canvasRightClick.apply(null, arguments);
|
|
32024
|
-
} } }), r("div", { class: t.commentCanvasName, style: { height: t.normalHeight + "px", width: t.commentWidth + "px" }, attrs: { id: "ho-comment-box-" + t.index } }), [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() {
|
|
32029
|
+
} } }), 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() {
|
|
32025
32030
|
return [t._t("hoPageHead")];
|
|
32026
32031
|
}, proxy: !0 }, { key: "foot", fn: function() {
|
|
32027
32032
|
return [t._t("hoPageFoot")];
|
|
@@ -46258,7 +46263,8 @@ const _sfc_main$1b = defineComponent({
|
|
|
46258
46263
|
pageIndex: 0,
|
|
46259
46264
|
selectedId: "",
|
|
46260
46265
|
selectItem: {},
|
|
46261
|
-
list: []
|
|
46266
|
+
list: [],
|
|
46267
|
+
historyPosition: 1
|
|
46262
46268
|
};
|
|
46263
46269
|
},
|
|
46264
46270
|
methods: {
|
|
@@ -46274,17 +46280,17 @@ const _sfc_main$1b = defineComponent({
|
|
|
46274
46280
|
const n = o.querySelector(".ho-history-box");
|
|
46275
46281
|
if (n) {
|
|
46276
46282
|
const s = Array.from(o.querySelectorAll(".ho-comment-item"));
|
|
46277
|
-
o.style.transform = "translate(0, 0)", n.style.paddingLeft = "0", s.forEach((l, c) => {
|
|
46283
|
+
o.style.transform = "translate(0, 0)", this.historyPosition == 1 ? n.style.paddingRight = "0" : n.style.paddingLeft = "0", s.forEach((l, c) => {
|
|
46278
46284
|
l.style.transform = "translate(0, 0)", l.style.boxShadow = "", l.className.includes("history-comment") || (l.className += " history-comment");
|
|
46279
46285
|
}), o.className = o.className.replace("ho-comment-history-selected", "");
|
|
46280
46286
|
}
|
|
46281
46287
|
}
|
|
46282
46288
|
}), r) {
|
|
46283
46289
|
const o = r.querySelector(".ho-history-box"), n = Array.from(o.querySelectorAll(".ho-comment-item"));
|
|
46284
|
-
r.style.transform = "translate(-25px, 0)", o.style.paddingLeft = "25px";
|
|
46290
|
+
this.historyPosition == 1 ? (r.style.transform = "translate(-25px, 0)", o.style.paddingLeft = "25px") : (r.style.transform = "translate(25px, 0)", o.style.paddingRight = "25px");
|
|
46285
46291
|
let s = 0;
|
|
46286
46292
|
n.forEach((l, c) => {
|
|
46287
|
-
l.id === a.id ? (l.className = "ho-comment-item", l.style.boxShadow = "0px 2px 12px 0px #9ea1a5", s = a.endNodeY - l.offsetTop + o.scrollTop, r.offsetHeight - a.endNodeY < l.offsetHeight && (s -= l.offsetHeight - (r.offsetHeight - a.endNodeY) + 60), c == 0 && s < 0 && (s = 0), a.elementName && a.vueController.findAndLightElementsByNames([a.elementName]), l.style.transform = `translate(-25px, ${s}px)`) : (l.className = "ho-comment-item history-comment", l.style.boxShadow = "", setTimeout(() => {
|
|
46293
|
+
l.id === a.id ? (l.className = "ho-comment-item", l.style.boxShadow = "0px 2px 12px 0px #9ea1a5", s = a.endNodeY - l.offsetTop + o.scrollTop, r.offsetHeight - a.endNodeY < l.offsetHeight && (s -= l.offsetHeight - (r.offsetHeight - a.endNodeY) + 60), c == 0 && s < 0 && (s = 0), a.elementName && a.vueController.findAndLightElementsByNames([a.elementName]), this.historyPosition == 1 ? l.style.transform = `translate(-25px, ${s}px)` : l.style.transform = `translate(25px, ${s}px)`) : (l.className = "ho-comment-item history-comment", l.style.boxShadow = "", setTimeout(() => {
|
|
46288
46294
|
l.style.transform = `translate(0, ${s}px)`;
|
|
46289
46295
|
}, 30));
|
|
46290
46296
|
});
|
|
@@ -46294,8 +46300,8 @@ const _sfc_main$1b = defineComponent({
|
|
|
46294
46300
|
});
|
|
46295
46301
|
var _sfc_render$1b = function a() {
|
|
46296
46302
|
var t = this, r = t._self._c;
|
|
46297
|
-
return t._self._setupProxy, r("section", { staticClass: "ho-history-box" }, [t._l(t.list, function(o
|
|
46298
|
-
return [r("div", { ref: "hoCommentItem" + o.id, refInFor: !0, staticClass: "ho-comment-item history-comment", attrs: { id: o.id }, on: { click: function(
|
|
46303
|
+
return t._self._setupProxy, r("section", { staticClass: "ho-history-box" }, [t._l(t.list, function(o) {
|
|
46304
|
+
return [r("div", { key: o.id, ref: "hoCommentItem" + o.id, refInFor: !0, staticClass: "ho-comment-item history-comment", attrs: { id: o.id }, on: { click: function(n) {
|
|
46299
46305
|
return t.selectComment(o);
|
|
46300
46306
|
} } }, [r("header", [r("span", { staticStyle: { "text-align": "left" } }, [t._v(t._s(o.userName))]), t._v(" "), r("span", { staticStyle: { "text-align": "right" } }, [t._v(t._s(o.date))])]), o.ipAddress ? r("p", { staticStyle: { "text-align": "right", "font-size": "12px" } }, [t._v(t._s(o.ipAddress))]) : t._e(), o.showBeforeContent ? r("section", { staticClass: "comment-content" }, [[r("span", [t._v("修改前")]), t._v(":" + t._s(o.text) + " ")]], 2) : t._e(), r("section", { staticClass: "comment-content", staticStyle: { "border-top": "1px solid #ccc" } }, [o.afterContentHtml ? [r("span", [t._v("修改后")]), t._v(":"), r("div", { domProps: { innerHTML: t._s(o.afterContentHtml) } })] : [r("span", [t._v("修改后")]), t._v(":" + t._s(o.afterContent) + " ")]], 2)])];
|
|
46301
46307
|
})], 2);
|
|
@@ -46306,22 +46312,23 @@ var _sfc_render$1b = function a() {
|
|
|
46306
46312
|
);
|
|
46307
46313
|
const HistoryComponent = __component__$1b.exports;
|
|
46308
46314
|
let HistoryConstructor = Vue.extend(HistoryComponent);
|
|
46309
|
-
const createHistoryInstance = (a) => {
|
|
46315
|
+
const createHistoryInstance = (a, t) => {
|
|
46310
46316
|
if (!Array.isArray(a) || a.length == 0)
|
|
46311
46317
|
return;
|
|
46312
|
-
let
|
|
46318
|
+
let r = new HistoryConstructor({
|
|
46313
46319
|
data: {
|
|
46314
46320
|
list: a,
|
|
46315
46321
|
pageIndex: a[0].pageIndex,
|
|
46316
|
-
visible: !0
|
|
46322
|
+
visible: !0,
|
|
46323
|
+
historyPosition: t
|
|
46317
46324
|
}
|
|
46318
46325
|
});
|
|
46319
|
-
|
|
46320
|
-
const
|
|
46321
|
-
|
|
46326
|
+
r.$mount();
|
|
46327
|
+
const o = document.querySelector(`#${a[0].editorId} #ho-comment-box-${a[0].pageIndex}`);
|
|
46328
|
+
o ? o.appendChild(r.$el) : document.body.appendChild(r.$el), r.visible = !0;
|
|
46322
46329
|
}, hoCreateHistory = {
|
|
46323
|
-
open: function(a) {
|
|
46324
|
-
return this.resetBackground(), createHistoryInstance(a);
|
|
46330
|
+
open: function(a, t) {
|
|
46331
|
+
return this.resetBackground(), createHistoryInstance(a, t);
|
|
46325
46332
|
},
|
|
46326
46333
|
resetBackground: function() {
|
|
46327
46334
|
const a = Array.from(document.querySelectorAll(".ho-comment-box"));
|
|
@@ -50830,7 +50837,7 @@ class VueController {
|
|
|
50830
50837
|
};
|
|
50831
50838
|
s[c[0]].push(d);
|
|
50832
50839
|
}), s.map((l) => (l.sort((c, d) => c.endNodeY - d.endNodeY), l)), hoCreateHistory.clear(), s.forEach((l) => {
|
|
50833
|
-
hoCreateHistory.open(l);
|
|
50840
|
+
hoCreateHistory.open(l, n.historyPosition);
|
|
50834
50841
|
});
|
|
50835
50842
|
}
|
|
50836
50843
|
clearEditRecords(t) {
|
|
@@ -64092,7 +64099,7 @@ WebPDecoder.prototype.getData = function() {
|
|
|
64092
64099
|
(function(a) {
|
|
64093
64100
|
function t() {
|
|
64094
64101
|
return function() {
|
|
64095
|
-
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-
|
|
64102
|
+
return globalObject.canvg ? Promise.resolve(globalObject.canvg) : import("./index.es-DqBe5gOd.mjs");
|
|
64096
64103
|
}().catch(function(r) {
|
|
64097
64104
|
return Promise.reject(new Error("Could not load canvg: " + r));
|
|
64098
64105
|
}).then(function(r) {
|
|
@@ -71676,9 +71683,11 @@ class HOEditorFactory {
|
|
|
71676
71683
|
b(this, "fixTableImage", !1);
|
|
71677
71684
|
// 修复表格图片卡死问题
|
|
71678
71685
|
b(this, "errorImgurl", []);
|
|
71686
|
+
// 错误图片地址
|
|
71687
|
+
b(this, "historyPosition", HistoryComponentPosition.right);
|
|
71679
71688
|
this._hoEditorFactoryId = t;
|
|
71680
71689
|
}
|
|
71681
|
-
//
|
|
71690
|
+
// 历史痕迹展示位置 默认右侧 单行工具栏启用时候需要调整位置避免被业务弹窗挡住
|
|
71682
71691
|
/**
|
|
71683
71692
|
* Getter hoLocalStorage
|
|
71684
71693
|
* @return {HoLocalStorage}
|