@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
|
@@ -6660,8 +6660,6 @@ var FHGridComponent = /** @class */ (function () {
|
|
|
6660
6660
|
p.filter = p.filter + ' and ';
|
|
6661
6661
|
p.filter = p.filter + ' (' + _this.fix_flt_temp + ' )';
|
|
6662
6662
|
}
|
|
6663
|
-
/** @type {?} */
|
|
6664
|
-
var b_filter = false;
|
|
6665
6663
|
// console.log('Filter model');
|
|
6666
6664
|
//console.log(params.filterModel);
|
|
6667
6665
|
if (params.filterModel != null) {
|
|
@@ -6670,104 +6668,31 @@ var FHGridComponent = /** @class */ (function () {
|
|
|
6670
6668
|
// console.log(key);
|
|
6671
6669
|
// if (p.hasOwnProperty(key)) {
|
|
6672
6670
|
// console.log( params.filterModel[key]);
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
p.filter = p.filter + ' ' + key + ' > ' + params.filterModel[key].filter;
|
|
6682
|
-
if (params.filterModel[key].type == "equals")
|
|
6683
|
-
p.filter = p.filter + ' ' + key + ' = ' + params.filterModel[key].filter;
|
|
6684
|
-
if (params.filterModel[key].type == "notEqual")
|
|
6685
|
-
p.filter = p.filter + ' ' + key + ' <> ' + params.filterModel[key].filter;
|
|
6686
|
-
if (params.filterModel[key].type == "lessThan")
|
|
6687
|
-
p.filter = p.filter + ' ' + key + ' < ' + params.filterModel[key].filter;
|
|
6688
|
-
if (params.filterModel[key].type == "lessThanOrEqual")
|
|
6689
|
-
p.filter = p.filter + ' ' + key + ' <= ' + params.filterModel[key].filter;
|
|
6690
|
-
if (params.filterModel[key].type == "greaterThanOrEqual")
|
|
6691
|
-
p.filter = p.filter + ' ' + key + ' >= ' + params.filterModel[key].filter;
|
|
6692
|
-
if (params.filterModel[key].type == "inRange")
|
|
6693
|
-
p.filter = p.filter + ' (' + key + ' >= ' + params.filterModel[key].filter + ' and ' + key + ' <= ' + params.filterModel[key].filterTo + ')';
|
|
6694
|
-
}
|
|
6695
|
-
else {
|
|
6696
|
-
if (params.filterModel[key].type == "contains")
|
|
6697
|
-
p.filter = p.filter + ' upper(' + key + ') like \'%' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6698
|
-
if (params.filterModel[key].type == "startsWith")
|
|
6699
|
-
p.filter = p.filter + ' upper(' + key + ') like \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6700
|
-
if (params.filterModel[key].type == "equals")
|
|
6701
|
-
p.filter = p.filter + ' upper(' + key + ') = \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6702
|
-
if (params.filterModel[key].type == "notContains")
|
|
6703
|
-
p.filter = p.filter + 'not upper(' + key + ') like \'%' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6704
|
-
if (params.filterModel[key].type == "notEqual")
|
|
6705
|
-
p.filter = p.filter + ' upper(' + key + ') <> \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
6706
|
-
if (params.filterModel[key].type == "endsWith")
|
|
6707
|
-
p.filter = p.filter + ' upper(' + key + ') like \'%' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
6708
|
-
// if(params.filterModel[key].type=="startsWith") p.filter = p.filter +' upper('+ key + ') like \'' + params.filterModel[key].filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
6709
|
-
}
|
|
6710
|
-
}
|
|
6711
|
-
if (params.filterModel[key].dateTo != null || params.filterModel[key].dateFrom != null) {
|
|
6712
|
-
b_filter = true;
|
|
6713
|
-
if (p.filter != "")
|
|
6714
|
-
p.filter = p.filter + ' and ';
|
|
6715
|
-
p.filter = p.filter + ' (';
|
|
6716
|
-
if (params.filterModel[key].dateFrom != null && params.filterModel[key].dateTo != null)
|
|
6717
|
-
p.filter = p.filter + key + ">='" + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + "'";
|
|
6718
|
-
if (params.filterModel[key].dateTo != null) {
|
|
6719
|
-
if (params.filterModel[key].dateFrom != null)
|
|
6720
|
-
p.filter = p.filter + ' and ';
|
|
6721
|
-
p.filter = p.filter + key + "<='" + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateTo, 1)) + "'";
|
|
6722
|
-
}
|
|
6723
|
-
else if (params.filterModel[key].dateFrom != null) {
|
|
6724
|
-
if (params.filterModel[key].type == "greaterThan")
|
|
6725
|
-
p.filter = p.filter + ' ' + key + ' >= \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6726
|
-
if (params.filterModel[key].type == "equals")
|
|
6727
|
-
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\')';
|
|
6728
|
-
if (params.filterModel[key].type == "notEqual")
|
|
6729
|
-
p.filter = p.filter + ' ' + key + ' <> \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6730
|
-
if (params.filterModel[key].type == "lessThan")
|
|
6731
|
-
p.filter = p.filter + ' ' + key + ' <= \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6732
|
-
if (params.filterModel[key].type == "lessThanOrEqual")
|
|
6733
|
-
p.filter = p.filter + ' ' + key + ' <= \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6734
|
-
if (params.filterModel[key].type == "greaterThanOrEqual")
|
|
6735
|
-
p.filter = p.filter + ' ' + key + ' >= \'' + _this.uti_s.sql_date(_this.uti_s.string2date(params.filterModel[key].dateFrom, 1)) + '\'';
|
|
6736
|
-
}
|
|
6737
|
-
p.filter = p.filter + ' )';
|
|
6738
|
-
}
|
|
6671
|
+
/** @type {?} */
|
|
6672
|
+
var obj_filtro_test = params.filterModel[key];
|
|
6673
|
+
console.log('obj_filtro_test ', obj_filtro_test);
|
|
6674
|
+
if (obj_filtro_test.operator == null) {
|
|
6675
|
+
if (p.filter == '')
|
|
6676
|
+
p.filter += _this.calcola_filtro(params.filterModel[key], '', key, false);
|
|
6677
|
+
else
|
|
6678
|
+
p.filter += _this.calcola_filtro(params.filterModel[key], '', key, true);
|
|
6739
6679
|
}
|
|
6740
6680
|
else {
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
}
|
|
6752
|
-
if (sq != '') {
|
|
6753
|
-
b_filter = true;
|
|
6754
|
-
if (p.filter != "")
|
|
6755
|
-
p.filter = p.filter + ' and ';
|
|
6756
|
-
p.filter = p.filter + key + ' in (' + sq + ')';
|
|
6757
|
-
}
|
|
6758
|
-
else {
|
|
6759
|
-
b_filter = true;
|
|
6760
|
-
if (p.filter != "")
|
|
6761
|
-
p.filter = p.filter + ' and 1=0';
|
|
6762
|
-
}
|
|
6681
|
+
if (p.filter != '')
|
|
6682
|
+
p.filter += " and ";
|
|
6683
|
+
p.filter += " (";
|
|
6684
|
+
p.filter += _this.calcola_filtro(params.filterModel[key].condition1, '', key, false);
|
|
6685
|
+
console.log('After chiamata1: ', p.filter);
|
|
6686
|
+
p.filter += ' ' + obj_filtro_test.operator + ' ';
|
|
6687
|
+
p.filter += _this.calcola_filtro(params.filterModel[key].condition2, '', key, false);
|
|
6688
|
+
console.log('After chiamata2: ', p.filter);
|
|
6689
|
+
p.filter += ")";
|
|
6690
|
+
console.log('After chiamata2: ', p.filter);
|
|
6763
6691
|
}
|
|
6764
6692
|
// }
|
|
6765
6693
|
}
|
|
6766
6694
|
}
|
|
6767
|
-
|
|
6768
|
-
if (_this.ric_libera != null)
|
|
6769
|
-
if (_this.ric_libera != '')
|
|
6770
|
-
_this.show_pulisci_filtri = true;
|
|
6695
|
+
console.log('p.filter ', p.filter);
|
|
6771
6696
|
//p.num_per_pag=5000;
|
|
6772
6697
|
// console.log(this._gridservice);
|
|
6773
6698
|
_this.str_curr_q_p = "";
|
|
@@ -7228,6 +7153,121 @@ var FHGridComponent = /** @class */ (function () {
|
|
|
7228
7153
|
}
|
|
7229
7154
|
}));
|
|
7230
7155
|
};
|
|
7156
|
+
/**
|
|
7157
|
+
* @param {?} obj_filtro
|
|
7158
|
+
* @param {?} filter_v
|
|
7159
|
+
* @param {?} key
|
|
7160
|
+
* @param {?=} add_end
|
|
7161
|
+
* @return {?}
|
|
7162
|
+
*/
|
|
7163
|
+
FHGridComponent.prototype.calcola_filtro = /**
|
|
7164
|
+
* @param {?} obj_filtro
|
|
7165
|
+
* @param {?} filter_v
|
|
7166
|
+
* @param {?} key
|
|
7167
|
+
* @param {?=} add_end
|
|
7168
|
+
* @return {?}
|
|
7169
|
+
*/
|
|
7170
|
+
function (obj_filtro, filter_v, key, add_end) {
|
|
7171
|
+
if (add_end === void 0) { add_end = true; }
|
|
7172
|
+
console.log('calcola_filtro ', obj_filtro, filter_v, key);
|
|
7173
|
+
/** @type {?} */
|
|
7174
|
+
var b_filter = false;
|
|
7175
|
+
if (obj_filtro.type != null) {
|
|
7176
|
+
if (obj_filtro.filter != null) {
|
|
7177
|
+
this.show_pulisci_filtri = true;
|
|
7178
|
+
if (add_end)
|
|
7179
|
+
filter_v = filter_v + ' and ';
|
|
7180
|
+
b_filter = true;
|
|
7181
|
+
if (obj_filtro.filterType == 'number') {
|
|
7182
|
+
if (obj_filtro.type == "greaterThan")
|
|
7183
|
+
filter_v = filter_v + ' ' + key + ' > ' + obj_filtro.filter;
|
|
7184
|
+
if (obj_filtro.type == "equals")
|
|
7185
|
+
filter_v = filter_v + ' ' + key + ' = ' + obj_filtro.filter;
|
|
7186
|
+
if (obj_filtro.type == "notEqual")
|
|
7187
|
+
filter_v = filter_v + ' ' + key + ' <> ' + obj_filtro.filter;
|
|
7188
|
+
if (obj_filtro.type == "lessThan")
|
|
7189
|
+
filter_v = filter_v + ' ' + key + ' < ' + obj_filtro.filter;
|
|
7190
|
+
if (obj_filtro.type == "lessThanOrEqual")
|
|
7191
|
+
filter_v = filter_v + ' ' + key + ' <= ' + obj_filtro.filter;
|
|
7192
|
+
if (obj_filtro.type == "greaterThanOrEqual")
|
|
7193
|
+
filter_v = filter_v + ' ' + key + ' >= ' + obj_filtro.filter;
|
|
7194
|
+
if (obj_filtro.type == "inRange")
|
|
7195
|
+
filter_v = filter_v + ' (' + key + ' >= ' + obj_filtro.filter + ' and ' + key + ' <= ' + obj_filtro.filterTo + ')';
|
|
7196
|
+
}
|
|
7197
|
+
else {
|
|
7198
|
+
if (obj_filtro.type == "contains")
|
|
7199
|
+
filter_v = filter_v + ' upper(' + key + ') like \'%' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7200
|
+
if (obj_filtro.type == "startsWith")
|
|
7201
|
+
filter_v = filter_v + ' upper(' + key + ') like \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7202
|
+
if (obj_filtro.type == "equals")
|
|
7203
|
+
filter_v = filter_v + ' upper(' + key + ') = \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7204
|
+
if (obj_filtro.type == "notContains")
|
|
7205
|
+
filter_v = filter_v + 'not upper(' + key + ') like \'%' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7206
|
+
if (obj_filtro.type == "notEqual")
|
|
7207
|
+
filter_v = filter_v + ' upper(' + key + ') <> \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
7208
|
+
if (obj_filtro.type == "endsWith")
|
|
7209
|
+
filter_v = filter_v + ' upper(' + key + ') like \'%' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '\'';
|
|
7210
|
+
// if(obj_filtro.type=="startsWith") filter_v = filter_v +' upper('+ key + ') like \'' + obj_filtro.filter.replace('\'', '\'\'').toUpperCase() + '%\'';
|
|
7211
|
+
}
|
|
7212
|
+
}
|
|
7213
|
+
if (obj_filtro.dateTo != null || obj_filtro.dateFrom != null) {
|
|
7214
|
+
b_filter = true;
|
|
7215
|
+
if (filter_v != "")
|
|
7216
|
+
filter_v = filter_v + ' and ';
|
|
7217
|
+
filter_v = filter_v + ' (';
|
|
7218
|
+
if (obj_filtro.dateFrom != null && obj_filtro.dateTo != null)
|
|
7219
|
+
filter_v = filter_v + key + ">='" + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + "'";
|
|
7220
|
+
if (obj_filtro.dateTo != null) {
|
|
7221
|
+
if (obj_filtro.dateFrom != null)
|
|
7222
|
+
filter_v = filter_v + ' and ';
|
|
7223
|
+
filter_v = filter_v + key + "<='" + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateTo, 1)) + "'";
|
|
7224
|
+
}
|
|
7225
|
+
else if (obj_filtro.dateFrom != null) {
|
|
7226
|
+
if (obj_filtro.type == "greaterThan")
|
|
7227
|
+
filter_v = filter_v + ' ' + key + ' >= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7228
|
+
if (obj_filtro.type == "equals")
|
|
7229
|
+
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\')';
|
|
7230
|
+
if (obj_filtro.type == "notEqual")
|
|
7231
|
+
filter_v = filter_v + ' ' + key + ' <> \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7232
|
+
if (obj_filtro.type == "lessThan")
|
|
7233
|
+
filter_v = filter_v + ' ' + key + ' <= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7234
|
+
if (obj_filtro.type == "lessThanOrEqual")
|
|
7235
|
+
filter_v = filter_v + ' ' + key + ' <= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7236
|
+
if (obj_filtro.type == "greaterThanOrEqual")
|
|
7237
|
+
filter_v = filter_v + ' ' + key + ' >= \'' + this.uti_s.sql_date(this.uti_s.string2date(obj_filtro.dateFrom, 1)) + '\'';
|
|
7238
|
+
}
|
|
7239
|
+
filter_v = filter_v + ' )';
|
|
7240
|
+
}
|
|
7241
|
+
}
|
|
7242
|
+
else {
|
|
7243
|
+
// if(obj_filtro.length>0)filter_v= filter_v+' and ';
|
|
7244
|
+
/** @type {?} */
|
|
7245
|
+
var sq = "";
|
|
7246
|
+
if (obj_filtro.values != null)
|
|
7247
|
+
for (var i = 0; i < obj_filtro.values.length; i++)
|
|
7248
|
+
if (obj_filtro.values[i] != null) {
|
|
7249
|
+
if (sq != "")
|
|
7250
|
+
sq = sq + ',';
|
|
7251
|
+
sq = sq + '\'' + obj_filtro.values[i].replace('\'', '\'\'') + '\'';
|
|
7252
|
+
}
|
|
7253
|
+
if (sq != '') {
|
|
7254
|
+
b_filter = true;
|
|
7255
|
+
if (filter_v != "" && add_end)
|
|
7256
|
+
filter_v = filter_v + ' and ';
|
|
7257
|
+
filter_v = filter_v + key + ' in (' + sq + ')';
|
|
7258
|
+
}
|
|
7259
|
+
else {
|
|
7260
|
+
b_filter = true;
|
|
7261
|
+
if (filter_v != "")
|
|
7262
|
+
filter_v = filter_v + ' and 1=0';
|
|
7263
|
+
}
|
|
7264
|
+
}
|
|
7265
|
+
this.show_pulisci_filtri = b_filter;
|
|
7266
|
+
if (this.ric_libera != null)
|
|
7267
|
+
if (this.ric_libera != '')
|
|
7268
|
+
this.show_pulisci_filtri = true;
|
|
7269
|
+
return filter_v;
|
|
7270
|
+
};
|
|
7231
7271
|
/**
|
|
7232
7272
|
* @private
|
|
7233
7273
|
* @return {?}
|