hoeditor-web 2.0.78 → 2.0.79

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.
@@ -37422,6 +37422,7 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
37422
37422
 
37423
37423
  if (isCopy) {
37424
37424
  rows = pto.row;
37425
+ cols = pto.col;
37425
37426
 
37426
37427
  if (to.colSpan > 1) {
37427
37428
  cols = pto.col + to.colSpan - 1;
@@ -207611,7 +207612,7 @@ var SignNode = __webpack_require__(34450);
207611
207612
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
207612
207613
  var ParagraphNode = __webpack_require__(14208);
207613
207614
  ;// CONCATENATED MODULE: ./src/components/version.ts
207614
- /* harmony default export */ var version = ('2.0.78');
207615
+ /* harmony default export */ var version = ('2.0.79');
207615
207616
  ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/poperTipText/PoperTipText.vue?vue&type=template&id=3fa4e4d3&scoped=true&
207616
207617
  var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"},{name:"click-outside",rawName:"v-click-outside",value:(_vm.handleClose),expression:"handleClose"}],ref:"poperTextNode",staticClass:"poper-text-modal animation-in",style:(_vm.posStyle),on:{"mouseenter":_vm.mouseEnter,"mouseleave":_vm.mouseLeave}},_vm._l((_vm.poperText),function(text){return _c('div',{key:text + Math.random(0, 1),staticClass:"poper-text"},[_vm._v(" "+_vm._s(text)+" ")])}),0)}
207617
207618
  var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
@@ -211439,7 +211440,6 @@ var GestationNode = __webpack_require__(74873);
211439
211440
 
211440
211441
 
211441
211442
 
211442
-
211443
211443
 
211444
211444
 
211445
211445
  var StructureConvert = /*#__PURE__*/function () {
@@ -213492,13 +213492,11 @@ var StructureConvert = /*#__PURE__*/function () {
213492
213492
  message_box_default().alert("不允许将表格粘贴到文本域");
213493
213493
 
213494
213494
  return undefined;
213495
- }
213496
-
213497
- if (isPaste && parentNode instanceof CellNode/* CellNode */.D) {
213498
- message_box_default().alert("不允许将表格粘贴到表格");
213495
+ } // if (isPaste && parentNode instanceof CellNode) {
213496
+ // MessageBox.alert("不允许将表格粘贴到表格");
213497
+ // return undefined;
213498
+ // }
213499
213499
 
213500
- return undefined;
213501
- }
213502
213500
 
213503
213501
  var node = TableNode/* TableNode.json2Node */.Fh.json2Node(this._hoEditorFactoryID, temp, rootNodes, parentNode, isPaste, isClearSign);
213504
213502
  return node;
@@ -222271,6 +222269,8 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message);
222271
222269
 
222272
222270
 
222273
222271
 
222272
+
222273
+
222274
222274
  var EditController = /*#__PURE__*/function () {
222275
222275
  function EditController(hoEditorFactoryID) {
222276
222276
  (0,classCallCheck/* default */.Z)(this, EditController);
@@ -222599,15 +222599,66 @@ var EditController = /*#__PURE__*/function () {
222599
222599
 
222600
222600
  var nodes;
222601
222601
 
222602
- if (jsonData && hoeditorfactory.drawTree.paintStatus === DrawTree/* PaintState.psDesign */.Dh.psDesign) {
222603
- nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctJSON, jsonData);
222602
+ if (jsonData) {
222603
+ if (hoeditorfactory.drawTree.paintStatus === DrawTree/* PaintState.psDesign */.Dh.psDesign) {
222604
+ nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctJSON, jsonData);
222605
+ } else {
222606
+ var jsonObject = JSON.parse(jsonData);
222607
+
222608
+ if (jsonObject.length == 1 && jsonObject[0].nodeType === "ntTable" && parentNode instanceof CellNode/* CellNode */.D) {
222609
+ nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctJSON, jsonData);
222610
+ } else {
222611
+ if (htmlData) {
222612
+ nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctHTML, htmlData);
222613
+ } else {
222614
+ nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctText, textData);
222615
+ }
222616
+ }
222617
+ }
222604
222618
  } else if (htmlData) {
222605
- //console.log(htmlData);
222606
222619
  nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctHTML, htmlData);
222607
222620
  } else {
222608
222621
  nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctText, textData);
222609
222622
  }
222610
222623
 
