@fluxhub/fluxhub-lib 1.0.234 → 1.0.236
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/fluxhub-fluxhub-lib.umd.js +119 -93
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/docs/classes/OfficeOperation.html +298 -0
- package/docs/classes/OfficeResult.html +230 -0
- package/docs/components/FHUploadPanelComponent.html +110 -1
- package/docs/coverage.html +13 -29
- package/docs/injectables/OfficeAutomatorService.html +122 -42
- package/docs/js/menu-wc.js +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/overview.html +2 -2
- package/esm2015/lib/controls/fhupload.js +2 -3
- package/esm2015/lib/controls/fhuploadpanel.js +13 -4
- package/esm2015/lib/services/office_automator.service.js +105 -114
- package/esm5/lib/controls/fhupload.js +1 -2
- package/esm5/lib/controls/fhuploadpanel.js +17 -4
- package/esm5/lib/services/office_automator.service.js +128 -129
- package/fesm2015/fluxhub-fluxhub-lib.js +93 -78
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +113 -91
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhuploadpanel.d.ts +3 -1
- package/lib/services/office_automator.service.d.ts +12 -28
- package/package.json +1 -1
- package/docs/interfaces/ChunkInfo.html +0 -245
- package/docs/interfaces/Command.html +0 -327
- package/docs/interfaces/CommandOptions.html +0 -225
|
@@ -3051,6 +3051,8 @@
|
|
|
3051
3051
|
this.b_False = false;
|
|
3052
3052
|
this.b_mobile = false;
|
|
3053
3053
|
this.b_ini = false;
|
|
3054
|
+
this.m_p_tipo = "";
|
|
3055
|
+
this.m_programma_da_eseguire = "";
|
|
3054
3056
|
}
|
|
3055
3057
|
/**
|
|
3056
3058
|
* @param {?} ax
|
|
@@ -3120,29 +3122,40 @@
|
|
|
3120
3122
|
* @return {?}
|
|
3121
3123
|
*/
|
|
3122
3124
|
function () {
|
|
3123
|
-
console.log('INIT1');
|
|
3124
3125
|
this.upc.single = false;
|
|
3125
3126
|
this.b_mobile = this._appservice.getState().pageFullscreen;
|
|
3126
3127
|
this
|
|
3127
3128
|
.upc
|
|
3128
|
-
.init(this.App, this.K, 'Descrizione Allegato');
|
|
3129
|
+
.init(this.App, this.K, 'Descrizione Allegato', this.m_p_tipo, this.m_programma_da_eseguire);
|
|
3129
3130
|
this.ref_allegato();
|
|
3130
3131
|
};
|
|
3131
3132
|
/**
|
|
3132
3133
|
* @param {?} p_app
|
|
3133
3134
|
* @param {?} p_k
|
|
3135
|
+
* @param {?=} p_tipo
|
|
3136
|
+
* @param {?=} programma_da_eseguire
|
|
3134
3137
|
* @return {?}
|
|
3135
3138
|
*/
|
|
3136
3139
|
FHUploadPanelComponent.prototype.init = /**
|
|
3137
3140
|
* @param {?} p_app
|
|
3138
3141
|
* @param {?} p_k
|
|
3142
|
+
* @param {?=} p_tipo
|
|
3143
|
+
* @param {?=} programma_da_eseguire
|
|
3139
3144
|
* @return {?}
|
|
3140
3145
|
*/
|
|
3141
|
-
function (p_app, p_k) {
|
|
3146
|
+
function (p_app, p_k, p_tipo, programma_da_eseguire) {
|
|
3147
|
+
if (p_tipo === void 0) {
|
|
3148
|
+
p_tipo = "";
|
|
3149
|
+
}
|
|
3150
|
+
if (programma_da_eseguire === void 0) {
|
|
3151
|
+
programma_da_eseguire = "";
|
|
3152
|
+
}
|
|
3142
3153
|
this.App = p_app;
|
|
3143
3154
|
this.K = p_k;
|
|
3144
3155
|
this.b_ini = true;
|
|
3145
3156
|
this.b_edit_loaded = false;
|
|
3157
|
+
this.m_p_tipo = p_tipo;
|
|
3158
|
+
this.m_programma_da_eseguire = programma_da_eseguire;
|
|
3146
3159
|
this.ngOnInit();
|
|
3147
3160
|
};
|
|
3148
3161
|
/**
|
|
@@ -3324,7 +3337,6 @@
|
|
|
3324
3337
|
*/
|
|
3325
3338
|
function () {
|
|
3326
3339
|
var _this = this;
|
|
3327
|
-
console.log('INIT');
|
|
3328
3340
|
/** @type {?} */
|
|
3329
3341
|
var uo = {};
|
|
3330
3342
|
uo.headers = [{ name: 'Authorization', value: 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token") }];
|
|
@@ -11447,61 +11459,111 @@
|
|
|
11447
11459
|
* @fileoverview added by tsickle
|
|
11448
11460
|
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
11449
11461
|
*/
|
|
11462
|
+
var OfficeOperation = /** @class */ (function () {
|
|
11463
|
+
function OfficeOperation() {
|
|
11464
|
+
}
|
|
11465
|
+
return OfficeOperation;
|
|
11466
|
+
}());
|
|
11450
11467
|
var OfficeAutomatorService = /** @class */ (function () {
|
|
11451
|
-
|
|
11452
|
-
*
|
|
11453
|
-
*/
|
|
11454
|
-
function OfficeAutomatorService(dataService, fileService, toastr, utility) {
|
|
11468
|
+
function OfficeAutomatorService(dataService, fileService, toastr) {
|
|
11455
11469
|
this.dataService = dataService;
|
|
11456
11470
|
this.fileService = fileService;
|
|
11457
11471
|
this.toastr = toastr;
|
|
11458
|
-
|
|
11472
|
+
/**
|
|
11473
|
+
* @param commands
|
|
11474
|
+
* @param options
|
|
11475
|
+
* @export
|
|
11476
|
+
*/
|
|
11477
|
+
this.eprog = 0;
|
|
11459
11478
|
}
|
|
11460
11479
|
/**
|
|
11461
|
-
* @param
|
|
11462
|
-
* @param
|
|
11463
|
-
* @
|
|
11480
|
+
* @param {?} operazione
|
|
11481
|
+
* @param {?} v1
|
|
11482
|
+
* @param {?} v2
|
|
11483
|
+
* @param {?} ordine
|
|
11484
|
+
* @return {?}
|
|
11485
|
+
*/
|
|
11486
|
+
OfficeAutomatorService.prototype.operation = /**
|
|
11487
|
+
* @param {?} operazione
|
|
11488
|
+
* @param {?} v1
|
|
11489
|
+
* @param {?} v2
|
|
11490
|
+
* @param {?} ordine
|
|
11491
|
+
* @return {?}
|
|
11464
11492
|
*/
|
|
11493
|
+
function (operazione, v1, v2, ordine) {
|
|
11494
|
+
/** @type {?} */
|
|
11495
|
+
var op = new OfficeOperation();
|
|
11496
|
+
op.op = operazione;
|
|
11497
|
+
op.v1 = v1;
|
|
11498
|
+
op.v2 = v2;
|
|
11499
|
+
op.ord = ordine;
|
|
11500
|
+
return op;
|
|
11501
|
+
};
|
|
11502
|
+
/**
|
|
11503
|
+
* @private
|
|
11504
|
+
* @param {?=} dialogRef_W
|
|
11505
|
+
* @return {?}
|
|
11506
|
+
*/
|
|
11507
|
+
OfficeAutomatorService.prototype.progress_update = /**
|
|
11508
|
+
* @private
|
|
11509
|
+
* @param {?=} dialogRef_W
|
|
11510
|
+
* @return {?}
|
|
11511
|
+
*/
|
|
11512
|
+
function (dialogRef_W) {
|
|
11513
|
+
var _this = this;
|
|
11514
|
+
if (dialogRef_W === void 0) {
|
|
11515
|
+
dialogRef_W = null;
|
|
11516
|
+
}
|
|
11517
|
+
if (dialogRef_W == null)
|
|
11518
|
+
return;
|
|
11519
|
+
if (dialogRef_W.componentInstance == null)
|
|
11520
|
+
return;
|
|
11521
|
+
if (this.eprog >= 100)
|
|
11522
|
+
return;
|
|
11523
|
+
this.eprog += 10;
|
|
11524
|
+
dialogRef_W.componentInstance.update_progess(this.eprog);
|
|
11525
|
+
setTimeout(function () {
|
|
11526
|
+
_this.progress_update(dialogRef_W);
|
|
11527
|
+
}, 2000);
|
|
11528
|
+
};
|
|
11465
11529
|
/**
|
|
11466
|
-
* @
|
|
11530
|
+
* @param {?} uiid
|
|
11467
11531
|
* @param {?} commands
|
|
11468
|
-
* @param {?}
|
|
11532
|
+
* @param {?} dialogRef_W
|
|
11469
11533
|
* @return {?}
|
|
11470
11534
|
*/
|
|
11471
11535
|
OfficeAutomatorService.prototype.runCommands = /**
|
|
11472
|
-
* @
|
|
11536
|
+
* @param {?} uiid
|
|
11473
11537
|
* @param {?} commands
|
|
11474
|
-
* @param {?}
|
|
11538
|
+
* @param {?} dialogRef_W
|
|
11475
11539
|
* @return {?}
|
|
11476
11540
|
*/
|
|
11477
|
-
function (commands,
|
|
11541
|
+
function (uiid, commands, dialogRef_W) {
|
|
11478
11542
|
var _this = this;
|
|
11479
|
-
|
|
11480
|
-
var uiid = this.utility.newGuid();
|
|
11481
|
-
// TODO: check order
|
|
11482
|
-
// TODO: check id
|
|
11483
|
-
// create job in db
|
|
11484
|
-
/** @type {?} */
|
|
11485
|
-
var q = '';
|
|
11486
|
-
for (var i = 0; i < commands.length; i++) {
|
|
11487
|
-
if (q != "") {
|
|
11488
|
-
q = q + ";;;";
|
|
11489
|
-
}
|
|
11490
|
-
q = q + (commands[i].id || uiid) + ";;;" + commands[i].op + ";;;" + (commands[i].v1 || ' ') + ";;;" + (commands[i].v2 || ' ') + ";;;" + (commands[i].ord);
|
|
11491
|
-
}
|
|
11543
|
+
this.eprog = 0;
|
|
11492
11544
|
/** @type {?} */
|
|
11493
11545
|
var p = new QParam();
|
|
11494
|
-
p.sql = "
|
|
11495
|
-
p.types = ['string', 'string'
|
|
11496
|
-
|
|
11546
|
+
p.sql = "INSERT_OFFICE_OPERATION";
|
|
11547
|
+
p.types = ['string', 'string'];
|
|
11548
|
+
commands.sort(function (left, right) {
|
|
11549
|
+
if (left.ord < right.ord)
|
|
11550
|
+
return -1;
|
|
11551
|
+
if (left.ord > right.ord)
|
|
11552
|
+
return 1;
|
|
11553
|
+
});
|
|
11554
|
+
console.log('commands ', commands);
|
|
11555
|
+
p.values = [uiid, JSON.stringify(commands)];
|
|
11497
11556
|
return this.dataService.doQuery(p).pipe(operators.flatMap(function (data) {
|
|
11498
11557
|
if (data != null) {
|
|
11499
11558
|
if (data.result_msg == "OK") {
|
|
11500
|
-
// create job file
|
|
11501
11559
|
/** @type {?} */
|
|
11502
11560
|
var p_1 = new FSInput();
|
|
11503
|
-
p_1.command = "
|
|
11504
|
-
p_1.p1 =
|
|
11561
|
+
p_1.command = "exec_app";
|
|
11562
|
+
p_1.p1 = "print_manager";
|
|
11563
|
+
p_1.p2 = uiid;
|
|
11564
|
+
setTimeout(function () {
|
|
11565
|
+
_this.progress_update(dialogRef_W);
|
|
11566
|
+
}, 2000);
|
|
11505
11567
|
return _this.fileService.doQuery(p_1).pipe(operators.flatMap(function (data) {
|
|
11506
11568
|
if (data != null && data.result_msg == "OK") {
|
|
11507
11569
|
// check the job is done
|
|
@@ -11513,35 +11575,31 @@
|
|
|
11513
11575
|
/** @type {?} */
|
|
11514
11576
|
var timeoutTimer = setTimeout(function () {
|
|
11515
11577
|
isTimeout = true;
|
|
11516
|
-
},
|
|
11517
|
-
|
|
11518
|
-
/** @type {?} */
|
|
11519
|
-
var logOffset = 0;
|
|
11520
|
-
ck_files();
|
|
11578
|
+
}, 3 * 60 * 1000);
|
|
11579
|
+
ck_files(uiid);
|
|
11521
11580
|
/**
|
|
11522
|
-
*
|
|
11581
|
+
* @param {?} uiid
|
|
11523
11582
|
* @return {?}
|
|
11524
11583
|
*/
|
|
11525
|
-
function ck_files() {
|
|
11584
|
+
function ck_files(uiid) {
|
|
11526
11585
|
/** @type {?} */
|
|
11527
|
-
var p = new
|
|
11528
|
-
p.
|
|
11529
|
-
p.
|
|
11530
|
-
p.
|
|
11531
|
-
self.
|
|
11586
|
+
var p = new QParam();
|
|
11587
|
+
p.sql = "SELECT_OFFICE_OPERATION_FINISCHED";
|
|
11588
|
+
p.types = ['string'];
|
|
11589
|
+
p.values = [uiid];
|
|
11590
|
+
self.dataService.doQuery(p).subscribe(function (data) {
|
|
11532
11591
|
if (data != null && data.result_msg == 'OK') {
|
|
11533
11592
|
/** @type {?} */
|
|
11534
|
-
var chunkInfo = data.result_data
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
if (chunkInfo.done) {
|
|
11593
|
+
var chunkInfo = data.result_data;
|
|
11594
|
+
if (chunkInfo.length == 1) {
|
|
11595
|
+
subscriber.next({ message: chunkInfo[0].result_message, result: chunkInfo[0].result });
|
|
11538
11596
|
subscriber.complete();
|
|
11539
11597
|
}
|
|
11540
11598
|
else {
|
|
11541
11599
|
if (!isTimeout) {
|
|
11542
11600
|
setTimeout(function () {
|
|
11543
|
-
ck_files();
|
|
11544
|
-
},
|
|
11601
|
+
ck_files(uiid);
|
|
11602
|
+
}, 3000); // 3 sec default check interval
|
|
11545
11603
|
}
|
|
11546
11604
|
else {
|
|
11547
11605
|
console.log('Timeout');
|
|
@@ -11551,9 +11609,11 @@
|
|
|
11551
11609
|
}
|
|
11552
11610
|
}
|
|
11553
11611
|
else {
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11612
|
+
if (!isTimeout) {
|
|
11613
|
+
setTimeout(function () {
|
|
11614
|
+
ck_files(uiid);
|
|
11615
|
+
}, 3000); // 3 sec default check interval
|
|
11616
|
+
}
|
|
11557
11617
|
}
|
|
11558
11618
|
});
|
|
11559
11619
|
}
|
|
@@ -11564,39 +11624,6 @@
|
|
|
11564
11624
|
}
|
|
11565
11625
|
}));
|
|
11566
11626
|
};
|
|
11567
|
-
/**
|
|
11568
|
-
* @param {?} fs_path
|
|
11569
|
-
* @param {?} web_path
|
|
11570
|
-
* @param {?=} error_msg
|
|
11571
|
-
* @return {?}
|
|
11572
|
-
*/
|
|
11573
|
-
OfficeAutomatorService.prototype.send_file_to_user = /**
|
|
11574
|
-
* @param {?} fs_path
|
|
11575
|
-
* @param {?} web_path
|
|
11576
|
-
* @param {?=} error_msg
|
|
11577
|
-
* @return {?}
|
|
11578
|
-
*/
|
|
11579
|
-
function (fs_path, web_path, error_msg) {
|
|
11580
|
-
var _this = this;
|
|
11581
|
-
if (error_msg === void 0) {
|
|
11582
|
-
error_msg = 'errore nella creazione del file';
|
|
11583
|
-
}
|
|
11584
|
-
/** @type {?} */
|
|
11585
|
-
var p = new FSInput();
|
|
11586
|
-
p.p1 = fs_path;
|
|
11587
|
-
p.command = "check_file";
|
|
11588
|
-
this.fileService.doQuery(p).subscribe(function (data) {
|
|
11589
|
-
if (data != null)
|
|
11590
|
-
if (data.msg != "N") {
|
|
11591
|
-
window.open(web_path);
|
|
11592
|
-
}
|
|
11593
|
-
else {
|
|
11594
|
-
if (error_msg != null)
|
|
11595
|
-
if (error_msg != '')
|
|
11596
|
-
_this.toastr.error(error_msg);
|
|
11597
|
-
}
|
|
11598
|
-
});
|
|
11599
|
-
};
|
|
11600
11627
|
OfficeAutomatorService.decorators = [
|
|
11601
11628
|
{ type: i0.Injectable, args: [{
|
|
11602
11629
|
providedIn: 'root',
|
|
@@ -11607,11 +11634,10 @@
|
|
|
11607
11634
|
return [
|
|
11608
11635
|
{ type: QueryService },
|
|
11609
11636
|
{ type: FileService },
|
|
11610
|
-
{ type: i3.ToastrService }
|
|
11611
|
-
{ type: UtilityService }
|
|
11637
|
+
{ type: i3.ToastrService }
|
|
11612
11638
|
];
|
|
11613
11639
|
};
|
|
11614
|
-
/** @nocollapse */ OfficeAutomatorService.ngInjectableDef = i0.defineInjectable({ factory: function OfficeAutomatorService_Factory() { return new OfficeAutomatorService(i0.inject(QueryService), i0.inject(FileService), i0.inject(i3.ToastrService)
|
|
11640
|
+
/** @nocollapse */ OfficeAutomatorService.ngInjectableDef = i0.defineInjectable({ factory: function OfficeAutomatorService_Factory() { return new OfficeAutomatorService(i0.inject(QueryService), i0.inject(FileService), i0.inject(i3.ToastrService)); }, token: OfficeAutomatorService, providedIn: "root" });
|
|
11615
11641
|
return OfficeAutomatorService;
|
|
11616
11642
|
}());
|
|
11617
11643
|
|