@fluxhub/fluxhub-lib 1.0.242 → 1.0.244
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 +35 -99
- 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/docs/components/FHGridComponent.html +297 -297
- package/docs/components/FHUploadPanelComponent.html +51 -3
- package/docs/coverage.html +2 -2
- package/docs/injectables/AuthenticationService.html +0 -36
- package/docs/js/search/search_index.js +2 -2
- package/esm2015/lib/controls/fhgrid.js +19 -17
- package/esm2015/lib/controls/fhuploadpanel.js +33 -3
- package/esm2015/lib/services/login.service.js +1 -85
- package/esm5/lib/controls/fhgrid.js +18 -16
- package/esm5/lib/controls/fhuploadpanel.js +21 -2
- package/esm5/lib/services/login.service.js +1 -89
- package/fesm2015/fluxhub-fluxhub-lib.js +49 -98
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +36 -100
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhuploadpanel.d.ts +1 -0
- package/lib/services/login.service.d.ts +0 -1
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ import { DragulaService, DragulaModule } from 'ng2-dragula';
|
|
|
33
33
|
import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_LOCALE, MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatPaginatorModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSortModule, MatSlideToggleModule, MatSnackBarModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatFormFieldModule, MatExpansionModule, MatStepperModule, MatDialogModule, MatNativeDateModule } from '@angular/material';
|
|
34
34
|
import { enabled, request, exit } from 'screenfull';
|
|
35
35
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
36
|
-
import { Injectable, Component, Directive, Input, ElementRef, Inject, PLATFORM_ID, Output, EventEmitter,
|
|
36
|
+
import { Injectable, Component, Directive, Input, ElementRef, Inject, PLATFORM_ID, ViewChild, Output, EventEmitter, forwardRef, Optional, HostListener, Pipe, ViewContainerRef, defineInjectable, inject, NgModule } from '@angular/core';
|
|
37
37
|
import { Http } from '@angular/http';
|
|
38
38
|
import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
|
|
39
39
|
import { ToastrService } from 'ngx-toastr';
|
|
@@ -2998,81 +2998,6 @@ class AuthenticationService {
|
|
|
2998
2998
|
throw err;
|
|
2999
2999
|
}));
|
|
3000
3000
|
}
|
|
3001
|
-
/**
|
|
3002
|
-
* @return {?}
|
|
3003
|
-
*/
|
|
3004
|
-
login_sa() {
|
|
3005
|
-
if (this.checkCredentials())
|
|
3006
|
-
return;
|
|
3007
|
-
/** @type {?} */
|
|
3008
|
-
let vars = window
|
|
3009
|
-
.location
|
|
3010
|
-
.href
|
|
3011
|
-
.split(/[\&?]+/);
|
|
3012
|
-
/** @type {?} */
|
|
3013
|
-
let altripar = "";
|
|
3014
|
-
/** @type {?} */
|
|
3015
|
-
let b_found = false;
|
|
3016
|
-
for (var i = 0; i < vars.length; i++) {
|
|
3017
|
-
if (vars[i].substring(0, 2) == "u=") {
|
|
3018
|
-
/** @type {?} */
|
|
3019
|
-
let p = vars[i].split("=")[1];
|
|
3020
|
-
//console.log(p);
|
|
3021
|
-
this.username = this.uti_s.decrypt(decodeURI(p));
|
|
3022
|
-
//console.log(this.username);
|
|
3023
|
-
b_found = true;
|
|
3024
|
-
}
|
|
3025
|
-
else {
|
|
3026
|
-
altripar = altripar + vars[i];
|
|
3027
|
-
}
|
|
3028
|
-
}
|
|
3029
|
-
if (!b_found) {
|
|
3030
|
-
/** @type {?} */
|
|
3031
|
-
let r_url = encodeURI(window.location.href).replace('#', '%23');
|
|
3032
|
-
if (r_url.indexOf('?') == -1)
|
|
3033
|
-
r_url = r_url + '?';
|
|
3034
|
-
this.url = 'http://csaportale.ceramicasantagostino.it/homepage_new.nsf/OK?OpenForm&redirect=' + r_url;
|
|
3035
|
-
// console.log(post_v);
|
|
3036
|
-
window.location.href = (this.url);
|
|
3037
|
-
}
|
|
3038
|
-
else {
|
|
3039
|
-
// this.username="NA";
|
|
3040
|
-
this
|
|
3041
|
-
.get_user_info(this.username)
|
|
3042
|
-
.subscribe(data => {
|
|
3043
|
-
/** @type {?} */
|
|
3044
|
-
let ok_op = false;
|
|
3045
|
-
if (data != null)
|
|
3046
|
-
if (data.result_msg == "OK") {
|
|
3047
|
-
/** @type {?} */
|
|
3048
|
-
let a = data.result_data;
|
|
3049
|
-
this.username = "NA";
|
|
3050
|
-
if (a.length > 0) {
|
|
3051
|
-
this.username = a[0].username;
|
|
3052
|
-
this.app_s.user_name = a[0].name;
|
|
3053
|
-
this.app_s.user_surname = a[0].surname;
|
|
3054
|
-
this.app_s.user = a[0].username;
|
|
3055
|
-
this.app_s.user_email = a[0].email;
|
|
3056
|
-
this.app_s.user_idp = a[0].username;
|
|
3057
|
-
this.app_s.user_lang = "IT";
|
|
3058
|
-
this.app_s.user_isadmin = a[0].isadmin;
|
|
3059
|
-
this.app_s.user_roles = a[0].roles;
|
|
3060
|
-
this.app_s.token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJlZm9ybmkiLCJpc3MiOiJ3d3cuZmx1eGh1Yi5jb20iLCJyb2xlIjoib2tfbG9nZ2VkIiwiaWF0IjoxNTA3OTA3MzQ2fQ.xqXZsPTu8stomoIl8_2d9DhLkGU3gAi7MXwClYNkEzg";
|
|
3061
|
-
localStorage.setItem(this.app_s.COMPANY_KEY + "token", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJlZm9ybmkiLCJpc3MiOiJ3d3cuZmx1eGh1Yi5jb20iLCJyb2xlIjoib2tfbG9nZ2VkIiwiaWF0IjoxNTA3OTA3MzQ2fQ.xqXZsPTu8stomoIl8_2d9DhLkGU3gAi7MXwClYNkEzg");
|
|
3062
|
-
// window.location.href = altripar;
|
|
3063
|
-
ok_op = true;
|
|
3064
|
-
}
|
|
3065
|
-
else
|
|
3066
|
-
localStorage.removeItem('token');
|
|
3067
|
-
}
|
|
3068
|
-
if (!ok_op) {
|
|
3069
|
-
console.log(data.msg);
|
|
3070
|
-
}
|
|
3071
|
-
}, err => {
|
|
3072
|
-
console.log("ERRORE DI CONNESSIONE CON IL SERVER.RITENTARE PIU' TARDI");
|
|
3073
|
-
});
|
|
3074
|
-
}
|
|
3075
|
-
}
|
|
3076
3001
|
/**
|
|
3077
3002
|
* @param {?} email
|
|
3078
3003
|
* @param {?=} displayError
|
|
@@ -3192,10 +3117,6 @@ class AuthenticationService {
|
|
|
3192
3117
|
if ('/login' != this.router.url && this.router.url.indexOf('/rp/') == -1)
|
|
3193
3118
|
this.goto_after = window.location.toString();
|
|
3194
3119
|
if (localStorage.getItem(this.app_s.COMPANY_KEY + "token") === null) {
|
|
3195
|
-
if (this.app_s.LOGIN_EXT == 1) {
|
|
3196
|
-
this.login_sa();
|
|
3197
|
-
return false;
|
|
3198
|
-
}
|
|
3199
3120
|
if (this.router.url.indexOf('/rp/') == -1)
|
|
3200
3121
|
this.router.navigate(['login']);
|
|
3201
3122
|
return false;
|
|
@@ -3257,6 +3178,7 @@ class FHUploadPanelComponent {
|
|
|
3257
3178
|
this.change = new EventEmitter();
|
|
3258
3179
|
this.App = '';
|
|
3259
3180
|
this.K = '';
|
|
3181
|
+
this.image_type = false;
|
|
3260
3182
|
this.b_edit_loaded = false;
|
|
3261
3183
|
this.b_False = false;
|
|
3262
3184
|
this.b_mobile = false;
|
|
@@ -3372,6 +3294,22 @@ class FHUploadPanelComponent {
|
|
|
3372
3294
|
iconf = arrf[arrf.length - 1].toLocaleLowerCase();
|
|
3373
3295
|
this.arr_g[i].icon = iconf + '.svg';
|
|
3374
3296
|
this.arr_g[i].can_delete = !this.access_control || this.arr_g[i].idp == this._appservice.user;
|
|
3297
|
+
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) {
|
|
3298
|
+
this.arr_g[i].type = "IMG";
|
|
3299
|
+
this.arr_g[i].image_original = [this.arr_g[i].url];
|
|
3300
|
+
if (this.arr_g[i].preview != null)
|
|
3301
|
+
if (this.arr_g[i].preview == 1) {
|
|
3302
|
+
/** @type {?} */
|
|
3303
|
+
let pcs = this.arr_g[i].url.split('.');
|
|
3304
|
+
/** @type {?} */
|
|
3305
|
+
let lastPc = pcs.pop();
|
|
3306
|
+
this.arr_g[i].url = pcs.join('.') + '_preview.' + lastPc;
|
|
3307
|
+
}
|
|
3308
|
+
this.image_type = true;
|
|
3309
|
+
this.arr_g[i].image_thumbnail = [this.arr_g[i].url];
|
|
3310
|
+
}
|
|
3311
|
+
else
|
|
3312
|
+
this.arr_g[i].type = "O";
|
|
3375
3313
|
}
|
|
3376
3314
|
}
|
|
3377
3315
|
});
|
|
@@ -3395,8 +3333,15 @@ FHUploadPanelComponent.decorators = [
|
|
|
3395
3333
|
<th style="width:40px"></th>
|
|
3396
3334
|
<th style="width:50%">Nome</th>
|
|
3397
3335
|
<th style="width:60px;text-align:center">Dim.</th>
|
|
3398
|
-
|
|
3399
|
-
<th style="width:
|
|
3336
|
+
|
|
3337
|
+
<th style="width:20%" *ngIf="image_type">Descrizione</th>
|
|
3338
|
+
<th style="width:10%" *ngIf="image_type">Utente</th>
|
|
3339
|
+
<th style="width:40%" *ngIf="image_type"></th>
|
|
3340
|
+
|
|
3341
|
+
|
|
3342
|
+
|
|
3343
|
+
<th style="width:50%" *ngIf="!image_type">Descrizione</th>
|
|
3344
|
+
<th style="width:30%" *ngIf="!image_type">Utente</th>
|
|
3400
3345
|
<th style="width:240px;text-align:center">Data</th>
|
|
3401
3346
|
<th style="width:40px" class="actions"></th>
|
|
3402
3347
|
<th *ngIf="enabled" style="width:40px" class="actions"></th>
|
|
@@ -3414,6 +3359,10 @@ FHUploadPanelComponent.decorators = [
|
|
|
3414
3359
|
<td *ngIf="!b_mobile">{{app.Filename}}</td>
|
|
3415
3360
|
<td *ngIf="!b_mobile" style="text-align:center">{{app.Filesize}}</td>
|
|
3416
3361
|
<td *ngIf="!b_mobile">{{app.descrizione}}</td>
|
|
3362
|
+
<td style="min-width:400px;min-height: 400px" *ngIf="app.type=='IMG'">
|
|
3363
|
+
<image_preview [u]="app"></image_preview>
|
|
3364
|
+
|
|
3365
|
+
</td>
|
|
3417
3366
|
<td *ngIf="!b_mobile">{{app.nc}}</td>
|
|
3418
3367
|
<td *ngIf="!b_mobile" style="text-align:center">{{app.dt_ins | date: 'dd/MM/yyyy HH:mm:ss'}}</td>
|
|
3419
3368
|
<td *ngIf="!b_mobile" style="text-align:center">
|
|
@@ -5700,15 +5649,15 @@ class FHGridComponent {
|
|
|
5700
5649
|
// console.log(this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
|
|
5701
5650
|
//if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
|
|
5702
5651
|
/*
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5652
|
+
|
|
5653
|
+
this.gridOptions.api.forEachNode( (node) =>{
|
|
5654
|
+
// select the node
|
|
5655
|
+
// console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
|
|
5656
|
+
if(node.rowIndex==parseInt(localStorage.getItem(this.grid_key+'_POS'))){
|
|
5657
|
+
// console.log(node.id+' '+this.m_appService.getState().grid_obj[this.grid_key+'_NODE'].id);
|
|
5658
|
+
node.setSelected(true);
|
|
5659
|
+
|
|
5660
|
+
}}*/
|
|
5712
5661
|
// if(this.m_appService.getState().grid_obj[this.grid_key+'_NODE']!=null)
|
|
5713
5662
|
//this.gridOptions.api.get(parseInt(localStorage.getItem(this.grid_key+'_POS'))).setSelected(true);
|
|
5714
5663
|
// console.log(this.myData);
|
|
@@ -6293,11 +6242,11 @@ class FHGridComponent {
|
|
|
6293
6242
|
}
|
|
6294
6243
|
// this.createNewDatasource();
|
|
6295
6244
|
/*
|
|
6296
|
-
|
|
6297
|
-
{
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
} */
|
|
6245
|
+
if(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']!=null)
|
|
6246
|
+
{
|
|
6247
|
+
//console.log('setto pag: '+this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
|
|
6248
|
+
this.gridOptions.api.paginationGoToPage(this.m_appService.getState().grid_obj[this.grid_key+'_startPage']);
|
|
6249
|
+
} */
|
|
6301
6250
|
}
|
|
6302
6251
|
/**
|
|
6303
6252
|
* @param {?=} forza
|
|
@@ -6500,6 +6449,8 @@ class FHGridComponent {
|
|
|
6500
6449
|
this.doFill('', true, false);
|
|
6501
6450
|
return;
|
|
6502
6451
|
}
|
|
6452
|
+
else
|
|
6453
|
+
this.show_pulisci_filtri = true;
|
|
6503
6454
|
/** @type {?} */
|
|
6504
6455
|
let arr = this.ric_libera.split(' ');
|
|
6505
6456
|
/** @type {?} */
|
|
@@ -6758,8 +6709,8 @@ FHGridComponent.decorators = [
|
|
|
6758
6709
|
selector: 'FHGrid',
|
|
6759
6710
|
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 \r\n <div>\r\n\t\t \t\t<h5>{{num_r}} {{label_elementi}}</h5>\r\n </div>\r\n \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> \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 \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",
|
|
6760
6711
|
styles: [`
|
|
6761
|
-
|
|
6762
|
-
|
|
6712
|
+
|
|
6713
|
+
`]
|
|
6763
6714
|
}] }
|
|
6764
6715
|
];
|
|
6765
6716
|
/** @nocollapse */
|