tnx-shared 5.8.3 → 5.8.5
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/bundles/tnx-shared.umd.js +9 -4
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/components/file-explorer/services/file-object.service.d.ts +1 -0
- package/components/file-explorer/services/file-object.service.d.ts.map +1 -1
- package/components/tn-tinymce/tn-tinymce.component.d.ts +1 -0
- package/components/tn-tinymce/tn-tinymce.component.d.ts.map +1 -1
- package/esm2015/components/file-explorer/services/file-object.service.js +3 -1
- package/esm2015/components/tn-tinymce/tn-tinymce.component.js +9 -6
- package/fesm2015/tnx-shared.js +10 -5
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -28251,10 +28251,12 @@
|
|
|
28251
28251
|
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.fileEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/FileObject") || this;
|
|
28252
28252
|
_this._moduleConfigService = _moduleConfigService;
|
|
28253
28253
|
_this.thumborEndpoint = '';
|
|
28254
|
+
_this.staticEndpoint = '';
|
|
28254
28255
|
_this.fileWithThumborEndpoint = '';
|
|
28255
28256
|
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.fileEndpoint;
|
|
28256
28257
|
_this.fileWithThumborEndpoint = _moduleConfigService.getConfig().environment.apiDomain.fileWithThumborEndpoint;
|
|
28257
28258
|
_this.thumborEndpoint = _moduleConfigService.getConfig().environment.apiDomain.thumbor;
|
|
28259
|
+
_this.staticEndpoint = _moduleConfigService.getConfig().environment.apiDomain.filePathEndpoint;
|
|
28258
28260
|
return _this;
|
|
28259
28261
|
}
|
|
28260
28262
|
FileObjectService.prototype.getFileUrlWithThumbor = function (fileId, width, height) {
|
|
@@ -60052,6 +60054,7 @@
|
|
|
60052
60054
|
_this.keydown = new i0.EventEmitter();
|
|
60053
60055
|
_this.onBlur = new i0.EventEmitter();
|
|
60054
60056
|
_this.onChanged = new i0.EventEmitter();
|
|
60057
|
+
_this.staticUrl = "" + _this._fileObjectService.staticEndpoint;
|
|
60055
60058
|
_this.model = '';
|
|
60056
60059
|
_this.id = nanoid.nanoid(8);
|
|
60057
60060
|
_this.dataEquation = {};
|
|
@@ -60385,7 +60388,7 @@
|
|
|
60385
60388
|
case 3:
|
|
60386
60389
|
uploadImage = _b.sent();
|
|
60387
60390
|
if (typeof uploadImage == 'string') {
|
|
60388
|
-
imgTags[i].src = this._fileObjectService.getUrlImage(uploadImage);
|
|
60391
|
+
imgTags[i].src = this.staticUrl + "/" + uploadImage; //this._fileObjectService.getUrlImage(uploadImage);
|
|
60389
60392
|
imageUploaded.push(imgTags[i].src);
|
|
60390
60393
|
}
|
|
60391
60394
|
return [3 /*break*/, 8];
|
|
@@ -60398,7 +60401,7 @@
|
|
|
60398
60401
|
case 6:
|
|
60399
60402
|
uploadImage = _b.sent();
|
|
60400
60403
|
if (typeof uploadImage == 'string') {
|
|
60401
|
-
imgTags[i].src = this._fileObjectService.getUrlImage(uploadImage);
|
|
60404
|
+
imgTags[i].src = "" + this.staticUrl + uploadImage; //this._fileObjectService.getUrlImage(uploadImage);
|
|
60402
60405
|
imageUploaded.push(imgTags[i].src);
|
|
60403
60406
|
}
|
|
60404
60407
|
return [3 /*break*/, 8];
|
|
@@ -60418,6 +60421,8 @@
|
|
|
60418
60421
|
return [3 /*break*/, 1];
|
|
60419
60422
|
case 11:
|
|
60420
60423
|
result = new XMLSerializer().serializeToString(docm);
|
|
60424
|
+
// Bọc img vào figure nếu chưa có
|
|
60425
|
+
result = result.replace(/<img([^>]*)>/g, '<figure class="image align-center"><img$1></figure>');
|
|
60421
60426
|
resolve(result);
|
|
60422
60427
|
return [3 /*break*/, 13];
|
|
60423
60428
|
case 12:
|
|
@@ -60464,7 +60469,7 @@
|
|
|
60464
60469
|
}
|
|
60465
60470
|
_a.label = 4;
|
|
60466
60471
|
case 4:
|
|
60467
|
-
pastedData = p1 + '<img src=' + imageUploaded[i] + '/>' + p2;
|
|
60472
|
+
pastedData = p1 + '<img src="' + imageUploaded[i] + '"/>' + p2;
|
|
60468
60473
|
index = pastedData.indexOf('<v:imagedata ');
|
|
60469
60474
|
i++;
|
|
60470
60475
|
_a.label = 5;
|
|
@@ -60507,7 +60512,7 @@
|
|
|
60507
60512
|
case 17:
|
|
60508
60513
|
uploadImage = _b.sent();
|
|
60509
60514
|
if (typeof uploadImage == 'string') {
|
|
60510
|
-
result += '<img src=' + this._fileObjectService.getUrlImage(uploadImage) + '/>';
|
|
60515
|
+
result += '<img src="' + this._fileObjectService.getUrlImage(uploadImage) + '"/>';
|
|
60511
60516
|
}
|
|
60512
60517
|
else {
|
|
60513
60518
|
this._notifierService.showWarning('Upload file thất bại');
|