hoeditor-web 3.1.12 → 3.1.14

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.
@@ -42605,8 +42605,11 @@ var DocController = /*#__PURE__*/function () {
42605
42605
  var startPath = domRange.startPath;
42606
42606
  var endPath = domRange.endPath;
42607
42607
  var ePNode = hoEditorFactory.docTree.getParentNode(endPath); //结束节点的父节点
42608
- var eStyleIndex = domRange.npEnd.node instanceof _treeNode_TextNode__WEBPACK_IMPORTED_MODULE_28__/* .TextNode */ .R ? domRange.npEnd.node.styleIndex : 0;
42609
- var endNode = new _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_48__/* .MarkNode */ .j(this._hoEditorFactoryID, domRange.npStart.roots, ePNode, _treeNode_BaseNode__WEBPACK_IMPORTED_MODULE_25__/* .NodeType */ .Jq.ntMark, commentID, eStyleIndex, _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_48__/* .MarkNodeType */ .q.mtEnd);
42608
+ // const eStyleIndex =
42609
+ // domRange.npEnd.node instanceof TextNode
42610
+ // ? domRange.npEnd.node.styleIndex
42611
+ // : 0;
42612
+ var endNode = new _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_48__/* .MarkNode */ .j(this._hoEditorFactoryID, domRange.npStart.roots, ePNode, _treeNode_BaseNode__WEBPACK_IMPORTED_MODULE_25__/* .NodeType */ .Jq.ntMark, commentID, 0, _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_48__/* .MarkNodeType */ .q.mtEnd);
42610
42613
  endNode.MarkNodeType = _treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_48__/* .MarkNodeType */ .q.mtEnd;
42611
42614
  endNode.isReadOnly = true;
42612
42615
  hoEditorFactory.undoService.begin();
@@ -59790,7 +59793,7 @@ var RadioAndCheckBoxInstance = /*#__PURE__*/function () {
59790
59793
  var RadioAndCheckBoxNode = /*#__PURE__*/function (_ControlNode) {
59791
59794
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_inherits_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(RadioAndCheckBoxNode, _ControlNode);
59792
59795
  var _super = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createSuper_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)(RadioAndCheckBoxNode);
59793
- //关联元素id
59796
+ //关联带出元素
59794
59797
  function RadioAndCheckBoxNode(hoEditorFactoryID, rootNodes, pNode, nodeType, valuesObject, styleIndex //, backColor: string
59795
59798
  ) {
59796
59799
  var _this;
@@ -59817,6 +59820,8 @@ var RadioAndCheckBoxNode = /*#__PURE__*/function (_ControlNode) {
59817
59820
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_groupHasOptions", false);
59818
59821
  //同组保存时必须有选项不能全部为空
59819
59822
  (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_associatedElement", "");
59823
+ //关联元素id
59824
+ (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)((0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_this), "_associatedId", "");
59820
59825
  _this._styleIndex = styleIndex;
59821
59826
  //const valuesObj = eval("(" + valuesObject + ")");
59822
59827
  _this.setValuesObject(valuesObject);
@@ -60022,6 +60027,16 @@ var RadioAndCheckBoxNode = /*#__PURE__*/function (_ControlNode) {
60022
60027
  this._associatedElement = value;
60023
60028
  }
60024
60029
  }
60030
+ }, {
60031
+ key: "associatedId",
60032
+ get: function get() {
60033
+ return this._associatedId;
60034
+ },
60035
+ set: function set(value) {
60036
+ if (this._associatedId !== value) {
60037
+ this._associatedId = value;
60038
+ }
60039
+ }
60025
60040
  // get bandDataSource(): BandDataSource {
60026
60041
  // return this._bandDataSource;
60027
60042
  // }
@@ -67851,7 +67866,7 @@ var TextInputFieldNode = /*#__PURE__*/function (_BaseCombineNode) {
67851
67866
  // };
67852
67867
  if (node) {
67853
67868
  if (node instanceof _TextNode__WEBPACK_IMPORTED_MODULE_59__/* .TextNode */ .R) {
67854
- if (temp.innerIdentifier == "name" && node.text.length > (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(node.text).length) {
67869
+ if (node.text.length > (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(node.text).length) {
67855
67870
  //特殊处理生僻字
67856
67871
  var rareCharNode = new _RareCharNode__WEBPACK_IMPORTED_MODULE_61__/* .RareCharNode */ .Q(temp.hoEditorFactoryID, node.rootNodes, node.parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_44__/* .NodeType */ .Jq.ntRareChar, node.text, node.styleIndex);
67857
67872
  nodes.push(rareCharNode);
@@ -67896,7 +67911,7 @@ var TextInputFieldNode = /*#__PURE__*/function (_BaseCombineNode) {
67896
67911
  var _node2 = hoEditorFactory.structureConvert.convertNode(item, rootNodes, temp, undefined, undefined, isClearSign);
67897
67912
  if (_node2) {
67898
67913
  if (_node2 instanceof _TextNode__WEBPACK_IMPORTED_MODULE_59__/* .TextNode */ .R) {
67899
- if (temp.innerIdentifier == "name" && _node2.text.length > (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_node2.text).length) {
67914
+ if (_node2.text.length > (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_node2.text).length) {
67900
67915
  //特殊处理生僻字
67901
67916
  var _rareCharNode = new _RareCharNode__WEBPACK_IMPORTED_MODULE_61__/* .RareCharNode */ .Q(temp.hoEditorFactoryID, _node2.rootNodes, _node2.parentNode, _BaseNode__WEBPACK_IMPORTED_MODULE_44__/* .NodeType */ .Jq.ntRareChar, _node2.text, _node2.styleIndex);
67902
67917
  nodes.push(_rareCharNode);
@@ -68116,7 +68131,7 @@ var TextInputFieldNode = /*#__PURE__*/function (_BaseCombineNode) {
68116
68131
  }
68117
68132
  } else {
68118
68133
  if (textArr[0] != "") {
68119
- if (temp.innerIdentifier == "name" && temp.text.length > (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(temp.text).length) {
68134
+ if (temp.text.length > (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(temp.text).length) {
68120
68135
  var rareCharNode = new _RareCharNode__WEBPACK_IMPORTED_MODULE_61__/* .RareCharNode */ .Q(temp.hoEditorFactoryID, rootNodes, temp, _BaseNode__WEBPACK_IMPORTED_MODULE_44__/* .NodeType */ .Jq.ntRareChar, textArr[0], styleIndex);
68121
68136
  temp.childNodes.splice(temp.childNodes.length - 1, 0, rareCharNode);
68122
68137
  } else {
@@ -78505,7 +78520,7 @@ var DrawRect = /*#__PURE__*/function (_DrawContainer) {
78505
78520
  /*
78506
78521
  * @Author: your name
78507
78522
  * @Date: 2021-09-01 16:51:49
78508
- * @LastEditTime: 2023-09-07 15:16:20
78523
+ * @LastEditTime: 2023-09-21 15:01:26
78509
78524
  * @LastEditors: liyanan 2441631434@qq.com
78510
78525
  * @Description: In User Settings Edit
78511
78526
  * @FilePath: \hoeditor-web\src\editor\draw\drawNode\DrawSignNode.ts
@@ -79295,10 +79310,10 @@ var DrawSignNode = /*#__PURE__*/function (_DrawCombineNode) {
79295
79310
  }
79296
79311
  }
79297
79312
  if (isFront) {
79298
- line.graphics.beginStroke('#000000').clear().moveTo(this.dWidth - this._drawText.getMeasuredWidth(), 2).lineTo(this.dWidth, -theHeight - 2);
79313
+ line.graphics.clear().beginStroke('#000000').moveTo(this.dWidth - this._drawText.getMeasuredWidth(), 2).lineTo(this.dWidth, -theHeight - 2);
79299
79314
  this.addChild(line);
79300
79315
  } else {
79301
- line.graphics.beginStroke('#000000').clear().moveTo(0, 2).lineTo(this._drawText.getMeasuredWidth(), -theHeight - 2);
79316
+ line.graphics.clear().beginStroke('#000000').moveTo(0, 2).lineTo(this._drawText.getMeasuredWidth(), -theHeight - 2);
79302
79317
  this.addChildAt(line);
79303
79318
  }
79304
79319
  }
@@ -83600,6 +83615,7 @@ var DrawTree = /*#__PURE__*/function () {
83600
83615
  (0,defineProperty/* default */.Z)(this, "_pageCountNodes", void 0);
83601
83616
  (0,defineProperty/* default */.Z)(this, "_errorsMap", void 0);
83602
83617
  //错别字提示
83618
+ (0,defineProperty/* default */.Z)(this, "_onInsertNodeByID", void 0);
83603
83619
  (0,defineProperty/* default */.Z)(this, "_formularNodes", void 0);
83604
83620
  this._hoEditorFactoryID = hoEditorFactoryID;
83605
83621
  var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
@@ -83629,6 +83645,7 @@ var DrawTree = /*#__PURE__*/function () {
83629
83645
  this._pageCountNodes = new Map();
83630
83646
  this._formularNodes = new Map();
83631
83647
  this._errorsMap = new Map();
83648
+ this._onInsertNodeByID = null;
83632
83649
  // this._drawPageMarks = new Array<DrawPageMarkNode>();
83633
83650
  // this._nodeMouseOverHandler = new Array<NodeMouseOverHandler>();
83634
83651
  // this._nodeMouseOutHandler = new Array<NodeMouseOutHandler>();
@@ -83784,6 +83801,14 @@ var DrawTree = /*#__PURE__*/function () {
83784
83801
  * Getter formularNodes
83785
83802
  * @return {Map<string, TableFormula>}
83786
83803
  */
83804
+ }, {
83805
+ key: "onInsertNodeByID",
83806
+ get: function get() {
83807
+ return this._onInsertNodeByID;
83808
+ },
83809
+ set: function set(onInsertNodeByID) {
83810
+ this._onInsertNodeByID = onInsertNodeByID;
83811
+ }
83787
83812
  }, {
83788
83813
  key: "formularNodes",
83789
83814
  get: function get() {
@@ -85562,7 +85587,7 @@ var DrawTree = /*#__PURE__*/function () {
85562
85587
  hoEditorFactory.docController.insertRadioAndCheckBox("update", newDomRangeCur, nodeObjectStr, aNode.styleIndex
85563
85588
  //aNode.backColor
85564
85589
  );
85565
-
85590
+ //单复选关联元素必填标记
85566
85591
  if (e.node.associatedElement) {
85567
85592
  var node = hoEditorFactory.vueController.getNodeByDataID("main", e.node.associatedElement);
85568
85593
  if (node && node instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
@@ -85574,6 +85599,70 @@ var DrawTree = /*#__PURE__*/function () {
85574
85599
  node.update(0);
85575
85600
  }
85576
85601
  }
85602
+ } else {
85603
+ if (e.node.controlStyle === "RadioBox" && e.node.isSelected) {
85604
+ var _iterator2 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.docTree.radioAndCheckBoxsMap.values()),
85605
+ _step2;
85606
+ try {
85607
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
85608
+ var value = _step2.value;
85609
+ if (value.associatedElement && value.controlStyle === "RadioBox" && value.groupName === groupName && groupName !== "") {
85610
+ var _node = hoEditorFactory.vueController.getNodeByDataID("main", value.associatedElement);
85611
+ if (_node && _node instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
85612
+ _node.customProperty.must = false;
85613
+ _node.update(0);
85614
+ break;
85615
+ }
85616
+ }
85617
+ }
85618
+ } catch (err) {
85619
+ _iterator2.e(err);
85620
+ } finally {
85621
+ _iterator2.f();
85622
+ }
85623
+ }
85624
+ }
85625
+ //单复选带出关联元素
85626
+ var deleteAssociatedEle = function deleteAssociatedEle(node) {
85627
+ var changeEvent = new NodeChangeEvent/* NodeChangeEvent */.G(_this2._hoEditorFactoryID, DocTree/* DocAction */.gk.daDelete, nodePathCur, "");
85628
+ changeEvent.oldEndPath = hoEditorFactory.docTree.getNodeLastPath(node);
85629
+ hoEditorFactory.docTree.deleteNode(node, "update");
85630
+ changeEvent.oldDrawTreeLines = new SelectRange/* SelectRange */.E(_this2._hoEditorFactoryID).getRangeDrawTreeLines(nodePathCur, changeEvent.oldEndPath);
85631
+ changeEvent.afterChangePath = nodePathCur;
85632
+ hoEditorFactory.docTree.change(changeEvent);
85633
+ };
85634
+ if (e.node.associatedId) {
85635
+ if (this._onInsertNodeByID) {
85636
+ if (e.node.isSelected) {
85637
+ this._onInsertNodeByID(nodePathCur, e.node.associatedId);
85638
+ } else {
85639
+ var _node2 = hoEditorFactory.vueController.getNodeByDataID("main", e.node.associatedId);
85640
+ if (_node2) {
85641
+ deleteAssociatedEle(_node2);
85642
+ }
85643
+ }
85644
+ }
85645
+ } else {
85646
+ if (e.node.controlStyle === "RadioBox" && e.node.isSelected) {
85647
+ var _iterator3 = (0,createForOfIteratorHelper/* default */.Z)(hoEditorFactory.docTree.radioAndCheckBoxsMap.values()),
85648
+ _step3;
85649
+ try {
85650
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
85651
+ var _value = _step3.value;
85652
+ if (_value.associatedId && _value.controlStyle === "RadioBox" && _value.groupName === groupName && groupName !== "") {
85653
+ var _node3 = hoEditorFactory.vueController.getNodeByDataID("main", _value.associatedId);
85654
+ if (_node3) {
85655
+ deleteAssociatedEle(_node3);
85656
+ break;
85657
+ }
85658
+ }
85659
+ }
85660
+ } catch (err) {
85661
+ _iterator3.e(err);
85662
+ } finally {
85663
+ _iterator3.f();
85664
+ }
85665
+ }
85577
85666
  }
85578
85667
  }
85579
85668
  }
@@ -85698,12 +85787,12 @@ var DrawTree = /*#__PURE__*/function () {
85698
85787
  selectStart = "".concat(_dNode.node.getNodePath(), "/").concat(childIndex);
85699
85788
  }
85700
85789
  } else if ((0,IDrawInfos/* instanceOfIDrawInfos */.r)(_dNode)) {
85701
- var _node = _dNode.node;
85702
- var _dindex = _node.drawNodes.indexOf(_dNode);
85703
- if (_node.hasChildPath()) {
85704
- selectStart = "".concat(_node.getNodePath(), "/").concat(_dindex);
85790
+ var _node4 = _dNode.node;
85791
+ var _dindex = _node4.drawNodes.indexOf(_dNode);
85792
+ if (_node4.hasChildPath()) {
85793
+ selectStart = "".concat(_node4.getNodePath(), "/").concat(_dindex);
85705
85794
  } else {
85706
- selectStart = "".concat(_node.getNodePath());
85795
+ selectStart = "".concat(_node4.getNodePath());
85707
85796
  }
85708
85797
  }
85709
85798
  }
@@ -217691,7 +217780,7 @@ var TextNode = __webpack_require__(27198);
217691
217780
  // EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
217692
217781
  var ParagraphNode = __webpack_require__(67945);
217693
217782
  ;// CONCATENATED MODULE: ./src/components/version.ts
217694
- /* harmony default export */ var version = ('3.1.12');
217783
+ /* harmony default export */ var version = ('3.1.14');
217695
217784
  // EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
217696
217785
  var PoperTipText = __webpack_require__(50987);
217697
217786
  ;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
@@ -232337,7 +232426,18 @@ var VueController = /*#__PURE__*/function () {
232337
232426
  }
232338
232427
  }
232339
232428
  if (table) {
232340
- var rowCellNum = table.rows[0].length;
232429
+ var rowIndex = this.getTableTitleMaxRowIndex(table);
232430
+ if (rowIndex === -1) {
232431
+ rowIndex = 0;
232432
+ }
232433
+ var rowCellNum = 0;
232434
+ for (var r = 0; r <= rowIndex; r++) {
232435
+ for (var c = 0; c < table.colCount; c++) {
232436
+ if (table.rows[r][c]) {
232437
+ rowCellNum++;
232438
+ }
232439
+ }
232440
+ }
232341
232441
  for (var _k4 = rowCellNum; _k4 < table.childNodes.length; _k4++) {
232342
232442
  var cell = table.childNodes[_k4];
232343
232443
  if (cell.childNodes.length > 1) {
@@ -232347,8 +232447,8 @@ var VueController = /*#__PURE__*/function () {
232347
232447
  }
232348
232448
  if (table.childNodes.length - rowCellNum < data.length) {
232349
232449
  var needCellNum = data.length - (table.childNodes.length - rowCellNum);
232350
- var needRows = Number((needCellNum / rowCellNum).toFixed());
232351
- var remainder = needCellNum % rowCellNum;
232450
+ var needRows = Number((needCellNum / table.colCount).toFixed());
232451
+ var remainder = needCellNum % table.colCount;
232352
232452
  if (remainder > 0) {
232353
232453
  needRows++;
232354
232454
  }