tnx-shared 5.3.399 → 5.3.400
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 +85 -8
- 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/file-manager/file-manager.component.d.ts +1 -0
- package/components/file-explorer/file-manager/file-manager.component.d.ts.map +1 -1
- package/esm2015/components/file-explorer/file-manager/file-manager.component.js +67 -1
- package/fesm2015/tnx-shared.js +66 -0
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -35738,6 +35738,15 @@
|
|
|
35738
35738
|
&& this._deviceDetectorService.isDesktop()
|
|
35739
35739
|
&& this.layout !== exports.EnumFileLayout.SIMPLE_FOR_LIST && !this.parentSetting.hiddenKySoUsbCaNhan),
|
|
35740
35740
|
},
|
|
35741
|
+
{
|
|
35742
|
+
label: 'Bút phê', icon: 'fas fa-comment-dots',
|
|
35743
|
+
command: function () {
|
|
35744
|
+
_this.addComment(item);
|
|
35745
|
+
},
|
|
35746
|
+
visible: (this._fileObjectService.isTypeFileKySo(item.name)
|
|
35747
|
+
&& this._deviceDetectorService.isDesktop()
|
|
35748
|
+
&& this.layout !== exports.EnumFileLayout.SIMPLE_FOR_LIST && !this.parentSetting.hiddenKySoUsbCaNhan),
|
|
35749
|
+
},
|
|
35741
35750
|
{
|
|
35742
35751
|
label: 'Ký số đơn vị (USB)', icon: 'fas fa-signature',
|
|
35743
35752
|
command: function () {
|
|
@@ -36507,19 +36516,87 @@
|
|
|
36507
36516
|
});
|
|
36508
36517
|
}); });
|
|
36509
36518
|
};
|
|
36519
|
+
FileManagerComponent.prototype.addComment = function (file) {
|
|
36520
|
+
var _this = this;
|
|
36521
|
+
this._notifierService.showConfirm('Bạn có chắc chắn muốn bút phê văn bản này?').then(function (rs) { return __awaiter(_this, void 0, void 0, function () {
|
|
36522
|
+
var sourceFileId, sourceFile_2, rsConvert, e_2;
|
|
36523
|
+
var _this = this;
|
|
36524
|
+
return __generator(this, function (_b) {
|
|
36525
|
+
switch (_b.label) {
|
|
36526
|
+
case 0:
|
|
36527
|
+
if (!rs) return [3 /*break*/, 5];
|
|
36528
|
+
sourceFileId = file.id;
|
|
36529
|
+
sourceFile_2 = file;
|
|
36530
|
+
if (!this._fileExplorerService.needConvertBeforeSign(file.name)) return [3 /*break*/, 4];
|
|
36531
|
+
_b.label = 1;
|
|
36532
|
+
case 1:
|
|
36533
|
+
_b.trys.push([1, 3, , 4]);
|
|
36534
|
+
return [4 /*yield*/, this._fileExplorerService.convertDocumentToPdfAndSave({
|
|
36535
|
+
instanceId: sourceFileId,
|
|
36536
|
+
name: this._fileExplorerService.changeFileExtension(file.name, 'pdf'),
|
|
36537
|
+
folderInstanceId: file.parentFolderId,
|
|
36538
|
+
ownerType: this._userService.getCurrentUser().userId.toString(),
|
|
36539
|
+
})];
|
|
36540
|
+
case 2:
|
|
36541
|
+
rsConvert = _b.sent();
|
|
36542
|
+
if (!rsConvert || !rsConvert.success) {
|
|
36543
|
+
this._notifierService.showWarning("C\u00F3 l\u1ED7i x\u1EA3y ra khi chuy\u1EC3n \u0111\u1ED5i t\u00E0i li\u1EC7u " + file.name + " th\u00E0nh pdf \u0111\u1EC3 k\u00FD. Vui l\u00F2ng th\u1EED l\u1EA1i sau");
|
|
36544
|
+
return [2 /*return*/];
|
|
36545
|
+
}
|
|
36546
|
+
else {
|
|
36547
|
+
this._notifierService.showSuccess("Chuy\u1EC3n \u0111\u1ED5i t\u00E0i li\u1EC7u " + file.name + " th\u00E0nh pdf th\u00E0nh c\u00F4ng");
|
|
36548
|
+
sourceFileId = rsConvert.data;
|
|
36549
|
+
sourceFile_2 = { id: sourceFileId };
|
|
36550
|
+
this._triggerProcessData();
|
|
36551
|
+
}
|
|
36552
|
+
return [3 /*break*/, 4];
|
|
36553
|
+
case 3:
|
|
36554
|
+
e_2 = _b.sent();
|
|
36555
|
+
this._notifierService.showWarning("C\u00F3 l\u1ED7i x\u1EA3y ra khi chuy\u1EC3n \u0111\u1ED5i t\u00E0i li\u1EC7u " + file.name + " th\u00E0nh pdf \u0111\u1EC3 k\u00FD. Vui l\u00F2ng th\u1EED l\u1EA1i sau");
|
|
36556
|
+
return [2 /*return*/];
|
|
36557
|
+
case 4:
|
|
36558
|
+
this._fileExplorerService.generateLinkDownload({
|
|
36559
|
+
fileId: sourceFileId,
|
|
36560
|
+
}).then(function (rs) {
|
|
36561
|
+
var url = _this._downloadLinkService.getDownloadForSignUrl(rs.data);
|
|
36562
|
+
var prms = {};
|
|
36563
|
+
prms['FileUploadHandler'] = _this._moduleConfig.environment.apiDomain.fileEndpoint + "/" + _this._moduleConfig.environment.apiVersion + "/KySoFile/SavePhysicalSignedFile";
|
|
36564
|
+
prms['SessionId'] = '';
|
|
36565
|
+
prms['FileName'] = url;
|
|
36566
|
+
// tslint:disable-next-line: variable-name
|
|
36567
|
+
var json_prms = JSON.stringify(prms);
|
|
36568
|
+
vgca_comment(json_prms, function (result) {
|
|
36569
|
+
var resultObj = JSON.parse(result);
|
|
36570
|
+
if (resultObj.FileServer != '') {
|
|
36571
|
+
_this._fileExplorerService.saveSignedFile({
|
|
36572
|
+
sourceFile: sourceFile_2,
|
|
36573
|
+
tempFileId: resultObj.FileServer,
|
|
36574
|
+
}).then(function (rss) {
|
|
36575
|
+
_this._triggerProcessData();
|
|
36576
|
+
_this._notifierService.showSuccess('Tạo bút phê thành công');
|
|
36577
|
+
});
|
|
36578
|
+
}
|
|
36579
|
+
});
|
|
36580
|
+
});
|
|
36581
|
+
_b.label = 5;
|
|
36582
|
+
case 5: return [2 /*return*/];
|
|
36583
|
+
}
|
|
36584
|
+
});
|
|
36585
|
+
}); });
|
|
36586
|
+
};
|
|
36510
36587
|
FileManagerComponent.prototype.signFileDonVi = function (file) {
|
|
36511
36588
|
var _this = this;
|
|
36512
36589
|
this._notifierService
|
|
36513
36590
|
.showConfirm('Bạn có chắc chắn muốn ký số đơn vị văn bản này?')
|
|
36514
36591
|
.then(function (rs) { return __awaiter(_this, void 0, void 0, function () {
|
|
36515
|
-
var sourceFileId,
|
|
36592
|
+
var sourceFileId, sourceFile_3, rsConvert, e_3;
|
|
36516
36593
|
var _this = this;
|
|
36517
36594
|
return __generator(this, function (_b) {
|
|
36518
36595
|
switch (_b.label) {
|
|
36519
36596
|
case 0:
|
|
36520
36597
|
if (!rs) return [3 /*break*/, 5];
|
|
36521
36598
|
sourceFileId = file.id;
|
|
36522
|
-
|
|
36599
|
+
sourceFile_3 = file;
|
|
36523
36600
|
if (!this._fileExplorerService.needConvertBeforeSign(file.name)) return [3 /*break*/, 4];
|
|
36524
36601
|
_b.label = 1;
|
|
36525
36602
|
case 1:
|
|
@@ -36540,11 +36617,11 @@
|
|
|
36540
36617
|
this._notifierService.showSuccess("Chuy\u1EC3n \u0111\u1ED5i t\u00E0i li\u1EC7u " + file.name + " th\u00E0nh pdf th\u00E0nh c\u00F4ng");
|
|
36541
36618
|
this._triggerProcessData();
|
|
36542
36619
|
sourceFileId = rsConvert.data;
|
|
36543
|
-
|
|
36620
|
+
sourceFile_3 = { id: sourceFileId };
|
|
36544
36621
|
}
|
|
36545
36622
|
return [3 /*break*/, 4];
|
|
36546
36623
|
case 3:
|
|
36547
|
-
|
|
36624
|
+
e_3 = _b.sent();
|
|
36548
36625
|
this._notifierService.showWarning("C\u00F3 l\u1ED7i x\u1EA3y ra khi chuy\u1EC3n \u0111\u1ED5i t\u00E0i li\u1EC7u " + file.name + " th\u00E0nh pdf \u0111\u1EC3 k\u00FD. Vui l\u00F2ng th\u1EED l\u1EA1i sau");
|
|
36549
36626
|
return [2 /*return*/];
|
|
36550
36627
|
case 4:
|
|
@@ -36581,7 +36658,7 @@
|
|
|
36581
36658
|
if (resultObj.FileServer != '') {
|
|
36582
36659
|
_this._fileExplorerService
|
|
36583
36660
|
.saveSignedFile({
|
|
36584
|
-
sourceFile:
|
|
36661
|
+
sourceFile: sourceFile_3,
|
|
36585
36662
|
tempFileId: resultObj.FileServer,
|
|
36586
36663
|
})
|
|
36587
36664
|
.then(function (rss) {
|
|
@@ -36773,7 +36850,7 @@
|
|
|
36773
36850
|
});
|
|
36774
36851
|
};
|
|
36775
36852
|
FileManagerComponent.prototype.buildTreeData = function (data, rootFolderId) {
|
|
36776
|
-
var
|
|
36853
|
+
var e_4, _b;
|
|
36777
36854
|
var result = [];
|
|
36778
36855
|
var rootData = data.filter(function (x) { return x.parentFolderId == rootFolderId; });
|
|
36779
36856
|
if (rootData.length > 0) {
|
|
@@ -36789,12 +36866,12 @@
|
|
|
36789
36866
|
});
|
|
36790
36867
|
}
|
|
36791
36868
|
}
|
|
36792
|
-
catch (
|
|
36869
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
36793
36870
|
finally {
|
|
36794
36871
|
try {
|
|
36795
36872
|
if (rootData_1_1 && !rootData_1_1.done && (_b = rootData_1.return)) _b.call(rootData_1);
|
|
36796
36873
|
}
|
|
36797
|
-
finally { if (
|
|
36874
|
+
finally { if (e_4) throw e_4.error; }
|
|
36798
36875
|
}
|
|
36799
36876
|
}
|
|
36800
36877
|
return result;
|