@fluxhub/fluxhub-lib 1.0.375 → 1.0.376
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 +64 -2
- 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 +77 -4
- package/esm5/lib/controls/fhupload.js +77 -3
- package/fesm2015/fluxhub-fluxhub-lib.js +64 -3
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +64 -2
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhupload.d.ts +4 -1
- package/package.json +1 -1
|
@@ -3091,6 +3091,7 @@
|
|
|
3091
3091
|
this.lista_allegati = [];
|
|
3092
3092
|
this.change = new core.EventEmitter();
|
|
3093
3093
|
this.upload_ended = new core.EventEmitter();
|
|
3094
|
+
this.allow_delete = false;
|
|
3094
3095
|
this.loading = false;
|
|
3095
3096
|
this.App = '';
|
|
3096
3097
|
this.K = '';
|
|
@@ -3106,6 +3107,7 @@
|
|
|
3106
3107
|
url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT,
|
|
3107
3108
|
'maxFileSize': 500 * 1024 * 1024
|
|
3108
3109
|
});
|
|
3110
|
+
this.id = null;
|
|
3109
3111
|
this.username = this.app_s.user;
|
|
3110
3112
|
this.uploader.onBeforeUploadItem = (/**
|
|
3111
3113
|
* @param {?} item
|
|
@@ -3133,6 +3135,61 @@
|
|
|
3133
3135
|
}
|
|
3134
3136
|
});
|
|
3135
3137
|
}
|
|
3138
|
+
/**
|
|
3139
|
+
* @return {?}
|
|
3140
|
+
*/
|
|
3141
|
+
FHUploadComponent.prototype.del_doc = /**
|
|
3142
|
+
* @return {?}
|
|
3143
|
+
*/
|
|
3144
|
+
function () {
|
|
3145
|
+
var _this = this;
|
|
3146
|
+
localStorage.setItem(this.app_s.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
|
|
3147
|
+
localStorage.setItem(this.app_s.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
|
|
3148
|
+
/** @type {?} */
|
|
3149
|
+
var dialogRef = this
|
|
3150
|
+
.dialog
|
|
3151
|
+
.open(FHConfirmComponent);
|
|
3152
|
+
dialogRef
|
|
3153
|
+
.afterClosed()
|
|
3154
|
+
.subscribe((/**
|
|
3155
|
+
* @param {?} result
|
|
3156
|
+
* @return {?}
|
|
3157
|
+
*/
|
|
3158
|
+
function (result) {
|
|
3159
|
+
if (result) {
|
|
3160
|
+
/** @type {?} */
|
|
3161
|
+
var p = new QParam();
|
|
3162
|
+
p.sql = "DELETE_ALLEGATO";
|
|
3163
|
+
p.types = ['int', 'string'];
|
|
3164
|
+
p.values = [_this.id, _this.app_s.user];
|
|
3165
|
+
_this
|
|
3166
|
+
._dataService
|
|
3167
|
+
.doQuery(p)
|
|
3168
|
+
.subscribe((/**
|
|
3169
|
+
* @param {?} data
|
|
3170
|
+
* @return {?}
|
|
3171
|
+
*/
|
|
3172
|
+
function (data) {
|
|
3173
|
+
if (data != null)
|
|
3174
|
+
if (data.result_msg == "OK") {
|
|
3175
|
+
// this.arr_g = data.result_data;
|
|
3176
|
+
_this.ref_allegato();
|
|
3177
|
+
_this
|
|
3178
|
+
.toastr
|
|
3179
|
+
.info("INFO", "ALLEGATO ELIMINATO", {
|
|
3180
|
+
timeOut: 1000,
|
|
3181
|
+
progressBar: true
|
|
3182
|
+
});
|
|
3183
|
+
}
|
|
3184
|
+
}), (/**
|
|
3185
|
+
* @param {?} err
|
|
3186
|
+
* @return {?}
|
|
3187
|
+
*/
|
|
3188
|
+
function (err) {
|
|
3189
|
+
}));
|
|
3190
|
+
}
|
|
3191
|
+
}));
|
|
3192
|
+
};
|
|
3136
3193
|
/**
|
|
3137
3194
|
* @return {?}
|
|
3138
3195
|
*/
|
|
@@ -3268,6 +3325,7 @@
|
|
|
3268
3325
|
* @param {?} p_label
|
|
3269
3326
|
* @param {?=} p_tipo
|
|
3270
3327
|
* @param {?=} programma_da_eseguire
|
|
3328
|
+
* @param {?=} allow_delete
|
|
3271
3329
|
* @return {?}
|
|
3272
3330
|
*/
|
|
3273
3331
|
FHUploadComponent.prototype.init = /**
|
|
@@ -3276,11 +3334,13 @@
|
|
|
3276
3334
|
* @param {?} p_label
|
|
3277
3335
|
* @param {?=} p_tipo
|
|
3278
3336
|
* @param {?=} programma_da_eseguire
|
|
3337
|
+
* @param {?=} allow_delete
|
|
3279
3338
|
* @return {?}
|
|
3280
3339
|
*/
|
|
3281
|
-
function (p_app, p_k, p_label, p_tipo, programma_da_eseguire) {
|
|
3340
|
+
function (p_app, p_k, p_label, p_tipo, programma_da_eseguire, allow_delete) {
|
|
3282
3341
|
if (p_tipo === void 0) { p_tipo = ""; }
|
|
3283
3342
|
if (programma_da_eseguire === void 0) { programma_da_eseguire = ""; }
|
|
3343
|
+
if (allow_delete === void 0) { allow_delete = false; }
|
|
3284
3344
|
this.App = p_app;
|
|
3285
3345
|
this.K = p_k;
|
|
3286
3346
|
this.label = p_label;
|
|
@@ -3289,6 +3349,7 @@
|
|
|
3289
3349
|
this.b_edit_loaded = false;
|
|
3290
3350
|
this.descrizione = "";
|
|
3291
3351
|
this.programma_da_eseguire = programma_da_eseguire;
|
|
3352
|
+
this.allow_delete = allow_delete;
|
|
3292
3353
|
this.ref_allegato();
|
|
3293
3354
|
};
|
|
3294
3355
|
/**
|
|
@@ -3320,6 +3381,7 @@
|
|
|
3320
3381
|
/** @type {?} */
|
|
3321
3382
|
var a = data.result_data;
|
|
3322
3383
|
if (a.length > 0) {
|
|
3384
|
+
_this.id = a[0].id;
|
|
3323
3385
|
_this.descrizione = a[0].descrizione;
|
|
3324
3386
|
_this.file_name = a[0].Filename;
|
|
3325
3387
|
_this.label_b = "" + a[0].Filename + " - " + a[0].Filesize + "";
|
|
@@ -3331,7 +3393,7 @@
|
|
|
3331
3393
|
FHUploadComponent.decorators = [
|
|
3332
3394
|
{ type: core.Component, args: [{
|
|
3333
3395
|
selector: 'FHUpload',
|
|
3334
|
-
template: "\n \n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div *ngIf=\"enabled && !loading\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-form-field [hidden]=\"!show_descri\" class=\"field_style\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}} {{fixed_label}}</mat-label>\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n >\n </mat-form-field>\n \n <div style=\"width:140px\" fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <input type=\"file\" multiple ng2FileSelect [uploader]=\"uploader\" name=\"file-fh{{App}}\" id=\"file-fh{{App}}\" class=\"inputfile inputfile-fh\" />\n <label for=\"file-fh{{App}}\" style=\"width:210px\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"17\" viewBox=\"0 0 20 17\"><path 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\"/></svg><span style=\"font-size: 12px\"> Upload</span></label>\n </div>\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px\">{{label_b}}</button>\n </div>\n </div>\n <div *ngIf=\"!enabled\">\n <label>{{label}}:</label>{{descrizione}}\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n ",
|
|
3396
|
+
template: "\n \n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div *ngIf=\"enabled && !loading\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-form-field [hidden]=\"!show_descri\" class=\"field_style\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}} {{fixed_label}}</mat-label>\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n >\n </mat-form-field>\n \n <div style=\"width:140px\" fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <input type=\"file\" multiple ng2FileSelect [uploader]=\"uploader\" name=\"file-fh{{App}}\" id=\"file-fh{{App}}\" class=\"inputfile inputfile-fh\" />\n <label for=\"file-fh{{App}}\" style=\"width:210px\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"17\" viewBox=\"0 0 20 17\"><path 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\"/></svg><span style=\"font-size: 12px\"> Upload</span></label>\n </div>\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\">\n <button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px\">{{label_b}}</button> \n <button mat-raised-button *ngIf=\"id!=null && allow_delete\" (click)=\"del_doc()\" color=\"warn\">\n <mat-icon>delete</mat-icon> {{'ELIMINA' | translate}}\n </button>\n </div>\n </div>\n <div *ngIf=\"!enabled\" fxLayout=\"row\">\n <label>{{label}}:</label>{{descrizione}}\n <button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\" style=\"font-size: 12px\">{{label_b}}</button>\n\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n ",
|
|
3335
3397
|
styles: ["\n\n "]
|
|
3336
3398
|
}] }
|
|
3337
3399
|
];
|