@fluxhub/fluxhub-lib 1.0.389 → 1.0.391
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 +135 -95
- 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/esm2015/lib/controls/fhautocomplete.js +4 -4
- package/esm2015/lib/controls/fhgrid.js +127 -95
- package/esm5/lib/controls/fhautocomplete.js +2 -2
- package/esm5/lib/controls/fhgrid.js +135 -95
- package/fesm2015/fluxhub-fluxhub-lib.js +129 -97
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +135 -95
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhgrid.d.ts +1 -0
- package/package.json +1 -1
|
@@ -6429,8 +6429,6 @@ class FHGridComponent {
|
|
|
6429
6429
|
p.filter = p.filter + ' and ';
|
|
6430
6430
|
p.filter = p.filter + ' (' + this.fix_flt_temp + ' )';
|
|
6431
6431
|
}
|
|
6432
|
-
/** @type {?} */
|
|
6433
|
-
let b_filter = false;
|
|
6434
6432
|
// console.log('Filter model');
|
|
6435
6433
|
//console.log(params.filterModel);
|
|
6436
6434
|
if (params.filterModel != null) {
|
|
@@ -6439,104 +6437,31 @@ class FHGridComponent {
|
|
|
6439
6437
|
// console.log(key);
|
|
6440
6438
|
// if (p.hasOwnProperty(key)) {
|
|
6441
6439
|
// console.log( params.filterModel[key]);
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
p.filter = p.filter + ' ' + key + ' > ' + params.filterModel[key].filter;
|
|
6451
|
-
if (params.filterModel[key].type == "equals")
|
|
6452
|
-
p.filter = p.filter + ' ' + key + ' = ' + params.filterModel[key].filter;
|
|
6453
|
-
if (params.filterModel[key].type == "notEqual")
|
|
6454
|
-
p.filter = p.filter + ' ' + key + ' <> ' + params.filterModel[key].filter;
|
|
6455
|
-
if (params.filterModel[key].type == "lessThan")
|
|
6456
|
-
p.filter = p.filter + ' ' + key + ' < ' + params.filterModel[key].filter;
|
|
6457
|
-
if (params.filterModel[key].type == "lessThanOrEqual")
|
|
6458
|
-
p.filter = p.filter + ' ' + key + ' <= ' + params.filterModel[key].filter;
|
|
6459
|
-
if (params.filterModel[key].type == "greaterThanOrEqual")
|
|
6460
|
-
p.filter = p.filter + ' ' + key + ' >= ' + params.filterModel[key].filter;
|
|
6461
|
-
if (params.filterModel[key].type == "inRange")
|
|
6462
|
-
p.filter = p.filter + ' (' + key + ' >= ' + params.filterModel[key].filter + ' and ' + key + ' <= ' + params.filterModel[key].filterTo + ')';
|
|
6463
|
-
}
|
|
6464
|
-
else {
|
|
6465
|
-
if (params.filterModel[key].type == "contains")
|
|
6466
|
-
p.filter = p.filter + ' upper(' + key + ') like \'%' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6467
|
-
if (params.filterModel[key].type == "startsWith")
|
|
6468
|
-
p.filter = p.filter + ' upper(' + key + ') like \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6469
|
-
if (params.filterModel[key].type == "equals")
|
|
6470
|
-
p.filter = p.filter + ' upper(' + key + ') = \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6471
|
-
if (params.filterModel[key].type == "notContains")
|
|
6472
|
-
p.filter = p.filter + 'not upper(' + key + ') like \'%' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6473
|
-
if (params.filterModel[key].type == "notEqual")
|
|
6474
|
-
p.filter = p.filter + ' upper(' + key + ') <> \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
6475
|
-
if (params.filterModel[key].type == "endsWith")
|
|
6476
|
-
p.filter = p.filter + ' upper(' + key + ') like \'%' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
6477
|
-
// if(params.filterModel[key].type=="startsWith") p.filter = p.filter +' upper('+ key + ') like \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6478
|
-
}
|
|
6479
|
-
}
|
|
6480
|
-
if (params.filterModel[key].dateTo != null || params.filterModel[key].dateFrom != null) {
|
|
6481
|
-
b_filter = true;
|
|
6482
|
-
if (p.filter != "")
|
|
6483
|
-
p.filter = p.filter + ' and ';
|
|
6484
|
-
p.filter = p.filter + ' (';
|
|
6485
|
-
if (params.filterModel[key].dateFrom != null && params.filterModel[key].dateTo != null)
|
|
6486
|
-
p.filter = p.filter + key + ">='" + this.uti_s.sql_date(this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + "'";
|
|
6487
|
-
if (params.filterModel[key].dateTo != null) {
|
|
6488
|
-
if (params.filterModel[key].dateFrom != null)
|
|
6489
|
-
p.filter = p.filter + ' and ';
|
|
6490
|
-
p.filter = p.filter + key + "<='" + this.uti_s.sql_date(this.uti_s.string2date(params.filterModel[key].dateTo, 1)) + "'";
|
|
6491
|
-
}
|
|
6492
|
-
else if (params.filterModel[key].dateFrom != null) {
|
|
6493
|
-
if (params.filterModel[key].type == "greaterThan")
|
|
6494
|
-
p.filter = p.filter + ' ' + key + ' >= \'' + this.uti_s.sql_date(this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6495
|
-
if (params.filterModel[key].type == "equals")
|
|
6496
|
-
p.filter = p.filter + ' (' + key + ' >=\'' + this.uti_s.sql_date(this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\' and ' + key + ' <=\'' + this.uti_s.sql_date(this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + ' 23:59:00\')';
|
|
6497
|
-
if (params.filterModel[key].type == "notEqual")
|
|
6498
|
-
p.filter = p.filter + ' ' + key + ' <> \'' + this.uti_s.sql_date(this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6499
|
-
if (params.filterModel[key].type == "lessThan")
|
|
6500
|
-
p.filter = p.filter + ' ' + key + ' <= \'' + this.uti_s.sql_date(this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6501
|
-
if (params.filterModel[key].type == "lessThanOrEqual")
|
|
6502
|
-
p.filter = p.filter + ' ' + key + ' <= \'' + this.uti_s.sql_date(this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6503
|
-
if (params.filterModel[key].type == "greaterThanOrEqual")
|
|
6504
|
-
p.filter = p.filter + ' ' + key + ' >= \'' + this.uti_s.sql_date(this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6505
|
-
}
|
|
6506
|
-
p.filter = p.filter + ' )';
|
|
6507
|
-
}
|
|
6440
|
+
/** @type {?} */
|
|
6441
|
+
let obj_filtro_test = params.filterModel[key];
|
|
6442
|
+
console.log('obj_filtro_test ', obj_filtro_test);
|
|
6443
|
+
if (obj_filtro_test.operator == null) {
|
|
6444
|
+
if (p.filter == '')
|
|
6445
|
+
p.filter += this.calcola_filtro(params.filterModel[key], '', key, false);
|
|
6446
|
+
else
|
|
6447
|
+
p.filter += this.calcola_filtro(params.filterModel[key], '', key, true);
|
|
6508
6448
|
}
|
|
6509
6449
|
else {
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
}
|
|
6521
|
-
if (sq != '') {
|
|
6522
|
-
b_filter = true;
|
|
6523
|
-
if (p.filter != "")
|
|
6524
|
-
p.filter = p.filter + ' and ';
|
|
6525
|
-
p.filter = p.filter + key + ' in (' + sq + ')';
|
|
6526
|
-
}
|
|
6527
|
-
else {
|
|
6528
|
-
b_filter = true;
|
|
6529
|
-
if (p.filter != "")
|
|
6530
|
-
p.filter = p.filter + ' and 1=0';
|
|
6531
|
-
}
|
|
6450
|
+
if (p.filter != '')
|
|
6451
|
+
p.filter += " and ";
|
|
6452
|
+
p.filter += " (";
|
|
6453
|
+
p.filter += this.calcola_filtro(params.filterModel[key].condition1, '', key, false);
|
|
6454
|
+
console.log('After chiamata1: ', p.filter);
|
|
6455
|
+
p.filter += ' ' + obj_filtro_test.operator + ' ';
|
|
6456
|
+
p.filter += this.calcola_filtro(params.filterModel[key].condition2, '', key, false);
|
|
6457
|
+
console.log('After chiamata2: ', p.filter);
|
|
6458
|
+
p.filter += ")";
|
|
6459
|
+
console.log('After chiamata2: ', p.filter);
|
|
6532
6460
|
}
|
|
6533
6461
|
// }
|
|
6534
6462
|
}
|
|
6535
6463
|
}
|
|
6536
|
-
|
|
6537
|
-
if (this.ric_libera != null)
|
|
6538
|
-
if (this.ric_libera != '')
|
|
6539
|
-
this.show_pulisci_filtri = true;
|
|
6464
|
+
console.log('p.filter ', p.filter);
|
|
6540
6465
|
//p.num_per_pag=5000;
|
|
6541
6466
|
// console.log(this._gridservice);
|
|
6542
6467
|
this.str_curr_q_p = "";
|
|
@@ -6970,6 +6895,113 @@ class FHGridComponent {
|
|
|
6970
6895
|
}
|
|
6971
6896
|
}));
|
|
6972
6897
|
}
|
|
6898
|
+
/**
|
|
6899
|
+
* @param {?} obj_filtro
|
|
6900
|
+
* @param {?} filter_v
|
|
6901
|
+
* @param {?} key
|
|
6902
|
+
* @param {?=} add_end
|
|
6903
|
+
* @return {?}
|
|
6904
|
+
*/
|
|
6905
|
+
calcola_filtro(obj_filtro, filter_v, key, add_end = true) {
|
|
6906
|
+
console.log('calcola_filtro ', obj_filtro, filter_v, key);
|
|
6907
|
+
/** @type {?} */
|
|
6908
|
+
let b_filter = false;
|
|
6909
|
+
if (obj_filtro.type != null) {
|
|
6910
|
+
if (obj_filtro.filter != null) {
|
|
6911
|
+
this.show_pulisci_filtri = true;
|
|
6912
|
+
if (add_end)
|
|
6913
|
+
filter_v = filter_v + ' and ';
|
|
6914
|
+
b_filter = true;
|
|
6915
|
+
if (obj_filtro.filterType == 'number') {
|
|
6916
|
+
if (obj_filtro.type == "greaterThan")
|
|
6917
|
+
filter_v = filter_v + ' ' + key + ' > ' + obj_filtro.filter;
|
|
6918
|
+
if (obj_filtro.type == "equals")
|
|
6919
|
+
filter_v = filter_v + ' ' + key + ' = ' + obj_filtro.filter;
|
|
6920
|
+
if (obj_filtro.type == "notEqual")
|
|
6921
|
+
filter_v = filter_v + ' ' + key + ' <> ' + obj_filtro.filter;
|
|
6922
|
+
if (obj_filtro.type == "lessThan")
|
|
6923
|
+
filter_v = filter_v + ' ' + key + ' < ' + obj_filtro.filter;
|
|
6924
|
+
if (obj_filtro.type == "lessThanOrEqual")
|
|
6925
|
+
filter_v = filter_v + ' ' + key + ' <= ' + obj_filtro.filter;
|
|
6926
|
+
if (obj_filtro.type == "greaterThanOrEqual")
|
|
6927
|
+
filter_v = filter_v + ' ' + key + ' >= ' + obj_filtro.filter;
|
|
6928
|
+
if (obj_filtro.type == "inRange")
|
|
6929
|
+
filter_v = filter_v + ' (' + key + ' >= ' + obj_filtro.filter + ' and ' + key + ' <= ' + obj_filtro.filterTo + ')';
|
|
6930
|
+
}
|
|
6931
|
+
else {
|
|
6932
|
+
if (obj_filtro.type == "contains")
|
|
6933
|
+
filter_v = filter_v + ' upper(' + key + ') like \'%' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6934
|
+
if (obj_filtro.type == "startsWith")
|
|
6935
|
+
filter_v = filter_v + ' upper(' + key + ') like \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6936
|
+
if (obj_filtro.type == "equals")
|
|
6937
|
+
filter_v = filter_v + ' upper(' + key + ') = \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6938
|
+
if (obj_filtro.type == "notContains")
|
|
6939
|
+
filter_v = filter_v + 'not upper(' + key + ') like \'%' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6940
|
+
if (obj_filtro.type == "notEqual")
|
|
6941
|
+
filter_v = filter_v + ' upper(' + key + ') <> \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
6942
|
+
if (obj_filtro.type == "endsWith")
|
|
6943
|
+
filter_v = filter_v + ' upper(' + key + ') like \'%' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
6944
|
+
// if(obj_filtro.type=="startsWith") filter_v = filter_v +' upper('+ key + ') like \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6945
|
+
}
|
|
6946
|
+
}
|
|
6947
|
+
if (obj_filtro.dateTo != null || obj_filtro.dateFrom != null) {
|
|
6948
|
+
b_filter = true;
|
|
6949
|
+
if (filter_v != "")
|
|
6950
|
+
filter_v = filter_v + ' and ';
|
|
6951
|
+
filter_v = filter_v + ' (';
|
|
6952
|
+
if (obj_filtro.dateFrom != null && obj_filtro.dateTo != null)
|
|
6953
|
+
filter_v = filter_v + key + ">='" + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + "'";
|
|
6954
|
+
if (obj_filtro.dateTo != null) {
|
|
6955
|
+
if (obj_filtro.dateFrom != null)
|
|
6956
|
+
filter_v = filter_v + ' and ';
|
|
6957
|
+
filter_v = filter_v + key + "<='" + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateTo, 1)) + "'";
|
|
6958
|
+
}
|
|
6959
|
+
else if (obj_filtro.dateFrom != null) {
|
|
6960
|
+
if (obj_filtro.type == "greaterThan")
|
|
6961
|
+
filter_v = filter_v + ' ' + key + ' >= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
6962
|
+
if (obj_filtro.type == "equals")
|
|
6963
|
+
filter_v = filter_v + ' (' + key + ' >=\'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\' and ' + key + ' <=\'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + ' 23:59:00\')';
|
|
6964
|
+
if (obj_filtro.type == "notEqual")
|
|
6965
|
+
filter_v = filter_v + ' ' + key + ' <> \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
6966
|
+
if (obj_filtro.type == "lessThan")
|
|
6967
|
+
filter_v = filter_v + ' ' + key + ' <= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
6968
|
+
if (obj_filtro.type == "lessThanOrEqual")
|
|
6969
|
+
filter_v = filter_v + ' ' + key + ' <= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
6970
|
+
if (obj_filtro.type == "greaterThanOrEqual")
|
|
6971
|
+
filter_v = filter_v + ' ' + key + ' >= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
6972
|
+
}
|
|
6973
|
+
filter_v = filter_v + ' )';
|
|
6974
|
+
}
|
|
6975
|
+
}
|
|
6976
|
+
else {
|
|
6977
|
+
// if(obj_filtro.length>0)filter_v= filter_v+' and ';
|
|
6978
|
+
/** @type {?} */
|
|
6979
|
+
let sq = "";
|
|
6980
|
+
if (obj_filtro.values != null)
|
|
6981
|
+
for (let i = 0; i < obj_filtro.values.length; i++)
|
|
6982
|
+
if (obj_filtro.values[i] != null) {
|
|
6983
|
+
if (sq != "")
|
|
6984
|
+
sq = sq + ',';
|
|
6985
|
+
sq = sq + '\'' + obj_filtro.values[i].replace('\'', '\'\'') + '\'';
|
|
6986
|
+
}
|
|
6987
|
+
if (sq != '') {
|
|
6988
|
+
b_filter = true;
|
|
6989
|
+
if (filter_v != "" && add_end)
|
|
6990
|
+
filter_v = filter_v + ' and ';
|
|
6991
|
+
filter_v = filter_v + key + ' in (' + sq + ')';
|
|
6992
|
+
}
|
|
6993
|
+
else {
|
|
6994
|
+
b_filter = true;
|
|
6995
|
+
if (filter_v != "")
|
|
6996
|
+
filter_v = filter_v + ' and 1=0';
|
|
6997
|
+
}
|
|
6998
|
+
}
|
|
6999
|
+
this.show_pulisci_filtri = b_filter;
|
|
7000
|
+
if (this.ric_libera != null)
|
|
7001
|
+
if (this.ric_libera != '')
|
|
7002
|
+
this.show_pulisci_filtri = true;
|
|
7003
|
+
return filter_v;
|
|
7004
|
+
}
|
|
6973
7005
|
/**
|
|
6974
7006
|
* @private
|
|
6975
7007
|
* @return {?}
|
|
@@ -8339,14 +8371,14 @@ FHAutoCompleteComponent.decorators = [
|
|
|
8339
8371
|
{ type: Component, args: [{
|
|
8340
8372
|
selector: 'FHAutoComplete',
|
|
8341
8373
|
template: `
|
|
8342
|
-
<mat-form-field
|
|
8374
|
+
<mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
|
|
8343
8375
|
<input matInput
|
|
8344
|
-
|
|
8376
|
+
[disabled]="!enabled || hidden" [matAutocomplete]="auto" [required]="required"
|
|
8345
8377
|
(keyup)="onChange($event)" [(ngModel)]="sItem" (focus)="fi_search()" (focusout)="fo_search($event)"
|
|
8346
8378
|
#searchp>
|
|
8347
8379
|
</mat-form-field>
|
|
8348
8380
|
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selectedSearchItem($event)" autoActiveFirstOption >
|
|
8349
|
-
<mat-option *ngFor="let objx of searchItemsFiltered"
|
|
8381
|
+
<mat-option *ngFor="let objx of searchItemsFiltered" [value]="objx.descrizione_valore">
|
|
8350
8382
|
{{ objx.descrizione_valore }}
|
|
8351
8383
|
</mat-option>
|
|
8352
8384
|
</mat-autocomplete>
|