hoeditor-web 3.0.21 → 3.0.23
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.css +13052 -2
- package/lib/hoeditor.umd.js +37 -25
- package/lib/hoeditor.umd.min.js +2 -2
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -35266,22 +35266,22 @@ var Print = /*#__PURE__*/function () {
|
|
|
35266
35266
|
(0,createClass/* default */.Z)(Print, null, [{
|
|
35267
35267
|
key: "openDataUriInWindow",
|
|
35268
35268
|
value: function openDataUriInWindow(PDF, fileName, width) {
|
|
35269
|
-
var _window$top, _window$top$chrome;
|
|
35270
35269
|
if (navigator && navigator.userAgent.toLowerCase().indexOf('electron') !== -1) {
|
|
35271
35270
|
var htmlForNewWindow = '<html>' + '<title>' + fileName + '</title>' + '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style>' + '<body>' + '<iframe src="' + PDF.output('bloburl') + '"></iframe>' + '</body></html>';
|
|
35272
35271
|
var nW = window.open('', 'modal', 'width=' + (width + 400) + ',height=800');
|
|
35273
35272
|
if (nW) {
|
|
35274
35273
|
nW.document.write(htmlForNewWindow);
|
|
35275
35274
|
}
|
|
35276
|
-
}
|
|
35277
|
-
|
|
35278
|
-
|
|
35279
|
-
|
|
35280
|
-
|
|
35281
|
-
|
|
35282
|
-
|
|
35283
|
-
|
|
35284
|
-
}
|
|
35275
|
+
}
|
|
35276
|
+
// else if (window.top?.chrome?.webview) {
|
|
35277
|
+
// window.top?.chrome?.webview.postMessage({
|
|
35278
|
+
// exec: 'printpdf',
|
|
35279
|
+
// data: {
|
|
35280
|
+
// base64: PDF.output('datauristring').replace(/^data:application\/pdf;filename=generated.pdf;base64,/, ''),
|
|
35281
|
+
// },
|
|
35282
|
+
// });
|
|
35283
|
+
// } =
|
|
35284
|
+
else {
|
|
35285
35285
|
if (document.querySelector('#Ho_Editor_Print_Iframe')) {
|
|
35286
35286
|
document.body.removeChild(document.querySelector('#Ho_Editor_Print_Iframe'));
|
|
35287
35287
|
}
|
|
@@ -37370,6 +37370,11 @@ var DocController = /*#__PURE__*/function () {
|
|
|
37370
37370
|
if (oldCanModifyContent !== undefined && pNode instanceof _treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_45__/* .TextInputFieldNode */ .re) {
|
|
37371
37371
|
pNode.canModifyContent = oldCanModifyContent;
|
|
37372
37372
|
pNode.update();
|
|
37373
|
+
var ppNode = pNode.parentNode;
|
|
37374
|
+
if (ppNode instanceof _treeNode_CellNode__WEBPACK_IMPORTED_MODULE_56__/* .CellNode */ .D) {
|
|
37375
|
+
ppNode.drawCell.needUpdate = true;
|
|
37376
|
+
ppNode.table.update();
|
|
37377
|
+
}
|
|
37373
37378
|
}
|
|
37374
37379
|
}
|
|
37375
37380
|
aresolve(strPath);
|
|
@@ -73648,17 +73653,19 @@ var DrawPageTable = /*#__PURE__*/function (_DrawRect) {
|
|
|
73648
73653
|
}, {
|
|
73649
73654
|
key: "removeDrawCellAfterRow",
|
|
73650
73655
|
value: function removeDrawCellAfterRow(startRow) {
|
|
73651
|
-
var endRow = Math.max(this._partRowHeights.getLastRow(), startRow);
|
|
73656
|
+
var endRow = Math.min(Math.max(this._partRowHeights.getLastRow(), startRow), this._table.rowCount - 1);
|
|
73652
73657
|
this._partRowHeights.delete(startRow, this._partRowHeights.getLength());
|
|
73653
73658
|
for (var r = endRow; r >= startRow; r--) {
|
|
73654
73659
|
for (var c = 0; c < this._table.colCount; c++) {
|
|
73655
|
-
|
|
73656
|
-
|
|
73657
|
-
|
|
73658
|
-
|
|
73659
|
-
|
|
73660
|
-
|
|
73661
|
-
|
|
73660
|
+
if (this._table.rows[r]) {
|
|
73661
|
+
var cell = this._table.rows[r][c];
|
|
73662
|
+
if (cell) {
|
|
73663
|
+
var partCell = cell.drawCell.getDrawPageCell(this);
|
|
73664
|
+
if (partCell) {
|
|
73665
|
+
this.removeChild(partCell);
|
|
73666
|
+
var index = cell.drawCell.drawPageCells.indexOf(partCell);
|
|
73667
|
+
if (index >= 0) cell.drawCell.drawPageCells.splice(index, 1);
|
|
73668
|
+
}
|
|
73662
73669
|
}
|
|
73663
73670
|
}
|
|
73664
73671
|
}
|
|
@@ -260010,7 +260017,7 @@ var SignNode = __webpack_require__(24701);
|
|
|
260010
260017
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
260011
260018
|
var ParagraphNode = __webpack_require__(67945);
|
|
260012
260019
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
260013
|
-
/* harmony default export */ var version = ('3.0.
|
|
260020
|
+
/* harmony default export */ var version = ('3.0.23');
|
|
260014
260021
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
260015
260022
|
var PoperTipText = __webpack_require__(15845);
|
|
260016
260023
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -268667,9 +268674,9 @@ var VueController = /*#__PURE__*/function () {
|
|
|
268667
268674
|
*/
|
|
268668
268675
|
}, {
|
|
268669
268676
|
key: "printPromisePDF",
|
|
268670
|
-
value: function printPromisePDF(printMode, printAppoint) {
|
|
268677
|
+
value: function printPromisePDF(printMode, printAppoint, type, callback) {
|
|
268671
268678
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys.instance */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
268672
|
-
hoEditorFactory.printController.printPromisePDF(printMode, printAppoint);
|
|
268679
|
+
hoEditorFactory.printController.printPromisePDF(printMode, printAppoint, type, callback);
|
|
268673
268680
|
}
|
|
268674
268681
|
/**
|
|
268675
268682
|
* 保存pdf
|
|
@@ -271811,7 +271818,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
271811
271818
|
if (text.length < 20) {
|
|
271812
271819
|
getText();
|
|
271813
271820
|
}
|
|
271814
|
-
if (textFieldName) {
|
|
271821
|
+
if (textFieldName.replace(/\s*/g, "")) {
|
|
271815
271822
|
textFieldName += ":";
|
|
271816
271823
|
}
|
|
271817
271824
|
if (text.length >= 20) {
|
|
@@ -271819,7 +271826,7 @@ var VueController = /*#__PURE__*/function () {
|
|
|
271819
271826
|
hoEditorFactory.aiTextFunc(text.replace(/\s*/g, ""), callback);
|
|
271820
271827
|
} else if (text.length > 0) {
|
|
271821
271828
|
hoEditorFactory.aiTextFunc(text.replace(/\s*/g, ""), callback);
|
|
271822
|
-
} else if (text.length === 0 && textFieldName) {
|
|
271829
|
+
} else if (text.length === 0 && textFieldName.replace(/\s*/g, "")) {
|
|
271823
271830
|
hoEditorFactory.aiTextFunc(textFieldName.replace(/\s*/g, ""), callback);
|
|
271824
271831
|
}
|
|
271825
271832
|
}
|
|
@@ -276455,8 +276462,13 @@ var PrintController = /*#__PURE__*/function () {
|
|
|
276455
276462
|
}
|
|
276456
276463
|
}).then(function (res) {
|
|
276457
276464
|
if (res === 'printend') {
|
|
276458
|
-
|
|
276459
|
-
|
|
276465
|
+
var lastPos = hoEditorFactory.printStatus.printRecord.last();
|
|
276466
|
+
if (callback && lastPos) {
|
|
276467
|
+
callback({
|
|
276468
|
+
startPageNum: 0,
|
|
276469
|
+
pageNum: lastPos[0],
|
|
276470
|
+
positionY: lastPos[1]
|
|
276471
|
+
});
|
|
276460
276472
|
}
|
|
276461
276473
|
hoEditorFactory.printStatus.printAppoint = '';
|
|
276462
276474
|
hoEditorFactory.printStatus.drawPrintRecord.Position = [0, 0];
|