@fluxhub/fluxhub-lib 1.0.575 → 1.0.576
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 +3 -208
- 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/esm2015/lib/wkf_engine/win_uploads.js +6 -275
- package/esm5/lib/wkf_engine/win_uploads.js +6 -232
- package/fesm2015/fluxhub-fluxhub-lib.js +3 -251
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +3 -208
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/wkf_engine/win_uploads.d.ts +3 -17
- package/package.json +1 -1
|
@@ -12235,180 +12235,11 @@ class win_uploads {
|
|
|
12235
12235
|
this.dialog = dialog;
|
|
12236
12236
|
this.app_s = app_s;
|
|
12237
12237
|
this.enabled = true;
|
|
12238
|
-
this.change = new EventEmitter();
|
|
12239
12238
|
this.access_control = true;
|
|
12240
12239
|
this.App = '';
|
|
12241
12240
|
this.K = '';
|
|
12242
|
-
this.b_edit_loaded = false;
|
|
12243
12241
|
this.title = "ALLEGATI";
|
|
12244
|
-
this.b_ini = false;
|
|
12245
12242
|
this.sovrascrivi_path = '';
|
|
12246
|
-
this.single = true;
|
|
12247
|
-
this.descrizione = '';
|
|
12248
|
-
this.label = 'Descrizione Allegato';
|
|
12249
|
-
this.username = '';
|
|
12250
|
-
this.uploader = new FileUploader({
|
|
12251
|
-
url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT
|
|
12252
|
-
});
|
|
12253
|
-
this.username = this.app_s.user;
|
|
12254
|
-
this.uploader.onBeforeUploadItem = (/**
|
|
12255
|
-
* @param {?} item
|
|
12256
|
-
* @return {?}
|
|
12257
|
-
*/
|
|
12258
|
-
(item) => {
|
|
12259
|
-
item.withCredentials = false;
|
|
12260
|
-
});
|
|
12261
|
-
this.uploader.onCompleteItem = (/**
|
|
12262
|
-
* @param {?} item
|
|
12263
|
-
* @param {?} response
|
|
12264
|
-
* @param {?} status
|
|
12265
|
-
* @param {?} header
|
|
12266
|
-
* @return {?}
|
|
12267
|
-
*/
|
|
12268
|
-
(item, response, status, header) => {
|
|
12269
|
-
if (status === 200) {
|
|
12270
|
-
this.descrizione = "";
|
|
12271
|
-
this
|
|
12272
|
-
.toastr
|
|
12273
|
-
.info("INFO", "ALLEGATO INSERITO", {
|
|
12274
|
-
timeOut: 1000,
|
|
12275
|
-
progressBar: true
|
|
12276
|
-
});
|
|
12277
|
-
this.ref_allegato();
|
|
12278
|
-
this
|
|
12279
|
-
.change
|
|
12280
|
-
.emit();
|
|
12281
|
-
}
|
|
12282
|
-
});
|
|
12283
|
-
}
|
|
12284
|
-
/**
|
|
12285
|
-
* @param {?} ax
|
|
12286
|
-
* @return {?}
|
|
12287
|
-
*/
|
|
12288
|
-
download_all(ax) {
|
|
12289
|
-
if (ax.APP != null)
|
|
12290
|
-
ax.App = ax.APP;
|
|
12291
|
-
if (this.sovrascrivi_path == '')
|
|
12292
|
-
window.open(this.app_s.COMPANY_SITE_ROOT + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
|
|
12293
|
-
else
|
|
12294
|
-
window.open(this.sovrascrivi_path + '/uploads/' + ax.App + '/' + ax.K + '/' + ax.Filename);
|
|
12295
|
-
}
|
|
12296
|
-
/**
|
|
12297
|
-
* @param {?} ax
|
|
12298
|
-
* @return {?}
|
|
12299
|
-
*/
|
|
12300
|
-
delete(ax) {
|
|
12301
|
-
localStorage.setItem(this.app_s.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
|
|
12302
|
-
localStorage.setItem(this.app_s.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
|
|
12303
|
-
/** @type {?} */
|
|
12304
|
-
let dialogRef1 = this
|
|
12305
|
-
.dialog
|
|
12306
|
-
.open(FHConfirmComponent);
|
|
12307
|
-
dialogRef1
|
|
12308
|
-
.afterClosed()
|
|
12309
|
-
.subscribe((/**
|
|
12310
|
-
* @param {?} result
|
|
12311
|
-
* @return {?}
|
|
12312
|
-
*/
|
|
12313
|
-
result => {
|
|
12314
|
-
if (result) {
|
|
12315
|
-
/** @type {?} */
|
|
12316
|
-
var p = new QParam();
|
|
12317
|
-
p.sql = "DELETE_ALLEGATO";
|
|
12318
|
-
p.types = ['int', 'string'];
|
|
12319
|
-
p.values = [ax.id, this.app_s.user];
|
|
12320
|
-
this
|
|
12321
|
-
._dataService
|
|
12322
|
-
.doQuery(p)
|
|
12323
|
-
.subscribe((/**
|
|
12324
|
-
* @param {?} data
|
|
12325
|
-
* @return {?}
|
|
12326
|
-
*/
|
|
12327
|
-
data => {
|
|
12328
|
-
if (data != null)
|
|
12329
|
-
if (data.result_msg == "OK") {
|
|
12330
|
-
this.arr_g = data.result_data;
|
|
12331
|
-
this.ref_allegato();
|
|
12332
|
-
this
|
|
12333
|
-
.toastr
|
|
12334
|
-
.info("INFO", "ALLEGATO ELIMINATO", {
|
|
12335
|
-
timeOut: 1000,
|
|
12336
|
-
progressBar: true
|
|
12337
|
-
});
|
|
12338
|
-
}
|
|
12339
|
-
}));
|
|
12340
|
-
}
|
|
12341
|
-
}));
|
|
12342
|
-
}
|
|
12343
|
-
/**
|
|
12344
|
-
* @param {?} fileItem
|
|
12345
|
-
* @return {?}
|
|
12346
|
-
*/
|
|
12347
|
-
ch(fileItem) {
|
|
12348
|
-
for (let i = 0; i < this.arr_g.length; i++) {
|
|
12349
|
-
if (this.arr_g[i].Filename.toLowerCase() == fileItem.file.name.toLowerCase()) {
|
|
12350
|
-
this.toastr.error('File già presente (cancellarlo per aggiornarlo)');
|
|
12351
|
-
return;
|
|
12352
|
-
}
|
|
12353
|
-
}
|
|
12354
|
-
this.uploader.onBuildItemForm = (/**
|
|
12355
|
-
* @param {?} item
|
|
12356
|
-
* @param {?} form
|
|
12357
|
-
* @return {?}
|
|
12358
|
-
*/
|
|
12359
|
-
(item, form) => {
|
|
12360
|
-
form.append('App', this.App);
|
|
12361
|
-
form.append('K', this.K);
|
|
12362
|
-
form.append('descrizione', this.descrizione);
|
|
12363
|
-
form.append('single', this.single);
|
|
12364
|
-
form.append('username', this.username);
|
|
12365
|
-
form.append('tipo', '');
|
|
12366
|
-
form.append('local_path', this.app_s.LOCAL_PATH);
|
|
12367
|
-
});
|
|
12368
|
-
/** @type {?} */
|
|
12369
|
-
var uo = {};
|
|
12370
|
-
uo.headers = [{ name: 'Authorization', value: 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token") }];
|
|
12371
|
-
this.uploader.setOptions(uo);
|
|
12372
|
-
this
|
|
12373
|
-
.uploader
|
|
12374
|
-
.uploadAll();
|
|
12375
|
-
}
|
|
12376
|
-
/**
|
|
12377
|
-
* @return {?}
|
|
12378
|
-
*/
|
|
12379
|
-
ref_allegato() {
|
|
12380
|
-
if (this.App == null)
|
|
12381
|
-
return;
|
|
12382
|
-
if (this.App == "")
|
|
12383
|
-
return;
|
|
12384
|
-
/** @type {?} */
|
|
12385
|
-
var p = new QParam();
|
|
12386
|
-
p.sql = "SELECT_ALLEGATO_INFO";
|
|
12387
|
-
p.types = ['string', 'string'];
|
|
12388
|
-
p.values = [this.App, this.K];
|
|
12389
|
-
this
|
|
12390
|
-
._dataService
|
|
12391
|
-
.doQuery(p)
|
|
12392
|
-
.subscribe((/**
|
|
12393
|
-
* @param {?} data
|
|
12394
|
-
* @return {?}
|
|
12395
|
-
*/
|
|
12396
|
-
data => {
|
|
12397
|
-
if (data != null)
|
|
12398
|
-
if (data.result_msg == "OK") {
|
|
12399
|
-
this.arr_g = data.result_data;
|
|
12400
|
-
/** @type {?} */
|
|
12401
|
-
let iconf = "webinfo";
|
|
12402
|
-
for (let i = 0; i < this.arr_g.length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|ODS|ODT|OGG|OGV|OST|OTF|OTT|OVA|OVF|P12|P7B|PAGES|PART|PCD|PDB|PDF|PEM|PFX|PGP|PH|PHAR|PHP|PKG|PL|PLIST|PM|PNG|PO|POM|POT|POTX|PPS|PPSX|PPT|PPTM|PPTX|PROP|PS|PS1|PSD|PSP|PST|PUB|PY|PYC|QT|RA|RAM|RAR|RAW|RB|RDF|RESX|RETRY|RM|ROM|RPM|RSA|RSS|RTF|RU|RUB|SASS|SCSS|SDF|SED|SH|SITEMAP|SKIN|SLDM|SLDX|SLN|SOL|SQL|SQLITE|STEP|STL|SVG|SWD|SWF|SWIFT|SYS|TAR|TCSH|TEX|TFIGNORE|TGA|TGZ|TIF|TIFF|TMP|TORRENT|TS|TSV|TTF|TWIG|TXT|UDF|VB|VBPROJ|VBS|VCD|VCS|VDI|VDX|VMDK|VOB|VSCODEIGNORE|VSD|VSS|VST|VSX|VTX|WAR|WAV|WBK|WEBINFO|WEBM|WEBP|WMA|WMF|WMV|WOFF|WOFF2|WPS|WSF|XAML|XCF|XLM|XLS|XLSM|XLSX|XLT|XLTM|XLTX|XML|XPI|XPS|XRB|XSD|XSL|XSPF|XZ|YAML|YML|Z|ZIP|ZSH'.indexOf(arrf[arrf.length - 1].toLocaleUpperCase()) != -1)
|
|
12406
|
-
iconf = arrf[arrf.length - 1].toLocaleLowerCase();
|
|
12407
|
-
this.arr_g[i].icon = iconf + '.svg';
|
|
12408
|
-
this.arr_g[i].can_delete = !this.access_control || this.arr_g[i].idp == this.app_s.user;
|
|
12409
|
-
}
|
|
12410
|
-
}
|
|
12411
|
-
}));
|
|
12412
12243
|
}
|
|
12413
12244
|
/**
|
|
12414
12245
|
* @return {?}
|
|
@@ -12416,16 +12247,7 @@ class win_uploads {
|
|
|
12416
12247
|
ngOnInit() {
|
|
12417
12248
|
this.App = this.app_s.getState().wkf_doc_info.uiid_app;
|
|
12418
12249
|
this.K = this.app_s.getState().wkf_doc_info.uiid_doc;
|
|
12419
|
-
this.single = false;
|
|
12420
|
-
this.uploader.onAfterAddingFile = (/**
|
|
12421
|
-
* @param {?} fileItem
|
|
12422
|
-
* @return {?}
|
|
12423
|
-
*/
|
|
12424
|
-
(fileItem) => {
|
|
12425
|
-
this.ch(fileItem);
|
|
12426
|
-
});
|
|
12427
12250
|
this.init(this.App, this.K);
|
|
12428
|
-
this.ref_allegato();
|
|
12429
12251
|
}
|
|
12430
12252
|
/**
|
|
12431
12253
|
* @param {?} p_app
|
|
@@ -12435,10 +12257,7 @@ class win_uploads {
|
|
|
12435
12257
|
init(p_app, p_k) {
|
|
12436
12258
|
this.App = p_app;
|
|
12437
12259
|
this.K = p_k;
|
|
12438
|
-
this.
|
|
12439
|
-
this.b_edit_loaded = false;
|
|
12440
|
-
//this.descrizione = "Descrizione Allegato";
|
|
12441
|
-
this.ref_allegato();
|
|
12260
|
+
this.upc.init(this.App, this.K);
|
|
12442
12261
|
}
|
|
12443
12262
|
}
|
|
12444
12263
|
win_uploads.decorators = [
|
|
@@ -12456,70 +12275,7 @@ win_uploads.decorators = [
|
|
|
12456
12275
|
</div>
|
|
12457
12276
|
</mat-toolbar>
|
|
12458
12277
|
<mat-dialog-content style="font-size:12px">
|
|
12459
|
-
|
|
12460
|
-
<br>
|
|
12461
|
-
<div *ngIf="enabled">
|
|
12462
|
-
<mat-form-field appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
|
|
12463
|
-
<input matInput type="text" name="descrizione" [(ngModel)]="descrizione" >
|
|
12464
|
-
</mat-form-field>
|
|
12465
|
-
|
|
12466
|
-
<input type="file" ng2FileSelect [uploader]="uploader" multiple />
|
|
12467
|
-
<!--<button mat-flat-button *ngIf="b_edit_loaded" (click)="download_all()">{{label_b}}</button>-->
|
|
12468
|
-
</div>
|
|
12469
|
-
<br>
|
|
12470
|
-
<div [style.height]="(app_s.getState().body_h-600)+'px'" style="overflow:auto;">
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
<table style="width: 100%;" class="fh_table">
|
|
12475
|
-
<thead>
|
|
12476
|
-
<tr>
|
|
12477
|
-
<th style="width:40px"></th>
|
|
12478
|
-
<th style="width:50%">Nome</th>
|
|
12479
|
-
<th style="width:60px;text-align:center">Dim.</th>
|
|
12480
|
-
<th style="width:50%">Descrizione</th>
|
|
12481
|
-
|
|
12482
|
-
<th style="width:30%">Utente</th>
|
|
12483
|
-
<th style="width:240px;text-align:center">Data</th>
|
|
12484
|
-
<th style="width:40px" class="actions"></th>
|
|
12485
|
-
<th *ngIf="enabled" style="width:40px" class="actions"></th>
|
|
12486
|
-
</tr>
|
|
12487
|
-
</thead>
|
|
12488
|
-
<tbody>
|
|
12489
|
-
|
|
12490
|
-
<tr *ngFor="let app of arr_g;let odd=odd; let even=even;index as i" [ngClass]="{ odd: odd, even: even }" >
|
|
12491
|
-
<td style="text-align:center;vertical-align: middle;width:36px;height:36px;">
|
|
12492
|
-
<div style="text-align:center;vertical-align: middle;width:28px;height:28px;">
|
|
12493
|
-
<img src="assets/icons/square-o/{{app.icon}}" style="width:28px;height:28px;"></div> </td>
|
|
12494
|
-
<td>{{app.Filename}}</td>
|
|
12495
|
-
<td style="text-align:center">{{app.Filesize}}</td>
|
|
12496
|
-
<td>{{app.descrizione}}</td>
|
|
12497
|
-
<td>{{app.nc}}</td>
|
|
12498
|
-
<td style="text-align:center">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>
|
|
12499
|
-
<td style="text-align:center">
|
|
12500
|
-
<button mat-icon-button matTooltip="Download File" (click)="download_all(app)">
|
|
12501
|
-
<mat-icon>save_alt</mat-icon>
|
|
12502
|
-
</button>
|
|
12503
|
-
</td>
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
<td *ngIf="enabled" style="text-align:center">
|
|
12507
|
-
<a mat-icon-button matTooltip="Elimina File" *ngIf="app.can_delete" (click)="delete(app)">
|
|
12508
|
-
<mat-icon>delete</mat-icon>
|
|
12509
|
-
</a>
|
|
12510
|
-
|
|
12511
|
-
<a mat-icon-button [matTooltip]="'Cancellazione consentita solo a: '+app.nc" *ngIf="!app.can_delete" [disabled]="true" >
|
|
12512
|
-
<mat-icon>delete</mat-icon>
|
|
12513
|
-
</a>
|
|
12514
|
-
|
|
12515
|
-
</td>
|
|
12516
|
-
</tr>
|
|
12517
|
-
</table>
|
|
12518
|
-
|
|
12519
|
-
</div>
|
|
12520
|
-
</div>
|
|
12521
|
-
|
|
12522
|
-
<div *ngIf="!b_ini" style="color:#ff0000"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>
|
|
12278
|
+
<FHUploadPanel [enabled]="enabled" #upc [access_control]="access_control"></FHUploadPanel>
|
|
12523
12279
|
</mat-dialog-content>
|
|
12524
12280
|
`,
|
|
12525
12281
|
styles: [`
|
|
@@ -12537,11 +12293,7 @@ win_uploads.ctorParameters = () => [
|
|
|
12537
12293
|
{ type: AppService }
|
|
12538
12294
|
];
|
|
12539
12295
|
win_uploads.propDecorators = {
|
|
12540
|
-
|
|
12541
|
-
change: [{ type: Output }],
|
|
12542
|
-
upc: [{ type: ViewChild, args: ['upc',] }],
|
|
12543
|
-
access_control: [{ type: Input }],
|
|
12544
|
-
single: [{ type: Input }]
|
|
12296
|
+
upc: [{ type: ViewChild, args: ['upc',] }]
|
|
12545
12297
|
};
|
|
12546
12298
|
|
|
12547
12299
|
/**
|