hoeditor-web 3.1.49 → 3.1.51
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.umd.js +586 -421
- package/lib/hoeditor.umd.min.js +25 -25
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -53518,7 +53518,7 @@ var CellNode = /*#__PURE__*/function (_RectNode) {
|
|
|
53518
53518
|
/*
|
|
53519
53519
|
* @Author: your name
|
|
53520
53520
|
* @Date: 2020-11-18 11:43:06
|
|
53521
|
-
* @LastEditTime:
|
|
53521
|
+
* @LastEditTime: 2024-01-04 14:15:40
|
|
53522
53522
|
* @LastEditors: liyanan 2441631434@qq.com
|
|
53523
53523
|
* @Description: In User Settings Edit
|
|
53524
53524
|
* @FilePath: \hoeditor-web\src\editor\dom\treeNode\ControlNode.ts
|
|
@@ -53850,11 +53850,11 @@ var ControlNode = /*#__PURE__*/function (_BaseNode) {
|
|
|
53850
53850
|
tip = "下拉列表";
|
|
53851
53851
|
}
|
|
53852
53852
|
if (nodeType === "LabelNode") {
|
|
53853
|
-
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.warn("
|
|
53853
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.warn("不允许删除标签文本。");
|
|
53854
53854
|
return false;
|
|
53855
53855
|
}
|
|
53856
53856
|
if (nodeType) {
|
|
53857
|
-
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.warn(tip + "
|
|
53857
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.warn(tip + "元素已设置为不允许删除。");
|
|
53858
53858
|
} else {
|
|
53859
53859
|
return (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_get_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(ControlNode.prototype), "delete", this).call(this);
|
|
53860
53860
|
}
|
|
@@ -66660,7 +66660,7 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
|
|
|
66660
66660
|
/*
|
|
66661
66661
|
* @Author: your name
|
|
66662
66662
|
* @Date: 2020-11-03 15:17:54
|
|
66663
|
-
* @LastEditTime:
|
|
66663
|
+
* @LastEditTime: 2024-01-04 14:14:28
|
|
66664
66664
|
* @LastEditors: liyanan 2441631434@qq.com
|
|
66665
66665
|
* @Description: In User Settings Edit
|
|
66666
66666
|
* @FilePath: \hoeditor-web\src\editor\dom\treeNode\TextInputFieldNode.ts
|
|
@@ -68250,7 +68250,7 @@ var TextInputFieldNode = /*#__PURE__*/function (_BaseCombineNode) {
|
|
|
68250
68250
|
return (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_get_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)(TextInputFieldNode.prototype), "delete", this).call(this);
|
|
68251
68251
|
} else {
|
|
68252
68252
|
if (operType !== 'update') {
|
|
68253
|
-
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_61__/* ["default"] */ .Z.warn('
|
|
68253
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_61__/* ["default"] */ .Z.warn('文本域已设置为不允许删除。');
|
|
68254
68254
|
} else {
|
|
68255
68255
|
return (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_get_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_getPrototypeOf_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)(TextInputFieldNode.prototype), "delete", this).call(this);
|
|
68256
68256
|
}
|
|
@@ -69038,15 +69038,6 @@ var TextInputFieldNode = /*#__PURE__*/function (_BaseCombineNode) {
|
|
|
69038
69038
|
behindText = temp.text.substring(eIndex + 17, temp.text.length);
|
|
69039
69039
|
}
|
|
69040
69040
|
getChildTextNodes(behindText);
|
|
69041
|
-
// const textNode2 = new TextNode(
|
|
69042
|
-
// hoEditorFactoryID,
|
|
69043
|
-
// rootNodes,
|
|
69044
|
-
// temp,
|
|
69045
|
-
// NodeType.ntText,
|
|
69046
|
-
// behindText,
|
|
69047
|
-
// styleIndex
|
|
69048
|
-
// );
|
|
69049
|
-
// temp.childNodes.splice(temp.childNodes.length - 1, 0, textNode2);
|
|
69050
69041
|
}
|
|
69051
69042
|
}
|
|
69052
69043
|
}
|
|
@@ -76642,6 +76633,7 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
76642
76633
|
}, {
|
|
76643
76634
|
key: "paintCellBorders",
|
|
76644
76635
|
value: function paintCellBorders(newHeight, r, c) {
|
|
76636
|
+
var _this2 = this;
|
|
76645
76637
|
if (!this._cell.cellProperty.isDrawGridlines) {
|
|
76646
76638
|
this._cell.cellProperty.gridLineDisplay = [false, false, false, false];
|
|
76647
76639
|
}
|
|
@@ -76689,15 +76681,23 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
76689
76681
|
}
|
|
76690
76682
|
} else {
|
|
76691
76683
|
if (r > 0) {
|
|
76692
|
-
var
|
|
76693
|
-
|
|
76694
|
-
|
|
76695
|
-
|
|
76696
|
-
var
|
|
76697
|
-
|
|
76698
|
-
|
|
76684
|
+
var removeLine = function removeLine(row, col) {
|
|
76685
|
+
var topCell = _this2._cell.table.getMainCell(row, col)[0];
|
|
76686
|
+
var drawPageCells = topCell.drawCell.drawPageCells;
|
|
76687
|
+
if (drawPageCells.length > 0) {
|
|
76688
|
+
for (var i = 0; i < drawPageCells[drawPageCells.length - 1].children.length; i++) {
|
|
76689
|
+
var child = drawPageCells[drawPageCells.length - 1].children[i];
|
|
76690
|
+
if (child.name == "bottomLine") {
|
|
76691
|
+
drawPageCells[drawPageCells.length - 1].children.splice(i, 1);
|
|
76692
|
+
}
|
|
76699
76693
|
}
|
|
76700
76694
|
}
|
|
76695
|
+
};
|
|
76696
|
+
removeLine(r - 1, c);
|
|
76697
|
+
if (this._cell.colSpan > 1) {
|
|
76698
|
+
for (var j = 1; j < this._cell.colSpan; j++) {
|
|
76699
|
+
removeLine(r - 1, c + j);
|
|
76700
|
+
}
|
|
76701
76701
|
}
|
|
76702
76702
|
}
|
|
76703
76703
|
}
|
|
@@ -76717,15 +76717,23 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
76717
76717
|
}
|
|
76718
76718
|
} else {
|
|
76719
76719
|
if (r < this.cell.table.rowCount - 1) {
|
|
76720
|
-
var
|
|
76721
|
-
|
|
76722
|
-
|
|
76723
|
-
|
|
76724
|
-
var
|
|
76725
|
-
|
|
76726
|
-
|
|
76720
|
+
var _removeLine = function _removeLine(row, col) {
|
|
76721
|
+
var bottomCell = _this2._cell.table.getMainCell(row, col)[0];
|
|
76722
|
+
var drawPageCells = bottomCell.drawCell.drawPageCells;
|
|
76723
|
+
if (drawPageCells.length > 0) {
|
|
76724
|
+
for (var i = 0; i < drawPageCells[0].children.length; i++) {
|
|
76725
|
+
var child = drawPageCells[0].children[i];
|
|
76726
|
+
if (child.name == "topLine") {
|
|
76727
|
+
drawPageCells[0].children.splice(i, 1);
|
|
76728
|
+
}
|
|
76727
76729
|
}
|
|
76728
76730
|
}
|
|
76731
|
+
};
|
|
76732
|
+
_removeLine(r + 1, c);
|
|
76733
|
+
if (this._cell.colSpan > 1) {
|
|
76734
|
+
for (var _j = 1; _j < this._cell.colSpan; _j++) {
|
|
76735
|
+
_removeLine(r + 1, c + _j);
|
|
76736
|
+
}
|
|
76729
76737
|
}
|
|
76730
76738
|
}
|
|
76731
76739
|
}
|
|
@@ -76751,18 +76759,26 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
76751
76759
|
}
|
|
76752
76760
|
} else {
|
|
76753
76761
|
if (c > 0) {
|
|
76754
|
-
var
|
|
76755
|
-
|
|
76756
|
-
|
|
76757
|
-
|
|
76758
|
-
var
|
|
76759
|
-
|
|
76760
|
-
var
|
|
76761
|
-
|
|
76762
|
-
|
|
76762
|
+
var _removeLine2 = function _removeLine2(row, col) {
|
|
76763
|
+
var leftCell = _this2._cell.table.getMainCell(row, col)[0];
|
|
76764
|
+
var drawPageCells = leftCell.drawCell.drawPageCells;
|
|
76765
|
+
if (drawPageCells.length > 0) {
|
|
76766
|
+
for (var i = 0; i < drawPageCells.length; i++) {
|
|
76767
|
+
var children = drawPageCells[i].children;
|
|
76768
|
+
for (var _j2 = 0; _j2 < children.length; _j2++) {
|
|
76769
|
+
var child = children[_j2];
|
|
76770
|
+
if (child.name == "rightLine") {
|
|
76771
|
+
children.splice(_j2, 1);
|
|
76772
|
+
}
|
|
76763
76773
|
}
|
|
76764
76774
|
}
|
|
76765
76775
|
}
|
|
76776
|
+
};
|
|
76777
|
+
_removeLine2(r, c - 1);
|
|
76778
|
+
if (this._cell.rowSpan > 1) {
|
|
76779
|
+
for (var _j3 = 1; _j3 < this._cell.rowSpan; _j3++) {
|
|
76780
|
+
_removeLine2(r + _j3, c - 1);
|
|
76781
|
+
}
|
|
76766
76782
|
}
|
|
76767
76783
|
}
|
|
76768
76784
|
}
|
|
@@ -76782,18 +76798,26 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
76782
76798
|
}
|
|
76783
76799
|
} else {
|
|
76784
76800
|
if (c < this.cell.table.colCount - 1) {
|
|
76785
|
-
var
|
|
76786
|
-
|
|
76787
|
-
|
|
76788
|
-
|
|
76789
|
-
var
|
|
76790
|
-
|
|
76791
|
-
var
|
|
76792
|
-
|
|
76793
|
-
|
|
76801
|
+
var _removeLine3 = function _removeLine3(row, col) {
|
|
76802
|
+
var rightCell = _this2._cell.table.getMainCell(row, col)[0];
|
|
76803
|
+
var drawPageCells = rightCell.drawCell.drawPageCells;
|
|
76804
|
+
if (drawPageCells.length > 0) {
|
|
76805
|
+
for (var i = 0; i < drawPageCells.length; i++) {
|
|
76806
|
+
var children = drawPageCells[i].children;
|
|
76807
|
+
for (var _j4 = 0; _j4 < children.length; _j4++) {
|
|
76808
|
+
var child = children[_j4];
|
|
76809
|
+
if (child.name == "leftLine") {
|
|
76810
|
+
children.splice(_j4, 1);
|
|
76811
|
+
}
|
|
76794
76812
|
}
|
|
76795
76813
|
}
|
|
76796
76814
|
}
|
|
76815
|
+
};
|
|
76816
|
+
_removeLine3(r, c + 1);
|
|
76817
|
+
if (this._cell.rowSpan > 1) {
|
|
76818
|
+
for (var _j5 = 1; _j5 < this._cell.rowSpan; _j5++) {
|
|
76819
|
+
_removeLine3(r + _j5, c + 1);
|
|
76820
|
+
}
|
|
76797
76821
|
}
|
|
76798
76822
|
}
|
|
76799
76823
|
}
|
|
@@ -76921,8 +76945,8 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
76921
76945
|
var pageTableIndex = this._cell.table.drawTable.drawPageTables.indexOf(dPageCell._drawPageTable);
|
|
76922
76946
|
var pageCellIndex = this._cell.drawCell.drawPageCells.length - 1;
|
|
76923
76947
|
var cellrestHeight = rowHeightArr[pageTableIndex][0];
|
|
76924
|
-
for (var
|
|
76925
|
-
var dObj = this._cell.drawCell.drawLines[
|
|
76948
|
+
for (var _i = childCount - 1; _i >= 0; _i--) {
|
|
76949
|
+
var dObj = this._cell.drawCell.drawLines[_i];
|
|
76926
76950
|
if (dObj instanceof DrawLine/* DrawLine */.a || dObj instanceof DrawPageTable/* DrawPageTable */.ox) {
|
|
76927
76951
|
while (pageCellIndex > 0 && cellrestHeight < dObj.dHeight) {
|
|
76928
76952
|
pageCellIndex -= 1;
|
|
@@ -76971,13 +76995,14 @@ var DrawPageCell = /*#__PURE__*/function (_DrawArea) {
|
|
|
76971
76995
|
if (this._cell.cellProperty.align === TableProperty/* VAlign */.TR.vatop) {
|
|
76972
76996
|
valignTop = innerTop;
|
|
76973
76997
|
} else if (this._cell.cellProperty.align === TableProperty/* VAlign */.TR.vacenter) {
|
|
76998
|
+
//2024-01-02改
|
|
76974
76999
|
var _this$calcCellHeight = this.calcCellHeight(restHeight);
|
|
76975
77000
|
var _this$calcCellHeight2 = (0,slicedToArray/* default */.Z)(_this$calcCellHeight, 3);
|
|
76976
77001
|
drawTreeHeight = _this$calcCellHeight2[0];
|
|
76977
77002
|
pageHeight = _this$calcCellHeight2[1];
|
|
76978
77003
|
toparr = _this$calcCellHeight2[2];
|
|
76979
|
-
if (pageHeight > this._cell.drawCell.docHeight && this.dHeight - this._cell.drawCell.docHeight >
|
|
76980
|
-
valignTop = (pageHeight - this._cell.drawCell.docHeight) / 2;
|
|
77004
|
+
if (pageHeight > this._cell.drawCell.docHeight && this.dHeight - this._cell.drawCell.docHeight > 2) {
|
|
77005
|
+
valignTop = (pageHeight - (this._cell.drawCell.docHeight + 2)) / 2;
|
|
76981
77006
|
}
|
|
76982
77007
|
} else if (this._cell.cellProperty.align === TableProperty/* VAlign */.TR.vabottom) {
|
|
76983
77008
|
var _this$calcCellHeight3 = this.calcCellHeight(restHeight);
|
|
@@ -90678,28 +90703,28 @@ var NodeStyleUndoUnit = /*#__PURE__*/function () {
|
|
|
90678
90703
|
/* harmony import */ var _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(32629);
|
|
90679
90704
|
/* harmony import */ var _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(27198);
|
|
90680
90705
|
/* harmony import */ var _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(2613);
|
|
90681
|
-
/* harmony import */ var
|
|
90682
|
-
/* harmony import */ var
|
|
90683
|
-
/* harmony import */ var
|
|
90684
|
-
/* harmony import */ var
|
|
90685
|
-
/* harmony import */ var
|
|
90686
|
-
/* harmony import */ var
|
|
90687
|
-
/* harmony import */ var
|
|
90688
|
-
/* harmony import */ var
|
|
90689
|
-
/* harmony import */ var
|
|
90690
|
-
/* harmony import */ var
|
|
90691
|
-
/* harmony import */ var
|
|
90692
|
-
/* harmony import */ var
|
|
90693
|
-
/* harmony import */ var
|
|
90694
|
-
/* harmony import */ var
|
|
90695
|
-
/* harmony import */ var
|
|
90696
|
-
/* harmony import */ var
|
|
90697
|
-
/* harmony import */ var
|
|
90698
|
-
/* harmony import */ var
|
|
90699
|
-
/* harmony import */ var
|
|
90700
|
-
/* harmony import */ var
|
|
90701
|
-
/* harmony import */ var
|
|
90702
|
-
/* harmony import */ var
|
|
90706
|
+
/* harmony import */ var _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(94639);
|
|
90707
|
+
/* harmony import */ var _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(59057);
|
|
90708
|
+
/* harmony import */ var _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(931);
|
|
90709
|
+
/* harmony import */ var _UndoService__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(19229);
|
|
90710
|
+
/* harmony import */ var _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(90161);
|
|
90711
|
+
/* harmony import */ var _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(57727);
|
|
90712
|
+
/* harmony import */ var _events_Exception__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(8277);
|
|
90713
|
+
/* harmony import */ var _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(67945);
|
|
90714
|
+
/* harmony import */ var _dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(68598);
|
|
90715
|
+
/* harmony import */ var _draw_SelectRange__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(53901);
|
|
90716
|
+
/* harmony import */ var _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(5010);
|
|
90717
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(74089);
|
|
90718
|
+
/* harmony import */ var _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(91105);
|
|
90719
|
+
/* harmony import */ var _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(99152);
|
|
90720
|
+
/* harmony import */ var _dom_treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(92501);
|
|
90721
|
+
/* harmony import */ var _dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(45712);
|
|
90722
|
+
/* harmony import */ var _NodeInsertUndoUnit__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(64465);
|
|
90723
|
+
/* harmony import */ var _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(24701);
|
|
90724
|
+
/* harmony import */ var _dom_NodePosition__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(42921);
|
|
90725
|
+
/* harmony import */ var _dom_treeNode_TableFormula__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(90832);
|
|
90726
|
+
/* harmony import */ var _dom_treeNode_RareCharNode__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(34910);
|
|
90727
|
+
/* harmony import */ var _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(51760);
|
|
90703
90728
|
|
|
90704
90729
|
|
|
90705
90730
|
|
|
@@ -90775,16 +90800,16 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
90775
90800
|
this._startPath = startPath;
|
|
90776
90801
|
this._endPath = endPath;
|
|
90777
90802
|
this._isForceDelete = isForceDelete;
|
|
90778
|
-
this._undo = new
|
|
90803
|
+
this._undo = new _UndoService__WEBPACK_IMPORTED_MODULE_23__/* .UndoService */ .O(this._hoEditorFactoryID); //hoEditorFactory.undoService;
|
|
90779
90804
|
this._undoNodes = new Map();
|
|
90780
|
-
var aDomRange = new
|
|
90805
|
+
var aDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(hoEditorFactoryID, startPath, endPath).normalize();
|
|
90781
90806
|
var _aDomRange$inSameTabl = aDomRange.inSameTable(),
|
|
90782
90807
|
_aDomRange$inSameTabl2 = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(_aDomRange$inSameTabl, 2),
|
|
90783
90808
|
bSametable = _aDomRange$inSameTabl2[0],
|
|
90784
90809
|
aTable = _aDomRange$inSameTabl2[1];
|
|
90785
90810
|
this._bSameTable = bSametable;
|
|
90786
90811
|
this._opTime = new Date();
|
|
90787
|
-
this._affectText =
|
|
90812
|
+
this._affectText = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_31__/* .HOEditorFactorys */ .b.instance().getFactory(hoEditorFactoryID).vueController.getRangeText(aDomRange);
|
|
90788
90813
|
}
|
|
90789
90814
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(NodesDeleteUndoUnit, [{
|
|
90790
90815
|
key: "undo",
|
|
@@ -90803,10 +90828,10 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
90803
90828
|
arr = Array.from(this._undoNodes).reverse();
|
|
90804
90829
|
i = 0;
|
|
90805
90830
|
prevIsTable = false;
|
|
90806
|
-
hoEditorFactory =
|
|
90831
|
+
hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_31__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
90807
90832
|
while (i < arr.length) {
|
|
90808
90833
|
value = arr[i];
|
|
90809
|
-
if (value[1] instanceof
|
|
90834
|
+
if (value[1] instanceof _dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_28__/* .CellNode */ .D) {
|
|
90810
90835
|
// (value[1] as CellNode).redrawCell(true, DocAction.daInsert);
|
|
90811
90836
|
} else {
|
|
90812
90837
|
if (prevIsTable) {
|
|
@@ -90814,12 +90839,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
90814
90839
|
} else {
|
|
90815
90840
|
hoEditorFactory.docTree.insertNodeAfterPath(value[0], value[1]);
|
|
90816
90841
|
}
|
|
90817
|
-
if (value[1] instanceof
|
|
90842
|
+
if (value[1] instanceof _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_30__/* .TableNode */ .Fh) {
|
|
90818
90843
|
prevIsTable = true;
|
|
90819
90844
|
// value[1].clearDrawNodes();
|
|
90820
90845
|
// value[1].drawTable.drawPageTables.length = 0;
|
|
90821
90846
|
np = hoEditorFactory.docTree.findNodePositionByPath(value[0]);
|
|
90822
|
-
if (np && np.node && np.node instanceof
|
|
90847
|
+
if (np && np.node && np.node instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_27__/* .ParagraphNode */ .C) value[1].drawTable.paragraphNode = np.node;
|
|
90823
90848
|
} else {
|
|
90824
90849
|
prevIsTable = false;
|
|
90825
90850
|
}
|
|
@@ -90856,9 +90881,9 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
90856
90881
|
// hoEditorFactory.docTree.change(changeEvent);
|
|
90857
90882
|
// }
|
|
90858
90883
|
//选中范围变化事件
|
|
90859
|
-
newRange = new
|
|
90884
|
+
newRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(this._hoEditorFactoryID, this._startPath, this._endPath).normalize();
|
|
90860
90885
|
hoEditorFactory.docTree.curDomRange = newRange;
|
|
90861
|
-
cgEvent = new
|
|
90886
|
+
cgEvent = new _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_22__/* .SelectionChangeEvent */ .r(hoEditorFactory.docTree.curDomRange, newRange);
|
|
90862
90887
|
hoEditorFactory.docTree.selectChange(cgEvent);
|
|
90863
90888
|
//光标定位
|
|
90864
90889
|
hoEditorFactory.drawTree.moveCaretToPath(newRange.endPath);
|
|
@@ -90885,7 +90910,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
90885
90910
|
}, {
|
|
90886
90911
|
key: "MoveCaret",
|
|
90887
90912
|
value: function MoveCaret(path) {
|
|
90888
|
-
|
|
90913
|
+
_HOEditorFactorys__WEBPACK_IMPORTED_MODULE_31__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.moveCaretToPath(path);
|
|
90889
90914
|
}
|
|
90890
90915
|
/**
|
|
90891
90916
|
* @description 返回前面一个node的开始结束选中范围 文本节点时候返回文本中单个文字的选中范围
|
|
@@ -90895,24 +90920,24 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
90895
90920
|
key: "getPrevNodeDomRange",
|
|
90896
90921
|
value: function getPrevNodeDomRange(Anode) {
|
|
90897
90922
|
var spath;
|
|
90898
|
-
var hoEditorFactory =
|
|
90923
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_31__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
90899
90924
|
var prev = Anode.prevSibling();
|
|
90900
90925
|
if (!prev) {
|
|
90901
|
-
throw
|
|
90926
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_26__/* .Exception */ .P.NodeNotFound();
|
|
90902
90927
|
}
|
|
90903
90928
|
var epath = hoEditorFactory.docTree.getNodeLastPath(prev);
|
|
90904
90929
|
if (prev instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_18__/* .TextNode */ .R) {
|
|
90905
90930
|
spath = prev.prevPath(epath);
|
|
90906
|
-
} else if (prev instanceof
|
|
90931
|
+
} else if (prev instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_27__/* .ParagraphNode */ .C) {
|
|
90907
90932
|
spath = epath;
|
|
90908
90933
|
} else {
|
|
90909
90934
|
var prev1 = prev.previousLeaf();
|
|
90910
90935
|
if (!prev1) {
|
|
90911
|
-
throw
|
|
90936
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_26__/* .Exception */ .P.NodeNotFound();
|
|
90912
90937
|
}
|
|
90913
90938
|
spath = hoEditorFactory.docTree.getNodeLastPath(prev1);
|
|
90914
90939
|
}
|
|
90915
|
-
return new
|
|
90940
|
+
return new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(this._hoEditorFactoryID, spath, epath);
|
|
90916
90941
|
}
|
|
90917
90942
|
/**
|
|
90918
90943
|
*
|
|
@@ -90925,20 +90950,20 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
90925
90950
|
}, {
|
|
90926
90951
|
key: "deleteRange",
|
|
90927
90952
|
value: function deleteRange(endpath, startpath) {
|
|
90928
|
-
var currRange = new
|
|
90953
|
+
var currRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(this._hoEditorFactoryID, startpath, endpath).normalize();
|
|
90929
90954
|
//拆分更新节点,更新删除范围 this._tmp
|
|
90930
90955
|
if (!this.spliteNode(currRange)) {
|
|
90931
90956
|
return 0;
|
|
90932
90957
|
}
|
|
90933
|
-
var newDomRange = new
|
|
90934
|
-
if (!newDomRange.npStart.node) throw
|
|
90935
|
-
if (!newDomRange.npEnd.node) throw
|
|
90958
|
+
var newDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.end);
|
|
90959
|
+
if (!newDomRange.npStart.node) throw _events_Exception__WEBPACK_IMPORTED_MODULE_26__/* .Exception */ .P.NodeNotFound();
|
|
90960
|
+
if (!newDomRange.npEnd.node) throw _events_Exception__WEBPACK_IMPORTED_MODULE_26__/* .Exception */ .P.NodeNotFound();
|
|
90936
90961
|
var aStart = newDomRange.npStart.node;
|
|
90937
90962
|
if (currRange.startMainNode) {
|
|
90938
90963
|
aStart = currRange.startMainNode;
|
|
90939
90964
|
}
|
|
90940
|
-
var nodes =
|
|
90941
|
-
var hoEditorFactory =
|
|
90965
|
+
var nodes = _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a.getSelectDomNodesForDelete(this._hoEditorFactoryID, this._tmp.start, this._tmp.end);
|
|
90966
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_31__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
90942
90967
|
// this.DeleteBaseCombineNodeContent(
|
|
90943
90968
|
// newDomRange,
|
|
90944
90969
|
// newDomRange.npEnd.node,
|
|
@@ -91066,24 +91091,24 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91066
91091
|
*
|
|
91067
91092
|
* @param Anode
|
|
91068
91093
|
*/
|
|
91069
|
-
var hoEditorFactory =
|
|
91094
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_31__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
91070
91095
|
var forMarkNode = function forMarkNode(Anode) {
|
|
91071
|
-
if (Anode.parentNode instanceof
|
|
91096
|
+
if (Anode.parentNode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_24__/* .TextInputFieldNode */ .re) {
|
|
91072
91097
|
var pTINode = Anode.parentNode;
|
|
91073
91098
|
if (pTINode.isEmpty() || !pTINode.canModifyContent) {
|
|
91074
91099
|
//为空 或者 不允许编辑
|
|
91075
91100
|
var tmp = pTINode.previousLeaf();
|
|
91076
91101
|
if (!tmp) {
|
|
91077
|
-
throw
|
|
91102
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_26__/* .Exception */ .P.NodeNotFound();
|
|
91078
91103
|
}
|
|
91079
91104
|
info[0] = 0;
|
|
91080
|
-
info[1] = new
|
|
91105
|
+
info[1] = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(_this._hoEditorFactoryID, hoEditorFactory.docTree.getNodeLastPath(tmp), hoEditorFactory.docTree.getNodeLastPath(pTINode));
|
|
91081
91106
|
} else {
|
|
91082
91107
|
if (Anode == pTINode.last()) {
|
|
91083
91108
|
//递归调用删除
|
|
91084
91109
|
var _tmp = _this.getPrevNodeDomRange(Anode);
|
|
91085
91110
|
//1.移动光标
|
|
91086
|
-
hoEditorFactory.docTree.curDomRange = new
|
|
91111
|
+
hoEditorFactory.docTree.curDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(_this._hoEditorFactoryID, _tmp.endPath, _tmp.endPath);
|
|
91087
91112
|
// this.MoveCaret(tmp.endPath);
|
|
91088
91113
|
//2.删除内容
|
|
91089
91114
|
info[0] = 1;
|
|
@@ -91091,7 +91116,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91091
91116
|
} else if (Anode == pTINode.first()) {
|
|
91092
91117
|
//移动光标到文本域外
|
|
91093
91118
|
var _tmp2 = _this.getPrevNodeDomRange(Anode);
|
|
91094
|
-
hoEditorFactory.docTree.curDomRange = new
|
|
91119
|
+
hoEditorFactory.docTree.curDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(_this._hoEditorFactoryID, _tmp2.endPath, _tmp2.endPath);
|
|
91095
91120
|
// this.MoveCaret(tmp.endPath);
|
|
91096
91121
|
info[0] = 2;
|
|
91097
91122
|
info[1] = _tmp2;
|
|
@@ -91100,20 +91125,20 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91100
91125
|
}
|
|
91101
91126
|
};
|
|
91102
91127
|
if (!(s && e)) {
|
|
91103
|
-
throw
|
|
91128
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_26__/* .Exception */ .P.NodeNotFound();
|
|
91104
91129
|
}
|
|
91105
91130
|
this._tmp.start = Arange.startPath;
|
|
91106
91131
|
this._tmp.end = Arange.endPath;
|
|
91107
91132
|
var spnode = s.parentNode;
|
|
91108
91133
|
var epnode = e.parentNode;
|
|
91109
91134
|
var pnode = epnode;
|
|
91110
|
-
if (spnode instanceof
|
|
91111
|
-
var result =
|
|
91135
|
+
if (spnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_24__/* .TextInputFieldNode */ .re && epnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_24__/* .TextInputFieldNode */ .re && spnode != epnode) {
|
|
91136
|
+
var result = _dom_NodePosition__WEBPACK_IMPORTED_MODULE_38__/* .NodePosition */ .F.nodePositionCompare(spnode.StartMarkNode, epnode.StartMarkNode);
|
|
91112
91137
|
if (result < 0) {
|
|
91113
91138
|
pnode = spnode;
|
|
91114
91139
|
}
|
|
91115
91140
|
}
|
|
91116
|
-
if (this._isForceDelete && pnode instanceof
|
|
91141
|
+
if (this._isForceDelete && pnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_24__/* .TextInputFieldNode */ .re && pnode.inputFieldType === 1 && (_pnode$downListProper = pnode.downListProperty.listItems) !== null && _pnode$downListProper !== void 0 && _pnode$downListProper.includes("<元素>")) {
|
|
91117
91142
|
this._tmp.start = pnode.StartMarkNode.getNodePath();
|
|
91118
91143
|
this._tmp.end = hoEditorFactory.docTree.getNodeLastPath(pnode.EndMarkNode.previousLeaf());
|
|
91119
91144
|
return true;
|
|
@@ -91121,12 +91146,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91121
91146
|
if (s === e) {
|
|
91122
91147
|
if (s instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_18__/* .TextNode */ .R) {
|
|
91123
91148
|
// HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.curDomRange = Arange;
|
|
91124
|
-
var tmp = new
|
|
91149
|
+
var tmp = new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_21__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, Arange.startPath, s, Arange);
|
|
91125
91150
|
this._undo.begin();
|
|
91126
91151
|
this._undo.add(tmp);
|
|
91127
91152
|
this._undo.commit();
|
|
91128
91153
|
this._tmp.end = hoEditorFactory.docTree.getNodeLastPath(tmp.theNode);
|
|
91129
|
-
} else if (s instanceof
|
|
91154
|
+
} else if (s instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_25__/* .MarkNode */ .j) {
|
|
91130
91155
|
forMarkNode(s);
|
|
91131
91156
|
if (info[0] == 0 && info[1]) {
|
|
91132
91157
|
this._tmp.start = info[1].startPath;
|
|
@@ -91142,24 +91167,24 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91142
91167
|
} else {
|
|
91143
91168
|
var _tmp3 = null;
|
|
91144
91169
|
if (e instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_18__/* .TextNode */ .R && Arange.npEnd.childIndex >= 0 && Arange.npEnd.childIndex < e.getLength() - 1) {
|
|
91145
|
-
_tmp3 = new
|
|
91170
|
+
_tmp3 = new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_21__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, Arange.endPath, e, Arange);
|
|
91146
91171
|
this._undo.begin();
|
|
91147
91172
|
this._undo.add(_tmp3);
|
|
91148
91173
|
this._undo.commit();
|
|
91149
91174
|
}
|
|
91150
91175
|
if (s instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_18__/* .TextNode */ .R && Arange.npStart.childIndex >= 0 && Arange.npStart.childIndex < s.getLength() - 1) {
|
|
91151
91176
|
this._undo.begin();
|
|
91152
|
-
this._undo.add(new
|
|
91177
|
+
this._undo.add(new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_21__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, Arange.startPath, s, Arange));
|
|
91153
91178
|
this._undo.commit();
|
|
91154
91179
|
}
|
|
91155
|
-
if (e instanceof
|
|
91180
|
+
if (e instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_25__/* .MarkNode */ .j) {
|
|
91156
91181
|
forMarkNode(e);
|
|
91157
91182
|
if (info[0] == 0 && info[1]) {
|
|
91158
91183
|
this._tmp.end = info[1].endPath;
|
|
91159
91184
|
// return this.spliteNode(new DomRange(this._tmp.start, this._tmp.end));
|
|
91160
91185
|
} else if ((info[0] == 1 || info[0] == 2) && info[1]) {
|
|
91161
91186
|
this._tmp.end = info[1].endPath;
|
|
91162
|
-
return this.spliteNode(new
|
|
91187
|
+
return this.spliteNode(new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.end));
|
|
91163
91188
|
}
|
|
91164
91189
|
}
|
|
91165
91190
|
if (_tmp3) {
|
|
@@ -91173,14 +91198,14 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91173
91198
|
}, {
|
|
91174
91199
|
key: "ParentRepaint",
|
|
91175
91200
|
value: function ParentRepaint(Anode) {
|
|
91176
|
-
if (Anode && Anode instanceof
|
|
91177
|
-
var hoEditorFactory =
|
|
91201
|
+
if (Anode && Anode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_24__/* .TextInputFieldNode */ .re) {
|
|
91202
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_31__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
91178
91203
|
if (Anode.childNodes.length === 2) {
|
|
91179
91204
|
var contentMarkNode = Anode.childNodes2[1];
|
|
91180
91205
|
contentMarkNode.styleIndex = Anode.childNodes[0].styleIndex;
|
|
91181
91206
|
var insertPath = hoEditorFactory.docTree.getNodeLastPath(Anode.childNodes[0]);
|
|
91182
91207
|
hoEditorFactory.undoService.begin();
|
|
91183
|
-
hoEditorFactory.undoService.add(new
|
|
91208
|
+
hoEditorFactory.undoService.add(new _NodeInsertUndoUnit__WEBPACK_IMPORTED_MODULE_36__/* .NodeInsertUndoUnit */ .R(this._hoEditorFactoryID, insertPath, contentMarkNode));
|
|
91184
91209
|
hoEditorFactory.undoService.commit();
|
|
91185
91210
|
}
|
|
91186
91211
|
Anode.update();
|
|
@@ -91202,10 +91227,10 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91202
91227
|
while (1) switch (_context2.prev = _context2.next) {
|
|
91203
91228
|
case 0:
|
|
91204
91229
|
this.initParam();
|
|
91205
|
-
currRange = new
|
|
91206
|
-
hoEditorFactory =
|
|
91230
|
+
currRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(this._hoEditorFactoryID, this._startPath, this._endPath).normalize();
|
|
91231
|
+
hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_31__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
91207
91232
|
hoEditorFactory.docTree.curDomRange = currRange;
|
|
91208
|
-
if (!(hoEditorFactory.drawTree.paintStatus ===
|
|
91233
|
+
if (!(hoEditorFactory.drawTree.paintStatus === _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_41__/* .PaintState */ .Dh.psReview)) {
|
|
91209
91234
|
_context2.next = 11;
|
|
91210
91235
|
break;
|
|
91211
91236
|
}
|
|
@@ -91222,7 +91247,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91222
91247
|
this._isError = true;
|
|
91223
91248
|
return _context2.abrupt("return");
|
|
91224
91249
|
case 11:
|
|
91225
|
-
nodes =
|
|
91250
|
+
nodes = _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a.getSelectDomNodesForDelete(this._hoEditorFactoryID, this._startPath, this._endPath); // const npFirst = hoEditorFactory.docTree.findNodePositionByPath(this._startPath);
|
|
91226
91251
|
// if (npFirst && npFirst.node) {
|
|
91227
91252
|
// //const parentNode = hoEditorFactory.docTree.getParentNode(this._startPath);
|
|
91228
91253
|
// //if (parentNode) {
|
|
@@ -91232,12 +91257,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91232
91257
|
// //}
|
|
91233
91258
|
// }
|
|
91234
91259
|
//if(nodes.length == 0) return;
|
|
91235
|
-
if (!(hoEditorFactory.drawTree.paintStatus !==
|
|
91236
|
-
_context2.next =
|
|
91260
|
+
if (!(hoEditorFactory.drawTree.paintStatus !== _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_41__/* .PaintState */ .Dh.psDesign && !this._isForceDelete)) {
|
|
91261
|
+
_context2.next = 68;
|
|
91237
91262
|
break;
|
|
91238
91263
|
}
|
|
91239
91264
|
lastNode = nodes[nodes.length - 1];
|
|
91240
|
-
if (!(lastNode instanceof
|
|
91265
|
+
if (!(lastNode instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_25__/* .MarkNode */ .j && lastNode.MarkNodeType === 0)) {
|
|
91241
91266
|
_context2.next = 22;
|
|
91242
91267
|
break;
|
|
91243
91268
|
}
|
|
@@ -91251,15 +91276,30 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91251
91276
|
hoEditorFactory.docTree.curDomRange.endPath = ePath;
|
|
91252
91277
|
nodes.splice(nodes.length - 1, 1);
|
|
91253
91278
|
case 22:
|
|
91254
|
-
if (nodes.length ===
|
|
91279
|
+
if (!(nodes.length === 1 && nodes[0] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_25__/* .MarkNode */ .j && nodes[0].MarkNodeType === 2)) {
|
|
91280
|
+
_context2.next = 24;
|
|
91281
|
+
break;
|
|
91282
|
+
}
|
|
91283
|
+
return _context2.abrupt("return");
|
|
91284
|
+
case 24:
|
|
91285
|
+
if (nodes.length === 2 && nodes[0] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_25__/* .MarkNode */ .j && nodes[0].MarkNodeType === 0) {
|
|
91255
91286
|
sPath = nodes[0].getNodePath();
|
|
91256
91287
|
hoEditorFactory.docTree.curDomRange.startPath = sPath;
|
|
91257
91288
|
nodes.splice(0, 1);
|
|
91258
91289
|
}
|
|
91290
|
+
if (!(nodes.length === 2 && nodes[1] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_25__/* .MarkNode */ .j && nodes[1].MarkNodeType === 2 && !nodes[1].parentNode.canModifyContent)) {
|
|
91291
|
+
_context2.next = 30;
|
|
91292
|
+
break;
|
|
91293
|
+
}
|
|
91294
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.destroy();
|
|
91295
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.warn("该元素不允许编辑。");
|
|
91296
|
+
this._isError = true;
|
|
91297
|
+
return _context2.abrupt("return");
|
|
91298
|
+
case 30:
|
|
91259
91299
|
n = 0;
|
|
91260
|
-
case
|
|
91300
|
+
case 31:
|
|
91261
91301
|
if (!(n < nodes.length)) {
|
|
91262
|
-
_context2.next =
|
|
91302
|
+
_context2.next = 67;
|
|
91263
91303
|
break;
|
|
91264
91304
|
}
|
|
91265
91305
|
node = nodes[n]; // if (node instanceof MarkNode && node.parentNode instanceof TextInputFieldNode && node.MarkNodeType === 1 && !node.parentNode.isAllowDelete) {
|
|
@@ -91267,79 +91307,79 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91267
91307
|
// this._isError = true;
|
|
91268
91308
|
// return;
|
|
91269
91309
|
// }
|
|
91270
|
-
if (!(node instanceof
|
|
91271
|
-
_context2.next =
|
|
91310
|
+
if (!(node instanceof _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_32__/* .ControlNode */ .w && !(node instanceof _dom_treeNode_RareCharNode__WEBPACK_IMPORTED_MODULE_40__/* .RareCharNode */ .Q) || node instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_24__/* .TextInputFieldNode */ .re)) {
|
|
91311
|
+
_context2.next = 44;
|
|
91272
91312
|
break;
|
|
91273
91313
|
}
|
|
91274
91314
|
if (node.isAllowDelete) {
|
|
91275
|
-
_context2.next =
|
|
91315
|
+
_context2.next = 44;
|
|
91276
91316
|
break;
|
|
91277
91317
|
}
|
|
91278
91318
|
tip = "";
|
|
91279
|
-
if (node instanceof
|
|
91319
|
+
if (node instanceof _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_33__/* .RadioAndCheckBoxNode */ .Yh && node.controlStyle === "RadioBox") {
|
|
91280
91320
|
tip = "单选框";
|
|
91281
91321
|
}
|
|
91282
|
-
if (node instanceof
|
|
91322
|
+
if (node instanceof _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_33__/* .RadioAndCheckBoxNode */ .Yh && node.controlStyle === "CheckBox") {
|
|
91283
91323
|
tip = "复选框";
|
|
91284
91324
|
}
|
|
91285
|
-
if (node instanceof
|
|
91325
|
+
if (node instanceof _dom_treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_34__/* .DateTimeNode */ .Z) {
|
|
91286
91326
|
tip = "日期时间";
|
|
91287
91327
|
}
|
|
91288
|
-
if (node instanceof
|
|
91328
|
+
if (node instanceof _dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_35__/* .DownListNode */ .yF) {
|
|
91289
91329
|
tip = "下拉列表";
|
|
91290
91330
|
}
|
|
91291
91331
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.destroy();
|
|
91292
|
-
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.warn(tip + "
|
|
91332
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.warn(tip + "元素已设置为不允许删除。");
|
|
91293
91333
|
this._isError = true;
|
|
91294
91334
|
return _context2.abrupt("return");
|
|
91295
|
-
case
|
|
91296
|
-
if (!(node instanceof
|
|
91297
|
-
_context2.next =
|
|
91335
|
+
case 44:
|
|
91336
|
+
if (!(node instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_25__/* .MarkNode */ .j && node.MarkNodeType === 0)) {
|
|
91337
|
+
_context2.next = 49;
|
|
91298
91338
|
break;
|
|
91299
91339
|
}
|
|
91300
91340
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.destroy();
|
|
91301
91341
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.warn("元素已设置为不允许删除,请正确操作。");
|
|
91302
91342
|
this._isError = true;
|
|
91303
91343
|
return _context2.abrupt("return");
|
|
91304
|
-
case
|
|
91305
|
-
if (!(node instanceof
|
|
91306
|
-
_context2.next =
|
|
91344
|
+
case 49:
|
|
91345
|
+
if (!(node instanceof _dom_treeNode_TableFormula__WEBPACK_IMPORTED_MODULE_39__/* .TableFormula */ .N)) {
|
|
91346
|
+
_context2.next = 54;
|
|
91307
91347
|
break;
|
|
91308
91348
|
}
|
|
91309
91349
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.destroy();
|
|
91310
91350
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.warn("不允许删除表格计算公式");
|
|
91311
91351
|
this._isError = true;
|
|
91312
91352
|
return _context2.abrupt("return");
|
|
91313
|
-
case
|
|
91314
|
-
if (!(node instanceof
|
|
91315
|
-
_context2.next =
|
|
91353
|
+
case 54:
|
|
91354
|
+
if (!(node instanceof _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_30__/* .TableNode */ .Fh)) {
|
|
91355
|
+
_context2.next = 59;
|
|
91316
91356
|
break;
|
|
91317
91357
|
}
|
|
91318
91358
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.destroy();
|
|
91319
91359
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.warn("不允许删除表格");
|
|
91320
91360
|
this._isError = true;
|
|
91321
91361
|
return _context2.abrupt("return");
|
|
91322
|
-
case
|
|
91323
|
-
if (!(node instanceof
|
|
91324
|
-
_context2.next =
|
|
91362
|
+
case 59:
|
|
91363
|
+
if (!(node instanceof _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_37__/* .SignNode */ .N)) {
|
|
91364
|
+
_context2.next = 64;
|
|
91325
91365
|
break;
|
|
91326
91366
|
}
|
|
91327
91367
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.destroy();
|
|
91328
91368
|
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_42__/* ["default"] */ .Z.warn("不允许直接删除签名!");
|
|
91329
91369
|
this._isError = true;
|
|
91330
91370
|
return _context2.abrupt("return");
|
|
91331
|
-
case
|
|
91371
|
+
case 64:
|
|
91332
91372
|
n++;
|
|
91333
|
-
_context2.next =
|
|
91373
|
+
_context2.next = 31;
|
|
91334
91374
|
break;
|
|
91335
|
-
case
|
|
91336
|
-
if (nodes.length === 1 && nodes[0] instanceof
|
|
91375
|
+
case 67:
|
|
91376
|
+
if (nodes.length === 1 && nodes[0] instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_24__/* .TextInputFieldNode */ .re && !nodes[0].isAllowDelete && nodes[0].childNodes[1] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_25__/* .MarkNode */ .j) {
|
|
91337
91377
|
hoEditorFactory.docTree.curDomRange.setSamePath(this._endPath);
|
|
91338
91378
|
}
|
|
91339
|
-
case
|
|
91379
|
+
case 68:
|
|
91340
91380
|
pnode = (_currRange$npEnd$node = currRange.npEnd.node) === null || _currRange$npEnd$node === void 0 ? void 0 : _currRange$npEnd$node.parentNode;
|
|
91341
|
-
if (!(pnode && pnode instanceof
|
|
91342
|
-
_context2.next =
|
|
91381
|
+
if (!(pnode && pnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_24__/* .TextInputFieldNode */ .re && currRange.npEnd.path != hoEditorFactory.docTree.getNodeLastPath(pnode))) {
|
|
91382
|
+
_context2.next = 74;
|
|
91343
91383
|
break;
|
|
91344
91384
|
}
|
|
91345
91385
|
//判断当前TextInputField是否可编辑
|
|
@@ -91351,19 +91391,19 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91351
91391
|
// this._undo.commit();
|
|
91352
91392
|
});
|
|
91353
91393
|
if (_res[0]) {
|
|
91354
|
-
_context2.next =
|
|
91394
|
+
_context2.next = 74;
|
|
91355
91395
|
break;
|
|
91356
91396
|
}
|
|
91357
91397
|
return _context2.abrupt("return");
|
|
91358
|
-
case
|
|
91398
|
+
case 74:
|
|
91359
91399
|
changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_19__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_17__/* .DocAction */ .gk.daUndoInsert, currRange.startPath, ""); //FIXME:deleteRange函数完成后调用这个
|
|
91360
91400
|
// hoEditorFactory.docTree.deleteRange(arange.startPath, arange.endPath);
|
|
91361
91401
|
if (currRange.npStart.node && currRange.npEnd.node) {
|
|
91362
|
-
_context2.next =
|
|
91402
|
+
_context2.next = 77;
|
|
91363
91403
|
break;
|
|
91364
91404
|
}
|
|
91365
|
-
throw
|
|
91366
|
-
case
|
|
91405
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_26__/* .Exception */ .P.NodeNotFound();
|
|
91406
|
+
case 77:
|
|
91367
91407
|
// const [startPath, endPath] = DomRange.skipStartEndTablePath(
|
|
91368
91408
|
// this._hoEditorFactory,
|
|
91369
91409
|
// currRange.startPath,
|
|
@@ -91372,20 +91412,20 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91372
91412
|
startPath = currRange.startPath;
|
|
91373
91413
|
endPath = currRange.endPath;
|
|
91374
91414
|
changeEvent.oldEndPath = endPath;
|
|
91375
|
-
changeEvent.oldDrawTreeLines = new
|
|
91415
|
+
changeEvent.oldDrawTreeLines = new _draw_SelectRange__WEBPACK_IMPORTED_MODULE_29__/* .SelectRange */ .E(this._hoEditorFactoryID).getRangeDrawTreeLines(startPath, endPath);
|
|
91376
91416
|
res = this.deleteRange(currRange.endPath, currRange.startPath);
|
|
91377
91417
|
if (!(res == 1)) {
|
|
91378
|
-
_context2.next =
|
|
91418
|
+
_context2.next = 89;
|
|
91379
91419
|
break;
|
|
91380
91420
|
}
|
|
91381
91421
|
changeEvent.beforeChangePath = startPath;
|
|
91382
91422
|
changeEvent.afterChangePath = this._tmp.start;
|
|
91383
|
-
_context2.next =
|
|
91423
|
+
_context2.next = 87;
|
|
91384
91424
|
return hoEditorFactory.docTree.change(changeEvent);
|
|
91385
|
-
case
|
|
91386
|
-
cgEvent = new
|
|
91425
|
+
case 87:
|
|
91426
|
+
cgEvent = new _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_22__/* .SelectionChangeEvent */ .r(hoEditorFactory.docTree.curDomRange, new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.start));
|
|
91387
91427
|
hoEditorFactory.docTree.selectChange(cgEvent);
|
|
91388
|
-
case
|
|
91428
|
+
case 89:
|
|
91389
91429
|
hoEditorFactory.docTree.curDomRange.setSamePath(this._tmp.start);
|
|
91390
91430
|
hoEditorFactory.drawTree.moveCaretToPath(this._tmp.start);
|
|
91391
91431
|
aNode = currRange.npStart.node;
|
|
@@ -91393,12 +91433,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
91393
91433
|
pnode = aNode.parentNode;
|
|
91394
91434
|
}
|
|
91395
91435
|
if (!(aNode && pnode)) {
|
|
91396
|
-
_context2.next =
|
|
91436
|
+
_context2.next = 96;
|
|
91397
91437
|
break;
|
|
91398
91438
|
}
|
|
91399
|
-
_context2.next =
|
|
91439
|
+
_context2.next = 96;
|
|
91400
91440
|
return this.ParentRepaint(pnode);
|
|
91401
|
-
case
|
|
91441
|
+
case 96:
|
|
91402
91442
|
case "end":
|
|
91403
91443
|
return _context2.stop();
|
|
91404
91444
|
}
|
|
@@ -218756,7 +218796,7 @@ var TextNode = __webpack_require__(27198);
|
|
|
218756
218796
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
218757
218797
|
var ParagraphNode = __webpack_require__(67945);
|
|
218758
218798
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
218759
|
-
/* harmony default export */ var version = ('3.1.
|
|
218799
|
+
/* harmony default export */ var version = ('3.1.51');
|
|
218760
218800
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
218761
218801
|
var PoperTipText = __webpack_require__(50987);
|
|
218762
218802
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -220214,17 +220254,22 @@ var DrawPageTree = /*#__PURE__*/function () {
|
|
|
220214
220254
|
return;
|
|
220215
220255
|
}
|
|
220216
220256
|
//页眉页脚绘制完毕
|
|
220217
|
-
|
|
220218
|
-
|
|
220219
|
-
|
|
220220
|
-
|
|
220221
|
-
|
|
220222
|
-
|
|
220223
|
-
|
|
220224
|
-
|
|
220225
|
-
|
|
220226
|
-
|
|
220227
|
-
|
|
220257
|
+
//2023-12-28日注释 处理首行有日期更新重叠
|
|
220258
|
+
// if (
|
|
220259
|
+
// drawArea === mainArea &&
|
|
220260
|
+
// nextLine === this.drawMainDocs.length - 1 &&
|
|
220261
|
+
// startUpdateLine === nextLine
|
|
220262
|
+
// ) {
|
|
220263
|
+
// this.afterAreaFinishPaint(drawArea);
|
|
220264
|
+
// this._startNeedUpdatePage = Math.min(drawArea.index, this._startNeedUpdatePage === -1 ? 99999 : this._startNeedUpdatePage);
|
|
220265
|
+
// this._endNeedUpdatePage = Math.max(drawArea.index, this._endNeedUpdatePage);
|
|
220266
|
+
// if (hoEditorFactory.drawTree.drawPages.length !== this._oldPageCount) {
|
|
220267
|
+
// this._oldPageCount = 0;
|
|
220268
|
+
// hoEditorFactory.drawTree.updatePageCountNodes();
|
|
220269
|
+
// }
|
|
220270
|
+
// // drawArea.stage.update();
|
|
220271
|
+
// return;
|
|
220272
|
+
// }
|
|
220228
220273
|
var dobj = dRoots[mainIndex];
|
|
220229
220274
|
var startDrawLine;
|
|
220230
220275
|
var redrawPostion = hoEditorFactory.drawTree.getDlineDrawRootLists(dobj)[0];
|
|
@@ -221648,6 +221693,12 @@ var HTMLconverter2 = /*#__PURE__*/function () {
|
|
|
221648
221693
|
this.convert.set('p', function (jnode, style) {
|
|
221649
221694
|
return _this.TransHTMLP(jnode, style);
|
|
221650
221695
|
});
|
|
221696
|
+
// this.convert.set('pclass="p1"', (jnode: ChildNode, style: string) => {
|
|
221697
|
+
// return this.TransHTMLP(jnode, style);
|
|
221698
|
+
// });
|
|
221699
|
+
// this.convert.set('pclass="p2"', (jnode: ChildNode, style: string) => {
|
|
221700
|
+
// return this.TransHTMLP(jnode, style);
|
|
221701
|
+
// });
|
|
221651
221702
|
this.convert.set('br', function (jnode, style) {
|
|
221652
221703
|
return _this.TransHTMLP(jnode, style);
|
|
221653
221704
|
});
|
|
@@ -221657,6 +221708,9 @@ var HTMLconverter2 = /*#__PURE__*/function () {
|
|
|
221657
221708
|
this.convert.set('font', function (jnode, style) {
|
|
221658
221709
|
return _this.TransHTMLSPAN(jnode, style);
|
|
221659
221710
|
});
|
|
221711
|
+
// this.convert.set('tableclass="t1"', (jnode: ChildNode, style: string) => {
|
|
221712
|
+
// return this.TransHTMLTABLE(jnode, style);
|
|
221713
|
+
// });
|
|
221660
221714
|
this.convert.set('table', function (jnode, style) {
|
|
221661
221715
|
return _this.TransHTMLTABLE(jnode, style);
|
|
221662
221716
|
});
|
|
@@ -222478,6 +222532,7 @@ var HTMLconverter2 = /*#__PURE__*/function () {
|
|
|
222478
222532
|
var anode = tmp[h];
|
|
222479
222533
|
if (h == 0 && anode instanceof ParagraphNode/* ParagraphNode */.C) {
|
|
222480
222534
|
node.childNodes[0].styleIndex = anode.styleIndex;
|
|
222535
|
+
node.childNodes[0].paraNo = anode.paraNo;
|
|
222481
222536
|
continue;
|
|
222482
222537
|
}
|
|
222483
222538
|
anode.parentNode = node;
|
|
@@ -226089,6 +226144,7 @@ var hoCreateHistory = {
|
|
|
226089
226144
|
|
|
226090
226145
|
|
|
226091
226146
|
|
|
226147
|
+
|
|
226092
226148
|
|
|
226093
226149
|
|
|
226094
226150
|
var VueController = /*#__PURE__*/function () {
|
|
@@ -231132,84 +231188,193 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231132
231188
|
key: "updateElementTextById",
|
|
231133
231189
|
value: function () {
|
|
231134
231190
|
var _updateElementTextById = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee8(id, text) {
|
|
231135
|
-
var
|
|
231136
|
-
|
|
231137
|
-
|
|
231191
|
+
var _this2 = this;
|
|
231192
|
+
var nodes, _loop4, _ret2, i;
|
|
231193
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee8$(_context10) {
|
|
231194
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
231138
231195
|
case 0:
|
|
231139
231196
|
nodes = this.getNodeByID('all', id, 'array');
|
|
231140
231197
|
if (!(nodes.length > 0)) {
|
|
231141
|
-
|
|
231198
|
+
_context10.next = 14;
|
|
231142
231199
|
break;
|
|
231143
231200
|
}
|
|
231201
|
+
_loop4 = /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _loop4() {
|
|
231202
|
+
var node, hoEditorFactory, _node$childNodes, xml, x2js, object, json, childNodes, getChildNodes, _nodes4, k, _xml, _x2js, _object, _json, _xml2, _x2js2, _object2, _json2;
|
|
231203
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _loop4$(_context9) {
|
|
231204
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
231205
|
+
case 0:
|
|
231206
|
+
node = nodes[i];
|
|
231207
|
+
if (!node) {
|
|
231208
|
+
_context9.next = 44;
|
|
231209
|
+
break;
|
|
231210
|
+
}
|
|
231211
|
+
if (!(node instanceof DateTimeNode/* DateTimeNode */.Z || node instanceof DownListNode/* DownListNode */.yF || node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
|
|
231212
|
+
_context9.next = 41;
|
|
231213
|
+
break;
|
|
231214
|
+
}
|
|
231215
|
+
if (!(node.notReplaceElement === true)) {
|
|
231216
|
+
_context9.next = 6;
|
|
231217
|
+
break;
|
|
231218
|
+
}
|
|
231219
|
+
console.warn("".concat(id, " ==> ").concat(node.notReplaceElement));
|
|
231220
|
+
return _context9.abrupt("return", {
|
|
231221
|
+
v: void 0
|
|
231222
|
+
});
|
|
231223
|
+
case 6:
|
|
231224
|
+
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(_this2._hoEditorFactoryID);
|
|
231225
|
+
if (!(node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
|
|
231226
|
+
_context9.next = 31;
|
|
231227
|
+
break;
|
|
231228
|
+
}
|
|
231229
|
+
if (!text.includes("<TextInputFieldNode>")) {
|
|
231230
|
+
_context9.next = 21;
|
|
231231
|
+
break;
|
|
231232
|
+
}
|
|
231233
|
+
xml = hoEditorFactory.structureConvert.replaceNodesName(text);
|
|
231234
|
+
x2js = new (x2js_default())({
|
|
231235
|
+
stripWhitespaces: false
|
|
231236
|
+
});
|
|
231237
|
+
object = x2js.xml2js(xml);
|
|
231238
|
+
json = object;
|
|
231239
|
+
childNodes = new Array();
|
|
231240
|
+
getChildNodes = function getChildNodes(item) {
|
|
231241
|
+
if (Array.isArray(item)) {
|
|
231242
|
+
//数组
|
|
231243
|
+
for (var _i3 = 1; _i3 < item.length - 1; _i3++) {
|
|
231244
|
+
var anode = hoEditorFactory.structureConvert.convertNode(item[_i3], node.rootNodes, node);
|
|
231245
|
+
if (anode) {
|
|
231246
|
+
if (anode instanceof TextNode/* TextNode */.R) {
|
|
231247
|
+
if (anode.text.length > (0,esm_toConsumableArray/* default */.Z)(anode.text).length) {
|
|
231248
|
+
//特殊处理生僻字
|
|
231249
|
+
var rareCharNode = new RareCharNode/* RareCharNode */.Q(node.hoEditorFactoryID, anode.rootNodes, node, BaseNode/* NodeType */.Jq.ntRareChar, anode.text, anode.styleIndex);
|
|
231250
|
+
childNodes.push(rareCharNode);
|
|
231251
|
+
} else {
|
|
231252
|
+
if (anode.text !== '' && anode.text !== '' && anode.text !== '' && anode.text !== '' && anode.text !== '' && anode.text !== '') {
|
|
231253
|
+
childNodes.push(anode);
|
|
231254
|
+
}
|
|
231255
|
+
}
|
|
231256
|
+
} else {
|
|
231257
|
+
childNodes.push(anode);
|
|
231258
|
+
}
|
|
231259
|
+
}
|
|
231260
|
+
}
|
|
231261
|
+
} else {
|
|
231262
|
+
//单个对象
|
|
231263
|
+
var bnode = hoEditorFactory.structureConvert.convertNode(item, node.rootNodes, node);
|
|
231264
|
+
if (bnode) {
|
|
231265
|
+
if (bnode instanceof TextNode/* TextNode */.R) {
|
|
231266
|
+
if (bnode.text.length > (0,esm_toConsumableArray/* default */.Z)(bnode.text).length) {
|
|
231267
|
+
//特殊处理生僻字
|
|
231268
|
+
var _rareCharNode = new RareCharNode/* RareCharNode */.Q(node.hoEditorFactoryID, bnode.rootNodes, node, BaseNode/* NodeType */.Jq.ntRareChar, bnode.text, bnode.styleIndex);
|
|
231269
|
+
childNodes.push(_rareCharNode);
|
|
231270
|
+
} else {
|
|
231271
|
+
if (bnode.text !== '' && bnode.text !== '' && bnode.text !== '' && bnode.text !== '' && bnode.text !== '' && bnode.text !== '') {
|
|
231272
|
+
childNodes.push(bnode);
|
|
231273
|
+
}
|
|
231274
|
+
}
|
|
231275
|
+
} else {
|
|
231276
|
+
childNodes.push(bnode);
|
|
231277
|
+
}
|
|
231278
|
+
}
|
|
231279
|
+
}
|
|
231280
|
+
};
|
|
231281
|
+
getChildNodes(json.node.childNodes.node);
|
|
231282
|
+
node.childNodes.splice(1, node.childNodes.length - 2);
|
|
231283
|
+
(_node$childNodes = node.childNodes).splice.apply(_node$childNodes, [1, 0].concat(childNodes));
|
|
231284
|
+
node.update(0);
|
|
231285
|
+
_context9.next = 31;
|
|
231286
|
+
break;
|
|
231287
|
+
case 21:
|
|
231288
|
+
if (!text.includes("<MedicalExpress>")) {
|
|
231289
|
+
_context9.next = 29;
|
|
231290
|
+
break;
|
|
231291
|
+
}
|
|
231292
|
+
node.childNodes.splice(1, node.childNodes.length - 2);
|
|
231293
|
+
_nodes4 = _this2.text2MedicalExpress(text, node.StartMarkNode, node.StartMarkNode.styleIndex);
|
|
231294
|
+
for (k = 0; k < _nodes4.length; k++) {
|
|
231295
|
+
node.childNodes.splice(1 + k, 0, _nodes4[k]);
|
|
231296
|
+
}
|
|
231297
|
+
node.update(0);
|
|
231298
|
+
return _context9.abrupt("return", {
|
|
231299
|
+
v: void 0
|
|
231300
|
+
});
|
|
231301
|
+
case 29:
|
|
231302
|
+
_context9.next = 31;
|
|
231303
|
+
return node.setFieldText(text);
|
|
231304
|
+
case 31:
|
|
231305
|
+
if (!(node instanceof DateTimeNode/* DateTimeNode */.Z)) {
|
|
231306
|
+
_context9.next = 35;
|
|
231307
|
+
break;
|
|
231308
|
+
}
|
|
231309
|
+
if (text.includes("<DateTimeNode>")) {
|
|
231310
|
+
_xml = hoEditorFactory.structureConvert.replaceNodesName(text);
|
|
231311
|
+
_x2js = new (x2js_default())({
|
|
231312
|
+
stripWhitespaces: false
|
|
231313
|
+
});
|
|
231314
|
+
_object = _x2js.xml2js(_xml);
|
|
231315
|
+
_json = _object;
|
|
231316
|
+
text = _json.node.text;
|
|
231317
|
+
}
|
|
231318
|
+
_context9.next = 35;
|
|
231319
|
+
return node.setDateTimeText(text);
|
|
231320
|
+
case 35:
|
|
231321
|
+
if (!(node instanceof DownListNode/* DownListNode */.yF)) {
|
|
231322
|
+
_context9.next = 39;
|
|
231323
|
+
break;
|
|
231324
|
+
}
|
|
231325
|
+
if (text.includes("<DownListNode>")) {
|
|
231326
|
+
_xml2 = hoEditorFactory.structureConvert.replaceNodesName(text);
|
|
231327
|
+
_x2js2 = new (x2js_default())({
|
|
231328
|
+
stripWhitespaces: false
|
|
231329
|
+
});
|
|
231330
|
+
_object2 = _x2js2.xml2js(_xml2);
|
|
231331
|
+
_json2 = _object2;
|
|
231332
|
+
text = _json2.node.text;
|
|
231333
|
+
}
|
|
231334
|
+
_context9.next = 39;
|
|
231335
|
+
return node.setDownListText(text);
|
|
231336
|
+
case 39:
|
|
231337
|
+
_context9.next = 42;
|
|
231338
|
+
break;
|
|
231339
|
+
case 41:
|
|
231340
|
+
console.warn("\u975E\u6587\u672C\u57DF\u548C\u65E5\u671F\u5143\u7D20");
|
|
231341
|
+
case 42:
|
|
231342
|
+
_context9.next = 45;
|
|
231343
|
+
break;
|
|
231344
|
+
case 44:
|
|
231345
|
+
console.warn('未找到对应的元素');
|
|
231346
|
+
case 45:
|
|
231347
|
+
case "end":
|
|
231348
|
+
return _context9.stop();
|
|
231349
|
+
}
|
|
231350
|
+
}, _loop4);
|
|
231351
|
+
});
|
|
231144
231352
|
i = nodes.length - 1;
|
|
231145
|
-
case
|
|
231353
|
+
case 4:
|
|
231146
231354
|
if (!(i >= 0)) {
|
|
231147
|
-
|
|
231148
|
-
break;
|
|
231149
|
-
}
|
|
231150
|
-
node = nodes[i];
|
|
231151
|
-
if (!node) {
|
|
231152
|
-
_context9.next = 29;
|
|
231153
|
-
break;
|
|
231154
|
-
}
|
|
231155
|
-
if (!(node instanceof DateTimeNode/* DateTimeNode */.Z || node instanceof DownListNode/* DownListNode */.yF || node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
|
|
231156
|
-
_context9.next = 26;
|
|
231157
|
-
break;
|
|
231158
|
-
}
|
|
231159
|
-
if (!(node instanceof TextInputFieldNode/* TextInputFieldNode */.re)) {
|
|
231160
|
-
_context9.next = 18;
|
|
231161
|
-
break;
|
|
231162
|
-
}
|
|
231163
|
-
if (!text.includes("<MedicalExpress>")) {
|
|
231164
|
-
_context9.next = 16;
|
|
231165
|
-
break;
|
|
231166
|
-
}
|
|
231167
|
-
node.childNodes.splice(1, node.childNodes.length - 2);
|
|
231168
|
-
_nodes4 = this.text2MedicalExpress(text, node.StartMarkNode, node.StartMarkNode.styleIndex);
|
|
231169
|
-
for (k = 0; k < _nodes4.length; k++) {
|
|
231170
|
-
node.childNodes.splice(1 + k, 0, _nodes4[k]);
|
|
231171
|
-
}
|
|
231172
|
-
node.update(0);
|
|
231173
|
-
return _context9.abrupt("return");
|
|
231174
|
-
case 16:
|
|
231175
|
-
_context9.next = 18;
|
|
231176
|
-
return node.setFieldText(text);
|
|
231177
|
-
case 18:
|
|
231178
|
-
if (!(node instanceof DateTimeNode/* DateTimeNode */.Z)) {
|
|
231179
|
-
_context9.next = 21;
|
|
231355
|
+
_context10.next = 12;
|
|
231180
231356
|
break;
|
|
231181
231357
|
}
|
|
231182
|
-
|
|
231183
|
-
|
|
231184
|
-
|
|
231185
|
-
if (!
|
|
231186
|
-
|
|
231358
|
+
return _context10.delegateYield(_loop4(), "t0", 6);
|
|
231359
|
+
case 6:
|
|
231360
|
+
_ret2 = _context10.t0;
|
|
231361
|
+
if (!_ret2) {
|
|
231362
|
+
_context10.next = 9;
|
|
231187
231363
|
break;
|
|
231188
231364
|
}
|
|
231189
|
-
|
|
231190
|
-
|
|
231191
|
-
case 24:
|
|
231192
|
-
_context9.next = 27;
|
|
231193
|
-
break;
|
|
231194
|
-
case 26:
|
|
231195
|
-
console.warn("\u975E\u6587\u672C\u57DF\u548C\u65E5\u671F\u5143\u7D20");
|
|
231196
|
-
case 27:
|
|
231197
|
-
_context9.next = 30;
|
|
231198
|
-
break;
|
|
231199
|
-
case 29:
|
|
231200
|
-
console.warn('未找到对应的元素');
|
|
231201
|
-
case 30:
|
|
231365
|
+
return _context10.abrupt("return", _ret2.v);
|
|
231366
|
+
case 9:
|
|
231202
231367
|
i--;
|
|
231203
|
-
|
|
231368
|
+
_context10.next = 4;
|
|
231204
231369
|
break;
|
|
231205
|
-
case
|
|
231206
|
-
|
|
231370
|
+
case 12:
|
|
231371
|
+
_context10.next = 15;
|
|
231207
231372
|
break;
|
|
231208
|
-
case
|
|
231373
|
+
case 14:
|
|
231209
231374
|
console.warn('未找到对应的元素');
|
|
231210
|
-
case
|
|
231375
|
+
case 15:
|
|
231211
231376
|
case "end":
|
|
231212
|
-
return
|
|
231377
|
+
return _context10.stop();
|
|
231213
231378
|
}
|
|
231214
231379
|
}, _callee8, this);
|
|
231215
231380
|
}));
|
|
@@ -231257,7 +231422,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231257
231422
|
}, {
|
|
231258
231423
|
key: "createPNG",
|
|
231259
231424
|
value: function createPNG(quality, type, callback) {
|
|
231260
|
-
var
|
|
231425
|
+
var _this3 = this;
|
|
231261
231426
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
231262
231427
|
var createElementNodes = function createElementNodes() {
|
|
231263
231428
|
var drawpages = hoEditorFactory.drawTree.drawPages;
|
|
@@ -231267,18 +231432,18 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231267
231432
|
var imgType = type ? type : 'image/jpeg';
|
|
231268
231433
|
drawpages.forEach(function (drawpage, index) {
|
|
231269
231434
|
var _drawpage$drawDomLeve;
|
|
231270
|
-
|
|
231271
|
-
|
|
231272
|
-
|
|
231273
|
-
|
|
231274
|
-
|
|
231275
|
-
|
|
231276
|
-
|
|
231277
|
-
|
|
231278
|
-
|
|
231279
|
-
|
|
231280
|
-
|
|
231281
|
-
|
|
231435
|
+
if (index == 0) {
|
|
231436
|
+
drawpage.paintBackGround();
|
|
231437
|
+
drawpage.needUpdateStage = true;
|
|
231438
|
+
}
|
|
231439
|
+
if (drawpage.drawDomLevel && !drawpage.drawDomLevel.stage) {
|
|
231440
|
+
drawpage.drawDomLevel.bindStage();
|
|
231441
|
+
drawpage.needUpdateStage = true;
|
|
231442
|
+
}
|
|
231443
|
+
if (drawpage.needUpdateStage && drawpage.drawDomLevel && drawpage.drawDomLevel.stage) {
|
|
231444
|
+
drawpage.drawDomLevel.stage.update();
|
|
231445
|
+
drawpage.needUpdateStage = false;
|
|
231446
|
+
}
|
|
231282
231447
|
var png = document.createElement('img');
|
|
231283
231448
|
var canvas = (_drawpage$drawDomLeve = drawpage.drawDomLevel) === null || _drawpage$drawDomLeve === void 0 ? void 0 : _drawpage$drawDomLeve.domCanvas;
|
|
231284
231449
|
png.src = canvas.toDataURL(imgType, imgQuality);
|
|
@@ -231298,7 +231463,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231298
231463
|
document.body.appendChild(pngBox);
|
|
231299
231464
|
callback && callback();
|
|
231300
231465
|
document.querySelector('#hoDownLoadImageBtn').onclick = function () {
|
|
231301
|
-
|
|
231466
|
+
_this3.downLoadPNGHTML();
|
|
231302
231467
|
};
|
|
231303
231468
|
};
|
|
231304
231469
|
if (hoEditorFactory.loadImageCount <= 0) {
|
|
@@ -231344,7 +231509,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231344
231509
|
}, {
|
|
231345
231510
|
key: "createPDF",
|
|
231346
231511
|
value: function createPDF() {
|
|
231347
|
-
var
|
|
231512
|
+
var _this4 = this;
|
|
231348
231513
|
var btn = document.createElement('button');
|
|
231349
231514
|
btn.id = 'hoDownLoadPDFBtn';
|
|
231350
231515
|
btn.style.position = 'fixed';
|
|
@@ -231356,7 +231521,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231356
231521
|
btn.style.outline = 'none';
|
|
231357
231522
|
document.body.appendChild(btn);
|
|
231358
231523
|
document.querySelector('#hoDownLoadPDFBtn').onclick = function () {
|
|
231359
|
-
|
|
231524
|
+
_this4.saveAsPDF();
|
|
231360
231525
|
};
|
|
231361
231526
|
}
|
|
231362
231527
|
/*
|
|
@@ -231394,26 +231559,26 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231394
231559
|
node = this.getNodeByID(scope, id);
|
|
231395
231560
|
}
|
|
231396
231561
|
if (node) {
|
|
231397
|
-
var
|
|
231398
|
-
var oldRange =
|
|
231399
|
-
var spath =
|
|
231400
|
-
var epath =
|
|
231562
|
+
var _hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
231563
|
+
var oldRange = _hoEditorFactory.docTree.curDomRange;
|
|
231564
|
+
var spath = _hoEditorFactory.docTree.getNodeLastPath(node.previousLeaf());
|
|
231565
|
+
var epath = _hoEditorFactory.docTree.getNodeLastPath(node);
|
|
231401
231566
|
var topath = epath;
|
|
231402
231567
|
if (node instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
231403
|
-
spath =
|
|
231404
|
-
epath =
|
|
231568
|
+
spath = _hoEditorFactory.docTree.getNodeLastPath(node.childNodes[0]);
|
|
231569
|
+
epath = _hoEditorFactory.docTree.getNodeLastPath(node.childNodes[node.childNodes.length - 1].previousLeaf());
|
|
231405
231570
|
if (node.childNodes[1] instanceof MarkNode/* MarkNode */.j) {
|
|
231406
231571
|
topath = spath;
|
|
231407
231572
|
} else {
|
|
231408
231573
|
topath = epath;
|
|
231409
231574
|
}
|
|
231410
231575
|
}
|
|
231411
|
-
|
|
231576
|
+
_hoEditorFactory.drawTree.moveCaretToPath(topath);
|
|
231412
231577
|
if (type !== 1) {
|
|
231413
231578
|
var newRange = new DomRange/* DomRange */.a(this.hoEditorFactoryID, spath, epath);
|
|
231414
|
-
|
|
231579
|
+
_hoEditorFactory.docTree.curDomRange = newRange;
|
|
231415
231580
|
var selectChangeEvent = new SelectionChangeEvent/* SelectionChangeEvent */.r(oldRange, newRange);
|
|
231416
|
-
|
|
231581
|
+
_hoEditorFactory.docTree.selectChange(selectChangeEvent);
|
|
231417
231582
|
}
|
|
231418
231583
|
}
|
|
231419
231584
|
if (returnValue) {
|
|
@@ -231456,49 +231621,49 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231456
231621
|
key: "getBase64",
|
|
231457
231622
|
value: function () {
|
|
231458
231623
|
var _getBase = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee9(type, callback) {
|
|
231459
|
-
var hoEditorFactory, _hoEditorFactory$vueC, curDomRange, endPath,
|
|
231460
|
-
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee9$(
|
|
231461
|
-
while (1) switch (
|
|
231624
|
+
var hoEditorFactory, _hoEditorFactory$vueC, curDomRange, endPath, _node, htmlText, _hoEditorFactory$vueC2, _curDomRange2, _endPath, _node2, base64;
|
|
231625
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee9$(_context11) {
|
|
231626
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
231462
231627
|
case 0:
|
|
231463
231628
|
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
231464
231629
|
if (!(type === 'html')) {
|
|
231465
|
-
|
|
231630
|
+
_context11.next = 14;
|
|
231466
231631
|
break;
|
|
231467
231632
|
}
|
|
231468
231633
|
curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
231469
231634
|
endPath = curDomRange.normalize().endPath;
|
|
231470
|
-
|
|
231471
|
-
if (!(
|
|
231472
|
-
|
|
231635
|
+
_node = (_hoEditorFactory$vueC = hoEditorFactory.vueController.findNodebyPath(endPath)) === null || _hoEditorFactory$vueC === void 0 ? void 0 : _hoEditorFactory$vueC.node;
|
|
231636
|
+
if (!(_node instanceof SignNode/* SignNode */.N && !_node.isTemplate && _node.attribute == 1)) {
|
|
231637
|
+
_context11.next = 8;
|
|
231473
231638
|
break;
|
|
231474
231639
|
}
|
|
231475
|
-
|
|
231476
|
-
return this.deleteNode(
|
|
231640
|
+
_context11.next = 8;
|
|
231641
|
+
return this.deleteNode(_node);
|
|
231477
231642
|
case 8:
|
|
231478
|
-
|
|
231643
|
+
_context11.next = 10;
|
|
231479
231644
|
return hoEditorFactory.printController.createHtml();
|
|
231480
231645
|
case 10:
|
|
231481
|
-
htmlText =
|
|
231482
|
-
return
|
|
231646
|
+
htmlText = _context11.sent;
|
|
231647
|
+
return _context11.abrupt("return", htmlText);
|
|
231483
231648
|
case 14:
|
|
231484
231649
|
_curDomRange2 = hoEditorFactory.docTree.curDomRange.normalize();
|
|
231485
231650
|
_endPath = _curDomRange2.normalize().endPath;
|
|
231486
|
-
|
|
231487
|
-
if (!(
|
|
231488
|
-
|
|
231651
|
+
_node2 = (_hoEditorFactory$vueC2 = hoEditorFactory.vueController.findNodebyPath(_endPath)) === null || _hoEditorFactory$vueC2 === void 0 ? void 0 : _hoEditorFactory$vueC2.node;
|
|
231652
|
+
if (!(_node2 instanceof SignNode/* SignNode */.N && !_node2.isTemplate && _node2.attribute == 1)) {
|
|
231653
|
+
_context11.next = 20;
|
|
231489
231654
|
break;
|
|
231490
231655
|
}
|
|
231491
|
-
|
|
231492
|
-
return this.deleteNode(
|
|
231656
|
+
_context11.next = 20;
|
|
231657
|
+
return this.deleteNode(_node2);
|
|
231493
231658
|
case 20:
|
|
231494
|
-
|
|
231659
|
+
_context11.next = 22;
|
|
231495
231660
|
return hoEditorFactory.printController.createBase64(callback);
|
|
231496
231661
|
case 22:
|
|
231497
|
-
base64 =
|
|
231498
|
-
return
|
|
231662
|
+
base64 = _context11.sent;
|
|
231663
|
+
return _context11.abrupt("return", base64);
|
|
231499
231664
|
case 24:
|
|
231500
231665
|
case "end":
|
|
231501
|
-
return
|
|
231666
|
+
return _context11.stop();
|
|
231502
231667
|
}
|
|
231503
231668
|
}, _callee9, this);
|
|
231504
231669
|
}));
|
|
@@ -231512,17 +231677,17 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231512
231677
|
value: function () {
|
|
231513
231678
|
var _getSvg = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee10() {
|
|
231514
231679
|
var hoEditorFactory;
|
|
231515
|
-
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee10$(
|
|
231516
|
-
while (1) switch (
|
|
231680
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee10$(_context12) {
|
|
231681
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
231517
231682
|
case 0:
|
|
231518
231683
|
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
231519
|
-
|
|
231684
|
+
_context12.next = 3;
|
|
231520
231685
|
return hoEditorFactory.printController.createSvg();
|
|
231521
231686
|
case 3:
|
|
231522
|
-
return
|
|
231687
|
+
return _context12.abrupt("return", _context12.sent);
|
|
231523
231688
|
case 4:
|
|
231524
231689
|
case "end":
|
|
231525
|
-
return
|
|
231690
|
+
return _context12.stop();
|
|
231526
231691
|
}
|
|
231527
231692
|
}, _callee10, this);
|
|
231528
231693
|
}));
|
|
@@ -231536,18 +231701,18 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231536
231701
|
value: function () {
|
|
231537
231702
|
var _isSetFontFamily = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee11(callback) {
|
|
231538
231703
|
var hoEditorFactory, font;
|
|
231539
|
-
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee11$(
|
|
231540
|
-
while (1) switch (
|
|
231704
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee11$(_context13) {
|
|
231705
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
231541
231706
|
case 0:
|
|
231542
231707
|
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
231543
231708
|
if (hoEditorFactory.printController.isSetFont) {
|
|
231544
|
-
|
|
231709
|
+
_context13.next = 8;
|
|
231545
231710
|
break;
|
|
231546
231711
|
}
|
|
231547
|
-
|
|
231712
|
+
_context13.next = 4;
|
|
231548
231713
|
return hoEditorFactory.vueController.hoLocalStorage().loadFontString();
|
|
231549
231714
|
case 4:
|
|
231550
|
-
font =
|
|
231715
|
+
font = _context13.sent;
|
|
231551
231716
|
if (font) {
|
|
231552
231717
|
hoEditorFactory.printController.setjsPDFFonts(font);
|
|
231553
231718
|
callback && callback();
|
|
@@ -231555,13 +231720,13 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231555
231720
|
font = '';
|
|
231556
231721
|
}, 0);
|
|
231557
231722
|
}
|
|
231558
|
-
|
|
231723
|
+
_context13.next = 9;
|
|
231559
231724
|
break;
|
|
231560
231725
|
case 8:
|
|
231561
231726
|
callback && callback();
|
|
231562
231727
|
case 9:
|
|
231563
231728
|
case "end":
|
|
231564
|
-
return
|
|
231729
|
+
return _context13.stop();
|
|
231565
231730
|
}
|
|
231566
231731
|
}, _callee11, this);
|
|
231567
231732
|
}));
|
|
@@ -231663,7 +231828,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231663
231828
|
}, {
|
|
231664
231829
|
key: "setBackgroundByName",
|
|
231665
231830
|
value: function setBackgroundByName(items) {
|
|
231666
|
-
var
|
|
231831
|
+
var _this5 = this;
|
|
231667
231832
|
var selectRangeArr = [];
|
|
231668
231833
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
231669
231834
|
var iteratesNodes = function iteratesNodes(nodes) {
|
|
@@ -231673,12 +231838,12 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231673
231838
|
for (var m = 0, len = items.length - 1; m <= len; m++) {
|
|
231674
231839
|
var item = items[m];
|
|
231675
231840
|
if (item.text !== '' && (item.name === anode.name || item.id === anode.id || item.dataId === anode.dataId) && anode.text.includes(item.text)) {
|
|
231676
|
-
var range =
|
|
231841
|
+
var range = _this5.search(anode, item.text);
|
|
231677
231842
|
if (range.length > 0) {
|
|
231678
231843
|
selectRangeArr = selectRangeArr.concat(range);
|
|
231679
231844
|
}
|
|
231680
231845
|
} else if (item.text === '' && (item.name === anode.name || item.id === anode.id || item.dataId === anode.dataId)) {
|
|
231681
|
-
var _range =
|
|
231846
|
+
var _range = _this5.search(anode, anode.text);
|
|
231682
231847
|
if (_range.length > 0) {
|
|
231683
231848
|
selectRangeArr = selectRangeArr.concat(_range);
|
|
231684
231849
|
}
|
|
@@ -231856,7 +232021,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231856
232021
|
var returnPath = textNodesPaths[j];
|
|
231857
232022
|
var path = returnPath;
|
|
231858
232023
|
var nodeLastPath = returnPath;
|
|
231859
|
-
var
|
|
232024
|
+
var _loop5 = function _loop5() {
|
|
231860
232025
|
var np = hoEditorFactory.docTree.findNodePositionByPath(path);
|
|
231861
232026
|
if (np && np.node) {
|
|
231862
232027
|
nodeLastPath = hoEditorFactory.docTree.getNodeLastPath(np.node);
|
|
@@ -231880,8 +232045,8 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231880
232045
|
path = pathArr.join('/');
|
|
231881
232046
|
}
|
|
231882
232047
|
};
|
|
231883
|
-
for (var
|
|
231884
|
-
|
|
232048
|
+
for (var _i4 = 0; _i4 < text.length; _i4++) {
|
|
232049
|
+
_loop5();
|
|
231885
232050
|
}
|
|
231886
232051
|
var selectRange = new SelectRange/* SelectRange */.E(this.hoEditorFactoryID);
|
|
231887
232052
|
var pStartPoint = StagePosition/* StagePosition */.M.getStagePosByPath(this._hoEditorFactoryID, returnPath);
|
|
@@ -231975,24 +232140,24 @@ var VueController = /*#__PURE__*/function () {
|
|
|
231975
232140
|
value: function getCaretPreviousText(value) {
|
|
231976
232141
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
231977
232142
|
if (hoEditorFactory.aiTextFunc) {
|
|
231978
|
-
var
|
|
232143
|
+
var _node3$parentNode2;
|
|
231979
232144
|
var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
231980
|
-
var
|
|
232145
|
+
var _node3 = curDomRange.npEnd.node;
|
|
231981
232146
|
var textFieldName = '';
|
|
231982
232147
|
var text = value || '';
|
|
231983
232148
|
if (!text) {
|
|
231984
|
-
var
|
|
231985
|
-
if ((
|
|
231986
|
-
text =
|
|
231987
|
-
} else if ((
|
|
231988
|
-
text =
|
|
232149
|
+
var _node3$parentNode;
|
|
232150
|
+
if ((_node3 === null || _node3 === void 0 ? void 0 : _node3.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
232151
|
+
text = _node3.parentNode.text.replace(/\s*/g, '');
|
|
232152
|
+
} else if ((_node3 === null || _node3 === void 0 || (_node3$parentNode = _node3.parentNode) === null || _node3$parentNode === void 0 ? void 0 : _node3$parentNode.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
232153
|
+
text = _node3.parentNode.parentNode.text.replace(/\s*/g, '');
|
|
231989
232154
|
}
|
|
231990
232155
|
}
|
|
231991
|
-
if ((
|
|
231992
|
-
textFieldName =
|
|
231993
|
-
} else if ((
|
|
231994
|
-
var
|
|
231995
|
-
textFieldName =
|
|
232156
|
+
if ((_node3 === null || _node3 === void 0 ? void 0 : _node3.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
232157
|
+
textFieldName = _node3.parentNode.name.replace(/\s*/g, '');
|
|
232158
|
+
} else if ((_node3 === null || _node3 === void 0 || (_node3$parentNode2 = _node3.parentNode) === null || _node3$parentNode2 === void 0 ? void 0 : _node3$parentNode2.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
232159
|
+
var _node3$parentNode3;
|
|
232160
|
+
textFieldName = _node3 === null || _node3 === void 0 || (_node3$parentNode3 = _node3.parentNode) === null || _node3$parentNode3 === void 0 ? void 0 : _node3$parentNode3.parentNode.name.replace(/\s*/g, '');
|
|
231996
232161
|
}
|
|
231997
232162
|
var callback = function callback(aiText) {
|
|
231998
232163
|
var aiInfo = hoEditorFactory.drawTree.caret.aiInfo;
|
|
@@ -232030,11 +232195,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232030
232195
|
}
|
|
232031
232196
|
var index = 0;
|
|
232032
232197
|
for (var i = 0; i < nodes.length; i++) {
|
|
232033
|
-
var
|
|
232034
|
-
if (
|
|
232035
|
-
var path =
|
|
232198
|
+
var _node4 = nodes[i];
|
|
232199
|
+
if (_node4 instanceof ParagraphNode/* ParagraphNode */.C) {
|
|
232200
|
+
var path = _node4.getNodePath();
|
|
232036
232201
|
hoEditorFactory.undoService.begin();
|
|
232037
|
-
hoEditorFactory.undoService.add(new NodeDeleteUndoUnit/* NodeDeleteUndoUnit */.w(this._hoEditorFactoryID,
|
|
232202
|
+
hoEditorFactory.undoService.add(new NodeDeleteUndoUnit/* NodeDeleteUndoUnit */.w(this._hoEditorFactoryID, _node4, path));
|
|
232038
232203
|
hoEditorFactory.undoService.commit();
|
|
232039
232204
|
} else {
|
|
232040
232205
|
index = i;
|
|
@@ -232292,42 +232457,42 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232292
232457
|
var downNames = [];
|
|
232293
232458
|
hoEditorFactory.docTree.curDomRange = new DomRange/* DomRange */.a(this._hoEditorFactoryID, curDomRange.startPath, curDomRange.startPath);
|
|
232294
232459
|
for (var i = 0; i < nodes.length; i++) {
|
|
232295
|
-
var
|
|
232296
|
-
if (
|
|
232297
|
-
if (fieldNames.indexOf(
|
|
232298
|
-
fieldNames.push(
|
|
232299
|
-
var sameNameEles = this.getNodesByName('all', true,
|
|
232460
|
+
var _node5 = nodes[i];
|
|
232461
|
+
if (_node5 instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
232462
|
+
if (fieldNames.indexOf(_node5.name) === -1) {
|
|
232463
|
+
fieldNames.push(_node5.name);
|
|
232464
|
+
var sameNameEles = this.getNodesByName('all', true, _node5.name);
|
|
232300
232465
|
for (var j = 0; j < sameNameEles.length; j++) {
|
|
232301
232466
|
var ele = sameNameEles[j];
|
|
232302
232467
|
if (nodes.indexOf(ele) >= 0) continue;
|
|
232303
232468
|
if (ele instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
232304
|
-
ele.setFieldText(
|
|
232469
|
+
ele.setFieldText(_node5.text);
|
|
232305
232470
|
}
|
|
232306
232471
|
}
|
|
232307
232472
|
}
|
|
232308
232473
|
}
|
|
232309
|
-
if (
|
|
232310
|
-
if (dateNames.indexOf(
|
|
232311
|
-
dateNames.push(
|
|
232312
|
-
var _sameNameEles = this.getNodesByName('all', true,
|
|
232474
|
+
if (_node5 instanceof DateTimeNode/* DateTimeNode */.Z) {
|
|
232475
|
+
if (dateNames.indexOf(_node5.name) === -1) {
|
|
232476
|
+
dateNames.push(_node5.name);
|
|
232477
|
+
var _sameNameEles = this.getNodesByName('all', true, _node5.name);
|
|
232313
232478
|
for (var _j = 0; _j < _sameNameEles.length; _j++) {
|
|
232314
232479
|
var _ele = _sameNameEles[_j];
|
|
232315
232480
|
if (nodes.indexOf(_ele) >= 0) continue;
|
|
232316
232481
|
if (_ele instanceof DateTimeNode/* DateTimeNode */.Z) {
|
|
232317
|
-
_ele.setDateTimeText(
|
|
232482
|
+
_ele.setDateTimeText(_node5.text);
|
|
232318
232483
|
}
|
|
232319
232484
|
}
|
|
232320
232485
|
}
|
|
232321
232486
|
}
|
|
232322
|
-
if (
|
|
232323
|
-
if (downNames.indexOf(
|
|
232324
|
-
downNames.push(
|
|
232325
|
-
var _sameNameEles2 = this.getNodesByName('all', true,
|
|
232487
|
+
if (_node5 instanceof DownListNode/* DownListNode */.yF) {
|
|
232488
|
+
if (downNames.indexOf(_node5.name) === -1) {
|
|
232489
|
+
downNames.push(_node5.name);
|
|
232490
|
+
var _sameNameEles2 = this.getNodesByName('all', true, _node5.name);
|
|
232326
232491
|
for (var _j2 = 0; _j2 < _sameNameEles2.length; _j2++) {
|
|
232327
232492
|
var _ele2 = _sameNameEles2[_j2];
|
|
232328
232493
|
if (nodes.indexOf(_ele2) >= 0) continue;
|
|
232329
232494
|
if (_ele2 instanceof DownListNode/* DownListNode */.yF) {
|
|
232330
|
-
_ele2.setDownListText(
|
|
232495
|
+
_ele2.setDownListText(_node5.text);
|
|
232331
232496
|
}
|
|
232332
232497
|
}
|
|
232333
232498
|
}
|
|
@@ -232478,29 +232643,29 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232478
232643
|
var hasEmptyDoctorSign = false;
|
|
232479
232644
|
var getAllNodes = function getAllNodes(nodes) {
|
|
232480
232645
|
for (var i = 0; i < nodes.length; i++) {
|
|
232481
|
-
var
|
|
232482
|
-
if (
|
|
232646
|
+
var _node6 = nodes[i];
|
|
232647
|
+
if (_node6 instanceof SignNode/* SignNode */.N) {
|
|
232483
232648
|
// 有值的患者签名
|
|
232484
|
-
if (attribute == 1 &&
|
|
232649
|
+
if (attribute == 1 && _node6.attribute === 1) {
|
|
232485
232650
|
patientSignCount++;
|
|
232486
232651
|
}
|
|
232487
|
-
if (attribute == 1 &&
|
|
232652
|
+
if (attribute == 1 && _node6.attribute === 1 && (_node6.imgSrc !== '' || _node6.fingerPrintSrc !== '')) {
|
|
232488
232653
|
hasEmptyPatientSign = true;
|
|
232489
232654
|
break;
|
|
232490
232655
|
}
|
|
232491
232656
|
// 空的医生签名
|
|
232492
|
-
if (attribute != 1 &&
|
|
232657
|
+
if (attribute != 1 && _node6.attribute != 1 && _node6.imgSrc === '') {
|
|
232493
232658
|
hasEmptyDoctorSign = true;
|
|
232494
232659
|
break;
|
|
232495
232660
|
}
|
|
232496
232661
|
}
|
|
232497
|
-
if (
|
|
232662
|
+
if (_node6 instanceof BaseCombineNode/* BaseCombineNode */.V && attribute === 1 && hasEmptyPatientSign) {
|
|
232498
232663
|
// 患者签名已存在的情况不在深层调用深层遍历
|
|
232499
|
-
getAllNodes(
|
|
232664
|
+
getAllNodes(_node6.childNodes);
|
|
232500
232665
|
}
|
|
232501
|
-
if (
|
|
232666
|
+
if (_node6 instanceof BaseCombineNode/* BaseCombineNode */.V && attribute != 1 && !hasEmptyDoctorSign) {
|
|
232502
232667
|
// 医生签名不存在的情况不在深层调用深层遍历
|
|
232503
|
-
getAllNodes(
|
|
232668
|
+
getAllNodes(_node6.childNodes);
|
|
232504
232669
|
}
|
|
232505
232670
|
}
|
|
232506
232671
|
};
|
|
@@ -232522,13 +232687,13 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232522
232687
|
}, {
|
|
232523
232688
|
key: "getAllSignNodeList",
|
|
232524
232689
|
value: function getAllSignNodeList(bce01) {
|
|
232525
|
-
var
|
|
232690
|
+
var _this6 = this;
|
|
232526
232691
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
232527
232692
|
var signList = [];
|
|
232528
232693
|
var patientSignList = [];
|
|
232529
232694
|
var bce01List = [];
|
|
232530
232695
|
var getAllNodes = function getAllNodes(nodes) {
|
|
232531
|
-
var
|
|
232696
|
+
var _loop6 = function _loop6() {
|
|
232532
232697
|
var node = nodes[i];
|
|
232533
232698
|
if (node instanceof SignNode/* SignNode */.N) {
|
|
232534
232699
|
if (node.parentNode instanceof CellNode/* CellNode */.D) {
|
|
@@ -232583,7 +232748,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232583
232748
|
}
|
|
232584
232749
|
});
|
|
232585
232750
|
if (signColList.length > 0) {
|
|
232586
|
-
var firstDataRowIndex =
|
|
232751
|
+
var firstDataRowIndex = _this6.getTableTitleMaxRowIndex(node) + 1;
|
|
232587
232752
|
node.rows.forEach(function (rows, rowIndex) {
|
|
232588
232753
|
if (rowIndex >= firstDataRowIndex) {
|
|
232589
232754
|
rows.forEach(function (cellNode, colIndex) {
|
|
@@ -232621,7 +232786,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232621
232786
|
}
|
|
232622
232787
|
};
|
|
232623
232788
|
for (var i = 0; i < nodes.length; i++) {
|
|
232624
|
-
if (
|
|
232789
|
+
if (_loop6()) continue;
|
|
232625
232790
|
}
|
|
232626
232791
|
};
|
|
232627
232792
|
var mainNodes = hoEditorFactory.docTree.mainNodes;
|
|
@@ -232636,9 +232801,9 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232636
232801
|
}
|
|
232637
232802
|
}
|
|
232638
232803
|
} else {
|
|
232639
|
-
for (var
|
|
232640
|
-
if (signList[
|
|
232641
|
-
sign.isTemplate = signList[
|
|
232804
|
+
for (var _i5 = index; _i5 >= 0; _i5--) {
|
|
232805
|
+
if (signList[_i5] && signList[_i5].number == 1) {
|
|
232806
|
+
sign.isTemplate = signList[_i5].isTemplate;
|
|
232642
232807
|
break;
|
|
232643
232808
|
}
|
|
232644
232809
|
}
|
|
@@ -232705,33 +232870,33 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232705
232870
|
}, {
|
|
232706
232871
|
key: "getSignNodeAndText",
|
|
232707
232872
|
value: function getSignNodeAndText(bce01) {
|
|
232708
|
-
var
|
|
232873
|
+
var _this7 = this;
|
|
232709
232874
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
232710
232875
|
var signList = [];
|
|
232711
232876
|
var getAllNodes = function getAllNodes(nodes) {
|
|
232712
232877
|
for (var i = 0; i < nodes.length; i++) {
|
|
232713
|
-
var
|
|
232714
|
-
if (
|
|
232878
|
+
var _node7 = nodes[i];
|
|
232879
|
+
if (_node7 instanceof SignNode/* SignNode */.N) {
|
|
232715
232880
|
// 空的医生签名
|
|
232716
|
-
if (
|
|
232881
|
+
if (_node7.attribute != 1) {
|
|
232717
232882
|
var sign = {
|
|
232718
232883
|
type: 'sign',
|
|
232719
232884
|
signed: false,
|
|
232720
|
-
isTemplate:
|
|
232721
|
-
number:
|
|
232722
|
-
isVerify:
|
|
232723
|
-
customProperty:
|
|
232885
|
+
isTemplate: _node7.isTemplate,
|
|
232886
|
+
number: _node7.number,
|
|
232887
|
+
isVerify: _node7.otherProperties && _node7.otherProperties.isVerify ? true : false,
|
|
232888
|
+
customProperty: _node7.customProperty,
|
|
232724
232889
|
previousText: '',
|
|
232725
|
-
dataId:
|
|
232726
|
-
name:
|
|
232890
|
+
dataId: _node7.dataId,
|
|
232891
|
+
name: _node7.name
|
|
232727
232892
|
};
|
|
232728
|
-
sign.previousText =
|
|
232893
|
+
sign.previousText = _this7.getPreviousText(_node7);
|
|
232729
232894
|
signList.push(sign);
|
|
232730
232895
|
}
|
|
232731
232896
|
}
|
|
232732
|
-
if (
|
|
232897
|
+
if (_node7 instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
232733
232898
|
// 医生签名不存在的情况不在深层调用深层遍历
|
|
232734
|
-
getAllNodes(
|
|
232899
|
+
getAllNodes(_node7.childNodes);
|
|
232735
232900
|
}
|
|
232736
232901
|
}
|
|
232737
232902
|
};
|
|
@@ -232750,15 +232915,15 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232750
232915
|
var isHasDoctorSign = false;
|
|
232751
232916
|
var getAllNodes = function getAllNodes(nodes) {
|
|
232752
232917
|
for (var i = 0; i < nodes.length; i++) {
|
|
232753
|
-
var
|
|
232754
|
-
if (
|
|
232918
|
+
var _node8 = nodes[i];
|
|
232919
|
+
if (_node8 instanceof SignNode/* SignNode */.N && _node8.type !== 3 && _node8.imgSrc) {
|
|
232755
232920
|
isHasDoctorSign = true;
|
|
232756
232921
|
break; // 医生签名已存在的情况中断当前层的遍历
|
|
232757
232922
|
}
|
|
232758
232923
|
|
|
232759
|
-
if (
|
|
232924
|
+
if (_node8 instanceof BaseCombineNode/* BaseCombineNode */.V && !isHasDoctorSign) {
|
|
232760
232925
|
// 医生签名已存在的情况不在深层调用深层遍历
|
|
232761
|
-
getAllNodes(
|
|
232926
|
+
getAllNodes(_node8.childNodes);
|
|
232762
232927
|
}
|
|
232763
232928
|
}
|
|
232764
232929
|
};
|
|
@@ -232781,13 +232946,13 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232781
232946
|
}, {
|
|
232782
232947
|
key: "html2Xml",
|
|
232783
232948
|
value: function html2Xml(json) {
|
|
232784
|
-
var
|
|
232949
|
+
var _this8 = this;
|
|
232785
232950
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
232786
232951
|
var headerNodes = hoEditorFactory.structureNode.Parse(StructureNode/* ClipboardType */.Y6.ctHTML, json.header);
|
|
232787
232952
|
var footerNodes = hoEditorFactory.structureNode.Parse(StructureNode/* ClipboardType */.Y6.ctHTML, json.footer);
|
|
232788
232953
|
var mainNodes = hoEditorFactory.structureNode.Parse(StructureNode/* ClipboardType */.Y6.ctHTML, json.main);
|
|
232789
232954
|
var insertParaNode = function insertParaNode(area, index) {
|
|
232790
|
-
var node = new ParagraphNode/* ParagraphNode */.C(
|
|
232955
|
+
var node = new ParagraphNode/* ParagraphNode */.C(_this8._hoEditorFactoryID, hoEditorFactory.docTree.activeNodes, null, 0);
|
|
232791
232956
|
if (area == 'header') {
|
|
232792
232957
|
node.rootPath = 'header/0';
|
|
232793
232958
|
headerNodes.splice(index, 0, node);
|
|
@@ -232860,13 +233025,13 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232860
233025
|
};
|
|
232861
233026
|
}
|
|
232862
233027
|
if (node instanceof TextNode/* TextNode */.R) {
|
|
232863
|
-
var
|
|
233028
|
+
var _json3 = {
|
|
232864
233029
|
nodeType: BaseNode/* NodeType */.Jq[2],
|
|
232865
233030
|
text: node.text,
|
|
232866
233031
|
styleIndex: node.styleIndex
|
|
232867
233032
|
};
|
|
232868
233033
|
return {
|
|
232869
|
-
TextNode:
|
|
233034
|
+
TextNode: _json3
|
|
232870
233035
|
};
|
|
232871
233036
|
}
|
|
232872
233037
|
if (node instanceof TableNode/* TableNode */.Fh) {
|
|
@@ -232907,8 +233072,8 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232907
233072
|
var rowInfosArray = new Array();
|
|
232908
233073
|
var rows = node.rowInfos.length - 1;
|
|
232909
233074
|
var cols = node.colInfos.length - 1;
|
|
232910
|
-
for (var
|
|
232911
|
-
var rowInfo = node.rowInfos[
|
|
233075
|
+
for (var _i6 = 0; _i6 <= rows; _i6++) {
|
|
233076
|
+
var rowInfo = node.rowInfos[_i6];
|
|
232912
233077
|
var _customProperties = {
|
|
232913
233078
|
customProperty: Array(rowInfo.rowProperty.customProperties)
|
|
232914
233079
|
};
|
|
@@ -232967,8 +233132,8 @@ var VueController = /*#__PURE__*/function () {
|
|
|
232967
233132
|
var defaultColPropJson = JSON.parse(JSON.stringify(defaultColProp));
|
|
232968
233133
|
//处理列宽
|
|
232969
233134
|
var colInfosArray = new Array();
|
|
232970
|
-
for (var
|
|
232971
|
-
var colInfo = node.colInfos[
|
|
233135
|
+
for (var _i7 = 0; _i7 <= cols; _i7++) {
|
|
233136
|
+
var colInfo = node.colInfos[_i7];
|
|
232972
233137
|
var _customProperties2 = {
|
|
232973
233138
|
customProperty: Array(colInfo.colProperty.customProperties)
|
|
232974
233139
|
};
|
|
@@ -233041,11 +233206,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233041
233206
|
for (var n = 0; n <= cols; n++) {
|
|
233042
233207
|
var col = row[n];
|
|
233043
233208
|
if (col) {
|
|
233044
|
-
var
|
|
233045
|
-
undefineArr.base = JSON.parse(JSON.stringify(
|
|
233046
|
-
|
|
233047
|
-
|
|
233048
|
-
rowArray.childNodes.CellNode.push(
|
|
233209
|
+
var _json4 = node2Json(col, _defaultCellPropJson);
|
|
233210
|
+
undefineArr.base = JSON.parse(JSON.stringify(_json4));
|
|
233211
|
+
_json4.rowNo = m;
|
|
233212
|
+
_json4.colNo = n;
|
|
233213
|
+
rowArray.childNodes.CellNode.push(_json4);
|
|
233049
233214
|
rowArray.rowNo = m;
|
|
233050
233215
|
} else {
|
|
233051
233216
|
rowArray.childNodes.CellNode.push({});
|
|
@@ -233072,7 +233237,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233072
233237
|
defaultColProperty: defaultColProp,
|
|
233073
233238
|
item: colInfosArray
|
|
233074
233239
|
};
|
|
233075
|
-
var
|
|
233240
|
+
var _childNodes = {
|
|
233076
233241
|
defaultCellProperty: defaultCellProp,
|
|
233077
233242
|
item: rowArrays
|
|
233078
233243
|
};
|
|
@@ -233086,7 +233251,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233086
233251
|
tableProperty: tableProperty,
|
|
233087
233252
|
rowInfos: rowInfos,
|
|
233088
233253
|
colInfos: colInfos,
|
|
233089
|
-
childNodes:
|
|
233254
|
+
childNodes: _childNodes
|
|
233090
233255
|
};
|
|
233091
233256
|
return {
|
|
233092
233257
|
TableNode: retJson
|
|
@@ -233095,8 +233260,8 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233095
233260
|
if (node instanceof CellNode/* CellNode */.D) {
|
|
233096
233261
|
//处理子节点
|
|
233097
233262
|
var childArray = new Array();
|
|
233098
|
-
for (var
|
|
233099
|
-
var anode = node.childNodes[
|
|
233263
|
+
for (var _i8 = 0; _i8 < node.childNodes.length; _i8++) {
|
|
233264
|
+
var anode = node.childNodes[_i8];
|
|
233100
233265
|
var nodeJson = void 0;
|
|
233101
233266
|
if (anode instanceof TextNode/* TextNode */.R) {
|
|
233102
233267
|
if (anode.text !== '') {
|
|
@@ -233172,7 +233337,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233172
233337
|
}
|
|
233173
233338
|
var colNo = node.row.indexOf(node);
|
|
233174
233339
|
var rowNo = node.table.rows.indexOf(node.row);
|
|
233175
|
-
var
|
|
233340
|
+
var _childNodes2 = {
|
|
233176
233341
|
TempNode: childArray
|
|
233177
233342
|
};
|
|
233178
233343
|
var cellText = node.getCellText();
|
|
@@ -233182,7 +233347,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233182
233347
|
crossLineType: 'ctNone',
|
|
233183
233348
|
rowSpan: node.rowSpan,
|
|
233184
233349
|
colSpan: node.colSpan,
|
|
233185
|
-
childNodes:
|
|
233350
|
+
childNodes: _childNodes2,
|
|
233186
233351
|
rowNo: rowNo,
|
|
233187
233352
|
colNo: colNo,
|
|
233188
233353
|
cellProperty: cellPropertyJson,
|
|
@@ -233211,10 +233376,10 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233211
233376
|
};
|
|
233212
233377
|
var xmlRoot = '<?xml version="1.0" encoding="utf-8"?>';
|
|
233213
233378
|
var doc2XmlJson = function doc2XmlJson(nodes) {
|
|
233214
|
-
for (var
|
|
233215
|
-
var
|
|
233216
|
-
if (
|
|
233217
|
-
var nodeJson = node2Json(
|
|
233379
|
+
for (var _i9 = 0; _i9 < nodes.length; _i9++) {
|
|
233380
|
+
var _node9 = nodes[_i9];
|
|
233381
|
+
if (_node9 instanceof TextNode/* TextNode */.R || _node9 instanceof ParagraphNode/* ParagraphNode */.C || _node9 instanceof TableNode/* TableNode */.Fh || _node9 instanceof ImageNode/* ImageNode */.H) {
|
|
233382
|
+
var nodeJson = node2Json(_node9);
|
|
233218
233383
|
xmlRoot += x2js.js2xml(nodeJson);
|
|
233219
233384
|
}
|
|
233220
233385
|
}
|
|
@@ -233280,7 +233445,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233280
233445
|
}, {
|
|
233281
233446
|
key: "updateNurseRecord",
|
|
233282
233447
|
value: function updateNurseRecord(table, operType, rowIndex, data) {
|
|
233283
|
-
var
|
|
233448
|
+
var _this9 = this;
|
|
233284
233449
|
var keys = Object.keys(data);
|
|
233285
233450
|
var backfill = function backfill(r) {
|
|
233286
233451
|
for (var i = 0; i < keys.length; i++) {
|
|
@@ -233289,7 +233454,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233289
233454
|
if (cell) {
|
|
233290
233455
|
var text = data[keys[i]];
|
|
233291
233456
|
cell.childNodes.splice(1, cell.childNodes.length);
|
|
233292
|
-
var textNode = new TextNode/* TextNode */.R(
|
|
233457
|
+
var textNode = new TextNode/* TextNode */.R(_this9._hoEditorFactoryID, table.rootNodes, cell, BaseNode/* NodeType */.Jq.ntText, text, cell.childNodes[0].styleIndex);
|
|
233293
233458
|
cell.drawCell.needUpdate = true;
|
|
233294
233459
|
cell.childNodes.push(textNode);
|
|
233295
233460
|
}
|
|
@@ -233442,9 +233607,9 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233442
233607
|
paragraphRecordId: recordId
|
|
233443
233608
|
});
|
|
233444
233609
|
}
|
|
233445
|
-
var
|
|
233446
|
-
if (
|
|
233447
|
-
nodes.push(
|
|
233610
|
+
var _node10 = hoEditorFactory.structureConvert.convertNode(temp, hoEditorFactory.docTree.mainNodes, null);
|
|
233611
|
+
if (_node10) {
|
|
233612
|
+
nodes.push(_node10);
|
|
233448
233613
|
}
|
|
233449
233614
|
}
|
|
233450
233615
|
if (nodes.length > 0) {
|
|
@@ -233539,17 +233704,17 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233539
233704
|
}, {
|
|
233540
233705
|
key: "updateAllCodeElements",
|
|
233541
233706
|
value: function updateAllCodeElements(element) {
|
|
233542
|
-
var
|
|
233707
|
+
var _this10 = this;
|
|
233543
233708
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
233544
233709
|
var ret = [];
|
|
233545
233710
|
var getAllNodes = function getAllNodes(nodes) {
|
|
233546
233711
|
for (var i = 0; i < nodes.length; i++) {
|
|
233547
|
-
var
|
|
233548
|
-
if (
|
|
233549
|
-
ret.push(
|
|
233712
|
+
var _node11 = nodes[i];
|
|
233713
|
+
if (_node11 instanceof QrcodeNode/* QrcodeNode */.d) {
|
|
233714
|
+
ret.push(_node11);
|
|
233550
233715
|
}
|
|
233551
|
-
if (
|
|
233552
|
-
getAllNodes(
|
|
233716
|
+
if (_node11 instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
233717
|
+
getAllNodes(_node11.childNodes);
|
|
233553
233718
|
}
|
|
233554
233719
|
}
|
|
233555
233720
|
};
|
|
@@ -233568,7 +233733,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233568
233733
|
if (ret.length > 0) {
|
|
233569
233734
|
ret.forEach(function (v) {
|
|
233570
233735
|
if (v.name === element.name) {
|
|
233571
|
-
|
|
233736
|
+
_this10.updateCodeContent(v, element.content);
|
|
233572
233737
|
}
|
|
233573
233738
|
});
|
|
233574
233739
|
this.rebuildAll(false);
|
|
@@ -233581,12 +233746,12 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233581
233746
|
var ret = [];
|
|
233582
233747
|
var getAllNodes = function getAllNodes(nodes) {
|
|
233583
233748
|
for (var i = 0; i < nodes.length; i++) {
|
|
233584
|
-
var
|
|
233585
|
-
if (
|
|
233586
|
-
ret.push(
|
|
233749
|
+
var _node12 = nodes[i];
|
|
233750
|
+
if (_node12 instanceof QrcodeNode/* QrcodeNode */.d) {
|
|
233751
|
+
ret.push(_node12);
|
|
233587
233752
|
}
|
|
233588
|
-
if (
|
|
233589
|
-
getAllNodes(
|
|
233753
|
+
if (_node12 instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
233754
|
+
getAllNodes(_node12.childNodes);
|
|
233590
233755
|
}
|
|
233591
233756
|
}
|
|
233592
233757
|
};
|
|
@@ -233641,7 +233806,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233641
233806
|
for (var j = 0; j < pathArr.length; j++) {
|
|
233642
233807
|
var apath = pathArr[j];
|
|
233643
233808
|
var nodeLastPath = pathArr[j];
|
|
233644
|
-
for (var
|
|
233809
|
+
for (var _i10 = 0; _i10 < findText.length; _i10++) {
|
|
233645
233810
|
var np = hoEditorFactory.docTree.findNodePositionByPath(apath);
|
|
233646
233811
|
if (np && np.node) {
|
|
233647
233812
|
nodeLastPath = hoEditorFactory.docTree.getNodeLastPath(np.node);
|
|
@@ -233896,10 +234061,10 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233896
234061
|
value: function moveCaretToTextInputField(node) {
|
|
233897
234062
|
var endNode = node.EndMarkNode.previousLeaf();
|
|
233898
234063
|
if (endNode) {
|
|
233899
|
-
var
|
|
233900
|
-
var toPath =
|
|
233901
|
-
|
|
233902
|
-
|
|
234064
|
+
var _hoEditorFactory2 = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
234065
|
+
var toPath = _hoEditorFactory2.docTree.getNodeLastPath(endNode);
|
|
234066
|
+
_hoEditorFactory2.drawTree.moveCaretToPath(toPath);
|
|
234067
|
+
_hoEditorFactory2.docTree.curDomRange.setSamePath(toPath);
|
|
233903
234068
|
}
|
|
233904
234069
|
}
|
|
233905
234070
|
}, {
|
|
@@ -233928,11 +234093,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
233928
234093
|
var table = null;
|
|
233929
234094
|
var i = 0;
|
|
233930
234095
|
for (var k = 0; k < hoEditorFactory.docTree.mainNodes.length; k++) {
|
|
233931
|
-
var
|
|
233932
|
-
if (
|
|
234096
|
+
var _node13 = hoEditorFactory.docTree.mainNodes[k];
|
|
234097
|
+
if (_node13 instanceof TableNode/* TableNode */.Fh) {
|
|
233933
234098
|
i++;
|
|
233934
234099
|
if (i === index) {
|
|
233935
|
-
table =
|
|
234100
|
+
table = _node13;
|
|
233936
234101
|
break;
|
|
233937
234102
|
}
|
|
233938
234103
|
}
|
|
@@ -234016,8 +234181,8 @@ var VueController = /*#__PURE__*/function () {
|
|
|
234016
234181
|
value: function () {
|
|
234017
234182
|
var _importWordFile = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee12(fileStr) {
|
|
234018
234183
|
var hoEditorFactory, _curDomRange, startPath, endPath, changingEvent, nodes;
|
|
234019
|
-
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee12$(
|
|
234020
|
-
while (1) switch (
|
|
234184
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee12$(_context14) {
|
|
234185
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
234021
234186
|
case 0:
|
|
234022
234187
|
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
234023
234188
|
hoEditorFactory.isThrowError = false;
|
|
@@ -234026,10 +234191,10 @@ var VueController = /*#__PURE__*/function () {
|
|
|
234026
234191
|
endPath = _curDomRange.normalize().endPath;
|
|
234027
234192
|
changingEvent = new NodeChangingEvent/* NodeChangingEvent */.Q(DocTree/* DocAction */.gk.daInsert, startPath, endPath, NodeChangingEvent/* OperType */.y.openLocalFiles);
|
|
234028
234193
|
if (!hoEditorFactory.docTree.changing(changingEvent)) {
|
|
234029
|
-
|
|
234194
|
+
_context14.next = 14;
|
|
234030
234195
|
break;
|
|
234031
234196
|
}
|
|
234032
|
-
|
|
234197
|
+
_context14.next = 9;
|
|
234033
234198
|
return hoEditorFactory.docController.initBlankDoc();
|
|
234034
234199
|
case 9:
|
|
234035
234200
|
hoEditorFactory.drawTree.inViewPages = [0];
|
|
@@ -234041,7 +234206,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
234041
234206
|
hoEditorFactory.undoService.stack = [];
|
|
234042
234207
|
case 15:
|
|
234043
234208
|
case "end":
|
|
234044
|
-
return
|
|
234209
|
+
return _context14.stop();
|
|
234045
234210
|
}
|
|
234046
234211
|
}, _callee12, this);
|
|
234047
234212
|
}));
|
|
@@ -234059,7 +234224,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
234059
234224
|
}, {
|
|
234060
234225
|
key: "getElementChangeRecords",
|
|
234061
234226
|
value: function getElementChangeRecords() {
|
|
234062
|
-
var
|
|
234227
|
+
var _this11 = this;
|
|
234063
234228
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
234064
234229
|
var recordArr = new Array();
|
|
234065
234230
|
var records = hoEditorFactory.docTree.elementChangeRecords;
|
|
@@ -234104,7 +234269,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
234104
234269
|
}
|
|
234105
234270
|
} else {
|
|
234106
234271
|
var id = key.split("|")[0];
|
|
234107
|
-
var
|
|
234272
|
+
var _node14 = _this11.getNodeByID('all', id);
|
|
234108
234273
|
}
|
|
234109
234274
|
});
|
|
234110
234275
|
return recordArr;
|