@fluxhub/fluxhub-lib 9.0.151 → 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.
@@ -3046,18 +3046,20 @@ var win_show_log_dett = /** @class */ (function () {
3046
3046
  }());
3047
3047
 
3048
3048
  var FHUploadComponent = /** @class */ (function () {
3049
- function FHUploadComponent(_dataService, toastr, dialog, app_s) {
3049
+ function FHUploadComponent(_dataService, toastr, dialog, app_s, uti) {
3050
3050
  var _this = this;
3051
3051
  this._dataService = _dataService;
3052
3052
  this.toastr = toastr;
3053
3053
  this.dialog = dialog;
3054
3054
  this.app_s = app_s;
3055
+ this.uti = uti;
3055
3056
  this.show_descri = true;
3056
3057
  this.enabled = true;
3057
3058
  this.single = true;
3058
3059
  this.descri_obb = false;
3059
3060
  this.programma_da_eseguire = "";
3060
3061
  this.label_attendere = "ATTENDERE UPLOAD IN CORSO";
3062
+ this.sovrascrivi_path = "";
3061
3063
  this.fixed_label = " (INSERISCI QUI LA DESCRIZIONE PRIMA DI CARICARE IL FILE)";
3062
3064
  this.limit_string = "Il file di <size>MB supera il limite di 500MB";
3063
3065
  this.allegato_inserito = "ALLEGATO INSERITO";
@@ -3066,6 +3068,7 @@ var FHUploadComponent = /** @class */ (function () {
3066
3068
  this.change = new EventEmitter();
3067
3069
  this.upload_ended = new EventEmitter();
3068
3070
  this.call_upload = new EventEmitter();
3071
+ this.id_component = '';
3069
3072
  this.multi_list = false;
3070
3073
  this.allow_delete = false;
3071
3074
  this.loading = false;
@@ -3085,6 +3088,7 @@ var FHUploadComponent = /** @class */ (function () {
3085
3088
  maxFileSize: 500 * 1024 * 1024,
3086
3089
  });
3087
3090
  this.id = null;
3091
+ this.id_component = this.uti.newGuid();
3088
3092
  this.username = this.app_s.user;
3089
3093
  this.uploader.onBeforeUploadItem = function (item) {
3090
3094
  item.withCredentials = false;
@@ -3213,13 +3217,24 @@ var FHUploadComponent = /** @class */ (function () {
3213
3217
  });
3214
3218
  };
3215
3219
  FHUploadComponent.prototype.download_all = function () {
3216
- window.open(this.app_s.COMPANY_SITE_ROOT +
3217
- "/uploads/" +
3218
- this.App +
3219
- "/" +
3220
- this.K +
3221
- "/" +
3222
- this.file_name);
3220
+ if (this.sovrascrivi_path == '') {
3221
+ window.open(this.app_s.COMPANY_SITE_ROOT +
3222
+ "/uploads/" +
3223
+ this.App +
3224
+ "/" +
3225
+ this.K +
3226
+ "/" +
3227
+ this.file_name);
3228
+ }
3229
+ else {
3230
+ window.open(this.sovrascrivi_path +
3231
+ "/uploads/" +
3232
+ this.App +
3233
+ "/" +
3234
+ this.K +
3235
+ "/" +
3236
+ this.file_name);
3237
+ }
3223
3238
  };
3224
3239
  FHUploadComponent.prototype.ch = function (fileItem) {
3225
3240
  var _this = this;
@@ -3317,7 +3332,8 @@ var FHUploadComponent = /** @class */ (function () {
3317
3332
  { type: QueryService },
3318
3333
  { type: ToastrService },
3319
3334
  { type: MatDialog },
3320
- { type: AppService }
3335
+ { type: AppService },
3336
+ { type: UtilityService }
3321
3337
  ]; };
3322
3338
  __decorate([
3323
3339
  Input(),
@@ -3343,6 +3359,10 @@ var FHUploadComponent = /** @class */ (function () {
3343
3359
  Input(),
3344
3360
  __metadata("design:type", String)
3345
3361
  ], FHUploadComponent.prototype, "label_attendere", void 0);
3362
+ __decorate([
3363
+ Input(),
3364
+ __metadata("design:type", String)
3365
+ ], FHUploadComponent.prototype, "sovrascrivi_path", void 0);
3346
3366
  __decorate([
3347
3367
  Input(),
3348
3368
  __metadata("design:type", String)
@@ -3382,13 +3402,13 @@ var FHUploadComponent = /** @class */ (function () {
3382
3402
  FHUploadComponent = __decorate([
3383
3403
  Component({
3384
3404
  selector: "FHUpload",
3385
- 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 >&nbsp;&nbsp;\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 &nbsp;&nbsp;&nbsp;&nbsp;\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{{ App }}\"\n id=\"file-fh{{ App }}\"\n class=\"inputfile inputfile-fh\"\n />\n <label for=\"file-fh{{ App }}\" 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\">&nbsp;&nbsp;&nbsp;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 >&nbsp;&nbsp;&nbsp;\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 ",
3405
+ 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 >&nbsp;&nbsp;\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 &nbsp;&nbsp;&nbsp;&nbsp;\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\">&nbsp;&nbsp;&nbsp;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 >&nbsp;&nbsp;&nbsp;\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 ",
3386
3406
  styles: [""]
3387
3407
  }),
3388
3408
  __metadata("design:paramtypes", [QueryService,
3389
3409
  ToastrService,
3390
3410
  MatDialog,
3391
- AppService])
3411
+ AppService, UtilityService])
3392
3412
  ], FHUploadComponent);
3393
3413
  return FHUploadComponent;
3394
3414
  }());
@@ -8619,7 +8639,7 @@ var FHAutoCompleteComponent = /** @class */ (function () {
8619
8639
  };
8620
8640
  FHAutoCompleteComponent.prototype.resetValue = function (b_res_valdef) {
8621
8641
  if (b_res_valdef === void 0) { b_res_valdef = true; }
8622
- console.log(">>>resetValue<<<");
8642
+ //console.log(">>>resetValue<<<");
8623
8643
  this.selval = "";
8624
8644
  if (b_res_valdef)
8625
8645
  this.valDef = "";
@@ -8627,7 +8647,7 @@ var FHAutoCompleteComponent = /** @class */ (function () {
8627
8647
  this.selval = null;
8628
8648
  };
8629
8649
  FHAutoCompleteComponent.prototype.reset = function () {
8630
- console.log(">>>reset<<<");
8650
+ //console.log(">>>reset<<<");
8631
8651
  this.selval = "";
8632
8652
  this.valDef = "";
8633
8653
  this.selval = null;
@@ -8691,6 +8711,7 @@ var FHAutoCompleteComponent = /** @class */ (function () {
8691
8711
  }
8692
8712
  };
8693
8713
  FHAutoCompleteComponent.prototype.setByDescri = function (desc_val) {
8714
+ // console.log('setByDescri ',desc_val);
8694
8715
  this.valDef = desc_val;
8695
8716
  this.selval = "";
8696
8717
  if (desc_val == "") {
@@ -8716,8 +8737,13 @@ var FHAutoCompleteComponent = /** @class */ (function () {
8716
8737
  this.sItem = desc_val;
8717
8738
  }
8718
8739
  };
8740
+ FHAutoCompleteComponent.prototype.last_val_rec = function () {
8741
+ this.setByValue(this.last_v);
8742
+ };
8719
8743
  FHAutoCompleteComponent.prototype.setByValue = function (desc_val) {
8720
8744
  var _this = this;
8745
+ //console.log('setByValue ',desc_val);
8746
+ this.last_v = desc_val;
8721
8747
  this.valDef = desc_val;
8722
8748
  this.selval = desc_val;
8723
8749
  if (this.myData != null) {
@@ -8736,7 +8762,7 @@ var FHAutoCompleteComponent = /** @class */ (function () {
8736
8762
  this.resetValue(false);
8737
8763
  }
8738
8764
  else {
8739
- setTimeout(function () { _this.setByValue(desc_val); }, 1000);
8765
+ setTimeout(function () { _this.last_val_rec(); }, 1000);
8740
8766
  return;
8741
8767
  }
8742
8768
  if (!this.only_from_list) {