@fluxhub/fluxhub-lib 1.0.390 → 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 +134 -94
- 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/fhgrid.js +127 -95
- package/esm5/lib/controls/fhgrid.js +135 -95
- package/fesm2015/fluxhub-fluxhub-lib.js +126 -94
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +134 -94
- 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
|
@@ -6682,8 +6682,6 @@
|
|
|
6682
6682
|
p.filter = p.filter + ' and ';
|
|
6683
6683
|
p.filter = p.filter + ' (' + _this.fix_flt_temp + ' )';
|
|
6684
6684
|
}
|
|
6685
|
-
/** @type {?} */
|
|
6686
|
-
var b_filter = false;
|
|
6687
6685
|
// console.log('Filter model');
|
|
6688
6686
|
//console.log(params.filterModel);
|
|
6689
6687
|
if (params.filterModel != null) {
|
|
@@ -6692,104 +6690,31 @@
|
|
|
6692
6690
|
// console.log(key);
|
|
6693
6691
|
// if (p.hasOwnProperty(key)) {
|
|
6694
6692
|
// console.log( params.filterModel[key]);
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
p.filter = p.filter + ' ' + key + ' > ' + params.filterModel[key].filter;
|
|
6704
|
-
if (params.filterModel[key].type == "equals")
|
|
6705
|
-
p.filter = p.filter + ' ' + key + ' = ' + params.filterModel[key].filter;
|
|
6706
|
-
if (params.filterModel[key].type == "notEqual")
|
|
6707
|
-
p.filter = p.filter + ' ' + key + ' <> ' + params.filterModel[key].filter;
|
|
6708
|
-
if (params.filterModel[key].type == "lessThan")
|
|
6709
|
-
p.filter = p.filter + ' ' + key + ' < ' + params.filterModel[key].filter;
|
|
6710
|
-
if (params.filterModel[key].type == "lessThanOrEqual")
|
|
6711
|
-
p.filter = p.filter + ' ' + key + ' <= ' + params.filterModel[key].filter;
|
|
6712
|
-
if (params.filterModel[key].type == "greaterThanOrEqual")
|
|
6713
|
-
p.filter = p.filter + ' ' + key + ' >= ' + params.filterModel[key].filter;
|
|
6714
|
-
if (params.filterModel[key].type == "inRange")
|
|
6715
|
-
p.filter = p.filter + ' (' + key + ' >= ' + params.filterModel[key].filter + ' and ' + key + ' <= ' + params.filterModel[key].filterTo + ')';
|
|
6716
|
-
}
|
|
6717
|
-
else {
|
|
6718
|
-
if (params.filterModel[key].type == "contains")
|
|
6719
|
-
p.filter = p.filter + ' upper(' + key + ') like \'%' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6720
|
-
if (params.filterModel[key].type == "startsWith")
|
|
6721
|
-
p.filter = p.filter + ' upper(' + key + ') like \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6722
|
-
if (params.filterModel[key].type == "equals")
|
|
6723
|
-
p.filter = p.filter + ' upper(' + key + ') = \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6724
|
-
if (params.filterModel[key].type == "notContains")
|
|
6725
|
-
p.filter = p.filter + 'not upper(' + key + ') like \'%' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6726
|
-
if (params.filterModel[key].type == "notEqual")
|
|
6727
|
-
p.filter = p.filter + ' upper(' + key + ') <> \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
6728
|
-
if (params.filterModel[key].type == "endsWith")
|
|
6729
|
-
p.filter = p.filter + ' upper(' + key + ') like \'%' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
6730
|
-
// if(params.filterModel[key].type=="startsWith") p.filter = p.filter +' upper('+ key + ') like \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6731
|
-
}
|
|
6732
|
-
}
|
|
6733
|
-
if (params.filterModel[key].dateTo != null || params.filterModel[key].dateFrom != null) {
|
|
6734
|
-
b_filter = true;
|
|
6735
|
-
if (p.filter != "")
|
|
6736
|
-
p.filter = p.filter + ' and ';
|
|
6737
|
-
p.filter = p.filter + ' (';
|
|
6738
|
-
if (params.filterModel[key].dateFrom != null && params.filterModel[key].dateTo != null)
|
|
6739
|
-
p.filter = p.filter + key + ">='" + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + "'";
|
|
6740
|
-
if (params.filterModel[key].dateTo != null) {
|
|
6741
|
-
if (params.filterModel[key].dateFrom != null)
|
|
6742
|
-
p.filter = p.filter + ' and ';
|
|
6743
|
-
p.filter = p.filter + key + "<='" + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateTo, 1)) + "'";
|
|
6744
|
-
}
|
|
6745
|
-
else if (params.filterModel[key].dateFrom != null) {
|
|
6746
|
-
if (params.filterModel[key].type == "greaterThan")
|
|
6747
|
-
p.filter = p.filter + ' ' + key + ' >= \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6748
|
-
if (params.filterModel[key].type == "equals")
|
|
6749
|
-
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\')';
|
|
6750
|
-
if (params.filterModel[key].type == "notEqual")
|
|
6751
|
-
p.filter = p.filter + ' ' + key + ' <> \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6752
|
-
if (params.filterModel[key].type == "lessThan")
|
|
6753
|
-
p.filter = p.filter + ' ' + key + ' <= \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6754
|
-
if (params.filterModel[key].type == "lessThanOrEqual")
|
|
6755
|
-
p.filter = p.filter + ' ' + key + ' <= \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6756
|
-
if (params.filterModel[key].type == "greaterThanOrEqual")
|
|
6757
|
-
p.filter = p.filter + ' ' + key + ' >= \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6758
|
-
}
|
|
6759
|
-
p.filter = p.filter + ' )';
|
|
6760
|
-
}
|
|
6693
|
+
/** @type {?} */
|
|
6694
|
+
var obj_filtro_test = params.filterModel[key];
|
|
6695
|
+
console.log('obj_filtro_test ', obj_filtro_test);
|
|
6696
|
+
if (obj_filtro_test.operator == null) {
|
|
6697
|
+
if (p.filter == '')
|
|
6698
|
+
p.filter += _this.calcola_filtro(params.filterModel[key], '', key, false);
|
|
6699
|
+
else
|
|
6700
|
+
p.filter += _this.calcola_filtro(params.filterModel[key], '', key, true);
|
|
6761
6701
|
}
|
|
6762
6702
|
else {
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
}
|
|
6774
|
-
if (sq != '') {
|
|
6775
|
-
b_filter = true;
|
|
6776
|
-
if (p.filter != "")
|
|
6777
|
-
p.filter = p.filter + ' and ';
|
|
6778
|
-
p.filter = p.filter + key + ' in (' + sq + ')';
|
|
6779
|
-
}
|
|
6780
|
-
else {
|
|
6781
|
-
b_filter = true;
|
|
6782
|
-
if (p.filter != "")
|
|
6783
|
-
p.filter = p.filter + ' and 1=0';
|
|
6784
|
-
}
|
|
6703
|
+
if (p.filter != '')
|
|
6704
|
+
p.filter += " and ";
|
|
6705
|
+
p.filter += " (";
|
|
6706
|
+
p.filter += _this.calcola_filtro(params.filterModel[key].condition1, '', key, false);
|
|
6707
|
+
console.log('After chiamata1: ', p.filter);
|
|
6708
|
+
p.filter += ' ' + obj_filtro_test.operator + ' ';
|
|
6709
|
+
p.filter += _this.calcola_filtro(params.filterModel[key].condition2, '', key, false);
|
|
6710
|
+
console.log('After chiamata2: ', p.filter);
|
|
6711
|
+
p.filter += ")";
|
|
6712
|
+
console.log('After chiamata2: ', p.filter);
|
|
6785
6713
|
}
|
|
6786
6714
|
// }
|
|
6787
6715
|
}
|
|
6788
6716
|
}
|
|
6789
|
-
|
|
6790
|
-
if (_this.ric_libera != null)
|
|
6791
|
-
if (_this.ric_libera != '')
|
|
6792
|
-
_this.show_pulisci_filtri = true;
|
|
6717
|
+
console.log('p.filter ', p.filter);
|
|
6793
6718
|
//p.num_per_pag=5000;
|
|
6794
6719
|
// console.log(this._gridservice);
|
|
6795
6720
|
_this.str_curr_q_p = "";
|
|
@@ -7250,6 +7175,121 @@
|
|
|
7250
7175
|
}
|
|
7251
7176
|
}));
|
|
7252
7177
|
};
|
|
7178
|
+
/**
|
|
7179
|
+
* @param {?} obj_filtro
|
|
7180
|
+
* @param {?} filter_v
|
|
7181
|
+
* @param {?} key
|
|
7182
|
+
* @param {?=} add_end
|
|
7183
|
+
* @return {?}
|
|
7184
|
+
*/
|
|
7185
|
+
FHGridComponent.prototype.calcola_filtro = /**
|
|
7186
|
+
* @param {?} obj_filtro
|
|
7187
|
+
* @param {?} filter_v
|
|
7188
|
+
* @param {?} key
|
|
7189
|
+
* @param {?=} add_end
|
|
7190
|
+
* @return {?}
|
|
7191
|
+
*/
|
|
7192
|
+
function (obj_filtro, filter_v, key, add_end) {
|
|
7193
|
+
if (add_end === void 0) { add_end = true; }
|
|
7194
|
+
console.log('calcola_filtro ', obj_filtro, filter_v, key);
|
|
7195
|
+
/** @type {?} */
|
|
7196
|
+
var b_filter = false;
|
|
7197
|
+
if (obj_filtro.type != null) {
|
|
7198
|
+
if (obj_filtro.filter != null) {
|
|
7199
|
+
this.show_pulisci_filtri = true;
|
|
7200
|
+
if (add_end)
|
|
7201
|
+
filter_v = filter_v + ' and ';
|
|
7202
|
+
b_filter = true;
|
|
7203
|
+
if (obj_filtro.filterType == 'number') {
|
|
7204
|
+
if (obj_filtro.type == "greaterThan")
|
|
7205
|
+
filter_v = filter_v + ' ' + key + ' > ' + obj_filtro.filter;
|
|
7206
|
+
if (obj_filtro.type == "equals")
|
|
7207
|
+
filter_v = filter_v + ' ' + key + ' = ' + obj_filtro.filter;
|
|
7208
|
+
if (obj_filtro.type == "notEqual")
|
|
7209
|
+
filter_v = filter_v + ' ' + key + ' <> ' + obj_filtro.filter;
|
|
7210
|
+
if (obj_filtro.type == "lessThan")
|
|
7211
|
+
filter_v = filter_v + ' ' + key + ' < ' + obj_filtro.filter;
|
|
7212
|
+
if (obj_filtro.type == "lessThanOrEqual")
|
|
7213
|
+
filter_v = filter_v + ' ' + key + ' <= ' + obj_filtro.filter;
|
|
7214
|
+
if (obj_filtro.type == "greaterThanOrEqual")
|
|
7215
|
+
filter_v = filter_v + ' ' + key + ' >= ' + obj_filtro.filter;
|
|
7216
|
+
if (obj_filtro.type == "inRange")
|
|
7217
|
+
filter_v = filter_v + ' (' + key + ' >= ' + obj_filtro.filter + ' and ' + key + ' <= ' + obj_filtro.filterTo + ')';
|
|
7218
|
+
}
|
|
7219
|
+
else {
|
|
7220
|
+
if (obj_filtro.type == "contains")
|
|
7221
|
+
filter_v = filter_v + ' upper(' + key + ') like \'%' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7222
|
+
if (obj_filtro.type == "startsWith")
|
|
7223
|
+
filter_v = filter_v + ' upper(' + key + ') like \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7224
|
+
if (obj_filtro.type == "equals")
|
|
7225
|
+
filter_v = filter_v + ' upper(' + key + ') = \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7226
|
+
if (obj_filtro.type == "notContains")
|
|
7227
|
+
filter_v = filter_v + 'not upper(' + key + ') like \'%' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7228
|
+
if (obj_filtro.type == "notEqual")
|
|
7229
|
+
filter_v = filter_v + ' upper(' + key + ') <> \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
7230
|
+
if (obj_filtro.type == "endsWith")
|
|
7231
|
+
filter_v = filter_v + ' upper(' + key + ') like \'%' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
7232
|
+
// if(obj_filtro.type=="startsWith") filter_v = filter_v +' upper('+ key + ') like \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7233
|
+
}
|
|
7234
|
+
}
|
|
7235
|
+
if (obj_filtro.dateTo != null || obj_filtro.dateFrom != null) {
|
|
7236
|
+
b_filter = true;
|
|
7237
|
+
if (filter_v != "")
|
|
7238
|
+
filter_v = filter_v + ' and ';
|
|
7239
|
+
filter_v = filter_v + ' (';
|
|
7240
|
+
if (obj_filtro.dateFrom != null && obj_filtro.dateTo != null)
|
|
7241
|
+
filter_v = filter_v + key + ">='" + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + "'";
|
|
7242
|
+
if (obj_filtro.dateTo != null) {
|
|
7243
|
+
if (obj_filtro.dateFrom != null)
|
|
7244
|
+
filter_v = filter_v + ' and ';
|
|
7245
|
+
filter_v = filter_v + key + "<='" + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateTo, 1)) + "'";
|
|
7246
|
+
}
|
|
7247
|
+
else if (obj_filtro.dateFrom != null) {
|
|
7248
|
+
if (obj_filtro.type == "greaterThan")
|
|
7249
|
+
filter_v = filter_v + ' ' + key + ' >= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7250
|
+
if (obj_filtro.type == "equals")
|
|
7251
|
+
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\')';
|
|
7252
|
+
if (obj_filtro.type == "notEqual")
|
|
7253
|
+
filter_v = filter_v + ' ' + key + ' <> \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7254
|
+
if (obj_filtro.type == "lessThan")
|
|
7255
|
+
filter_v = filter_v + ' ' + key + ' <= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7256
|
+
if (obj_filtro.type == "lessThanOrEqual")
|
|
7257
|
+
filter_v = filter_v + ' ' + key + ' <= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7258
|
+
if (obj_filtro.type == "greaterThanOrEqual")
|
|
7259
|
+
filter_v = filter_v + ' ' + key + ' >= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7260
|
+
}
|
|
7261
|
+
filter_v = filter_v + ' )';
|
|
7262
|
+
}
|
|
7263
|
+
}
|
|
7264
|
+
else {
|
|
7265
|
+
// if(obj_filtro.length>0)filter_v= filter_v+' and ';
|
|
7266
|
+
/** @type {?} */
|
|
7267
|
+
var sq = "";
|
|
7268
|
+
if (obj_filtro.values != null)
|
|
7269
|
+
for (var i = 0; i < obj_filtro.values.length; i++)
|
|
7270
|
+
if (obj_filtro.values[i] != null) {
|
|
7271
|
+
if (sq != "")
|
|
7272
|
+
sq = sq + ',';
|
|
7273
|
+
sq = sq + '\'' + obj_filtro.values[i].replace('\'', '\'\'') + '\'';
|
|
7274
|
+
}
|
|
7275
|
+
if (sq != '') {
|
|
7276
|
+
b_filter = true;
|
|
7277
|
+
if (filter_v != "" && add_end)
|
|
7278
|
+
filter_v = filter_v + ' and ';
|
|
7279
|
+
filter_v = filter_v + key + ' in (' + sq + ')';
|
|
7280
|
+
}
|
|
7281
|
+
else {
|
|
7282
|
+
b_filter = true;
|
|
7283
|
+
if (filter_v != "")
|
|
7284
|
+
filter_v = filter_v + ' and 1=0';
|
|
7285
|
+
}
|
|
7286
|
+
}
|
|
7287
|
+
this.show_pulisci_filtri = b_filter;
|
|
7288
|
+
if (this.ric_libera != null)
|
|
7289
|
+
if (this.ric_libera != '')
|
|
7290
|
+
this.show_pulisci_filtri = true;
|
|
7291
|
+
return filter_v;
|
|
7292
|
+
};
|
|
7253
7293
|
/**
|
|
7254
7294
|
* @private
|
|
7255
7295
|
* @return {?}
|