hoeditor-web 3.0.92 → 3.0.93
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 +418 -149
- package/lib/hoeditor.umd.min.js +2 -2
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -88735,6 +88735,10 @@ var MarkNode = __webpack_require__(57727);
|
|
|
88735
88735
|
var ParagraphNode = __webpack_require__(67945);
|
|
88736
88736
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/SignNode.ts
|
|
88737
88737
|
var SignNode = __webpack_require__(24701);
|
|
88738
|
+
// EXTERNAL MODULE: ./src/editor/dom/treeNode/TextInputFieldNode.ts
|
|
88739
|
+
var TextInputFieldNode = __webpack_require__(90161);
|
|
88740
|
+
// EXTERNAL MODULE: ./src/editor/dom/treeNode/CellNode.ts
|
|
88741
|
+
var CellNode = __webpack_require__(68598);
|
|
88738
88742
|
;// CONCATENATED MODULE: ./src/editor/undoRedo/NodeStyleUndoUnit.ts
|
|
88739
88743
|
|
|
88740
88744
|
|
|
@@ -88758,6 +88762,8 @@ var SignNode = __webpack_require__(24701);
|
|
|
88758
88762
|
|
|
88759
88763
|
|
|
88760
88764
|
|
|
88765
|
+
|
|
88766
|
+
|
|
88761
88767
|
|
|
88762
88768
|
|
|
88763
88769
|
|
|
@@ -88929,7 +88935,8 @@ var NodeStyleUndoUnit = /*#__PURE__*/function () {
|
|
|
88929
88935
|
}, {
|
|
88930
88936
|
key: "redo",
|
|
88931
88937
|
value: function redo() {
|
|
88932
|
-
var _this = this
|
|
88938
|
+
var _this = this,
|
|
88939
|
+
_range$npEnd$node;
|
|
88933
88940
|
this.initParam();
|
|
88934
88941
|
var range = new DomRange/* DomRange */.a(this._hoEditorFactoryID, this._oldpairs.start, this._oldpairs.end).normalize();
|
|
88935
88942
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
@@ -88978,6 +88985,15 @@ var NodeStyleUndoUnit = /*#__PURE__*/function () {
|
|
|
88978
88985
|
};
|
|
88979
88986
|
changeNodesStyle(nodes);
|
|
88980
88987
|
this.repaint(this._oldpairs.start, this._newpairs.end, this._newpairs.end);
|
|
88988
|
+
var pNode = (_range$npEnd$node = range.npEnd.node) === null || _range$npEnd$node === void 0 ? void 0 : _range$npEnd$node.parentNode;
|
|
88989
|
+
if (pNode && pNode instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
88990
|
+
pNode.update();
|
|
88991
|
+
}
|
|
88992
|
+
var ppNode = pNode === null || pNode === void 0 ? void 0 : pNode.parentNode;
|
|
88993
|
+
if (ppNode && ppNode instanceof CellNode/* CellNode */.D) {
|
|
88994
|
+
ppNode.drawCell.needUpdate = true;
|
|
88995
|
+
ppNode.table.update();
|
|
88996
|
+
}
|
|
88981
88997
|
return;
|
|
88982
88998
|
/**
|
|
88983
88999
|
*
|
|
@@ -89101,13 +89117,13 @@ var NodeStyleUndoUnit = /*#__PURE__*/function () {
|
|
|
89101
89117
|
/* harmony export */ "F": function() { return /* binding */ NodesDeleteUndoUnit; }
|
|
89102
89118
|
/* harmony export */ });
|
|
89103
89119
|
/* harmony import */ var ant_design_vue_es_message_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94310);
|
|
89104
|
-
/* harmony import */ var
|
|
89120
|
+
/* harmony import */ var ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(40735);
|
|
89105
89121
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80543);
|
|
89106
89122
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81448);
|
|
89107
89123
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27222);
|
|
89108
89124
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70280);
|
|
89109
|
-
/* harmony import */ var
|
|
89110
|
-
/* harmony import */ var
|
|
89125
|
+
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(66298);
|
|
89126
|
+
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(78255);
|
|
89111
89127
|
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66992);
|
|
89112
89128
|
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
89113
89129
|
/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(51532);
|
|
@@ -89126,30 +89142,33 @@ var NodeStyleUndoUnit = /*#__PURE__*/function () {
|
|
|
89126
89142
|
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_12__);
|
|
89127
89143
|
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(32023);
|
|
89128
89144
|
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
89129
|
-
/* harmony import */ var
|
|
89130
|
-
/* harmony import */ var
|
|
89131
|
-
/* harmony import */ var
|
|
89132
|
-
/* harmony import */ var
|
|
89133
|
-
/* harmony import */ var
|
|
89134
|
-
/* harmony import */ var
|
|
89135
|
-
/* harmony import */ var
|
|
89136
|
-
/* harmony import */ var
|
|
89137
|
-
/* harmony import */ var
|
|
89138
|
-
/* harmony import */ var
|
|
89139
|
-
/* harmony import */ var
|
|
89140
|
-
/* harmony import */ var
|
|
89141
|
-
/* harmony import */ var
|
|
89142
|
-
/* harmony import */ var
|
|
89143
|
-
/* harmony import */ var
|
|
89144
|
-
/* harmony import */ var
|
|
89145
|
-
/* harmony import */ var
|
|
89146
|
-
/* harmony import */ var
|
|
89147
|
-
/* harmony import */ var
|
|
89148
|
-
/* harmony import */ var
|
|
89149
|
-
/* harmony import */ var
|
|
89150
|
-
/* harmony import */ var
|
|
89151
|
-
/* harmony import */ var
|
|
89152
|
-
/* harmony import */ var
|
|
89145
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(40561);
|
|
89146
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
89147
|
+
/* harmony import */ var _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(32629);
|
|
89148
|
+
/* harmony import */ var _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(27198);
|
|
89149
|
+
/* harmony import */ var _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2613);
|
|
89150
|
+
/* harmony import */ var _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(51760);
|
|
89151
|
+
/* harmony import */ var _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(94639);
|
|
89152
|
+
/* harmony import */ var _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59057);
|
|
89153
|
+
/* harmony import */ var _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(931);
|
|
89154
|
+
/* harmony import */ var _UndoService__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(19229);
|
|
89155
|
+
/* harmony import */ var _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(90161);
|
|
89156
|
+
/* harmony import */ var _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(57727);
|
|
89157
|
+
/* harmony import */ var _events_Exception__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(8277);
|
|
89158
|
+
/* harmony import */ var _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(67945);
|
|
89159
|
+
/* harmony import */ var _dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(68598);
|
|
89160
|
+
/* harmony import */ var _draw_SelectRange__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(53901);
|
|
89161
|
+
/* harmony import */ var _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(5010);
|
|
89162
|
+
/* harmony import */ var _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(74089);
|
|
89163
|
+
/* harmony import */ var _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(91105);
|
|
89164
|
+
/* harmony import */ var _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(99152);
|
|
89165
|
+
/* harmony import */ var _dom_treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(92501);
|
|
89166
|
+
/* harmony import */ var _dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(45712);
|
|
89167
|
+
/* harmony import */ var _NodeInsertUndoUnit__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(64465);
|
|
89168
|
+
/* harmony import */ var _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(24701);
|
|
89169
|
+
/* harmony import */ var _dom_NodePosition__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(42921);
|
|
89170
|
+
/* harmony import */ var _dom_treeNode_TableFormula__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(90832);
|
|
89171
|
+
|
|
89153
89172
|
|
|
89154
89173
|
|
|
89155
89174
|
|
|
@@ -89206,37 +89225,37 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89206
89225
|
*/
|
|
89207
89226
|
function NodesDeleteUndoUnit(hoEditorFactoryID, startPath, endPath, isForceDelete) {
|
|
89208
89227
|
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_classCallCheck_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(this, NodesDeleteUndoUnit);
|
|
89209
|
-
(0,
|
|
89210
|
-
(0,
|
|
89211
|
-
(0,
|
|
89228
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_startPath", void 0);
|
|
89229
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_endPath", void 0);
|
|
89230
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_tmp", {
|
|
89212
89231
|
start: "",
|
|
89213
89232
|
end: ""
|
|
89214
89233
|
});
|
|
89215
|
-
(0,
|
|
89216
|
-
(0,
|
|
89217
|
-
(0,
|
|
89218
|
-
(0,
|
|
89219
|
-
(0,
|
|
89220
|
-
(0,
|
|
89221
|
-
(0,
|
|
89222
|
-
(0,
|
|
89223
|
-
(0,
|
|
89234
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_undoNodes", void 0);
|
|
89235
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_undo", void 0);
|
|
89236
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_pnode", null);
|
|
89237
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_hoEditorFactoryID", void 0);
|
|
89238
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_bSameTable", void 0);
|
|
89239
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_opTime", void 0);
|
|
89240
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_affectText", void 0);
|
|
89241
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_isForceDelete", void 0);
|
|
89242
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_39__/* ["default"] */ .Z)(this, "_isError", false);
|
|
89224
89243
|
this._hoEditorFactoryID = hoEditorFactoryID;
|
|
89225
89244
|
this._startPath = startPath;
|
|
89226
89245
|
this._endPath = endPath;
|
|
89227
89246
|
this._isForceDelete = isForceDelete;
|
|
89228
|
-
this._undo = new
|
|
89247
|
+
this._undo = new _UndoService__WEBPACK_IMPORTED_MODULE_22__/* .UndoService */ .O(this._hoEditorFactoryID); //hoEditorFactory.undoService;
|
|
89229
89248
|
this._undoNodes = new Map();
|
|
89230
|
-
var aDomRange = new
|
|
89249
|
+
var aDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(hoEditorFactoryID, startPath, endPath).normalize();
|
|
89231
89250
|
var _aDomRange$inSameTabl = aDomRange.inSameTable(),
|
|
89232
89251
|
_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),
|
|
89233
89252
|
bSametable = _aDomRange$inSameTabl2[0],
|
|
89234
89253
|
aTable = _aDomRange$inSameTabl2[1];
|
|
89235
89254
|
this._bSameTable = bSametable;
|
|
89236
89255
|
this._opTime = new Date();
|
|
89237
|
-
this._affectText =
|
|
89256
|
+
this._affectText = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_30__/* .HOEditorFactorys.instance */ .b.instance().getFactory(hoEditorFactoryID).vueController.getRangeText(aDomRange);
|
|
89238
89257
|
}
|
|
89239
|
-
(0,
|
|
89258
|
+
(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_createClass_js__WEBPACK_IMPORTED_MODULE_40__/* ["default"] */ .Z)(NodesDeleteUndoUnit, [{
|
|
89240
89259
|
key: "undo",
|
|
89241
89260
|
value: function undo() {
|
|
89242
89261
|
//2.插入删除的节点
|
|
@@ -89254,10 +89273,10 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89254
89273
|
arr = Array.from(this._undoNodes).reverse();
|
|
89255
89274
|
i = 0;
|
|
89256
89275
|
prevIsTable = false;
|
|
89257
|
-
hoEditorFactory =
|
|
89276
|
+
hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_30__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
89258
89277
|
while (i < arr.length) {
|
|
89259
89278
|
value = arr[i];
|
|
89260
|
-
if (value[1] instanceof
|
|
89279
|
+
if (value[1] instanceof _dom_treeNode_CellNode__WEBPACK_IMPORTED_MODULE_27__/* .CellNode */ .D) {
|
|
89261
89280
|
// (value[1] as CellNode).redrawCell(true, DocAction.daInsert);
|
|
89262
89281
|
} else {
|
|
89263
89282
|
if (prevIsTable) {
|
|
@@ -89265,12 +89284,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89265
89284
|
} else {
|
|
89266
89285
|
hoEditorFactory.docTree.insertNodeAfterPath(value[0], value[1]);
|
|
89267
89286
|
}
|
|
89268
|
-
if (value[1] instanceof
|
|
89287
|
+
if (value[1] instanceof _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_29__/* .TableNode */ .Fh) {
|
|
89269
89288
|
prevIsTable = true;
|
|
89270
89289
|
// value[1].clearDrawNodes();
|
|
89271
89290
|
// value[1].drawTable.drawPageTables.length = 0;
|
|
89272
89291
|
np = hoEditorFactory.docTree.findNodePositionByPath(value[0]);
|
|
89273
|
-
if (np && np.node && np.node instanceof
|
|
89292
|
+
if (np && np.node && np.node instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_26__/* .ParagraphNode */ .C) value[1].drawTable.paragraphNode = np.node;
|
|
89274
89293
|
} else {
|
|
89275
89294
|
prevIsTable = false;
|
|
89276
89295
|
}
|
|
@@ -89278,7 +89297,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89278
89297
|
i += 1;
|
|
89279
89298
|
}
|
|
89280
89299
|
aendPaht = hoEditorFactory.docTree.getNodeLastPath(arr[arr.length - 1][1]);
|
|
89281
|
-
changeEvent = new
|
|
89300
|
+
changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_17__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_15__/* .DocAction.daInsert */ .gk.daInsert, arr[0][0], aendPaht);
|
|
89282
89301
|
_context.next = 9;
|
|
89283
89302
|
return hoEditorFactory.docTree.change(changeEvent);
|
|
89284
89303
|
case 9:
|
|
@@ -89307,9 +89326,9 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89307
89326
|
// hoEditorFactory.docTree.change(changeEvent);
|
|
89308
89327
|
// }
|
|
89309
89328
|
//选中范围变化事件
|
|
89310
|
-
newRange = new
|
|
89329
|
+
newRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(this._hoEditorFactoryID, this._startPath, this._endPath).normalize();
|
|
89311
89330
|
hoEditorFactory.docTree.curDomRange = newRange;
|
|
89312
|
-
cgEvent = new
|
|
89331
|
+
cgEvent = new _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_21__/* .SelectionChangeEvent */ .r(hoEditorFactory.docTree.curDomRange, newRange);
|
|
89313
89332
|
hoEditorFactory.docTree.selectChange(cgEvent);
|
|
89314
89333
|
//光标定位
|
|
89315
89334
|
hoEditorFactory.drawTree.moveCaretToPath(newRange.endPath);
|
|
@@ -89337,7 +89356,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89337
89356
|
}, {
|
|
89338
89357
|
key: "MoveCaret",
|
|
89339
89358
|
value: function MoveCaret(path) {
|
|
89340
|
-
|
|
89359
|
+
_HOEditorFactorys__WEBPACK_IMPORTED_MODULE_30__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID).drawTree.moveCaretToPath(path);
|
|
89341
89360
|
}
|
|
89342
89361
|
/**
|
|
89343
89362
|
* @description 返回前面一个node的开始结束选中范围 文本节点时候返回文本中单个文字的选中范围
|
|
@@ -89347,24 +89366,24 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89347
89366
|
key: "getPrevNodeDomRange",
|
|
89348
89367
|
value: function getPrevNodeDomRange(Anode) {
|
|
89349
89368
|
var spath;
|
|
89350
|
-
var hoEditorFactory =
|
|
89369
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_30__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
89351
89370
|
var prev = Anode.prevSibling();
|
|
89352
89371
|
if (!prev) {
|
|
89353
|
-
throw
|
|
89372
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_25__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
89354
89373
|
}
|
|
89355
89374
|
var epath = hoEditorFactory.docTree.getNodeLastPath(prev);
|
|
89356
|
-
if (prev instanceof
|
|
89375
|
+
if (prev instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_16__/* .TextNode */ .R) {
|
|
89357
89376
|
spath = prev.prevPath(epath);
|
|
89358
|
-
} else if (prev instanceof
|
|
89377
|
+
} else if (prev instanceof _dom_treeNode_ParagraphNode__WEBPACK_IMPORTED_MODULE_26__/* .ParagraphNode */ .C) {
|
|
89359
89378
|
spath = epath;
|
|
89360
89379
|
} else {
|
|
89361
89380
|
var prev1 = prev.previousLeaf();
|
|
89362
89381
|
if (!prev1) {
|
|
89363
|
-
throw
|
|
89382
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_25__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
89364
89383
|
}
|
|
89365
89384
|
spath = hoEditorFactory.docTree.getNodeLastPath(prev1);
|
|
89366
89385
|
}
|
|
89367
|
-
return new
|
|
89386
|
+
return new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(this._hoEditorFactoryID, spath, epath);
|
|
89368
89387
|
}
|
|
89369
89388
|
/**
|
|
89370
89389
|
*
|
|
@@ -89377,20 +89396,20 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89377
89396
|
}, {
|
|
89378
89397
|
key: "deleteRange",
|
|
89379
89398
|
value: function deleteRange(endpath, startpath) {
|
|
89380
|
-
var currRange = new
|
|
89399
|
+
var currRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(this._hoEditorFactoryID, startpath, endpath).normalize();
|
|
89381
89400
|
//拆分更新节点,更新删除范围 this._tmp
|
|
89382
89401
|
if (!this.spliteNode(currRange)) {
|
|
89383
89402
|
return 0;
|
|
89384
89403
|
}
|
|
89385
|
-
var newDomRange = new
|
|
89386
|
-
if (!newDomRange.npStart.node) throw
|
|
89387
|
-
if (!newDomRange.npEnd.node) throw
|
|
89404
|
+
var newDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.end);
|
|
89405
|
+
if (!newDomRange.npStart.node) throw _events_Exception__WEBPACK_IMPORTED_MODULE_25__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
89406
|
+
if (!newDomRange.npEnd.node) throw _events_Exception__WEBPACK_IMPORTED_MODULE_25__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
89388
89407
|
var aStart = newDomRange.npStart.node;
|
|
89389
89408
|
if (currRange.startMainNode) {
|
|
89390
89409
|
aStart = currRange.startMainNode;
|
|
89391
89410
|
}
|
|
89392
|
-
var nodes =
|
|
89393
|
-
var hoEditorFactory =
|
|
89411
|
+
var nodes = _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange.getSelectDomNodesForDelete */ .a.getSelectDomNodesForDelete(this._hoEditorFactoryID, this._tmp.start, this._tmp.end);
|
|
89412
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_30__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
89394
89413
|
// this.DeleteBaseCombineNodeContent(
|
|
89395
89414
|
// newDomRange,
|
|
89396
89415
|
// newDomRange.npEnd.node,
|
|
@@ -89518,24 +89537,24 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89518
89537
|
*
|
|
89519
89538
|
* @param Anode
|
|
89520
89539
|
*/
|
|
89521
|
-
var hoEditorFactory =
|
|
89540
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_30__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
89522
89541
|
var forMarkNode = function forMarkNode(Anode) {
|
|
89523
|
-
if (Anode.parentNode instanceof
|
|
89542
|
+
if (Anode.parentNode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_23__/* .TextInputFieldNode */ .re) {
|
|
89524
89543
|
var pTINode = Anode.parentNode;
|
|
89525
89544
|
if (pTINode.isEmpty() || !pTINode.canModifyContent) {
|
|
89526
89545
|
//为空 或者 不允许编辑
|
|
89527
89546
|
var tmp = pTINode.previousLeaf();
|
|
89528
89547
|
if (!tmp) {
|
|
89529
|
-
throw
|
|
89548
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_25__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
89530
89549
|
}
|
|
89531
89550
|
info[0] = 0;
|
|
89532
|
-
info[1] = new
|
|
89551
|
+
info[1] = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(_this._hoEditorFactoryID, hoEditorFactory.docTree.getNodeLastPath(tmp), hoEditorFactory.docTree.getNodeLastPath(pTINode));
|
|
89533
89552
|
} else {
|
|
89534
89553
|
if (Anode == pTINode.last()) {
|
|
89535
89554
|
//递归调用删除
|
|
89536
89555
|
var _tmp = _this.getPrevNodeDomRange(Anode);
|
|
89537
89556
|
//1.移动光标
|
|
89538
|
-
hoEditorFactory.docTree.curDomRange = new
|
|
89557
|
+
hoEditorFactory.docTree.curDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(_this._hoEditorFactoryID, _tmp.endPath, _tmp.endPath);
|
|
89539
89558
|
// this.MoveCaret(tmp.endPath);
|
|
89540
89559
|
//2.删除内容
|
|
89541
89560
|
info[0] = 1;
|
|
@@ -89543,7 +89562,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89543
89562
|
} else if (Anode == pTINode.first()) {
|
|
89544
89563
|
//移动光标到文本域外
|
|
89545
89564
|
var _tmp2 = _this.getPrevNodeDomRange(Anode);
|
|
89546
|
-
hoEditorFactory.docTree.curDomRange = new
|
|
89565
|
+
hoEditorFactory.docTree.curDomRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(_this._hoEditorFactoryID, _tmp2.endPath, _tmp2.endPath);
|
|
89547
89566
|
// this.MoveCaret(tmp.endPath);
|
|
89548
89567
|
info[0] = 2;
|
|
89549
89568
|
info[1] = _tmp2;
|
|
@@ -89552,33 +89571,33 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89552
89571
|
}
|
|
89553
89572
|
};
|
|
89554
89573
|
if (!(s && e)) {
|
|
89555
|
-
throw
|
|
89574
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_25__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
89556
89575
|
}
|
|
89557
89576
|
this._tmp.start = Arange.startPath;
|
|
89558
89577
|
this._tmp.end = Arange.endPath;
|
|
89559
89578
|
var spnode = s.parentNode;
|
|
89560
89579
|
var epnode = e.parentNode;
|
|
89561
89580
|
var pnode = epnode;
|
|
89562
|
-
if (spnode instanceof
|
|
89563
|
-
var result =
|
|
89581
|
+
if (spnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_23__/* .TextInputFieldNode */ .re && epnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_23__/* .TextInputFieldNode */ .re && spnode != epnode) {
|
|
89582
|
+
var result = _dom_NodePosition__WEBPACK_IMPORTED_MODULE_37__/* .NodePosition.nodePositionCompare */ .F.nodePositionCompare(spnode.StartMarkNode, epnode.StartMarkNode);
|
|
89564
89583
|
if (result < 0) {
|
|
89565
89584
|
pnode = spnode;
|
|
89566
89585
|
}
|
|
89567
89586
|
}
|
|
89568
|
-
if (this._isForceDelete && pnode instanceof
|
|
89587
|
+
if (this._isForceDelete && pnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_23__/* .TextInputFieldNode */ .re && pnode.inputFieldType === 1 && (_pnode$downListProper = pnode.downListProperty.listItems) !== null && _pnode$downListProper !== void 0 && _pnode$downListProper.includes("<元素>")) {
|
|
89569
89588
|
this._tmp.start = pnode.StartMarkNode.getNodePath();
|
|
89570
89589
|
this._tmp.end = hoEditorFactory.docTree.getNodeLastPath(pnode.EndMarkNode.previousLeaf());
|
|
89571
89590
|
return true;
|
|
89572
89591
|
}
|
|
89573
89592
|
if (s === e) {
|
|
89574
|
-
if (s instanceof
|
|
89593
|
+
if (s instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_16__/* .TextNode */ .R) {
|
|
89575
89594
|
// HOEditorFactorys.instance().getFactory(this._hoEditorFactoryID).docTree.curDomRange = Arange;
|
|
89576
|
-
var tmp = new
|
|
89595
|
+
var tmp = new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_20__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, Arange.startPath, s, Arange);
|
|
89577
89596
|
this._undo.begin();
|
|
89578
89597
|
this._undo.add(tmp);
|
|
89579
89598
|
this._undo.commit();
|
|
89580
89599
|
this._tmp.end = hoEditorFactory.docTree.getNodeLastPath(tmp.theNode);
|
|
89581
|
-
} else if (s instanceof
|
|
89600
|
+
} else if (s instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_24__/* .MarkNode */ .j) {
|
|
89582
89601
|
forMarkNode(s);
|
|
89583
89602
|
if (info[0] == 0 && info[1]) {
|
|
89584
89603
|
this._tmp.start = info[1].startPath;
|
|
@@ -89593,25 +89612,25 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89593
89612
|
}
|
|
89594
89613
|
} else {
|
|
89595
89614
|
var _tmp3 = null;
|
|
89596
|
-
if (e instanceof
|
|
89597
|
-
_tmp3 = new
|
|
89615
|
+
if (e instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_16__/* .TextNode */ .R && Arange.npEnd.childIndex >= 0 && Arange.npEnd.childIndex < e.getLength() - 1) {
|
|
89616
|
+
_tmp3 = new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_20__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, Arange.endPath, e, Arange);
|
|
89598
89617
|
this._undo.begin();
|
|
89599
89618
|
this._undo.add(_tmp3);
|
|
89600
89619
|
this._undo.commit();
|
|
89601
89620
|
}
|
|
89602
|
-
if (s instanceof
|
|
89621
|
+
if (s instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_16__/* .TextNode */ .R && Arange.npStart.childIndex >= 0 && Arange.npStart.childIndex < s.getLength() - 1) {
|
|
89603
89622
|
this._undo.begin();
|
|
89604
|
-
this._undo.add(new
|
|
89623
|
+
this._undo.add(new _TextNodeSplitUndoUnit__WEBPACK_IMPORTED_MODULE_20__/* .TextNodeSplitUndoUnit */ .W(this._hoEditorFactoryID, Arange.startPath, s, Arange));
|
|
89605
89624
|
this._undo.commit();
|
|
89606
89625
|
}
|
|
89607
|
-
if (e instanceof
|
|
89626
|
+
if (e instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_24__/* .MarkNode */ .j) {
|
|
89608
89627
|
forMarkNode(e);
|
|
89609
89628
|
if (info[0] == 0 && info[1]) {
|
|
89610
89629
|
this._tmp.end = info[1].endPath;
|
|
89611
89630
|
// return this.spliteNode(new DomRange(this._tmp.start, this._tmp.end));
|
|
89612
89631
|
} else if ((info[0] == 1 || info[0] == 2) && info[1]) {
|
|
89613
89632
|
this._tmp.end = info[1].endPath;
|
|
89614
|
-
return this.spliteNode(new
|
|
89633
|
+
return this.spliteNode(new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.end));
|
|
89615
89634
|
}
|
|
89616
89635
|
}
|
|
89617
89636
|
if (_tmp3) {
|
|
@@ -89625,14 +89644,14 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89625
89644
|
}, {
|
|
89626
89645
|
key: "ParentRepaint",
|
|
89627
89646
|
value: function ParentRepaint(Anode) {
|
|
89628
|
-
if (Anode && Anode instanceof
|
|
89629
|
-
var hoEditorFactory =
|
|
89647
|
+
if (Anode && Anode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_23__/* .TextInputFieldNode */ .re) {
|
|
89648
|
+
var hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_30__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
89630
89649
|
if (Anode.childNodes.length === 2) {
|
|
89631
89650
|
var contentMarkNode = Anode.childNodes2[1];
|
|
89632
89651
|
contentMarkNode.styleIndex = Anode.childNodes[0].styleIndex;
|
|
89633
89652
|
var insertPath = hoEditorFactory.docTree.getNodeLastPath(Anode.childNodes[0]);
|
|
89634
89653
|
hoEditorFactory.undoService.begin();
|
|
89635
|
-
hoEditorFactory.undoService.add(new
|
|
89654
|
+
hoEditorFactory.undoService.add(new _NodeInsertUndoUnit__WEBPACK_IMPORTED_MODULE_35__/* .NodeInsertUndoUnit */ .R(this._hoEditorFactoryID, insertPath, contentMarkNode));
|
|
89636
89655
|
hoEditorFactory.undoService.commit();
|
|
89637
89656
|
}
|
|
89638
89657
|
Anode.update();
|
|
@@ -89649,20 +89668,20 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89649
89668
|
value: function () {
|
|
89650
89669
|
var _doRedo = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)( /*#__PURE__*/(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)().mark(function _callee2() {
|
|
89651
89670
|
var _currRange$npEnd$node;
|
|
89652
|
-
var currRange, hoEditorFactory, textStyle, nodes, n, node, tip, pnode, pTiNode, _res, changeEvent, startPath, endPath, res, cgEvent, aNode;
|
|
89671
|
+
var currRange, hoEditorFactory, textStyle, nodes, lastNode, ePath, sPath, n, node, tip, pnode, pTiNode, _res, changeEvent, startPath, endPath, res, cgEvent, aNode;
|
|
89653
89672
|
return (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)().wrap(function _callee2$(_context2) {
|
|
89654
89673
|
while (1) {
|
|
89655
89674
|
switch (_context2.prev = _context2.next) {
|
|
89656
89675
|
case 0:
|
|
89657
89676
|
this.initParam();
|
|
89658
|
-
currRange = new
|
|
89659
|
-
hoEditorFactory =
|
|
89677
|
+
currRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(this._hoEditorFactoryID, this._startPath, this._endPath).normalize();
|
|
89678
|
+
hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_30__/* .HOEditorFactorys.instance */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
89660
89679
|
hoEditorFactory.docTree.curDomRange = currRange;
|
|
89661
|
-
if (!(hoEditorFactory.drawTree.paintStatus ===
|
|
89680
|
+
if (!(hoEditorFactory.drawTree.paintStatus === _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_18__/* .PaintState.psReview */ .Dh.psReview)) {
|
|
89662
89681
|
_context2.next = 11;
|
|
89663
89682
|
break;
|
|
89664
89683
|
}
|
|
89665
|
-
if (!(currRange.npEnd.node && currRange.npEnd.node instanceof
|
|
89684
|
+
if (!(currRange.npEnd.node && currRange.npEnd.node instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_16__/* .TextNode */ .R)) {
|
|
89666
89685
|
_context2.next = 11;
|
|
89667
89686
|
break;
|
|
89668
89687
|
}
|
|
@@ -89671,11 +89690,11 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89671
89690
|
_context2.next = 11;
|
|
89672
89691
|
break;
|
|
89673
89692
|
}
|
|
89674
|
-
|
|
89693
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_41__/* ["default"].warn */ .Z.warn("该内容当前已处于删除状态!");
|
|
89675
89694
|
this._isError = true;
|
|
89676
89695
|
return _context2.abrupt("return");
|
|
89677
89696
|
case 11:
|
|
89678
|
-
nodes =
|
|
89697
|
+
nodes = _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange.getSelectDomNodesForDelete */ .a.getSelectDomNodesForDelete(this._hoEditorFactoryID, this._startPath, this._endPath); // const npFirst = hoEditorFactory.docTree.findNodePositionByPath(this._startPath);
|
|
89679
89698
|
// if (npFirst && npFirst.node) {
|
|
89680
89699
|
// //const parentNode = hoEditorFactory.docTree.getParentNode(this._startPath);
|
|
89681
89700
|
// //if (parentNode) {
|
|
@@ -89685,14 +89704,34 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89685
89704
|
// //}
|
|
89686
89705
|
// }
|
|
89687
89706
|
//if(nodes.length == 0) return;
|
|
89688
|
-
if (!(hoEditorFactory.drawTree.paintStatus !==
|
|
89689
|
-
_context2.next =
|
|
89707
|
+
if (!(hoEditorFactory.drawTree.paintStatus !== _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_18__/* .PaintState.psDesign */ .Dh.psDesign && !this._isForceDelete)) {
|
|
89708
|
+
_context2.next = 51;
|
|
89690
89709
|
break;
|
|
89691
89710
|
}
|
|
89711
|
+
lastNode = nodes[nodes.length - 1];
|
|
89712
|
+
if (!(lastNode instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_24__/* .MarkNode */ .j && lastNode.MarkNodeType === 0)) {
|
|
89713
|
+
_context2.next = 22;
|
|
89714
|
+
break;
|
|
89715
|
+
}
|
|
89716
|
+
if (!(nodes.length === 1)) {
|
|
89717
|
+
_context2.next = 19;
|
|
89718
|
+
break;
|
|
89719
|
+
}
|
|
89720
|
+
return _context2.abrupt("return");
|
|
89721
|
+
case 19:
|
|
89722
|
+
ePath = hoEditorFactory.docTree.getNodeLastPath(lastNode.previousLeaf());
|
|
89723
|
+
hoEditorFactory.docTree.curDomRange.endPath = ePath;
|
|
89724
|
+
nodes.splice(nodes.length - 1, 1);
|
|
89725
|
+
case 22:
|
|
89726
|
+
if (nodes.length === 2 && nodes[0] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_24__/* .MarkNode */ .j && nodes[0].MarkNodeType === 0) {
|
|
89727
|
+
sPath = nodes[0].getNodePath();
|
|
89728
|
+
hoEditorFactory.docTree.curDomRange.startPath = sPath;
|
|
89729
|
+
nodes.splice(0, 1);
|
|
89730
|
+
}
|
|
89692
89731
|
n = 0;
|
|
89693
|
-
case
|
|
89732
|
+
case 24:
|
|
89694
89733
|
if (!(n < nodes.length)) {
|
|
89695
|
-
_context2.next =
|
|
89734
|
+
_context2.next = 50;
|
|
89696
89735
|
break;
|
|
89697
89736
|
}
|
|
89698
89737
|
node = nodes[n]; // if (node instanceof MarkNode && node.parentNode instanceof TextInputFieldNode && node.MarkNodeType === 1 && !node.parentNode.isAllowDelete) {
|
|
@@ -89700,61 +89739,61 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89700
89739
|
// this._isError = true;
|
|
89701
89740
|
// return;
|
|
89702
89741
|
// }
|
|
89703
|
-
if (!(node instanceof
|
|
89704
|
-
_context2.next =
|
|
89742
|
+
if (!(node instanceof _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_31__/* .ControlNode */ .w || node instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_23__/* .TextInputFieldNode */ .re)) {
|
|
89743
|
+
_context2.next = 37;
|
|
89705
89744
|
break;
|
|
89706
89745
|
}
|
|
89707
89746
|
if (node.isAllowDelete) {
|
|
89708
|
-
_context2.next =
|
|
89747
|
+
_context2.next = 37;
|
|
89709
89748
|
break;
|
|
89710
89749
|
}
|
|
89711
89750
|
tip = "";
|
|
89712
|
-
if (node instanceof
|
|
89751
|
+
if (node instanceof _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_32__/* .RadioAndCheckBoxNode */ .Yh && node.controlStyle === "RadioBox") {
|
|
89713
89752
|
tip = "单选框";
|
|
89714
89753
|
}
|
|
89715
|
-
if (node instanceof
|
|
89754
|
+
if (node instanceof _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_32__/* .RadioAndCheckBoxNode */ .Yh && node.controlStyle === "CheckBox") {
|
|
89716
89755
|
tip = "复选框";
|
|
89717
89756
|
}
|
|
89718
|
-
if (node instanceof
|
|
89757
|
+
if (node instanceof _dom_treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_33__/* .DateTimeNode */ .Z) {
|
|
89719
89758
|
tip = "日期时间";
|
|
89720
89759
|
}
|
|
89721
|
-
if (node instanceof
|
|
89760
|
+
if (node instanceof _dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_34__/* .DownListNode */ .yF) {
|
|
89722
89761
|
tip = "下拉列表";
|
|
89723
89762
|
}
|
|
89724
|
-
|
|
89725
|
-
|
|
89763
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_41__/* ["default"].destroy */ .Z.destroy();
|
|
89764
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_41__/* ["default"].warn */ .Z.warn(tip + "元素已设置为不允许删除。请先右键元素属性设置成允许删除,再进行删除操作。");
|
|
89726
89765
|
this._isError = true;
|
|
89727
89766
|
return _context2.abrupt("return");
|
|
89728
|
-
case
|
|
89729
|
-
if (!(node instanceof
|
|
89730
|
-
_context2.next =
|
|
89767
|
+
case 37:
|
|
89768
|
+
if (!(node instanceof _dom_treeNode_TableFormula__WEBPACK_IMPORTED_MODULE_38__/* .TableFormula */ .N)) {
|
|
89769
|
+
_context2.next = 42;
|
|
89731
89770
|
break;
|
|
89732
89771
|
}
|
|
89733
|
-
|
|
89734
|
-
|
|
89772
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_41__/* ["default"].destroy */ .Z.destroy();
|
|
89773
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_41__/* ["default"].warn */ .Z.warn("不允许删除表格计算公式");
|
|
89735
89774
|
this._isError = true;
|
|
89736
89775
|
return _context2.abrupt("return");
|
|
89737
|
-
case
|
|
89738
|
-
if (!(node instanceof
|
|
89739
|
-
_context2.next =
|
|
89776
|
+
case 42:
|
|
89777
|
+
if (!(node instanceof _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_36__/* .SignNode */ .N && node.isTemplate && node.number === 0)) {
|
|
89778
|
+
_context2.next = 47;
|
|
89740
89779
|
break;
|
|
89741
89780
|
}
|
|
89742
|
-
|
|
89743
|
-
|
|
89781
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_41__/* ["default"].destroy */ .Z.destroy();
|
|
89782
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_41__/* ["default"].warn */ .Z.warn("该签名元素不允许删除!");
|
|
89744
89783
|
this._isError = true;
|
|
89745
89784
|
return _context2.abrupt("return");
|
|
89746
|
-
case
|
|
89785
|
+
case 47:
|
|
89747
89786
|
n++;
|
|
89748
|
-
_context2.next =
|
|
89787
|
+
_context2.next = 24;
|
|
89749
89788
|
break;
|
|
89750
|
-
case
|
|
89751
|
-
if (nodes.length === 1 && nodes[0] instanceof
|
|
89789
|
+
case 50:
|
|
89790
|
+
if (nodes.length === 1 && nodes[0] instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_23__/* .TextInputFieldNode */ .re && !nodes[0].isAllowDelete && nodes[0].childNodes[1] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_24__/* .MarkNode */ .j) {
|
|
89752
89791
|
hoEditorFactory.docTree.curDomRange.setSamePath(this._endPath);
|
|
89753
89792
|
}
|
|
89754
|
-
case
|
|
89793
|
+
case 51:
|
|
89755
89794
|
pnode = (_currRange$npEnd$node = currRange.npEnd.node) === null || _currRange$npEnd$node === void 0 ? void 0 : _currRange$npEnd$node.parentNode;
|
|
89756
|
-
if (!(pnode && pnode instanceof
|
|
89757
|
-
_context2.next =
|
|
89795
|
+
if (!(pnode && pnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_23__/* .TextInputFieldNode */ .re && currRange.npEnd.path != hoEditorFactory.docTree.getNodeLastPath(pnode))) {
|
|
89796
|
+
_context2.next = 57;
|
|
89758
89797
|
break;
|
|
89759
89798
|
}
|
|
89760
89799
|
//判断当前TextInputField是否可编辑
|
|
@@ -89766,19 +89805,19 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89766
89805
|
// this._undo.commit();
|
|
89767
89806
|
});
|
|
89768
89807
|
if (_res[0]) {
|
|
89769
|
-
_context2.next =
|
|
89808
|
+
_context2.next = 57;
|
|
89770
89809
|
break;
|
|
89771
89810
|
}
|
|
89772
89811
|
return _context2.abrupt("return");
|
|
89773
|
-
case
|
|
89774
|
-
changeEvent = new
|
|
89812
|
+
case 57:
|
|
89813
|
+
changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_17__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_15__/* .DocAction.daUndoInsert */ .gk.daUndoInsert, currRange.startPath, ""); //FIXME:deleteRange函数完成后调用这个
|
|
89775
89814
|
// hoEditorFactory.docTree.deleteRange(arange.startPath, arange.endPath);
|
|
89776
89815
|
if (currRange.npStart.node && currRange.npEnd.node) {
|
|
89777
|
-
_context2.next =
|
|
89816
|
+
_context2.next = 60;
|
|
89778
89817
|
break;
|
|
89779
89818
|
}
|
|
89780
|
-
throw
|
|
89781
|
-
case
|
|
89819
|
+
throw _events_Exception__WEBPACK_IMPORTED_MODULE_25__/* .Exception.NodeNotFound */ .P.NodeNotFound();
|
|
89820
|
+
case 60:
|
|
89782
89821
|
// const [startPath, endPath] = DomRange.skipStartEndTablePath(
|
|
89783
89822
|
// this._hoEditorFactory,
|
|
89784
89823
|
// currRange.startPath,
|
|
@@ -89787,20 +89826,20 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89787
89826
|
startPath = currRange.startPath;
|
|
89788
89827
|
endPath = currRange.endPath;
|
|
89789
89828
|
changeEvent.oldEndPath = endPath;
|
|
89790
|
-
changeEvent.oldDrawTreeLines = new
|
|
89829
|
+
changeEvent.oldDrawTreeLines = new _draw_SelectRange__WEBPACK_IMPORTED_MODULE_28__/* .SelectRange */ .E(this._hoEditorFactoryID).getRangeDrawTreeLines(startPath, endPath);
|
|
89791
89830
|
res = this.deleteRange(currRange.endPath, currRange.startPath);
|
|
89792
89831
|
if (!(res == 1)) {
|
|
89793
|
-
_context2.next =
|
|
89832
|
+
_context2.next = 72;
|
|
89794
89833
|
break;
|
|
89795
89834
|
}
|
|
89796
89835
|
changeEvent.beforeChangePath = startPath;
|
|
89797
89836
|
changeEvent.afterChangePath = this._tmp.start;
|
|
89798
|
-
_context2.next =
|
|
89837
|
+
_context2.next = 70;
|
|
89799
89838
|
return hoEditorFactory.docTree.change(changeEvent);
|
|
89800
|
-
case
|
|
89801
|
-
cgEvent = new
|
|
89839
|
+
case 70:
|
|
89840
|
+
cgEvent = new _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_21__/* .SelectionChangeEvent */ .r(hoEditorFactory.docTree.curDomRange, new _dom_DomRange__WEBPACK_IMPORTED_MODULE_19__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.start));
|
|
89802
89841
|
hoEditorFactory.docTree.selectChange(cgEvent);
|
|
89803
|
-
case
|
|
89842
|
+
case 72:
|
|
89804
89843
|
hoEditorFactory.docTree.curDomRange.setSamePath(this._tmp.start);
|
|
89805
89844
|
hoEditorFactory.drawTree.moveCaretToPath(this._tmp.start);
|
|
89806
89845
|
aNode = currRange.npStart.node;
|
|
@@ -89808,12 +89847,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
89808
89847
|
pnode = aNode.parentNode;
|
|
89809
89848
|
}
|
|
89810
89849
|
if (!(aNode && pnode)) {
|
|
89811
|
-
_context2.next =
|
|
89850
|
+
_context2.next = 79;
|
|
89812
89851
|
break;
|
|
89813
89852
|
}
|
|
89814
|
-
_context2.next =
|
|
89853
|
+
_context2.next = 79;
|
|
89815
89854
|
return this.ParentRepaint(pnode);
|
|
89816
|
-
case
|
|
89855
|
+
case 79:
|
|
89817
89856
|
case "end":
|
|
89818
89857
|
return _context2.stop();
|
|
89819
89858
|
}
|
|
@@ -90030,8 +90069,12 @@ var ParseUndoUnit = /*#__PURE__*/function () {
|
|
|
90030
90069
|
if (!curRange.isEmpty) {
|
|
90031
90070
|
//删除选中节点
|
|
90032
90071
|
this._undo.begin();
|
|
90033
|
-
|
|
90072
|
+
var nodesDeleteUndoUnit = new _editor_undoRedo_NodesDeleteUndoUnit__WEBPACK_IMPORTED_MODULE_13__/* .NodesDeleteUndoUnit */ .F(this._hoEditorFactoryID, curRange.startPath, curRange.endPath);
|
|
90073
|
+
this._undo.add(nodesDeleteUndoUnit);
|
|
90034
90074
|
this._undo.commit();
|
|
90075
|
+
if (nodesDeleteUndoUnit.isError) {
|
|
90076
|
+
return;
|
|
90077
|
+
}
|
|
90035
90078
|
}
|
|
90036
90079
|
var startPosition = hoEditorFactory.docTree.findNodePositionByPath(curRange.startPath);
|
|
90037
90080
|
var endNode;
|
|
@@ -236312,6 +236355,8 @@ var web_dom_collections_iterator = __webpack_require__(33948);
|
|
|
236312
236355
|
var es_string_starts_with = __webpack_require__(23157);
|
|
236313
236356
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
|
|
236314
236357
|
var es_array_splice = __webpack_require__(40561);
|
|
236358
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.to-fixed.js
|
|
236359
|
+
var es_number_to_fixed = __webpack_require__(56977);
|
|
236315
236360
|
// EXTERNAL MODULE: ./src/editor/dom/DocTree.ts
|
|
236316
236361
|
var DocTree = __webpack_require__(32629);
|
|
236317
236362
|
// EXTERNAL MODULE: ./src/editor/draw/drawTree/DrawTree.ts + 4 modules
|
|
@@ -236352,6 +236397,8 @@ var DrawPageCell = __webpack_require__(59105);
|
|
|
236352
236397
|
var DrawTable = __webpack_require__(74298);
|
|
236353
236398
|
// EXTERNAL MODULE: ./src/components/common/comment/index.ts + 6 modules
|
|
236354
236399
|
var comment = __webpack_require__(85687);
|
|
236400
|
+
// EXTERNAL MODULE: ./src/editor/dom/treeNode/MarkNode.ts
|
|
236401
|
+
var MarkNode = __webpack_require__(57727);
|
|
236355
236402
|
;// CONCATENATED MODULE: ./src/editor/draw/DrawSelectLevel.ts
|
|
236356
236403
|
|
|
236357
236404
|
|
|
@@ -236384,6 +236431,9 @@ var comment = __webpack_require__(85687);
|
|
|
236384
236431
|
|
|
236385
236432
|
|
|
236386
236433
|
|
|
236434
|
+
|
|
236435
|
+
|
|
236436
|
+
|
|
236387
236437
|
|
|
236388
236438
|
|
|
236389
236439
|
|
|
@@ -236810,6 +236860,22 @@ var DrawSelectLevel = /*#__PURE__*/function () {
|
|
|
236810
236860
|
//鼠标点到文本域内容结尾时触发
|
|
236811
236861
|
var curNP = hoeditorfactory.docTree.curDomRange.normalize().npEnd;
|
|
236812
236862
|
if (curNP && curNP.node) {
|
|
236863
|
+
var parentNode = curNP.node.parentNode;
|
|
236864
|
+
if (hoeditorfactory.isControlCaret && aevent.nativeEvent.button === 0 && parentNode instanceof TextInputFieldNode/* TextInputFieldNode */.re && parentNode.isEmpty()) {
|
|
236865
|
+
var ePath = hoeditorfactory.docTree.getNodeLastPath(parentNode.childNodes[1]);
|
|
236866
|
+
var len = parentNode.childNodes[1].text.length;
|
|
236867
|
+
var pathNum = '0';
|
|
236868
|
+
if (len > 1) {
|
|
236869
|
+
pathNum = (len / 2 - 1).toFixed(0);
|
|
236870
|
+
}
|
|
236871
|
+
var pathArr = ePath.split("/");
|
|
236872
|
+
pathArr[pathArr.length - 1] = pathNum;
|
|
236873
|
+
var toPath = pathArr.join("/");
|
|
236874
|
+
if (curNP.node instanceof MarkNode/* MarkNode */.j && curNP.node.MarkNodeType === 0 || startPos.path === ePath) {
|
|
236875
|
+
hoeditorfactory.drawTree.moveCaretToPath(toPath);
|
|
236876
|
+
hoeditorfactory.docTree.curDomRange.setSamePath(toPath);
|
|
236877
|
+
}
|
|
236878
|
+
}
|
|
236813
236879
|
var nextNode = curNP.node.nextLeaf();
|
|
236814
236880
|
if (nextNode && nextNode.parentNode instanceof TextInputFieldNode/* TextInputFieldNode */.re && nextNode.parentNode.inputFieldType == 0) {
|
|
236815
236881
|
if (nextNode == nextNode.parentNode.EndMarkNode) {
|
|
@@ -236917,7 +236983,31 @@ var DrawSelectLevel = /*#__PURE__*/function () {
|
|
|
236917
236983
|
if (endPos.index === -1) {
|
|
236918
236984
|
hoeditorfactory.drawTree.moveCaretToDitem(startPos.page, startPos.dline, startPos.index);
|
|
236919
236985
|
} else {
|
|
236920
|
-
hoeditorfactory.
|
|
236986
|
+
var curNP = hoeditorfactory.docTree.curDomRange.normalize().npEnd;
|
|
236987
|
+
if (curNP && curNP.node) {
|
|
236988
|
+
var parentNode = curNP.node.parentNode;
|
|
236989
|
+
if (hoeditorfactory.isControlCaret && aevent.nativeEvent.button === 0 && parentNode instanceof TextInputFieldNode/* TextInputFieldNode */.re && parentNode.isEmpty()) {
|
|
236990
|
+
var ePath = hoeditorfactory.docTree.getNodeLastPath(parentNode.childNodes[1]);
|
|
236991
|
+
var len = parentNode.childNodes[1].text.length;
|
|
236992
|
+
var pathNum = '0';
|
|
236993
|
+
if (len > 1) {
|
|
236994
|
+
pathNum = (len / 2 - 1).toFixed(0);
|
|
236995
|
+
}
|
|
236996
|
+
var pathArr = ePath.split("/");
|
|
236997
|
+
pathArr[pathArr.length - 1] = pathNum;
|
|
236998
|
+
var toPath = pathArr.join("/");
|
|
236999
|
+
if (curNP.node instanceof MarkNode/* MarkNode */.j && curNP.node.MarkNodeType === 0 || startPos.path === ePath) {
|
|
237000
|
+
hoeditorfactory.drawTree.moveCaretToPath(toPath);
|
|
237001
|
+
} else {
|
|
237002
|
+
hoeditorfactory.drawTree.moveCaretToPath(startPos.path);
|
|
237003
|
+
}
|
|
237004
|
+
} else {
|
|
237005
|
+
hoeditorfactory.drawTree.moveCaretToPath(startPos.path);
|
|
237006
|
+
}
|
|
237007
|
+
} else {
|
|
237008
|
+
return;
|
|
237009
|
+
}
|
|
237010
|
+
//hoeditorfactory.drawTree.moveCaretToPath(startPos.path);
|
|
236921
237011
|
}
|
|
236922
237012
|
} else {
|
|
236923
237013
|
if (hoeditorfactory.drawTree.activePage) hoeditorfactory.drawTree.moveEditTo(hoeditorfactory.drawTree.activePage.pageIndex, 0, 0);
|
|
@@ -239157,10 +239247,8 @@ var SignNode = __webpack_require__(24701);
|
|
|
239157
239247
|
var TextNode = __webpack_require__(27198);
|
|
239158
239248
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
239159
239249
|
var ParagraphNode = __webpack_require__(67945);
|
|
239160
|
-
// EXTERNAL MODULE: ./src/editor/dom/treeNode/MarkNode.ts
|
|
239161
|
-
var MarkNode = __webpack_require__(57727);
|
|
239162
239250
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
239163
|
-
/* harmony default export */ var version = ('3.0.
|
|
239251
|
+
/* harmony default export */ var version = ('3.0.93');
|
|
239164
239252
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
239165
239253
|
var PoperTipText = __webpack_require__(36081);
|
|
239166
239254
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -242691,8 +242779,6 @@ var HTMLconverter2 = /*#__PURE__*/function () {
|
|
|
242691
242779
|
}();
|
|
242692
242780
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
242693
242781
|
var esm_typeof = __webpack_require__(8495);
|
|
242694
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.to-fixed.js
|
|
242695
|
-
var es_number_to_fixed = __webpack_require__(56977);
|
|
242696
242782
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
|
|
242697
242783
|
var es_array_find = __webpack_require__(69826);
|
|
242698
242784
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.constructor.js
|
|
@@ -258061,10 +258147,10 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
258061
258147
|
}, {
|
|
258062
258148
|
key: "clearJsPDF",
|
|
258063
258149
|
value: function clearJsPDF() {
|
|
258064
|
-
if (this.PDF.internal.getFont(
|
|
258065
|
-
delete this.PDF.internal.getFont(
|
|
258066
|
-
delete this.PDF.internal.getFont(
|
|
258067
|
-
delete this.PDF.internal.vFS[
|
|
258150
|
+
if (this.PDF.internal.getFont('SimSun')) {
|
|
258151
|
+
delete this.PDF.internal.getFont('SimSun').metadata;
|
|
258152
|
+
delete this.PDF.internal.getFont('SimSun').data;
|
|
258153
|
+
delete this.PDF.internal.vFS['SimSun-normal.ttf'];
|
|
258068
258154
|
this.PDF = null;
|
|
258069
258155
|
}
|
|
258070
258156
|
}
|
|
@@ -258623,6 +258709,177 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
258623
258709
|
}
|
|
258624
258710
|
return pintAllToPDF;
|
|
258625
258711
|
}()
|
|
258712
|
+
/**
|
|
258713
|
+
* 批量获取xml 当前
|
|
258714
|
+
* @param xmlList [string, boolean, string, boolean][]
|
|
258715
|
+
* 四个参数分别是: xml内容 是否合并 病程记录id:用来判断是否是病程记录和返回对应病程记录的坐标(处理多个不同病程记录的情况) 是否是最后一份病程记录
|
|
258716
|
+
*/
|
|
258717
|
+
}, {
|
|
258718
|
+
key: "pintAllToPDFBase64",
|
|
258719
|
+
value: function () {
|
|
258720
|
+
var _pintAllToPDFBase = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee11(xmlList, callback, params) {
|
|
258721
|
+
var _this7 = this;
|
|
258722
|
+
var hoEditorFactory, beforePrintStatus, xml, xmlIndex, mergeList, position, continuousid, currentName, pdfList, options, toPrint, createSvg;
|
|
258723
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee11$(_context11) {
|
|
258724
|
+
while (1) {
|
|
258725
|
+
switch (_context11.prev = _context11.next) {
|
|
258726
|
+
case 0:
|
|
258727
|
+
hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
258728
|
+
beforePrintStatus = hoEditorFactory.drawTree.paintStatus;
|
|
258729
|
+
xml = hoEditorFactory.vueController.getDocXml();
|
|
258730
|
+
if (!hoEditorFactory.isHideComments) hoEditorFactory.vueController.hideComments(true);
|
|
258731
|
+
hoEditorFactory.printStatus.printMode = 0;
|
|
258732
|
+
hoEditorFactory.drawTree.paintStatus = DrawTree/* PaintState.psPreview */.Dh.psPreview;
|
|
258733
|
+
xmlIndex = -1;
|
|
258734
|
+
mergeList = [];
|
|
258735
|
+
continuousid = '';
|
|
258736
|
+
currentName = '';
|
|
258737
|
+
pdfList = [];
|
|
258738
|
+
options = {
|
|
258739
|
+
unit: 'px',
|
|
258740
|
+
hotfixes: ['px_scaling'],
|
|
258741
|
+
compress: true
|
|
258742
|
+
};
|
|
258743
|
+
this.PDF = null;
|
|
258744
|
+
this.PDF = new jspdf/* default */.ZP(options);
|
|
258745
|
+
toPrint = /*#__PURE__*/function () {
|
|
258746
|
+
var _ref5 = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee9() {
|
|
258747
|
+
var emrOptions, _this7$PDF;
|
|
258748
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee9$(_context9) {
|
|
258749
|
+
while (1) {
|
|
258750
|
+
switch (_context9.prev = _context9.next) {
|
|
258751
|
+
case 0:
|
|
258752
|
+
emrOptions = {
|
|
258753
|
+
name: hoEditorFactory.vueController.getDocTitle() ? hoEditorFactory.vueController.getDocTitle() : '电子病历文档',
|
|
258754
|
+
continuousid: continuousid
|
|
258755
|
+
};
|
|
258756
|
+
if (!(params && continuousid && Array.isArray(params.notPrintDocId) && params.notPrintDocId.length > 0 && params.notPrintDocId.includes(continuousid))) {
|
|
258757
|
+
_context9.next = 6;
|
|
258758
|
+
break;
|
|
258759
|
+
}
|
|
258760
|
+
_context9.next = 4;
|
|
258761
|
+
return PrintStatus/* Print.printAllNew */.Kh.printAllNew(_this7._hoEditorFactoryID, createSvg, _this7.PDF, position, true);
|
|
258762
|
+
case 4:
|
|
258763
|
+
_context9.next = 8;
|
|
258764
|
+
break;
|
|
258765
|
+
case 6:
|
|
258766
|
+
_context9.next = 8;
|
|
258767
|
+
return PrintStatus/* Print.printAllNew */.Kh.printAllNew(_this7._hoEditorFactoryID, createSvg, _this7.PDF, position);
|
|
258768
|
+
case 8:
|
|
258769
|
+
if (!params.mergePDF) {
|
|
258770
|
+
(_this7$PDF = _this7.PDF) === null || _this7$PDF === void 0 ? void 0 : _this7$PDF.deletePage(1);
|
|
258771
|
+
pdfList.push((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, emrOptions), {}, {
|
|
258772
|
+
exportName: currentName,
|
|
258773
|
+
pdf: _this7.PDF.output('datauristring')
|
|
258774
|
+
}));
|
|
258775
|
+
_this7.PDF = null;
|
|
258776
|
+
_this7.PDF = new jspdf/* default */.ZP(options);
|
|
258777
|
+
// const otherPageNumber = this.PDF.internal.getNumberOfPages();
|
|
258778
|
+
// this.PDF?.deletePage(otherPageNumber);
|
|
258779
|
+
// this.PDF.addPage();
|
|
258780
|
+
}
|
|
258781
|
+
case 9:
|
|
258782
|
+
case "end":
|
|
258783
|
+
return _context9.stop();
|
|
258784
|
+
}
|
|
258785
|
+
}
|
|
258786
|
+
}, _callee9);
|
|
258787
|
+
}));
|
|
258788
|
+
return function toPrint() {
|
|
258789
|
+
return _ref5.apply(this, arguments);
|
|
258790
|
+
};
|
|
258791
|
+
}();
|
|
258792
|
+
createSvg = /*#__PURE__*/function () {
|
|
258793
|
+
var _ref6 = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/(0,regeneratorRuntime/* default */.Z)().mark(function _callee10() {
|
|
258794
|
+
var _this7$PDF2;
|
|
258795
|
+
return (0,regeneratorRuntime/* default */.Z)().wrap(function _callee10$(_context10) {
|
|
258796
|
+
while (1) {
|
|
258797
|
+
switch (_context10.prev = _context10.next) {
|
|
258798
|
+
case 0:
|
|
258799
|
+
xmlIndex++;
|
|
258800
|
+
currentName = xmlList[xmlIndex - 1] ? xmlList[xmlIndex - 1][5] : '';
|
|
258801
|
+
if (xmlIndex <= xmlList.length - 1) {
|
|
258802
|
+
if (xmlList[xmlIndex][2]) {
|
|
258803
|
+
// 循环到病程记录时
|
|
258804
|
+
if (position == undefined) {
|
|
258805
|
+
position = {};
|
|
258806
|
+
}
|
|
258807
|
+
if (position && Object.keys(position).length != 0) {
|
|
258808
|
+
callback && callback((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, position), {}, {
|
|
258809
|
+
continuousid: continuousid
|
|
258810
|
+
}));
|
|
258811
|
+
position = {};
|
|
258812
|
+
}
|
|
258813
|
+
if (continuousid && xmlList[xmlIndex][2] !== continuousid) {
|
|
258814
|
+
mergeList = [];
|
|
258815
|
+
}
|
|
258816
|
+
continuousid = xmlList[xmlIndex][2];
|
|
258817
|
+
mergeList.push([xmlList[xmlIndex][1], xmlList[xmlIndex][0], xmlList[xmlIndex][4] === undefined ? false : xmlList[xmlIndex][4]]);
|
|
258818
|
+
if (xmlList[xmlIndex][3]) {
|
|
258819
|
+
Promise.all([hoEditorFactory.vueController.openDocsForPrint(mergeList)]).then(function () {
|
|
258820
|
+
if (hoEditorFactory.loadImageCount === 0) {
|
|
258821
|
+
toPrint();
|
|
258822
|
+
hoEditorFactory.loadImageCallback = null;
|
|
258823
|
+
} else {
|
|
258824
|
+
hoEditorFactory.loadImageCallback = toPrint;
|
|
258825
|
+
}
|
|
258826
|
+
});
|
|
258827
|
+
} else {
|
|
258828
|
+
createSvg();
|
|
258829
|
+
}
|
|
258830
|
+
} else {
|
|
258831
|
+
mergeList = [];
|
|
258832
|
+
continuousid = '';
|
|
258833
|
+
Promise.all([hoEditorFactory.vueController.openXml(xmlList[xmlIndex][0])]).then(function () {
|
|
258834
|
+
if (hoEditorFactory.loadImageCount === 0) {
|
|
258835
|
+
toPrint();
|
|
258836
|
+
hoEditorFactory.loadImageCallback = null;
|
|
258837
|
+
} else {
|
|
258838
|
+
hoEditorFactory.loadImageCallback = toPrint;
|
|
258839
|
+
}
|
|
258840
|
+
});
|
|
258841
|
+
}
|
|
258842
|
+
} else if (xmlIndex > xmlList.length - 1) {
|
|
258843
|
+
hoEditorFactory.drawTree.paintStatus = beforePrintStatus;
|
|
258844
|
+
hoEditorFactory.vueController.openXml(xml);
|
|
258845
|
+
if (params && params.mergePDF) {
|
|
258846
|
+
(_this7$PDF2 = _this7.PDF) === null || _this7$PDF2 === void 0 ? void 0 : _this7$PDF2.deletePage(1);
|
|
258847
|
+
callback && callback({
|
|
258848
|
+
pdf: _this7.PDF.output('datauristring')
|
|
258849
|
+
});
|
|
258850
|
+
} else {
|
|
258851
|
+
callback && callback({
|
|
258852
|
+
pdfList: pdfList
|
|
258853
|
+
});
|
|
258854
|
+
}
|
|
258855
|
+
setTimeout(function () {
|
|
258856
|
+
_this7.clearJsPDF();
|
|
258857
|
+
}, 1000);
|
|
258858
|
+
}
|
|
258859
|
+
case 3:
|
|
258860
|
+
case "end":
|
|
258861
|
+
return _context10.stop();
|
|
258862
|
+
}
|
|
258863
|
+
}
|
|
258864
|
+
}, _callee10);
|
|
258865
|
+
}));
|
|
258866
|
+
return function createSvg() {
|
|
258867
|
+
return _ref6.apply(this, arguments);
|
|
258868
|
+
};
|
|
258869
|
+
}();
|
|
258870
|
+
createSvg();
|
|
258871
|
+
case 17:
|
|
258872
|
+
case "end":
|
|
258873
|
+
return _context11.stop();
|
|
258874
|
+
}
|
|
258875
|
+
}
|
|
258876
|
+
}, _callee11, this);
|
|
258877
|
+
}));
|
|
258878
|
+
function pintAllToPDFBase64(_x10, _x11, _x12) {
|
|
258879
|
+
return _pintAllToPDFBase.apply(this, arguments);
|
|
258880
|
+
}
|
|
258881
|
+
return pintAllToPDFBase64;
|
|
258882
|
+
}()
|
|
258626
258883
|
/**
|
|
258627
258884
|
* 合并预览病历
|
|
258628
258885
|
* @param xmlList `xmlList: [{ xml: 'xml内容', isMerge: false }], // isMerge: false合并到上一页中 / isMerge: true新起一页`
|
|
@@ -259673,6 +259930,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
259673
259930
|
});
|
|
259674
259931
|
(0,esm_defineProperty/* default */.Z)(this, "_commentParams", void 0);
|
|
259675
259932
|
(0,esm_defineProperty/* default */.Z)(this, "_isDrawMustMarker", true);
|
|
259933
|
+
(0,esm_defineProperty/* default */.Z)(this, "_isControlCaret", false);
|
|
259676
259934
|
this._hoEditorFactoryId = id;
|
|
259677
259935
|
}
|
|
259678
259936
|
(0,esm_createClass/* default */.Z)(HOEditorFactory, [{
|
|
@@ -259720,6 +259978,7 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
259720
259978
|
// 审阅参数设置
|
|
259721
259979
|
// 批注相关动态变更
|
|
259722
259980
|
//是否绘制必填标记
|
|
259981
|
+
//鼠标点击空元素控制光标在中间位置
|
|
259723
259982
|
/**
|
|
259724
259983
|
* Getter hoLocalStorage
|
|
259725
259984
|
* @return {HoLocalStorage}
|
|
@@ -260540,6 +260799,16 @@ var HOEditorFactory = /*#__PURE__*/function () {
|
|
|
260540
260799
|
this._canvasListNode = value;
|
|
260541
260800
|
}
|
|
260542
260801
|
}
|
|
260802
|
+
}, {
|
|
260803
|
+
key: "isControlCaret",
|
|
260804
|
+
get: function get() {
|
|
260805
|
+
return this._isControlCaret;
|
|
260806
|
+
},
|
|
260807
|
+
set: function set(value) {
|
|
260808
|
+
if (this._isControlCaret !== value) {
|
|
260809
|
+
this._isControlCaret = value;
|
|
260810
|
+
}
|
|
260811
|
+
}
|
|
260543
260812
|
}, {
|
|
260544
260813
|
key: "clear",
|
|
260545
260814
|
value: function clear() {
|