@fluxhub/fluxhub-lib 1.0.208 → 1.0.210

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.
Files changed (30) hide show
  1. package/bundles/fluxhub-fluxhub-lib.umd.js +46 -18
  2. package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
  3. package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
  4. package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
  5. package/docs/components/FHCurrencyFieldComponent.html +8 -44
  6. package/docs/components/FHUploadComponent.html +72 -3
  7. package/docs/components/FHUploadPanelComponent.html +33 -3
  8. package/docs/components/win_uploads.html +70 -6
  9. package/docs/coverage.html +4 -4
  10. package/docs/js/search/search_index.js +2 -2
  11. package/esm2015/lib/controls/fhcurrencyfield.js +4 -10
  12. package/esm2015/lib/controls/fhupload.js +19 -4
  13. package/esm2015/lib/controls/fhuploadpanel.js +19 -3
  14. package/esm2015/lib/controls/win_ask_textbig.js +1 -1
  15. package/esm2015/lib/wkf_engine/win_uploads.js +35 -6
  16. package/esm5/lib/controls/fhcurrencyfield.js +3 -12
  17. package/esm5/lib/controls/fhupload.js +20 -5
  18. package/esm5/lib/controls/fhuploadpanel.js +10 -2
  19. package/esm5/lib/controls/win_ask_textbig.js +1 -1
  20. package/esm5/lib/wkf_engine/win_uploads.js +23 -3
  21. package/fesm2015/fluxhub-fluxhub-lib.js +68 -20
  22. package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
  23. package/fesm5/fluxhub-fluxhub-lib.js +47 -19
  24. package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
  25. package/fluxhub-fluxhub-lib.metadata.json +1 -1
  26. package/lib/controls/fhcurrencyfield.d.ts +1 -2
  27. package/lib/controls/fhupload.d.ts +3 -2
  28. package/lib/controls/fhuploadpanel.d.ts +1 -0
  29. package/lib/wkf_engine/win_uploads.d.ts +3 -2
  30. package/package.json +1 -1
@@ -3031,6 +3031,7 @@
3031
3031
  this.enabled = true;
3032
3032
  this.label = '';
3033
3033
  this.sovrascrivi_path = '';
3034
+ this.access_control = false;
3034
3035
  this.change = new i0.EventEmitter();
3035
3036
  this.App = '';
3036
3037
  this.K = '';
@@ -3107,6 +3108,7 @@
3107
3108
  * @return {?}
3108
3109
  */
3109
3110
  function () {
3111
+ console.log('INIT1');
3110
3112
  this.upc.single = false;
3111
3113
  this.b_mobile = this._appservice.getState().pageFullscreen;
3112
3114
  this
@@ -3163,13 +3165,16 @@
3163
3165
  if ('3G2|3GA|3GP|7Z|AA|AAC|AC|ACCDB|ACCDT|ADN|AI|AIF|AIFC|AIFF|AIT|AMR|ANI|APK|APP|APPLESCRIPT|ASAX|ASC|ASCX|ASF|ASH|ASHX|ASMX|ASP|ASPX|ASX|AU|AUP|AVI|AXD|AZE|BAK|BASH|BAT|BIN|BLANK|BMP|BOWERRC|BPG|BROWSER|BZ2|C|CAB|CAD|CAF|CAL|CD|CER|CFG|CFM|CFML|CGI|CLASS|CMD|CODEKIT|COFFEE|COFFEELINTIGNORE|COM|COMPILE|CONF|CONFIG|CPP|CPTX|CR2|CRDOWNLOAD|CRT|CRYPT|CS|CSH|CSON|CSPROJ|CSS|CSV|CUE|DAT|DB|DBF|DEB|DGN|DIST|DIZ|DLL|DMG|DNG|DOC|DOCB|DOCM|DOCX|DOT|DOTM|DOTX|DOWNLOAD|DPJ|DS_STORE|DTD|DWG|DXF|EDITORCONFIG|EL|ENC|EOT|EPS|EPUB|ESLINTIGNORE|EXE|F4V|FAX|FB2|FLA|FLAC|FLV|FOLDER|GADGET|GDP|GEM|GIF|GITATTRIBUTES|GITIGNORE|GO|GPG|GZ|H|HANDLEBARS|HBS|HEIC|HS|HSL|HTM|HTML|IBOOKS|ICNS|ICO|ICS|IDX|IFF|IFO|IMAGE|IMG|IN|INDD|INF|INI|ISO|J2|JAR|JAVA|JPE|JPEG|JPG|JS|JSON|JSP|JSX|KEY|KF8|KMK|KSH|KUP|LESS|LEX|LICX|LISP|LIT|LNK|LOCK|LOG|LUA|M|M2V|M3U|M3U8|M4|M4A|M4R|M4V|MAP|MASTER|MC|MD|MDB|MDF|ME|MI|MID|MIDI|MK|MKV|MM|MO|MOBI|MOD|MOV|MP2|MP3|MP4|MPA|MPD|MPE|MPEG|MPG|MPGA|MPP|MPT|MSI|MSU|NEF|NES|NFO|NIX|NPMIGNORE|ODB|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)
3164
3166
  iconf = arrf[arrf.length - 1].toLocaleLowerCase();
3165
3167
  _this.arr_g[i].icon = iconf + '.svg';
3168
+ _this.arr_g[i].can_delete = !_this.access_control || _this.arr_g[i].idp == _this._appservice.user;
3166
3169
  }
3170
+ if (_this.upc == null)
3171
+ _this.upc.lista_allegati = _this.arr_g;
3167
3172
  }
