@fluxhub/fluxhub-lib 11.0.10 → 11.0.12

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.
@@ -4877,6 +4877,7 @@
4877
4877
  this.allegato_inserito = "ALLEGATO INSERITO";
4878
4878
  this.inserire_descrizione = "Descrizione Obbligatoria";
4879
4879
  this.selezionare_tipologia = "Selezionare la Tipologia";
4880
+ this.show_error = true;
4880
4881
  this.lista_allegati = [];
4881
4882
  this.change = new i0.EventEmitter();
4882
4883
  this.upload_ended = new i0.EventEmitter();
@@ -5019,7 +5020,8 @@
5019
5020
  }
5020
5021
  };
5021
5022
  _this.uploader.onErrorItem = function (a, b, c, d) {
5022
- _this.toastr.error(b);
5023
+ if (_this.show_error)
5024
+ _this.toastr.error(b);
5023
5025
  };
5024
5026
  _this.uploader.onAfterAddingFile = function (fileItem) {
5025
5027
  _this.ch(fileItem);
@@ -5177,7 +5179,7 @@
5177
5179
  FHUploadComponent.decorators = [
5178
5180
  { type: i0.Component, args: [{
5179
5181
  selector: "FHUpload",
5180
- template: "\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n\n <div\n [hidden]=\"!(enabled && !loading)\"\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n fxLayoutGap=\"10px\"\n >\n <div\n [hidden]=\"!multi_list\"\n style=\"width:400px\"\n fxLayoutAlign=\"start center\"\n >\n <div style=\"width:100%\">\n <FHComboBox\n [sql]=\"tipo\"\n #cmb_tipo\n [init_fill]=\"false\"\n label=\"Tipologia\"\n ></FHComboBox\n ></div>\n </div>\n <mat-form-field\n [hidden]=\"!show_descri\" [class.fh_field]=\"enabled\" [class.fh_field_dis]=\"!enabled\"\n style=\"width: 100%\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label | translate}} {{ fixed_label | translate }} {{ descri_obb ? '*':''}}</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><span style=\"font-size: 12px\">&nbsp;&nbsp;&nbsp;Upload</span></label>\n </div>\n -->\n <div fxLayout=\"row\" [hidden]=\"!((descri_obb && descrizione == '') || (multi_list && (cmb_tipo.getValue() == '' || cmb_tipo.getValue() == '-1')))\">\n <div [hidden]=\"!(this.descri_obb && descrizione == '')\"><b>{{inserire_descrizione | translate}}</b></div>\n <div [hidden]=\"!(multi_list && (cmb_tipo.getValue() == '' || cmb_tipo.getValue() == '-1'))\"><b>{{selezionare_tipologia | translate}}</b></div>\n </div>\n <div class=\"my-drop-zone\" [hidden]=\"(descri_obb && descrizione == '') || (multi_list && (cmb_tipo.getValue() == '' || cmb_tipo.getValue() == '-1'))\" style=\"width:130px\" fxLayout=\"row\" [matTooltip]=\"hasBaseDropZoneOver ? lascia_il_file : trascina_il_file | translate\" fxLayoutAlign=\"center start\">\n <label for=\"uploader-input\" ng2FileDrop style=\"font-weight:bold\"\n [ngClass]=\"{'over-drop-zone': hasBaseDropZoneOver}\" for=\"file-fh{{ id_component }}\"\n (onFileDrop)=\"onFileDrop($event)\" (click)=\"call_up()\"\n (fileOver)=\"fileOverBase($event)\" [uploader]=\"uploader\">\n <div fxLayoutAlign=\"center center\" fxLayout=\"row\">\n <mat-icon>{{!hasBaseDropZoneOver?'backup':'thumb_up'}}</mat-icon>\n\n &nbsp;<span style=\"font-size: 14px\">&nbsp;&nbsp;Upload</span></div></label></div>\n <input type=\"file\"\n ng2FileSelect #select_file\n [multiple]=\"true\"\n [uploader]=\"uploader\"\n name=\"file-fh{{ id_component }}\"\n id=\"file-fh{{ id_component }}\" (click)=\"call_up()\"\n (onFileSelected)=\"onFileDrop($event)\"\n id=\"uploader-input\" style=\"display:none\"/>\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\">\n &nbsp;&nbsp;&nbsp;&nbsp;\n <button\n mat-flat-button\n *ngIf=\"b_edit_loaded && show_download_button\"\n (click)=\"download_all()\"\n style=\"font-size: 12px;font-weight:bold\" color=\"accent\"\n\n >\n {{ label_b }}</button\n >&nbsp;&nbsp;&nbsp;\n <button\n mat-flat-button\n *ngIf=\"id != null && allow_delete && show_download_button\"\n (click)=\"del_doc()\"\n color=\"warn\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n\n </div>\n </div>\n <div *ngIf=\"!enabled\" fxLayout=\"row\" fxLayoutGap=\"10px\">\n <label [hidden]=\"label==null || label==''\">{{ label }}:</label>\n <div *ngIf=\"label != descrizione\">{{ descrizione }}</div>\n <button\n mat-flat-button\n *ngIf=\"b_edit_loaded && show_download_button\"\n (click)=\"download_all()\"\n style=\"font-size: 12px;background-color: #F5F5F5\"\n >\n {{ label_b }}\n </button>\n </div>\n ",
5182
+ template: "\n <div *ngIf=\"loading\" fxLayout=\"row\">\n <mat-spinner diameter=\"25\" ></mat-spinner>\n </div>\n\n <div\n [hidden]=\"!(enabled && !loading)\"\n fxLayout=\"row\"\n fxLayoutAlign=\"start center\"\n fxLayoutGap=\"10px\"\n >\n <div\n [hidden]=\"!multi_list\"\n style=\"width:400px\"\n fxLayoutAlign=\"start center\"\n >\n <div style=\"width:100%\">\n <FHComboBox\n [sql]=\"tipo\"\n #cmb_tipo\n [init_fill]=\"false\"\n label=\"Tipologia\"\n ></FHComboBox\n ></div>\n </div>\n <mat-form-field\n [hidden]=\"!show_descri\" [class.fh_field]=\"enabled\" [class.fh_field_dis]=\"!enabled\"\n style=\"width: 100%\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label | translate}} {{ fixed_label | translate }} {{ descri_obb ? '*':''}}</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><span style=\"font-size: 12px\">&nbsp;&nbsp;&nbsp;Upload</span></label>\n </div>\n -->\n <div fxLayout=\"row\" [hidden]=\"!((descri_obb && descrizione == '') || (multi_list && (cmb_tipo.getValue() == '' || cmb_tipo.getValue() == '-1')))\">\n <div [hidden]=\"!(this.descri_obb && descrizione == '')\"><b>{{inserire_descrizione | translate}}</b></div>\n <div [hidden]=\"!(multi_list && (cmb_tipo.getValue() == '' || cmb_tipo.getValue() == '-1'))\"><b>{{selezionare_tipologia | translate}}</b></div>\n </div>\n <div class=\"my-drop-zone\" [hidden]=\"(descri_obb && descrizione == '') || (multi_list && (cmb_tipo.getValue() == '' || cmb_tipo.getValue() == '-1'))\" style=\"width:130px\" fxLayout=\"row\" [matTooltip]=\"hasBaseDropZoneOver ? lascia_il_file : trascina_il_file | translate\" fxLayoutAlign=\"center start\">\n <label for=\"uploader-input\" ng2FileDrop style=\"font-weight:bold\"\n [ngClass]=\"{'over-drop-zone': hasBaseDropZoneOver}\" for=\"file-fh{{ id_component }}\"\n (onFileDrop)=\"onFileDrop($event)\" (click)=\"call_up()\"\n (fileOver)=\"fileOverBase($event)\" [uploader]=\"uploader\">\n <div fxLayoutAlign=\"center center\" fxLayout=\"row\">\n <mat-icon>{{!hasBaseDropZoneOver?'backup':'thumb_up'}}</mat-icon>\n\n &nbsp;<span style=\"font-size: 14px\">&nbsp;&nbsp;Upload</span></div></label></div>\n <input type=\"file\"\n ng2FileSelect #select_file\n [multiple]=\"true\"\n [uploader]=\"uploader\"\n name=\"file-fh{{ id_component }}\"\n id=\"file-fh{{ id_component }}\" (click)=\"call_up()\"\n (onFileSelected)=\"onFileDrop($event)\"\n id=\"uploader-input\" style=\"display:none\"/>\n <div fxLayout=\"row\" fxLayoutAlign=\"start start\">\n &nbsp;&nbsp;&nbsp;&nbsp;\n <button\n mat-flat-button\n *ngIf=\"b_edit_loaded && show_download_button\"\n (click)=\"download_all()\"\n style=\"font-size: 12px;font-weight:bold\" color=\"accent\"\n\n >\n {{ label_b }}</button\n >&nbsp;&nbsp;&nbsp;\n <button\n mat-flat-button\n *ngIf=\"id != null && allow_delete && show_download_button\"\n (click)=\"del_doc()\"\n color=\"warn\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n\n </div>\n </div>\n <div *ngIf=\"!enabled\" fxLayout=\"row\" fxLayoutGap=\"10px\">\n <label [hidden]=\"label==null || label==''\">{{ label }}:</label>\n <div *ngIf=\"label != descrizione\">{{ descrizione }}</div>\n <button\n mat-flat-button\n *ngIf=\"b_edit_loaded && show_download_button\"\n (click)=\"download_all()\"\n style=\"font-size: 12px;background-color: #F5F5F5\"\n >\n {{ label_b }}\n </button>\n </div>\n ",
5181
5183
  styles: ["\n .fileLabel{\n display: inline-block;\n padding: .7em .4em;\n font-size: 13px;\n color: #525252;\n background-color: #e6e6e6;\n margin: 0 .2em;\n border-radius: 5px;\n }\n",
5182
5184
  "\n .my-drop-zone { border: dotted 3px lightgray;height:35px }\n\n", "\n .nv-file-over { border: dotted 3px red; } /* Default class applied to drop zones on over */\n ", "\n .another-file-over-class { border: dotted 3px green; }\n"]
5183
5185
  },] }
@@ -5206,6 +5208,7 @@
5206
5208
  allegato_inserito: [{ type: i0.Input }],
5207
5209
  inserire_descrizione: [{ type: i0.Input }],
5208
5210
  selezionare_tipologia: [{ type: i0.Input }],
5211
+ show_error: [{ type: i0.Input }],
5209
5212
  lista_allegati: [{ type: i0.Input }],
5210
5213
  change: [{ type: i0.Output }],
5211
5214
  upload_ended: [{ type: i0.Output }],