hoeditor-web 3.0.89 → 3.0.90
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 +44 -27
- package/lib/hoeditor.umd.min.js +3 -3
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -37686,29 +37686,41 @@ var Print = /*#__PURE__*/function () {
|
|
|
37686
37686
|
(0,createClass/* default */.Z)(Print, null, [{
|
|
37687
37687
|
key: "openDataUriInWindow",
|
|
37688
37688
|
value: function openDataUriInWindow(PDF, fileName, width, printSilently) {
|
|
37689
|
-
var _window$top, _window$top$chrome;
|
|
37690
37689
|
if (navigator && navigator.userAgent.toLowerCase().indexOf('electron') !== -1) {
|
|
37691
37690
|
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>';
|
|
37692
37691
|
var nW = window.open('', 'modal', 'width=' + (width + 400) + ',height=800');
|
|
37693
37692
|
if (nW) {
|
|
37694
37693
|
nW.document.write(htmlForNewWindow);
|
|
37695
37694
|
}
|
|
37696
|
-
} else if ((_window$top = window.top) !== null && _window$top !== void 0 && (_window$top$chrome = _window$top.chrome) !== null && _window$top$chrome !== void 0 && _window$top$chrome.webview && printSilently) {
|
|
37697
|
-
var _window$top2, _window$top2$chrome;
|
|
37698
|
-
(_window$top2 = window.top) === null || _window$top2 === void 0 ? void 0 : (_window$top2$chrome = _window$top2.chrome) === null || _window$top2$chrome === void 0 ? void 0 : _window$top2$chrome.webview.postMessage({
|
|
37699
|
-
exec: 'printpdf',
|
|
37700
|
-
data: {
|
|
37701
|
-
base64: PDF.output('datauristring').replace(/^data:application\/pdf;filename=generated.pdf;base64,/, '')
|
|
37702
|
-
}
|
|
37703
|
-
});
|
|
37704
37695
|
} else {
|
|
37705
|
-
|
|
37706
|
-
|
|
37696
|
+
try {
|
|
37697
|
+
var _window$top, _window$top$chrome;
|
|
37698
|
+
if ((_window$top = window.top) !== null && _window$top !== void 0 && (_window$top$chrome = _window$top.chrome) !== null && _window$top$chrome !== void 0 && _window$top$chrome.webview && printSilently) {
|
|
37699
|
+
var _window$top2, _window$top2$chrome;
|
|
37700
|
+
(_window$top2 = window.top) === null || _window$top2 === void 0 ? void 0 : (_window$top2$chrome = _window$top2.chrome) === null || _window$top2$chrome === void 0 ? void 0 : _window$top2$chrome.webview.postMessage({
|
|
37701
|
+
exec: 'printpdf',
|
|
37702
|
+
data: {
|
|
37703
|
+
base64: PDF.output('datauristring').replace(/^data:application\/pdf;filename=generated.pdf;base64,/, '')
|
|
37704
|
+
}
|
|
37705
|
+
});
|
|
37706
|
+
} else {
|
|
37707
|
+
if (document.querySelector('#Ho_Editor_Print_Iframe')) {
|
|
37708
|
+
document.body.removeChild(document.querySelector('#Ho_Editor_Print_Iframe'));
|
|
37709
|
+
}
|
|
37710
|
+
this.printPage(PDF).catch(function (error) {
|
|
37711
|
+
PDF.autoPrint();
|
|
37712
|
+
PDF.output('dataurlnewwindow');
|
|
37713
|
+
});
|
|
37714
|
+
}
|
|
37715
|
+
} catch (error) {
|
|
37716
|
+
if (document.querySelector('#Ho_Editor_Print_Iframe')) {
|
|
37717
|
+
document.body.removeChild(document.querySelector('#Ho_Editor_Print_Iframe'));
|
|
37718
|
+
}
|
|
37719
|
+
this.printPage(PDF).catch(function (error) {
|
|
37720
|
+
PDF.autoPrint();
|
|
37721
|
+
PDF.output('dataurlnewwindow');
|
|
37722
|
+
});
|
|
37707
37723
|
}
|
|
37708
|
-
this.printPage(PDF).catch(function (error) {
|
|
37709
|
-
PDF.autoPrint();
|
|
37710
|
-
PDF.output('dataurlnewwindow');
|
|
37711
|
-
});
|
|
37712
37724
|
}
|
|
37713
37725
|
}
|
|
37714
37726
|
}, {
|
|
@@ -80101,6 +80113,10 @@ var DrawText = /*#__PURE__*/function (_createjs$Text) {
|
|
|
80101
80113
|
if (this.outline) {
|
|
80102
80114
|
ctx.strokeText(str, 0, 0, docWidth || this._maxWidth);
|
|
80103
80115
|
} else {
|
|
80116
|
+
if (this.font.indexOf("bold") != -1) {
|
|
80117
|
+
ctx.strokeStyle = ctx.fillStyle;
|
|
80118
|
+
ctx.strokeText(str, 0, 0, docWidth || this._maxWidth);
|
|
80119
|
+
}
|
|
80104
80120
|
ctx.fillText(str, 0, 0, docWidth || this._maxWidth);
|
|
80105
80121
|
}
|
|
80106
80122
|
}
|
|
@@ -100179,7 +100195,8 @@ Context2D.prototype.arcTo=function(x1,y1,x2,y2,radius){throw new Error("arcTo no
|
|
|
100179
100195
|
*/Context2D.prototype.fillText=function(text,x,y,maxWidth){if(isNaN(x)||isNaN(y)||typeof text!=="string"){console.error("jsPDF.context2d.fillText: Invalid arguments",arguments);throw new Error("Invalid arguments passed to jsPDF.context2d.fillText");}maxWidth=isNaN(maxWidth)?undefined:maxWidth;if(isFillTransparent.call(this)){return;}var degs=rad2deg(this.ctx.transform.rotation);// We only use X axis as scale hint
|
|
100180
100196
|
var scale=this.ctx.transform.scaleX;var acharSpace=this.letterSpacing?parseFloat(this.letterSpacing):0.0;//自定义修改 以处理宋体粗体
|
|
100181
100197
|
if(this.font.indexOf("SimSun")>=0&&this.font.indexOf("bold")>=0){//renderingMode: "stroke",
|
|
100182
|
-
|
|
100198
|
+
putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign,maxWidth:maxWidth,// renderingMode: "fillThenStroke",
|
|
100199
|
+
charSpace:acharSpace+0.35});}else{putText.call(this,{text:text,x:x,y:y,scale:scale,angle:degs,align:this.textAlign,maxWidth:maxWidth,charSpace:acharSpace});}};/**
|
|
100183
100200
|
* Draws text on the canvas (no fill)
|
|
100184
100201
|
*
|
|
100185
100202
|
* @name strokeText
|
|
@@ -236028,8 +236045,8 @@ var es_string_match = __webpack_require__(4723);
|
|
|
236028
236045
|
var es_number_constructor = __webpack_require__(9653);
|
|
236029
236046
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.stringify.js
|
|
236030
236047
|
var es_json_stringify = __webpack_require__(38862);
|
|
236031
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=template&id=
|
|
236032
|
-
var
|
|
236048
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=template&id=1e9632f5&
|
|
236049
|
+
var HoDocvue_type_template_id_1e9632f5_render = function render() {
|
|
236033
236050
|
var _vm = this,
|
|
236034
236051
|
_c = _vm._self._c;
|
|
236035
236052
|
return _c('div', {
|
|
@@ -236177,7 +236194,7 @@ var HoDocvue_type_template_id_197ca538_render = function render() {
|
|
|
236177
236194
|
}
|
|
236178
236195
|
}, [_vm._v("v " + _vm._s(_vm.version))])])])], 1);
|
|
236179
236196
|
};
|
|
236180
|
-
var
|
|
236197
|
+
var HoDocvue_type_template_id_1e9632f5_staticRenderFns = [];
|
|
236181
236198
|
|
|
236182
236199
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
|
|
236183
236200
|
var es_array_filter = __webpack_require__(57327);
|
|
@@ -239136,7 +239153,7 @@ var ParagraphNode = __webpack_require__(67945);
|
|
|
239136
239153
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/MarkNode.ts
|
|
239137
239154
|
var MarkNode = __webpack_require__(57727);
|
|
239138
239155
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
239139
|
-
/* harmony default export */ var version = ('3.0.
|
|
239156
|
+
/* harmony default export */ var version = ('3.0.90');
|
|
239140
239157
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
239141
239158
|
var PoperTipText = __webpack_require__(36081);
|
|
239142
239159
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -239659,15 +239676,15 @@ var defaultHeight = Math.floor(1122 * scaleXY) % 2 === 1 ? Math.floor(1122 * sca
|
|
|
239659
239676
|
}
|
|
239660
239677
|
this.poperType = 'datePoper';
|
|
239661
239678
|
} else if (Number(_parentNode.inputFieldType) === 1) {
|
|
239679
|
+
var _node$parentNode$down, _node$parentNode$down2;
|
|
239662
239680
|
if (paintStatus === 0) {
|
|
239663
239681
|
this.hoEditorProvider.setControlProperty('text', 'update', '');
|
|
239664
239682
|
this.hoEditorProvider.setUpdateNodeValue(this.getCurrentSelectNode());
|
|
239665
239683
|
return;
|
|
239666
239684
|
}
|
|
239667
239685
|
var text = node.text.replace(/ /g, '');
|
|
239668
|
-
|
|
239669
|
-
|
|
239670
|
-
var list = (_node$parentNode$down = node.parentNode.downListProperty) !== null && _node$parentNode$down !== void 0 && _node$parentNode$down.listItems ? JSON.parse((_node$parentNode$down2 = node.parentNode.downListProperty) === null || _node$parentNode$down2 === void 0 ? void 0 : _node$parentNode$down2.listItems) : [];
|
|
239686
|
+
var list = (_node$parentNode$down = node.parentNode.downListProperty) !== null && _node$parentNode$down !== void 0 && _node$parentNode$down.listItems ? JSON.parse((_node$parentNode$down2 = node.parentNode.downListProperty) === null || _node$parentNode$down2 === void 0 ? void 0 : _node$parentNode$down2.listItems) : [];
|
|
239687
|
+
if (text != node.parentNode.name && text !== '' && list.length > 0) {
|
|
239671
239688
|
if (list.filter(function (v) {
|
|
239672
239689
|
return v.text.split('<元素>')[0].includes(text);
|
|
239673
239690
|
}).length === 0) {
|
|
@@ -239881,10 +239898,10 @@ var defaultHeight = Math.floor(1122 * scaleXY) % 2 === 1 ? Math.floor(1122 * sca
|
|
|
239881
239898
|
});
|
|
239882
239899
|
;// CONCATENATED MODULE: ./src/components/HoDoc.vue?vue&type=script&lang=js&
|
|
239883
239900
|
/* harmony default export */ var components_HoDocvue_type_script_lang_js_ = (HoDocvue_type_script_lang_js_);
|
|
239884
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=style&index=0&id=
|
|
239901
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/HoDoc.vue?vue&type=style&index=0&id=1e9632f5&prod&lang=scss&
|
|
239885
239902
|
// extracted by mini-css-extract-plugin
|
|
239886
239903
|
|
|
239887
|
-
;// CONCATENATED MODULE: ./src/components/HoDoc.vue?vue&type=style&index=0&id=
|
|
239904
|
+
;// CONCATENATED MODULE: ./src/components/HoDoc.vue?vue&type=style&index=0&id=1e9632f5&prod&lang=scss&
|
|
239888
239905
|
|
|
239889
239906
|
;// CONCATENATED MODULE: ./src/components/HoDoc.vue
|
|
239890
239907
|
|
|
@@ -239897,8 +239914,8 @@ var defaultHeight = Math.floor(1122 * scaleXY) % 2 === 1 ? Math.floor(1122 * sca
|
|
|
239897
239914
|
|
|
239898
239915
|
var HoDoc_component = (0,componentNormalizer/* default */.Z)(
|
|
239899
239916
|
components_HoDocvue_type_script_lang_js_,
|
|
239900
|
-
|
|
239901
|
-
|
|
239917
|
+
HoDocvue_type_template_id_1e9632f5_render,
|
|
239918
|
+
HoDocvue_type_template_id_1e9632f5_staticRenderFns,
|
|
239902
239919
|
false,
|
|
239903
239920
|
null,
|
|
239904
239921
|
null,
|