3168
3173
  });
3169
3174
  };
3170
3175
  FHUploadPanelComponent.decorators = [
3171
3176
  { type: i0.Component, args: [{
3172
- selector: 'FHUploadPanel', template: "\n <div fxLayout=\"column\">\n\n <h3>{{label}}</h3>\n\n <div fxLayout=\"column\">\n <div [hidden]=\"!enabled\">\n <FHUpload [single]=\"b_False\" (change)=\"ref_allegato()\" #upc></FHUpload>\n <br></div>\n\n <table width=\"98%\" class=\"fh_table\">\n <thead *ngIf=\"!b_mobile\">\n <tr class=\"header\">\n <th style=\"width:40px\"></th>\n <th style=\"width:50%\">Nome</th>\n <th style=\"width:60px;text-align:center\">Dim.</th>\n <th style=\"width:50%\">Descrizione</th>\n <th style=\"width:240px;text-align:center\">Data</th>\n <th style=\"width:40px\" class=\"actions\"></th>\n <th *ngIf=\"enabled\" style=\"width:40px\" class=\"actions\"></th>\n </tr>\n </thead>\n <tbody>\n\n <tr *ngFor=\"let app of arr_g\" style=\"font-size: 12px;\">\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n <td *ngIf=\"b_mobile\" style=\"text-align:center\">{{app.Filename}}<br><br>\n <button (click)=\"download_all(app)\" mat-raised-button>DOWNLOAD</button>\n </td>\n <td *ngIf=\"!b_mobile\">{{app.Filename}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">{{app.Filesize}}</td>\n <td *ngIf=\"!b_mobile\">{{app.descrizione}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">\n <button mat-icon-button matTooltip=\"Download File\" (click)=\"download_all(app)\">\n <mat-icon>save_alt</mat-icon>\n </button>\n </td>\n\n <td *ngIf=\"enabled\" style=\"text-align:center\">\n <a mat-icon-button matTooltip=\"Elimina File\" *ngIf=\"enabled\" (click)=\"delete(app)\">\n <mat-icon>delete</mat-icon>\n </a></td>\n\n </tr>\n </table>\n\n </div>\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n\n ",
3177
+ selector: 'FHUploadPanel', template: "\n <div fxLayout=\"column\">\n\n <h3>{{label}}</h3>\n\n <div fxLayout=\"column\">\n <div [hidden]=\"!enabled\">\n <FHUpload [single]=\"b_False\" (change)=\"ref_allegato()\" #upc></FHUpload>\n <br></div>\n\n <table width=\"98%\" class=\"fh_table\">\n <thead *ngIf=\"!b_mobile\">\n <tr class=\"header\">\n <th style=\"width:40px\"></th>\n <th style=\"width:50%\">Nome</th>\n <th style=\"width:60px;text-align:center\">Dim.</th>\n <th style=\"width:50%\">Descrizione</th>\n <th style=\"width:30%\">Utente</th>\n <th style=\"width:240px;text-align:center\">Data</th>\n <th style=\"width:40px\" class=\"actions\"></th>\n <th *ngIf=\"enabled\" style=\"width:40px\" class=\"actions\"></th>\n </tr>\n </thead>\n <tbody>\n\n <tr *ngFor=\"let app of arr_g\" style=\"font-size: 12px;\">\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n <td *ngIf=\"b_mobile\" style=\"text-align:center\">{{app.Filename}}<br><br>\n <button (click)=\"download_all(app)\" mat-raised-button>DOWNLOAD</button>\n </td>\n <td *ngIf=\"!b_mobile\">{{app.Filename}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">{{app.Filesize}}</td>\n <td *ngIf=\"!b_mobile\">{{app.descrizione}}</td>\n <td *ngIf=\"!b_mobile\">{{app.nc}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>\n <td *ngIf=\"!b_mobile\" style=\"text-align:center\">\n <button mat-icon-button matTooltip=\"Download File\" (click)=\"download_all(app)\">\n <mat-icon>save_alt</mat-icon>\n </button>\n </td>\n\n <td *ngIf=\"enabled\" style=\"text-align:center\">\n <a mat-icon-button matTooltip=\"Elimina File\" *ngIf=\"app.can_delete\" (click)=\"delete(app)\">\n <mat-icon>delete</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Cancellazione consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>delete</mat-icon>\n </a>\n \n </td>\n\n </tr>\n </table>\n\n </div>\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n\n ",
3173
3178
  styles: ["\n\n \n\n "]
3174
3179
  }] }
3175
3180
  ];
