@fluxhub/fluxhub-lib 1.0.242 → 1.0.243

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.
@@ -34,7 +34,7 @@ import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_LOCALE, MatAutocompleteM
34
34
  import { __read, __assign, __extends } from 'tslib';
35
35
  import { enabled, request, exit } from 'screenfull';
36
36
  import { ActivatedRoute, Router } from '@angular/router';
37
- import { Injectable, Component, Directive, Input, ElementRef, Output, EventEmitter, ViewChild, Inject, PLATFORM_ID, forwardRef, Pipe, ViewContainerRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
37
+ import { Injectable, Component, Directive, Input, ElementRef, Inject, PLATFORM_ID, Output, EventEmitter, ViewChild, forwardRef, Pipe, ViewContainerRef, Optional, HostListener, defineInjectable, inject, NgModule } from '@angular/core';
38
38
  import { Http } from '@angular/http';
39
39
  import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
40
40
  import { ToastrService } from 'ngx-toastr';
@@ -3342,7 +3342,6 @@ var AuthenticationService = /** @class */ (function () {
3342
3342
  * @return {?}
3343
3343
  */
3344
3344
  function () {
3345
- var _this = this;
3346
3345
  if (this.checkCredentials())
3347
3346
  return;
3348
3347
  /** @type {?} */
@@ -3377,41 +3376,7 @@ var AuthenticationService = /** @class */ (function () {
3377
3376
  window.location.href = (this.url);
3378
3377
  }
3379
3378
  else {
3380
- // this.username="NA";
3381
- this
3382
- .get_user_info(this.username)
3383
- .subscribe(function (data) {
3384
- /** @type {?} */
3385
- var ok_op = false;
3386
- if (data != null)
3387
- if (data.result_msg == "OK") {
3388
- /** @type {?} */
3389
- var a = data.result_data;
3390
- _this.username = "NA";
3391
- if (a.length > 0) {
3392
- _this.username = a[0].username;
3393
- _this.app_s.user_name = a[0].name;
3394
- _this.app_s.user_surname = a[0].surname;
3395
- _this.app_s.user = a[0].username;
3396
- _this.app_s.user_email = a[0].email;
3397
- _this.app_s.user_idp = a[0].username;
3398
- _this.app_s.user_lang = "IT";
3399
- _this.app_s.user_isadmin = a[0].isadmin;
3400
- _this.app_s.user_roles = a[0].roles;
3401
- _this.app_s.token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJlZm9ybmkiLCJpc3MiOiJ3d3cuZmx1eGh1Yi5jb20iLCJyb2xlIjoib2tfbG9nZ2VkIiwiaWF0IjoxNTA3OTA3MzQ2fQ.xqXZsPTu8stomoIl8_2d9DhLkGU3gAi7MXwClYNkEzg";
3402
- localStorage.setItem(_this.app_s.COMPANY_KEY + "token", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJlZm9ybmkiLCJpc3MiOiJ3d3cuZmx1eGh1Yi5jb20iLCJyb2xlIjoib2tfbG9nZ2VkIiwiaWF0IjoxNTA3OTA3MzQ2fQ.xqXZsPTu8stomoIl8_2d9DhLkGU3gAi7MXwClYNkEzg");
3403
- // window.location.href = altripar;
3404
- ok_op = true;
3405
- }
3406
- else
3407
- localStorage.removeItem('token');
3408
- }
3409
- if (!ok_op) {
3410
- console.log(data.msg);
3411
- }
3412
- }, function (err) {
3413
- console.log("ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI");
3414
- });
3379
+ this.login(this.username, 'jacoèp');
3415
3380
  }
3416
3381
  };
3417
3382
  /**
@@ -3620,6 +3585,7 @@ var FHUploadPanelComponent = /** @class */ (function () {
3620
3585
  this.change = new EventEmitter();
3621
3586
  this.App = '';
3622
3587
  this.K = '';
3588
+ this.image_type = false;
3623
3589
  this.b_edit_loaded = false;
3624
3590
  this.b_False = false;
3625
3591
  this.b_mobile = false;
@@ -3760,13 +3726,29 @@ var FHUploadPanelComponent = /** @class */ (function () {
3760
3726
  iconf = arrf[arrf.length - 1].toLocaleLowerCase();
3761
3727
  _this.arr_g[i].icon = iconf + '.svg';
3762
3728
  _this.arr_g[i].can_delete = !_this.access_control || _this.arr_g[i].idp == _this._appservice.user;
3729
+ if (_this.arr_g[i].Filename.indexOf(".jpg") != -1 || _this.arr_g[i].Filename.indexOf(".gif") != -1 || _this.arr_g[i].Filename.indexOf(".png") != -1) {
3730
+ _this.arr_g[i].type = "IMG";
3731
+ _this.arr_g[i].image_original = [_this.arr_g[i].url];
3732
+ if (_this.arr_g[i].preview != null)
3733
+ if (_this.arr_g[i].preview == 1) {
3734
+ /** @type {?} */
3735
+ var pcs = _this.arr_g[i].url.split('.');
3736
+ /** @type {?} */
3737
+ var lastPc = pcs.pop();
3738
+ _this.arr_g[i].url = pcs.join('.') + '_preview.' + lastPc;
3739
+ }
3740
+ _this.image_type = true;
3741
+ _this.arr_g[i].image_thumbnail = [_this.arr_g[i].url];
3742
+ }
3743
+ else
3744
+ _this.arr_g[i].type = "O";
3763
3745
  }
3764
3746
  }
3765
3747
  });
3766
3748
  };
3767
3749
  FHUploadPanelComponent.decorators = [
3768
3750
  { type: Component, args: [{
3769
- 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\" [lista_allegati]=\"arr_g\" (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 ",
3751
+ 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\" [lista_allegati]=\"arr_g\" (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\n <th style=\"width:20%\" *ngIf=\"image_type\">Descrizione</th>\n <th style=\"width:10%\" *ngIf=\"image_type\">Utente</th>\n <th style=\"width:40%\" *ngIf=\"image_type\"></th>\n\n\n\n <th style=\"width:50%\" *ngIf=\"!image_type\">Descrizione</th>\n <th style=\"width:30%\" *ngIf=\"!image_type\">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 style=\"min-width:400px;min-height: 400px\" *ngIf=\"app.type=='IMG'\">\n <image_preview [u]=\"app\"></image_preview>\n\n </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 ",
3770
3752
  styles: ["\n\n \n\n "]
3771
3753
  }] }
3772
3754
  ];
@@ -6010,15 +5992,15 @@ var FHGridComponent = /** @class */ (function () {
6010
5992
  // console.log(this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6011
5993
  //if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
6012
5994
  /*
6013
-
6014
- this.gridOptions.api.forEachNode( (node) =>{
6015
- // select the node
6016
- // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6017
- if(node.rowIndex==parseInt(localStorage.getItem(this.grid_key+'_POS'))){
6018
- // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6019
- node.setSelected(true);
6020
-
6021
- }}*/
5995
+
5996
+ this.gridOptions.api.forEachNode( (node) =>{
5997
+ // select the node
5998
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
5999
+ if(node.rowIndex==parseInt(localStorage.getItem(this.grid_key+'_POS'))){
6000
+ // console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
6001
+ node.setSelected(true);
6002
+
6003
+ }}*/
6022
6004
  // if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
6023
6005
  //this.gridOptions.api.get(parseInt(localStorage.getItem(this.grid_key+'_POS'))).setSelected(true);
6024
6006
  // console.log(this.myData);
@@ -6704,11 +6686,11 @@ var FHGridComponent = /** @class */ (function () {
6704
6686
  }
6705
6687
  // this.createNewDatasource();
6706
6688
  /*
6707
- if(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']!=null)
6708
- {
6709
- //console.log('setto pag: '+this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
6710
- this.gridOptions.api.paginationGoToPage(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
6711
- } */
6689
+ if(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']!=null)
6690
+ {
6691
+ //console.log('setto pag: '+this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
6692
+ this.gridOptions.api.paginationGoToPage(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
6693
+ } */
6712
6694
  };
6713
6695
  /**
6714
6696
  * @param {?=} forza
@@ -6969,6 +6951,8 @@ var FHGridComponent = /** @class */ (function () {
6969
6951
  this.doFill('', true, false);
6970
6952
  return;
6971
6953
  }
6954
+ else
6955
+ this.show_pulisci_filtri = true;
6972
6956
  /** @type {?} */
6973
6957
  var arr = this.ric_libera.split(' ');
6974
6958
  /** @type {?} */
@@ -7316,7 +7300,7 @@ var FHGridComponent = /** @class */ (function () {
7316
7300
  { type: Component, args: [{
7317
7301
  selector: 'FHGrid',
7318
7302
  template: "\r\n<div fxLayout=\"column\" fxFlexFill>\r\n\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"3px\" style=\"min-height: 55px\" [hidden]=\"!show_buttons\">\r\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n <div>\r\n\t\t \t\t<h5>{{num_r}}&nbsp;{{label_elementi}}</h5>\r\n </div>\r\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\r\n\t\t\t<div>\t<input matInput [placeholder]=\"trova_label\" (keydown)=\"keyDownFunctioncl($event)\" [(ngModel)]=\"ric_libera\"\r\n\t\t\t\t\t\t\t style=\"min-width:100px;max-width:180px;border:1px solid;min-height:30px\"></div>\r\n <div matTooltip=\"REMOVE FILTER\" matTooltipPosition=\"above\" *ngIf=\"show_pulisci_filtri\" >\r\n \t\t\t<button mat-raised-button (click)=\"pulisci_filtri()\" color=\"warn\">\r\n\t\t\t\t<mat-icon>filter_none</mat-icon>&nbsp;\r\n\t\t\t</button>\r\n </div>\r\n <div fxHide fxShow.gt-sm matTooltip=\"AUTO SIZE\" matTooltipPosition=\"above\">\r\n \t\t\t<button mat-raised-button (click)=\"autoSizeAll()\" color=\"primary\"\r\n *ngIf=\"show_buttons\">\r\n\t\t\t\t<mat-icon>compare_arrows</mat-icon>\r\n\t\t\t</button>\r\n </div>\r\n <div fxHide fxShow.gt-sm matTooltip=\"FIT SIZE\" matTooltipPosition=\"above\">\r\n\t \t\t<button mat-raised-button (click)=\"fitSizeAll()\" color=\"primary\"\r\n *ngIf=\"show_buttons\">\r\n\t\t\t\t<mat-icon>keyboard_tab</mat-icon>\r\n\t\t\t</button>\r\n </div>\r\n\r\n <FHComboBox fxHide fxShow.gt-sm [hidden]='!show_buttons' (selchange)=\"ch_config()\" (fillend)=\"fe_cfg()\" #gf init_fill=\"false\"></FHComboBox>\r\n\t\t\t\t<div matTooltip=\"Modifica Preferenza\" matTooltipPosition=\"above\" *ngIf=\"curr_config!='-1'\">\r\n\t\t\t\t\t<button mat-icon-button *ngIf=\"show_buttons\"\r\n\t\t\t\t\t\t\t\t\tstyle=\"color:rgb(248, 105, 10)\">\r\n\t\t\t\t\t\t<mat-icon (click)=\"edit_config()\">save</mat-icon>\r\n </button>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div fxHide fxShow.gt-sm matTooltip=\"Crea Nuova Preferenza\" matTooltipPosition=\"above\">\r\n\t\t\t\t\t<button mat-icon-button style=\"color:rgb(16, 98, 16)\" *ngIf=\"show_buttons\">\r\n\t\t\t\t\t\t<mat-icon (click)=\"insert_config()\">library_add</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\r\n <mat-slide-toggle fxHide fxShow.gt-sm [hidden]='!show_buttons' (click)=\"ck_flag()\" #toggle_mantieni>\r\n\t\t\t\t\t{{mantieni_impostazioni}}\r\n\t\t\t\t</mat-slide-toggle>\r\n\r\n\r\n \t&nbsp;\t<div fxHide fxShow.gt-sm matTooltip=\"HELP\" matTooltipPosition=\"above\">\r\n <button mat-raised-button (click)=\"help_window()\" color=\"primary\" *ngIf=\"show_buttons && show_help\" >\r\n\t\t\t<mat-icon>help</mat-icon>\r\n </button></div>\r\n\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\" fxFlex>\r\n <FHGridToolBar (command)=\"docmd($event)\" [type]=\"toolbar_type\"\r\n\r\n [custom_commands]=\"toolbar_custom_commands\"\r\n [toolbar_wkfapp]=\"toolbar_wkfapp\"\r\n\r\n ></FHGridToolBar>\r\n\t\t</div>\r\n\r\n\r\n</div>\r\n\r\n <div fxLayout=\"row\" style=\"width:100%\" fxFlex=\"95\">\r\n<ag-grid-angular\r\n ref-agGrid\r\n style=\"width: 100%; height: 100%;\"\r\n id=\"myGrid\"\r\n\t\t\t\t\t\t\t\t (cellDoubleClicked)=\"onColumnEvent($event)\"\r\n (cellClicked)=\"onCellClicked($event)\"\r\n\t\t\t\t\t\t\t\t [headerHeight]=\"header_h\"\r\n [groupHeaderHeight]=\"header_h\"\r\n\r\n\t\t\t\t\t\t\t\t class=\"ag-theme-balham\"\r\n [singleClickEdit]=\"true\"\r\n [gridOptions]=\"gridOptions\"\r\n [columnDefs]=\"columnDefs\"\r\n\t\t\t\t\t\t\t\t [rowData]=\"rowData\"\r\n\t\t\t\t\t\t\t\t (afterFilterChanged)=\"onAfterFilterChanged()\"\r\n (filterModified)=\"onFilterModified()\"\r\n\t\t\t\t\t\t\t\t (rowDoubleClicked)=\"onRowDClicked($event)\"\r\n\t\t\t\t\t\t\t\t (rowClicked)=\"onRowClicked($event)\"\r\n (columnVisible)=\"oncolumnEverythingChanged($event)\"\r\n\t\t\t\t\t\t\t\t (columnResized)=\"oncolumnEverythingChanged($event)\"\r\n\t\t\t\t\t\t\t\t (columnMoved)=\"oncolumnEverythingChanged($event)\"\r\n (cellValueChanged)=\"okr($event)\"\r\n\t\t\t\t\t\t\t\t (sortChanged)=\"onAfterSortChanged()\"\r\n [paginationPageSize]=\"num_per_pag\"\r\n (gridReady)=\"onReady($event)\">\r\n</ag-grid-angular>\r\n</div>\r\n</div>\r\n",
7319
- styles: ["\n \n\t"]
7303
+ styles: ["\n\n "]
7320
7304
  }] }
7321
7305
  ];
7322
7306
  /** @nocollapse */