@fluxhub/fluxhub-lib 9.0.152 → 9.0.153
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 +31 -11
- 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/controls/fhupload.js +35 -14
- package/esm5/lib/controls/fhupload.js +33 -12
- package/fesm2015/fluxhub-fluxhub-lib.js +33 -13
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +31 -11
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhupload.d.ts +5 -1
- package/package.json +1 -1
|
@@ -3178,18 +3178,20 @@
|
|
|
3178
3178
|
}());
|
|
3179
3179
|
|
|
3180
3180
|
var FHUploadComponent = /** @class */ (function () {
|
|
3181
|
-
function FHUploadComponent(_dataService, toastr, dialog, app_s) {
|
|
3181
|
+
function FHUploadComponent(_dataService, toastr, dialog, app_s, uti) {
|
|
3182
3182
|
var _this = this;
|
|
3183
3183
|
this._dataService = _dataService;
|
|
3184
3184
|
this.toastr = toastr;
|
|
3185
3185
|
this.dialog = dialog;
|
|
3186
3186
|
this.app_s = app_s;
|
|
3187
|
+
this.uti = uti;
|
|
3187
3188
|
this.show_descri = true;
|
|
3188
3189
|
this.enabled = true;
|
|
3189
3190
|
this.single = true;
|
|
3190
3191
|
this.descri_obb = false;
|
|
3191
3192
|
this.programma_da_eseguire = "";
|
|
3192
3193
|
this.label_attendere = "ATTENDERE UPLOAD IN CORSO";
|
|
3194
|
+
this.sovrascrivi_path = "";
|
|
3193
3195
|
this.fixed_label = " (INSERISCI QUI LA DESCRIZIONE PRIMA DI CARICARE IL FILE)";
|
|
3194
3196
|
this.limit_string = "Il file di <size>MB supera il limite di 500MB";
|
|
3195
3197
|
this.allegato_inserito = "ALLEGATO INSERITO";
|
|
@@ -3198,6 +3200,7 @@
|
|
|
3198
3200
|
this.change = new core.EventEmitter();
|
|
3199
3201
|
this.upload_ended = new core.EventEmitter();
|
|
3200
3202
|
this.call_upload = new core.EventEmitter();
|
|
3203
|
+
this.id_component = '';
|
|
3201
3204
|
this.multi_list = false;
|
|
3202
3205
|
this.allow_delete = false;
|
|
3203
3206
|
this.loading = false;
|
|
@@ -3217,6 +3220,7 @@
|
|
|
3217
3220
|
maxFileSize: 500 * 1024 * 1024,
|
|
3218
3221
|
});
|
|
3219
3222
|
this.id = null;
|
|
3223
|
+
this.id_component = this.uti.newGuid();
|
|
3220
3224
|
this.username = this.app_s.user;
|
|
3221
3225
|
this.uploader.onBeforeUploadItem = function (item) {
|
|
3222
3226
|
item.withCredentials = false;
|
|
@@ -3345,13 +3349,24 @@
|
|
|
3345
3349
|
});
|
|
3346
3350
|
};
|
|
3347
3351
|
FHUploadComponent.prototype.download_all = function () {
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3352
|
+
if (this.sovrascrivi_path == '') {
|
|
3353
|
+
window.open(this.app_s.COMPANY_SITE_ROOT +
|
|
3354
|
+
"/uploads/" +
|
|
3355
|
+
this.App +
|
|
3356
|
+
"/" +
|
|
3357
|
+
this.K +
|
|
3358
|
+
"/" +
|
|
3359
|
+
this.file_name);
|
|
3360
|
+
}
|
|
3361
|
+
else {
|
|
3362
|
+
window.open(this.sovrascrivi_path +
|
|
3363
|
+
"/uploads/" +
|
|
3364
|
+
this.App +
|
|
3365
|
+
"/" +
|
|
3366
|
+
this.K +
|
|
3367
|
+
"/" +
|
|
3368
|
+
this.file_name);
|
|
3369
|
+
}
|
|
3355
3370
|
};
|
|
3356
3371
|
FHUploadComponent.prototype.ch = function (fileItem) {
|
|
3357
3372
|
var _this = this;
|
|
@@ -3449,7 +3464,8 @@
|
|
|
3449
3464
|
{ type: QueryService },
|
|
3450
3465
|
{ type: ngxToastr.ToastrService },
|
|
3451
3466
|
{ type: dialog.MatDialog },
|
|
3452
|
-
{ type: AppService }
|
|
3467
|
+
{ type: AppService },
|
|
3468
|
+
{ type: UtilityService }
|
|
3453
3469
|
]; };
|
|
3454
3470
|
__decorate([
|
|
3455
3471
|
core.Input(),
|
|
@@ -3475,6 +3491,10 @@
|
|
|
3475
3491
|
core.Input(),
|
|
3476
3492
|
__metadata("design:type", String)
|
|
3477
3493
|
], FHUploadComponent.prototype, "label_attendere", void 0);
|
|
3494
|
+
__decorate([
|
|
3495
|
+
core.Input(),
|
|
3496
|
+
__metadata("design:type", String)
|
|
3497
|
+
], FHUploadComponent.prototype, "sovrascrivi_path", void 0);
|
|
3478
3498
|
__decorate([
|
|
3479
3499
|
core.Input(),
|
|
3480
3500
|
__metadata("design:type", String)
|
|
@@ -3514,13 +3534,13 @@
|
|
|
3514
3534
|
FHUploadComponent = __decorate([
|
|
3515
3535
|
core.Component({
|
|
3516
3536
|
selector: "FHUpload",
|
|
3517
|
-
template: "\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div\n [hidden]=\"!(enabled && !loading)\"\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n >\n <div\n [hidden]=\"!multi_list\"\n style=\"width:380px\"\n fxLayoutAlign=\"start center\"\n >\n <FHComboBox\n [sql]=\"tipo\"\n #cmb_tipo\n [init_fill]=\"false\"\n label=\"Tipologia\"\n ></FHComboBox\n > \n </div>\n <mat-form-field\n [hidden]=\"!show_descri\"\n style=\"width: 100%\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }} {{ fixed_label }}</mat-label>\n <input\n matInput\n type=\"text\"\n name=\"descrizione\"\n [(ngModel)]=\"descrizione\"\n />\n </mat-form-field>\n \n <div\n style=\"width:140px\"\n fxLayout=\"row\"\n fxLayoutAlign=\"start start\"\n (click)=\"call_up()\"\n >\n <input\n type=\"file\"\n multiple\n ng2FileSelect\n [uploader]=\"uploader\"\n name=\"file-fh{{
|
|
3537
|
+
template: "\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div\n [hidden]=\"!(enabled && !loading)\"\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n >\n <div\n [hidden]=\"!multi_list\"\n style=\"width:380px\"\n fxLayoutAlign=\"start center\"\n >\n <FHComboBox\n [sql]=\"tipo\"\n #cmb_tipo\n [init_fill]=\"false\"\n label=\"Tipologia\"\n ></FHComboBox\n > \n </div>\n <mat-form-field\n [hidden]=\"!show_descri\"\n style=\"width: 100%\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }} {{ fixed_label }}</mat-label>\n <input\n matInput\n type=\"text\"\n name=\"descrizione\"\n [(ngModel)]=\"descrizione\"\n />\n </mat-form-field>\n \n <div\n style=\"width:140px\"\n fxLayout=\"row\"\n fxLayoutAlign=\"start start\"\n (click)=\"call_up()\"\n >\n <input\n type=\"file\"\n multiple\n ng2FileSelect\n [uploader]=\"uploader\"\n name=\"file-fh{{ id_component }}\"\n id=\"file-fh{{ id_component }}\"\n class=\"inputfile inputfile-fh\"\n />\n <label for=\"file-fh{{ id_component }}\" style=\"width:210px\"\n ><svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"17\"\n viewBox=\"0 0 20 17\"\n >\n <path\n d=\"M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z\"\n /></svg\n ><span style=\"font-size: 12px\"> Upload</span></label\n >\n </div>\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <button\n mat-flat-button\n *ngIf=\"b_edit_loaded\"\n (click)=\"download_all()\"\n style=\"font-size: 12px\"\n >\n {{ label_b }}</button\n > \n <button\n mat-flat-button\n *ngIf=\"id != null && allow_delete\"\n (click)=\"del_doc()\"\n color=\"warn\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n <div *ngIf=\"!enabled\" fxLayout=\"row\" fxLayoutGap=\"10px\">\n <label>{{ label }}:</label>\n <div *ngIf=\"label != descrizione\">{{ descrizione }}</div>\n <button\n mat-flat-button\n *ngIf=\"b_edit_loaded\"\n (click)=\"download_all()\"\n style=\"font-size: 12px;background-color: #F5F5F5\"\n >\n {{ label_b }}\n </button>\n </div>\n ",
|
|
3518
3538
|
styles: [""]
|
|
3519
3539
|
}),
|
|
3520
3540
|
__metadata("design:paramtypes", [QueryService,
|
|
3521
3541
|
ngxToastr.ToastrService,
|
|
3522
3542
|
dialog.MatDialog,
|
|
3523
|
-
AppService])
|
|
3543
|
+
AppService, UtilityService])
|
|
3524
3544
|
], FHUploadComponent);
|
|
3525
3545
|
return FHUploadComponent;
|
|
3526
3546
|
}());
|