hoeditor-web 3.0.80 → 3.0.81

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.
@@ -39481,6 +39481,16 @@ var DocController = /*#__PURE__*/function () {
39481
39481
  }
39482
39482
  startPath = domRange.startPath;
39483
39483
  endPath = domRange.endPath;
39484
+ if (startPath !== endPath && domRange.npEnd.node instanceof _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_46__/* .MarkNode */ .j) {
39485
+ var nodes = _DomRange__WEBPACK_IMPORTED_MODULE_30__/* .DomRange.getSelectDomNodesForDelete */ .a.getSelectDomNodesForDelete(this._hoEditorFactoryID, startPath, endPath);
39486
+ if (nodes.length == 1 && nodes[0] instanceof _treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_45__/* .TextInputFieldNode */ .re && nodes[0].isEmpty()) {
39487
+ startPath = nodes[0].StartMarkNode.getNodePath();
39488
+ endPath = nodes[0].childNodes[1].getNodePath();
39489
+ var newDomRange = new _DomRange__WEBPACK_IMPORTED_MODULE_30__/* .DomRange */ .a(this._hoEditorFactoryID, startPath, endPath);
39490
+ hoEditorFactory.docTree.curDomRange = newDomRange;
39491
+ hoEditorFactory.drawTree.moveCaretToPath(startPath);
39492
+ }
39493
+ }
39484
39494
  var changingEvent = new _events_NodeChangingEvent__WEBPACK_IMPORTED_MODULE_22__/* .NodeChangingEvent */ .Q(_DocTree__WEBPACK_IMPORTED_MODULE_25__/* .DocAction.daInsert */ .gk.daInsert, startPath, endPath, _events_NodeChangingEvent__WEBPACK_IMPORTED_MODULE_22__/* .OperType.keyBoardInput */ .y.keyBoardInput);