222624
+ if (nodes.length === 1 && nodes[0] instanceof TableNode/* TableNode */.Fh && parentNode instanceof CellNode/* CellNode */.D) {
222625
+ var tableNode = nodes[0];
222626
+
222627
+ var _parentNode$table$get = parentNode.table.getCellInfos(parentNode),
222628
+ _parentNode$table$get2 = (0,slicedToArray/* default */.Z)(_parentNode$table$get, 2),
222629
+ rs = _parentNode$table$get2[0],
222630
+ cs = _parentNode$table$get2[1];
222631
+
222632
+ var endRow = 0;
222633
+ var endCol = 0;
222634
+
222635
+ if (hoeditorfactory.docTree.curDomRange.isEmpty) {
222636
+ var re = parentNode.table.rowCount - 1;
222637
+ var ce = parentNode.table.colCount - 1;
222638
+ endRow = re - rs + 1 >= tableNode.rowCount ? tableNode.rowCount : re - rs + 1;
222639
+ endCol = ce - cs + 1 >= tableNode.colCount ? tableNode.colCount : ce - cs + 1;
222640
+ } else {
222641
+ var curDomRange = hoeditorfactory.docTree.curDomRange.normalize();
222642
+ var rowscols = TableNode/* TableNode.getSelectTableRowColInfos */.Fh.getSelectTableRowColInfos(this._hoEditorFactoryID, curDomRange);
222643
+ endRow = rowscols[3] - rowscols[1] + 1 >= tableNode.rowCount ? tableNode.rowCount : rowscols[3] - rowscols[1] + 1;
222644
+ endCol = rowscols[4] - rowscols[2] + 1 >= tableNode.colCount ? tableNode.colCount : rowscols[4] - rowscols[2] + 1;
222645
+ }
222646
+
222647
+ for (var i = 0; i < endRow; i++) {
222648
+ for (var j = 0; j < endCol; j++) {
222649
+ var fromCell = tableNode.rows[i][j];
222650
+ var toCell = parentNode.table.rows[rs + i][cs + j];
222651
+
222652
+ if (fromCell && toCell) {
222653
+ var sCellText = fromCell.getCellText();
222654
+ toCell.setCellText(sCellText);
222655
+ }
222656
+ }
222657
+ }
222658
+
222659
+ return;
222660
+ }
222661
+
222611
222662
  if (!hoeditorfactory.pasteBase) {
222612
222663
  for (var n = 0; n < nodes.length; n++) {
222613
222664
  var node = nodes[n];
@@ -37432,6 +37432,7 @@ var TableNode = /*#__PURE__*/function (_RectNode) {
37432
37432
 
37433
37433
  if (isCopy) {
37434
37434
  rows = pto.row;
37435
+ cols = pto.col;
37435
37436
 
37436
37437
  if (to.colSpan > 1) {
37437
37438
  cols = pto.col + to.colSpan - 1;
@@ -207621,7 +207622,7 @@ var SignNode = __webpack_require__(78975);
207621
207622
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
207622
207623
  var ParagraphNode = __webpack_require__(13880);
207623
207624
  ;// CONCATENATED MODULE: ./src/components/version.ts
207624
- /* harmony default export */ var version = ('2.0.78');
207625
+ /* harmony default export */ var version = ('2.0.79');
207625
207626
  ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/poperTipText/PoperTipText.vue?vue&type=template&id=3fa4e4d3&scoped=true&
207626
207627
  var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"},{name:"click-outside",rawName:"v-click-outside",value:(_vm.handleClose),expression:"handleClose"}],ref:"poperTextNode",staticClass:"poper-text-modal animation-in",style:(_vm.posStyle),on:{"mouseenter":_vm.mouseEnter,"mouseleave":_vm.mouseLeave}},_vm._l((_vm.poperText),function(text){return _c('div',{key:text + Math.random(0, 1),staticClass:"poper-text"},[_vm._v(" "+_vm._s(text)+" ")])}),0)}
207627
207628
  var PoperTipTextvue_type_template_id_3fa4e4d3_scoped_true_staticRenderFns = []
@@ -211449,7 +211450,6 @@ var GestationNode = __webpack_require__(55817);
211449
211450
 
211450
211451
 
211451
211452
 
211452
-
211453
211453
 
211454
211454
 
211455
211455
  var StructureConvert = /*#__PURE__*/function () {
@@ -213502,13 +213502,11 @@ var StructureConvert = /*#__PURE__*/function () {
213502
213502
  message_box_default().alert("不允许将表格粘贴到文本域");
213503
213503
 
213504
213504
  return undefined;
213505
- }
213506
-
213507
- if (isPaste && parentNode instanceof CellNode/* CellNode */.D) {
213508
- message_box_default().alert("不允许将表格粘贴到表格");
213505
+ } // if (isPaste && parentNode instanceof CellNode) {
213506
+ // MessageBox.alert("不允许将表格粘贴到表格");
213507
+ // return undefined;
213508
+ // }
213509
213509
 
213510
- return undefined;
213511
- }
213512
213510
 
213513
213511
  var node = TableNode/* TableNode.json2Node */.Fh.json2Node(this._hoEditorFactoryID, temp, rootNodes, parentNode, isPaste, isClearSign);
213514
213512
  return node;
@@ -222281,6 +222279,8 @@ var message_default = /*#__PURE__*/__webpack_require__.n(message);
222281
222279
 
222282
222280
 
222283
222281
 
222282
+
222283
+
222284
222284
  var EditController = /*#__PURE__*/function () {
222285
222285
  function EditController(hoEditorFactoryID) {
222286
222286
  (0,classCallCheck/* default */.Z)(this, EditController);
@@ -222609,15 +222609,66 @@ var EditController = /*#__PURE__*/function () {
222609
222609
 
222610
222610
  var nodes;
222611
222611
 
222612
- if (jsonData && hoeditorfactory.drawTree.paintStatus === DrawTree/* PaintState.psDesign */.Dh.psDesign) {
222613
- nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctJSON, jsonData);
222612
+ if (jsonData) {
222613
+ if (hoeditorfactory.drawTree.paintStatus === DrawTree/* PaintState.psDesign */.Dh.psDesign) {
222614
+ nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctJSON, jsonData);
222615
+ } else {
222616
+ var jsonObject = JSON.parse(jsonData);
222617
+
222618
+ if (jsonObject.length == 1 && jsonObject[0].nodeType === "ntTable" && parentNode instanceof CellNode/* CellNode */.D) {
222619
+ nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctJSON, jsonData);
222620
+ } else {
222621
+ if (htmlData) {
222622
+ nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctHTML, htmlData);
222623
+ } else {
222624
+ nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctText, textData);
222625
+ }
222626
+ }
222627
+ }
222614
222628
  } else if (htmlData) {
222615
- //console.log(htmlData);
222616
222629
  nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctHTML, htmlData);
222617
222630
  } else {
222618
222631
  nodes = hoeditorfactory.structureNode.Parse(ClipboardType.ctText, textData);
222619
222632
  }
222620
222633
 
222634
+ if (nodes.length === 1 && nodes[0] instanceof TableNode/* TableNode */.Fh && parentNode instanceof CellNode/* CellNode */.D) {
222635
+ var tableNode = nodes[0];
222636
+
222637
+ var _parentNode$table$get = parentNode.table.getCellInfos(parentNode),
222638
+ _parentNode$table$get2 = (0,slicedToArray/* default */.Z)(_parentNode$table$get, 2),
222639
+ rs = _parentNode$table$get2[0],
222640
+ cs = _parentNode$table$get2[1];
222641
+
222642
+ var endRow = 0;
222643
+ var endCol = 0;
222644
+
222645
+ if (hoeditorfactory.docTree.curDomRange.isEmpty) {
222646
+ var re = parentNode.table.rowCount - 1;
222647
+ var ce = parentNode.table.colCount - 1;
222648
+ endRow = re - rs + 1 >= tableNode.rowCount ? tableNode.rowCount : re - rs + 1;
222649
+ endCol = ce - cs + 1 >= tableNode.colCount ? tableNode.colCount : ce - cs + 1;
222650
+ } else {
222651
+ var curDomRange = hoeditorfactory.docTree.curDomRange.normalize();
222652
+ var rowscols = TableNode/* TableNode.getSelectTableRowColInfos */.Fh.getSelectTableRowColInfos(this._hoEditorFactoryID, curDomRange);
222653
+ endRow = rowscols[3] - rowscols[1] + 1 >= tableNode.rowCount ? tableNode.rowCount : rowscols[3] - rowscols[1] + 1;
222654
+ endCol = rowscols[4] - rowscols[2] + 1 >= tableNode.colCount ? tableNode.colCount : rowscols[4] - rowscols[2] + 1;
222655
+ }
222656
+
222657
+ for (var i = 0; i < endRow; i++) {
222658
+ for (var j = 0; j < endCol; j++) {
222659
+ var fromCell = tableNode.rows[i][j];
222660
+ var toCell = parentNode.table.rows[rs + i][cs + j];
222661
+
222662
+ if (fromCell && toCell) {
222663
+ var sCellText = fromCell.getCellText();
222664
+ toCell.setCellText(sCellText);
222665
+ }
222666
+ }
222667
+ }
222668
+
222669
+ return;
222670
+ }
222671
+
222621
222672
  if (!hoeditorfactory.pasteBase) {
222622
222673
  for (var n = 0; n < nodes.length; n++) {
222623
222674
  var node = nodes[n];