@@ -3187,6 +3192,7 @@
3187
3192
  enabled: [{ type: i0.Input }],
3188
3193
  label: [{ type: i0.Input }],
3189
3194
  sovrascrivi_path: [{ type: i0.Input }],
3195
+ access_control: [{ type: i0.Input }],
3190
3196
  change: [{ type: i0.Output }],
3191
3197
  upc: [{ type: i0.ViewChild, args: ['upc',] }]
3192
3198
  };
@@ -3280,6 +3286,7 @@
3280
3286
  this.b_edit_loaded = false;
3281
3287
  this.tipo = '';
3282
3288
  this.b_ini = false;
3289
+ this.lista_allegati = [];
3283
3290
  this.uploader = new ng2FileUpload.FileUploader({
3284
3291
  url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT,
3285
3292
  'maxFileSize': 500 * 1024 * 1024
@@ -3308,6 +3315,7 @@
3308
3315
  */
3309
3316
  function () {
3310
3317
  var _this = this;
3318
+ console.log('INIT');
3311
3319
  /** @type {?} */
3312
3320
  var uo = {};
3313
3321
  uo.headers = [{ name: 'Authorization', value: 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token") }];
@@ -3324,8 +3332,9 @@
3324
3332
  this.uploader.onErrorItem = function (a, b, c, d) {
3325
3333
  _this.toastr.error(b);
3326
3334
  };
3327
- this.uploader.onAfterAddingFile = function () {
3328
- _this.ch();
3335
+ this.uploader.onAfterAddingFile = function (fileItem) {
3336
+ console.log('onAfterAddingFile');
3337
+ _this.ch(fileItem);
3329
3338
  };
3330
3339
  this.uploader.onProgressItem = function (fileItem, progress) {
3331
3340
  // console.log(fileItem);
@@ -3357,17 +3366,27 @@
3357
3366
  window.open(this.app_s.COMPANY_SITE_ROOT + '/uploads/' + this.App + '/' + this.K + '/' + this.file_name);
3358
3367
  };
3359
3368
  /**
3369
+ * @param {?} fileItem
3360
3370
  * @return {?}
3361
3371
  */
3362
3372
  FHUploadComponent.prototype.ch = /**
3373
+ * @param {?} fileItem
3363
3374
  * @return {?}
3364
3375
  */
3365
- function () {
3376
+ function (fileItem) {
3366
3377
  var _this = this;
3367
3378
  if (this.descri_obb && this.descrizione == '') {
3368
3379
  this.toastr.error(this.inserire_descrizione);
3369
3380
  return;
3370
3381
  }
3382
+ console.log('this.lista_allegati ', this.lista_allegati);
3383
+ console.log('fileItem ', fileItem);
3384
+ for (var i = 0; i < this.lista_allegati.length; i++) {
3385
+ if (this.lista_allegati[i].Filename.toLowerCase() == fileItem.file.name.toLowerCase()) {
3386
+ this.toastr.error('File già presente (cancellarlo per aggiornarlo)');
3387
+ return;
3388
+ }
3389
+ }
3371
3390
  this.uploader.onBuildItemForm = function (item, form) {
3372
3391
  form.append('App', _this.App);
3373
3392
  form.append('K', _this.K);
@@ -3457,7 +3476,7 @@
3457
3476
  FHUploadComponent.decorators = [
3458
3477
  { type: i0.Component, args: [{
3459
3478
  selector: 'FHUpload',
3460
- template: "\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div *ngIf=\"enabled &amp;&amp; !loading\" fxLayout=\"row\">\n <mat-form-field class=\"field_style\">\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n placeholder=\"{{label}} {{fixed_label}}\">\n </mat-form-field>\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple/>\n <div>\n <button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\">{{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 ",
3479
+ template: "\n aaaazzz\n <div *ngIf=\"loading\" fxLayout=\"row\">\n WAIT\n </div>\n <div *ngIf=\"enabled &amp;&amp; !loading\" fxLayout=\"row\">\n <mat-form-field class=\"field_style\">\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\"\n placeholder=\"{{label}} {{fixed_label}}\">\n </mat-form-field>\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple/>\n <div>\n <button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\">{{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 ",
3461
3480
  styles: ["\n\n "]
3462
3481
  }] }
3463
3482
  ];
@@ -8624,15 +8643,6 @@
8624
8643
  /**
8625
8644
  * @return {?}
8626
8645
  */
8627
- FHCurrencyFieldComponent.prototype.getStyle = /**
8628
- * @return {?}
8629
- */
8630
- function () {
8631
- return this.m_color;
8632
- };
8633
- /**
8634
- * @return {?}
8635
- */
8636
8646
  FHCurrencyFieldComponent.prototype.getStyle_color = /**
8637
8647
  * @return {?}
8638
8648
  */
@@ -8652,7 +8662,7 @@
8652
8662
  * @param {?} color
8653
8663
  * @return {?}
8654
8664
  */
8655
- FHCurrencyFieldComponent.prototype.set_backcolor = /**
8665
+ FHCurrencyFieldComponent.prototype.set_color = /**
8656
8666
  * @param {?} color
8657
8667
  * @return {?}
8658
8668
  */
@@ -8805,7 +8815,7 @@
8805
8815
  { type: i0.Component, args: [{
8806
8816
  selector: 'FHCurrencyField',
8807
8817
  providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
8808
- template: "\n <mat-form-field [hidden]=\"!enabled || hidden\">\n <input type=\"text\" style=\"text-align:right\" [style.background-color]=\"getStyle()\" #el matInput\n [disabled]=\"!enabled\" placeholder=\"{{label}}\" [(ngModel)]=\"formattedAmount\"\n (blur)=\"transformAmount($event)\" [style.color]=\"getStyle_color()\" (keydown)=\"kd($event)\" \n (focus)=\"removeCurrencyPipeFormat($event)\" (keyup)=\"chg()\"\n pattern=\"[0-9]+\">\n </mat-form-field>\n <mat-form-field [hidden]=\"enabled || hidden\">\n <input type=\"text\" style=\"text-align:right\" [style.background-color]=\"getStyle()\" #el1 matInput [disabled]=\"true\"\n placeholder=\"{{label}}\" [(ngModel)]=\"formattedAmount\"\n >\n </mat-form-field>\n ",
8818
+ template: "\n <mat-form-field [hidden]=\"!enabled || hidden\">\n <input type=\"text\" style=\"text-align:right\" #el matInput\n [disabled]=\"!enabled\" placeholder=\"{{label}}\" [(ngModel)]=\"formattedAmount\"\n (blur)=\"transformAmount($event)\" [style.color]=\"getStyle_color()\" (keydown)=\"kd($event)\" \n (focus)=\"removeCurrencyPipeFormat($event)\" (keyup)=\"chg()\"\n pattern=\"[0-9]+\">\n </mat-form-field>\n <mat-form-field [hidden]=\"enabled || hidden\">\n <input type=\"text\" style=\"text-align:right\" [style.color]=\"getStyle_color()\" #el1 matInput [disabled]=\"true\"\n placeholder=\"{{label}}\" [(ngModel)]=\"formattedAmount\"\n >\n </mat-form-field>\n ",
8809
8819
  styles: ["\n\n "]
8810
8820
  }] }
8811
8821
  ];
@@ -10013,6 +10023,7 @@
10013
10023
  this.app_s = app_s;
10014
10024
  this.enabled = true;
10015
10025
  this.change = new i0.EventEmitter();
10026
+ this.access_control = true;
10016
10027
  this.App = '';
10017
10028
  this.K = '';
10018
10029
  this.b_edit_loaded = false;
@@ -10104,13 +10115,23 @@
10104
10115
  });
10105
10116
  };
10106
10117
  /**
10118
+ * @param {?} fileItem
10107
10119
  * @return {?}
10108
10120
  */
10109
10121
  win_uploads.prototype.ch = /**
10122
+ * @param {?} fileItem
10110
10123
  * @return {?}
10111
10124
  */
10112
- function () {
10125
+ function (fileItem) {
10113
10126
  var _this = this;
10127
+ console.log('this.arr_g ', this.arr_g);
10128
+ console.log('fileItem ', fileItem);
10129
+ for (var i = 0; i < this.arr_g.length; i++) {
10130
+ if (this.arr_g[i].Filename.toLowerCase() == fileItem.file.name.toLowerCase()) {
10131
+ this.toastr.error('File già presente (cancellarlo per aggiornarlo)');
10132
+ return;
10133
+ }
10134
+ }
10114
10135
  this.uploader.onBuildItemForm = function (item, form) {
10115
10136
  form.append('App', _this.App);
10116
10137
  form.append('K', _this.K);
@@ -10160,6 +10181,7 @@
10160
10181
  if ('3G2|3GA|3GP|7Z|AA|AAC|AC|ACCDB|ACCDT|ADN|AI|AIF|AIFC|AIFF|AIT|AMR|ANI|APK|APP|APPLESCRIPT|ASAX|ASC|ASCX|ASF|ASH|ASHX|ASMX|ASP|ASPX|ASX|AU|AUP|AVI|AXD|AZE|BAK|BASH|BAT|BIN|BLANK|BMP|BOWERRC|BPG|BROWSER|BZ2|C|CAB|CAD|CAF|CAL|CD|CER|CFG|CFM|CFML|CGI|CLASS|CMD|CODEKIT|COFFEE|COFFEELINTIGNORE|COM|COMPILE|CONF|CONFIG|CPP|CPTX|CR2|CRDOWNLOAD|CRT|CRYPT|CS|CSH|CSON|CSPROJ|CSS|CSV|CUE|DAT|DB|DBF|DEB|DGN|DIST|DIZ|DLL|DMG|DNG|DOC|DOCB|DOCM|DOCX|DOT|DOTM|DOTX|DOWNLOAD|DPJ|DS_STORE|DTD|DWG|DXF|EDITORCONFIG|EL|ENC|EOT|EPS|EPUB|ESLINTIGNORE|EXE|F4V|FAX|FB2|FLA|FLAC|FLV|FOLDER|GADGET|GDP|GEM|GIF|GITATTRIBUTES|GITIGNORE|GO|GPG|GZ|H|HANDLEBARS|HBS|HEIC|HS|HSL|HTM|HTML|IBOOKS|ICNS|ICO|ICS|IDX|IFF|IFO|IMAGE|IMG|IN|INDD|INF|INI|ISO|J2|JAR|JAVA|JPE|JPEG|JPG|JS|JSON|JSP|JSX|KEY|KF8|KMK|KSH|KUP|LESS|LEX|LICX|LISP|LIT|LNK|LOCK|LOG|LUA|M|M2V|M3U|M3U8|M4|M4A|M4R|M4V|MAP|MASTER|MC|MD|MDB|MDF|ME|MI|MID|MIDI|MK|MKV|MM|MO|MOBI|MOD|MOV|MP2|MP3|MP4|MPA|MPD|MPE|MPEG|MPG|MPGA|MPP|MPT|MSI|MSU|NEF|NES|NFO|NIX|NPMIGNORE|ODB|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)
10161
10182
  iconf = arrf[arrf.length - 1].toLocaleLowerCase();
10162
10183
  _this.arr_g[i].icon = iconf + '.svg';
10184
+ _this.arr_g[i].can_delete = !_this.access_control || _this.arr_g[i].idp == _this.app_s.user;
10163
10185
  }
10164
10186
  }
10165
10187
  });
@@ -10171,9 +10193,14 @@
10171
10193
  * @return {?}
10172
10194
  */
10173
10195
  function () {
10196
+ var _this = this;
10174
10197
  this.App = this.app_s.getState().wkf_doc_info.uiid_app;
10175
10198
  this.K = this.app_s.getState().wkf_doc_info.uiid_doc;
10176
10199
  this.single = false;
10200
+ this.uploader.onAfterAddingFile = function (fileItem) {
10201
+ console.log('onAfterAddingFile');
10202
+ _this.ch(fileItem);
10203
+ };
10177
10204
  this.init(this.App, this.K);
10178
10205
  this.ref_allegato();
10179
10206
  };
@@ -10198,7 +10225,7 @@
10198
10225
  win_uploads.decorators = [
10199
10226
  { type: i0.Component, args: [{
10200
10227
  selector: 'wkf_win_upload',
10201
- template: "\n <mat-toolbar color=\"primary\">{{title}}\n <div style=\"width:100%;text-align: right;\">\n </div>\n\n </mat-toolbar>\n <div mat-dialog-content style=\"min-width:800px\">\n <br>\n <div *ngIf=\"enabled\">\n\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\" placeholder=\"{{label}}\">\n\n\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple (change)=\"ch()\"/>\n <!--<button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\">{{label_b}}</button>-->\n </div>\n <br>\n\n\n <br>\n\n <table style=\"width: 100%;\" class=\"fh_table\">\n <thead>\n <tr>\n <th style=\"width:40px\"></th>\n <th style=\"width:50%\">Nome</th>\n <th style=\"width:60px;text-align:center\">Dim.</th>\n <th style=\"width:50%\">Descrizione</th>\n <th style=\"width:240px;text-align:center\">Data</th>\n <th style=\"width:40px\" class=\"actions\"></th>\n <th *ngIf=\"enabled\" style=\"width:40px\" class=\"actions\"></th>\n </tr>\n </thead>\n <tbody>\n\n <tr *ngFor=\"let app of arr_g;let odd=odd; let even=even;index as i\" [ngClass]=\"{ odd: odd, even: even }\" >\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n <td>{{app.Filename}}</td>\n <td style=\"text-align:center\">{{app.Filesize}}</td>\n <td>{{app.descrizione}}</td>\n <td style=\"text-align:center\">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>\n <td style=\"text-align:center\">\n <button mat-icon-button matTooltip=\"Download File\" (click)=\"download_all(app)\">\n <mat-icon>save_alt</mat-icon>\n </button>\n </td>\n\n <td style=\"text-align:center\"><a mat-icon-button *ngIf=\"enabled\" (click)=\"delete(app)\">\n <mat-icon>delete</mat-icon>\n </a></td>\n </tr>\n </table>\n\n\n </div>\n <div style=\"width:100%;text-align:center;\">\n <button mat-raised-button (click)=\"dialogRef.close('Option 1')\">CHIUDI</button>\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n\n ",
10228
+ template: "\n <mat-toolbar color=\"primary\">{{title}}\n <div style=\"width:100%;text-align: right;\">\n </div>\n\n </mat-toolbar>\n <div mat-dialog-content style=\"min-width:800px\">\n <br>\n <div *ngIf=\"enabled\">\n\n <input matInput type=\"text\" name=\"descrizione\" [(ngModel)]=\"descrizione\" placeholder=\"{{label}}\">\n\n\n <input type=\"file\" ng2FileSelect [uploader]=\"uploader\" multiple />\n <!--<button mat-raised-button *ngIf=\"b_edit_loaded\" (click)=\"download_all()\">{{label_b}}</button>-->\n </div>\n <br>\n\n\n <br>\n\n <table style=\"width: 100%;\" class=\"fh_table\">\n <thead>\n <tr>\n <th style=\"width:40px\"></th>\n <th style=\"width:50%\">Nome</th>\n <th style=\"width:60px;text-align:center\">Dim.</th>\n <th style=\"width:50%\">Descrizione</th>\n \n <th style=\"width:30%\">Utente</th>\n <th style=\"width:240px;text-align:center\">Data</th>\n <th style=\"width:40px\" class=\"actions\"></th>\n <th *ngIf=\"enabled\" style=\"width:40px\" class=\"actions\"></th>\n </tr>\n </thead>\n <tbody>\n\n <tr *ngFor=\"let app of arr_g;let odd=odd; let even=even;index as i\" [ngClass]=\"{ odd: odd, even: even }\" >\n <td style=\"text-align:center;vertical-align: middle;width:36px;height:36px;\">\n <div style=\"text-align:center;vertical-align: middle;width:28px;height:28px;\">\n <img src=\"assets/icons/square-o/{{app.icon}}\" style=\"width:28px;height:28px;\"></div> </td>\n <td>{{app.Filename}}</td>\n <td style=\"text-align:center\">{{app.Filesize}}</td>\n <td>{{app.descrizione}}</td>\n <td>{{app.nc}}</td>\n <td style=\"text-align:center\">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>\n <td style=\"text-align:center\">\n <button mat-icon-button matTooltip=\"Download File\" (click)=\"download_all(app)\">\n <mat-icon>save_alt</mat-icon>\n </button>\n </td>\n\n\n <td *ngIf=\"enabled\" style=\"text-align:center\">\n <a mat-icon-button matTooltip=\"Elimina File\" *ngIf=\"app.can_delete\" (click)=\"delete(app)\">\n <mat-icon>delete</mat-icon>\n </a>\n\n <a mat-icon-button [matTooltip]=\"'Cancellazione consentita solo a: '+app.nc\" *ngIf=\"!app.can_delete\" [disabled]=\"true\" >\n <mat-icon>delete</mat-icon>\n </a>\n\n </td>\n </tr>\n </table>\n\n\n </div>\n <div style=\"width:100%;text-align:center;\">\n <button mat-raised-button (click)=\"dialogRef.close('Option 1')\">CHIUDI</button>\n </div>\n <div *ngIf=\"!b_ini\" style=\"color:#ff0000\"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>\n\n ",
10202
10229
  styles: ["\n\n \n "]
10203
10230
  }] }
10204
10231
  ];
@@ -10216,6 +10243,7 @@
10216
10243
  enabled: [{ type: i0.Input }],
10217
10244
  change: [{ type: i0.Output }],
10218
10245
  upc: [{ type: i0.ViewChild, args: ['upc',] }],
10246
+ access_control: [{ type: i0.Input }],
10219
10247
  single: [{ type: i0.Input }]
10220
10248
  };
10221
10249
  return win_uploads;