39485
39495
  if (hoEditorFactory.docTree.changing(changingEvent)) {
39486
39496
  if (domRange.npStart.node && domRange.npStart.node.parentNode instanceof _treeNode_CellNode__WEBPACK_IMPORTED_MODULE_56__/* .CellNode */ .D) {
@@ -39882,7 +39892,7 @@ var DocController = /*#__PURE__*/function () {
39882
39892
  key: "deleteTextBeforePath",
39883
39893
  value: function () {
39884
39894
  var _deleteTextBeforePath = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)( /*#__PURE__*/(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)().mark(function _callee(startPath) {
39885
- var hoEditorFactory, domRange, nodePosition, childIndex, node, ret, topath, arr, tmp, aRange, endPath, _topath, _aRange, prevNode, cellNode, tableNode, tIndex, cIndex, preParaNode, newpath, signUserId, preNode, nextNode, path, signNode, spath, epath, newSignNode, pNode;
39895
+ var hoEditorFactory, domRange, nodePosition, childIndex, node, ret, topath, arr, tmp, aRange, endPath, _topath, _aRange, isError, prevNode, cellNode, tableNode, tIndex, cIndex, preParaNode, newpath, signUserId, preNode, nextNode, path, signNode, spath, epath, newSignNode, pNode;
39886
39896
  return (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)().wrap(function _callee$(_context) {
39887
39897
  while (1) {
39888
39898
  switch (_context.prev = _context.next) {
@@ -39904,18 +39914,18 @@ var DocController = /*#__PURE__*/function () {
39904
39914
  // )
39905
39915
  // );
39906
39916
  // hoEditorFactory.undoService.commit();
39907
- _context.next = 123;
39917
+ _context.next = 124;
39908
39918
  break;
39909
39919
  case 6:
39910
39920
  nodePosition = hoEditorFactory.docTree.findNodePositionByPath(startPath);
39911
39921
  childIndex = nodePosition.childIndex;
39912
39922
  node = nodePosition.node;
39913
39923
  if (!node) {
39914
- _context.next = 123;
39924
+ _context.next = 124;
39915
39925
  break;
39916
39926
  }
39917
39927
  if (!domRange.isEmpty) {
39918
- _context.next = 123;
39928
+ _context.next = 124;
39919
39929
  break;
39920
39930
  }
39921
39931
  if (!(node instanceof _treeNode_TextNode__WEBPACK_IMPORTED_MODULE_26__/* .TextNode */ .R)) {
@@ -39971,11 +39981,11 @@ var DocController = /*#__PURE__*/function () {
39971
39981
  aRange = new _DomRange__WEBPACK_IMPORTED_MODULE_30__/* .DomRange */ .a(this._hoEditorFactoryID, startPath, topath).normalize();
39972
39982
  this.deleteRange(aRange, true);
39973
39983
  hoEditorFactory.docTree.curDomRange = new _DomRange__WEBPACK_IMPORTED_MODULE_30__/* .DomRange */ .a(this._hoEditorFactoryID, topath, topath);
39974
- _context.next = 123;
39984
+ _context.next = 124;
39975
39985
  break;
39976
39986
  case 36:
39977
39987
  if (!(node instanceof _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_46__/* .MarkNode */ .j)) {
39978
- _context.next = 55;
39988
+ _context.next = 56;
39979
39989
  break;
39980
39990
  }
39981
39991
  endPath = hoEditorFactory.docTree.getNodeLastPath(node);
@@ -40009,7 +40019,10 @@ var DocController = /*#__PURE__*/function () {
40009
40019
  case 51:
40010
40020
  _aRange = new _DomRange__WEBPACK_IMPORTED_MODULE_30__/* .DomRange */ .a(this._hoEditorFactoryID, startPath, endPath //hoEditorFactory.docTree.getNodeLastPath(node)
40011
40021
  ).normalize();
40012
- this.deleteRange(_aRange, true);
40022
+ isError = this.deleteRange(_aRange, true);
40023
+ if (isError) {
40024
+ hoEditorFactory.docTree.curDomRange.setSamePath(node.getNodePath());
40025
+ }
40013
40026
  // hoEditorFactory.undoService.begin();
40014
40027
  // hoEditorFactory.undoService.add(
40015
40028
  // new NodesDeleteUndoUnit(
@@ -40020,26 +40033,26 @@ var DocController = /*#__PURE__*/function () {
40020
40033
  // )
40021
40034
  // );
40022
40035
  // hoEditorFactory.undoService.commit();
40023
- _context.next = 123;
40036
+ _context.next = 124;
40024
40037
  break;
40025
- case 55:
40038
+ case 56:
40026
40039
  if (!(node instanceof _treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_29__/* .ParagraphNode */ .C)) {
40027
- _context.next = 81;
40040
+ _context.next = 82;
40028
40041
  break;
40029
40042
  }
40030
40043
  prevNode = node.prevSibling();
40031
40044
  if (!(prevNode instanceof _treeNode_TableNode__WEBPACK_IMPORTED_MODULE_50__/* .TableNode */ .Fh)) {
40032
- _context.next = 59;
40045
+ _context.next = 60;
40033
40046
  break;
40034
40047
  }
40035
40048
  return _context.abrupt("return");
40036
- case 59:
40049
+ case 60:
40037
40050
  if (!(prevNode == null)) {
40038
- _context.next = 81;
40051
+ _context.next = 82;
40039
40052
  break;
40040
40053
  }
40041
40054
  if (!(node.parentNode instanceof _treeNode_CellNode__WEBPACK_IMPORTED_MODULE_56__/* .CellNode */ .D)) {
40042
- _context.next = 80;
40055
+ _context.next = 81;
40043
40056
  break;
40044
40057
  }
40045
40058
  cellNode = node.parentNode;
@@ -40048,7 +40061,7 @@ var DocController = /*#__PURE__*/function () {
40048
40061
  cIndex = cellNode.childNodes.indexOf(node);
40049
40062
  preParaNode = hoEditorFactory.docTree.getSameRectPrevParanode(tableNode.paragraphNode);
40050
40063
  if (!(preParaNode && tIndex == 0 && cIndex == 0 && preParaNode.drawlines.length == 1 && preParaNode.drawlines[0] instanceof _draw_DrawLine__WEBPACK_IMPORTED_MODULE_79__/* .DrawLine */ .a && preParaNode.drawlines[0].isEmpty())) {
40051
- _context.next = 77;
40064
+ _context.next = 78;
40052
40065
  break;
40053
40066
  }
40054
40067
  // hoEditorFactory.undoService.begin();
@@ -40058,62 +40071,62 @@ var DocController = /*#__PURE__*/function () {
40058
40071
  // await hoEditorFactory.undoService.commit();
40059
40072
  hoEditorFactory.undoService.begin();
40060
40073
  hoEditorFactory.undoService.add(new _undoRedo_TableUndos_TableDeleteParagraphUndoUnit__WEBPACK_IMPORTED_MODULE_86__/* .TableDeleteParagraphUndoUnit */ .T(this._hoEditorFactoryID, tableNode, tableNode.paragraphNode));
40061
- _context.next = 71;
40074
+ _context.next = 72;
40062
40075
  return hoEditorFactory.undoService.commit();
40063
- case 71:
40076
+ case 72:
40064
40077
  newpath = cellNode.childNodes[0].getNodePath();
40065
40078
  hoEditorFactory.docTree.curDomRange.setSamePath(newpath);
40066
40079
  hoEditorFactory.drawTree.moveCaretToPath(newpath);
40067
40080
  return _context.abrupt("return");
40068
- case 77:
40069
- return _context.abrupt("return");
40070
40081
  case 78:
40071
- _context.next = 81;
40072
- break;
40073
- case 80:
40074
40082
  return _context.abrupt("return");
40083
+ case 79:
40084
+ _context.next = 82;
40085
+ break;
40075
40086
  case 81:
40087
+ return _context.abrupt("return");
40088
+ case 82:
40076
40089
  if (!(hoEditorFactory.drawTree.paintStatus === _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_27__/* .PaintState.psReview */ .Dh.psReview && !(node instanceof _treeNode_SignNode__WEBPACK_IMPORTED_MODULE_83__/* .SignNode */ .N))) {
40077
- _context.next = 86;
40090
+ _context.next = 87;
40078
40091
  break;
40079
40092
  }
40080
40093
  ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_91__/* ["default"].warn */ .Z.warn("审阅模式下,只能对文本内容进行删除");
40081
40094
  return _context.abrupt("return");
40082
- case 86:
40095
+ case 87:
40083
40096
  if (!(hoEditorFactory.drawTree.paintStatus === _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_27__/* .PaintState.psReview */ .Dh.psReview && node instanceof _treeNode_SignNode__WEBPACK_IMPORTED_MODULE_83__/* .SignNode */ .N)) {
40084
- _context.next = 91;
40097
+ _context.next = 92;
40085
40098
  break;
40086
40099
  }
40087
40100
  signUserId = node.customProperty.bce01;
40088
40101
  if (!(hoEditorFactory.userInfo.id != signUserId)) {
40089
- _context.next = 91;
40102
+ _context.next = 92;
40090
40103
  break;
40091
40104
  }
40092
40105
  ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_91__/* ["default"].warn */ .Z.warn("不是本人签名,不允许删除!");
40093
40106
  return _context.abrupt("return");
40094
- case 91:
40107
+ case 92:
40095
40108
  if (!(hoEditorFactory.drawTree.paintStatus !== _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_27__/* .PaintState.psDesign */ .Dh.psDesign && node instanceof _treeNode_SignNode__WEBPACK_IMPORTED_MODULE_83__/* .SignNode */ .N)) {
40096
- _context.next = 94;
40109
+ _context.next = 95;
40097
40110
  break;
40098
40111
  }
40099
40112
  ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_91__/* ["default"].warn */ .Z.warn("不允许使用删除键删除签名,请右键删除元素");
40100
40113
  return _context.abrupt("return");
40101
- case 94:
40114
+ case 95:
40102
40115
  if (!(hoEditorFactory.drawTree.paintStatus !== _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_27__/* .PaintState.psDesign */ .Dh.psDesign && node instanceof _treeNode_SignNode__WEBPACK_IMPORTED_MODULE_83__/* .SignNode */ .N && node.isTemplate && node.number === 0)) {
40103
- _context.next = 97;
40116
+ _context.next = 98;
40104
40117
  break;
40105
40118
  }
40106
40119
  ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_91__/* ["default"].warn */ .Z.warn("该签名元素不允许删除!");
40107
40120
  return _context.abrupt("return");
40108
- case 97:
40121
+ case 98:
40109
40122
  if (!(node instanceof _treeNode_SignNode__WEBPACK_IMPORTED_MODULE_83__/* .SignNode */ .N)) {
40110
- _context.next = 118;
40123
+ _context.next = 119;
40111
40124
  break;
40112
40125
  }
40113
40126
  preNode = node.previousLeaf();
40114
40127
  nextNode = node.nextLeaf();
40115
40128
  if (!((node.imgSrc !== "" || node.fingerPrintSrc !== "") && node.isTemplate && !(preNode instanceof _treeNode_SignNode__WEBPACK_IMPORTED_MODULE_83__/* .SignNode */ .N) && !(nextNode instanceof _treeNode_SignNode__WEBPACK_IMPORTED_MODULE_83__/* .SignNode */ .N))) {
40116
- _context.next = 108;
40129
+ _context.next = 109;
40117
40130
  break;
40118
40131
  }
40119
40132
  path = hoEditorFactory.docTree.getNodeLastPath(preNode);
@@ -40123,9 +40136,9 @@ var DocController = /*#__PURE__*/function () {
40123
40136
  hoEditorFactory.undoService.add(new _undoRedo_NodeInsertUndoUnit__WEBPACK_IMPORTED_MODULE_24__/* .NodeInsertUndoUnit */ .R(this._hoEditorFactoryID, path, signNode));
40124
40137
  hoEditorFactory.undoService.commit();
40125
40138
  return _context.abrupt("return");
40126
- case 108:
40139
+ case 109:
40127
40140
  if (!(preNode instanceof _treeNode_SignNode__WEBPACK_IMPORTED_MODULE_83__/* .SignNode */ .N)) {
40128
- _context.next = 118;
40141
+ _context.next = 119;
40129
40142
  break;
40130
40143
  }
40131
40144
  spath = "";
@@ -40146,7 +40159,7 @@ var DocController = /*#__PURE__*/function () {
40146
40159
  }
40147
40160
  hoEditorFactory.undoService.commit();
40148
40161
  return _context.abrupt("return");
40149
- case 118:
40162
+ case 119:
40150
40163
  pNode = node.parentNode;
40151
40164
  hoEditorFactory.undoService.begin();
40152
40165
  hoEditorFactory.undoService.add(new _undoRedo_NodeDeleteUndoUnit__WEBPACK_IMPORTED_MODULE_36__/* .NodeDeleteUndoUnit */ .w(this._hoEditorFactoryID, node, startPath));
@@ -40154,7 +40167,7 @@ var DocController = /*#__PURE__*/function () {
40154
40167
  if (pNode && pNode instanceof _treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_45__/* .TextInputFieldNode */ .re && pNode.childNodes.length === 2) {
40155
40168
  this.resetEmptyInputFieldNode(hoEditorFactory, pNode);
40156
40169
  }
40157
- case 123:
40170
+ case 124:
40158
40171
  case "end":
40159
40172
  return _context.stop();
40160
40173
  }
@@ -237704,7 +237717,7 @@ var ParagraphNode = __webpack_require__(67945);
237704
237717
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/MarkNode.ts
237705
237718
  var MarkNode = __webpack_require__(57727);
237706
237719
  ;// CONCATENATED MODULE: ./src/components/version.ts
237707
- /* harmony default export */ var version = ('3.0.80');
237720
+ /* harmony default export */ var version = ('3.0.81');
237708
237721
  // EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
237709
237722
  var PoperTipText = __webpack_require__(36081);
237710
237723
  ;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts