@fluxhub/fluxhub-lib 10.0.168 → 10.0.170
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 +51 -57
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +2 -2
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhcurrencyfield.js +21 -20
- package/esm2015/lib/controls/fhgrid.js +32 -38
- package/esm2015/lib/wkf_engine/wkfdatiaggiuntivi.js +1 -2
- package/fesm2015/fluxhub-fluxhub-lib.js +51 -57
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -8018,16 +8018,16 @@ class FHGridComponent {
|
|
|
8018
8018
|
if (this.curr_config == "-1")
|
|
8019
8019
|
return;
|
|
8020
8020
|
localStorage.removeItem(this.grid_key + "_COLS");
|
|
8021
|
-
|
|
8021
|
+
localStorage.removeItem(this.grid_key + "_SORT");
|
|
8022
8022
|
localStorage.removeItem(this.grid_key + "_FILTER");
|
|
8023
8023
|
localStorage.removeItem(this.grid_key + "_CFG_DEFAULT");
|
|
8024
8024
|
localStorage.removeItem(this.grid_key + "_FILTER_UP");
|
|
8025
8025
|
if (this.gf.getObj().COL != null)
|
|
8026
8026
|
if (this.gf.getObj().COL != "")
|
|
8027
8027
|
localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COL);
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8028
|
+
if (this.gf.getObj().SORT != null)
|
|
8029
|
+
if (this.gf.getObj().SORT != "")
|
|
8030
|
+
localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
|
|
8031
8031
|
if (this.gf.getObj().FILTER != null)
|
|
8032
8032
|
if (this.gf.getObj().FILTER != "")
|
|
8033
8033
|
localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
|
|
@@ -8089,12 +8089,12 @@ class FHGridComponent {
|
|
|
8089
8089
|
let p = new QParam();
|
|
8090
8090
|
p.sql = "INSERT_UPDATE_CFG_GRID";
|
|
8091
8091
|
let p_col = "";
|
|
8092
|
-
|
|
8092
|
+
let p_sort = "";
|
|
8093
8093
|
let p_filter = "";
|
|
8094
8094
|
if (localStorage.getItem(this.grid_key + "_COLS") != null)
|
|
8095
8095
|
p_col = localStorage.getItem(this.grid_key + "_COLS");
|
|
8096
|
-
|
|
8097
|
-
|
|
8096
|
+
if (localStorage.getItem(this.grid_key + "_SORT") != null)
|
|
8097
|
+
p_sort = localStorage.getItem(this.grid_key + "_SORT");
|
|
8098
8098
|
if (localStorage.getItem(this.grid_key + "_FILTER") != null)
|
|
8099
8099
|
p_filter = localStorage.getItem(this.grid_key + "_FILTER");
|
|
8100
8100
|
p.types = ["string", "string", "string", "string", "string", "string"];
|
|
@@ -8146,12 +8146,12 @@ class FHGridComponent {
|
|
|
8146
8146
|
let p = new QParam();
|
|
8147
8147
|
p.sql = "INSERT_UPDATE_CFG_GRID";
|
|
8148
8148
|
let p_col = "";
|
|
8149
|
-
|
|
8149
|
+
let p_sort = "";
|
|
8150
8150
|
let p_filter = "";
|
|
8151
8151
|
if (localStorage.getItem(this.grid_key + "_COLS") != null)
|
|
8152
8152
|
p_col = localStorage.getItem(this.grid_key + "_COLS");
|
|
8153
|
-
|
|
8154
|
-
|
|
8153
|
+
if (localStorage.getItem(this.grid_key + "_SORT") != null)
|
|
8154
|
+
p_sort = localStorage.getItem(this.grid_key + "_SORT");
|
|
8155
8155
|
if (localStorage.getItem(this.grid_key + "_FILTER") != null)
|
|
8156
8156
|
p_filter = localStorage.getItem(this.grid_key + "_FILTER");
|
|
8157
8157
|
p.types = [
|
|
@@ -8831,31 +8831,30 @@ class FHGridComponent {
|
|
|
8831
8831
|
console.log(eer);
|
|
8832
8832
|
}
|
|
8833
8833
|
}
|
|
8834
|
-
|
|
8834
|
+
try {
|
|
8835
8835
|
this.gridOptions.api.setSortModel(null);
|
|
8836
|
-
|
|
8836
|
+
}
|
|
8837
|
+
catch (eer) {
|
|
8837
8838
|
console.log(eer);
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
(b_mantieni_ck || forza)
|
|
8842
|
-
)
|
|
8839
|
+
}
|
|
8840
|
+
if (localStorage.getItem(this.grid_key + "_SORT") != null &&
|
|
8841
|
+
(b_mantieni_ck || forza))
|
|
8843
8842
|
if (localStorage.getItem(this.grid_key + "_SORT") != "") {
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
)
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
}
|
|
8843
|
+
// console.log('setto sort: '+localStorage.getItem(this.grid_key+'_SORT'));
|
|
8844
|
+
// console.log(localStorage.getItem(this.grid_key+'_SORT'));
|
|
8845
|
+
try {
|
|
8846
|
+
this.gridOptions.api.setSortModel(JSON.parse(localStorage.getItem(this.grid_key + "_SORT")));
|
|
8847
|
+
}
|
|
8848
|
+
catch (eer) {
|
|
8849
|
+
console.log(eer);
|
|
8850
|
+
}
|
|
8853
8851
|
}
|
|
8854
|
-
|
|
8852
|
+
try {
|
|
8855
8853
|
this.gridOptions.api.setFilterModel(null);
|
|
8856
|
-
|
|
8854
|
+
}
|
|
8855
|
+
catch (eer) {
|
|
8857
8856
|
console.log(eer);
|
|
8858
|
-
|
|
8857
|
+
}
|
|
8859
8858
|
if (localStorage.getItem(this.grid_key + "_FILTER") != null &&
|
|
8860
8859
|
(b_mantieni_ck || forza))
|
|
8861
8860
|
if (localStorage.getItem(this.grid_key + "_FILTER") != "") {
|
|
@@ -8926,7 +8925,7 @@ class FHGridComponent {
|
|
|
8926
8925
|
if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO") {
|
|
8927
8926
|
this.gf.setByDescri(localStorage.getItem(this.grid_key + "_CFG_DEFAULT"));
|
|
8928
8927
|
localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COLS);
|
|
8929
|
-
|
|
8928
|
+
localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
|
|
8930
8929
|
localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
|
|
8931
8930
|
this.curr_config = this.gf.getValue();
|
|
8932
8931
|
}
|
|
@@ -9038,14 +9037,9 @@ class FHGridComponent {
|
|
|
9038
9037
|
if (this.no_pref)
|
|
9039
9038
|
return;
|
|
9040
9039
|
if (this.b_init) {
|
|
9041
|
-
localStorage.setItem(this.grid_key + "_COLS",
|
|
9040
|
+
// localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
|
|
9042
9041
|
// console.log('salvo s: '+this.gridOptions.api.getSortModel());
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
localStorage.setItem(
|
|
9046
|
-
this.grid_key + "_SORT",
|
|
9047
|
-
JSON.stringify(this.gridOptions.api.getSortModel())
|
|
9048
|
-
);*/
|
|
9042
|
+
localStorage.setItem(this.grid_key + "_SORT", JSON.stringify(this.gridOptions.api.getSortModel()));
|
|
9049
9043
|
}
|
|
9050
9044
|
}
|
|
9051
9045
|
onVirtualRowRemoved($event) {
|
|
@@ -12134,27 +12128,28 @@ class FHCurrencyFieldComponent {
|
|
|
12134
12128
|
else
|
|
12135
12129
|
this.value = parseFloat(this.value.split(".").join("").split(",").join("."));
|
|
12136
12130
|
}
|
|
12137
|
-
console.log("this.value ", this.value);
|
|
12131
|
+
// console.log("this.value ", this.value);
|
|
12138
12132
|
this.onChange(this.value);
|
|
12139
12133
|
}, 0);
|
|
12140
12134
|
}
|
|
12141
12135
|
writeValue(value) {
|
|
12142
|
-
console.log('inif ', value,
|
|
12136
|
+
// console.log('inif ',parseFloat(value), value,this.innerValue);
|
|
12143
12137
|
if (value == null)
|
|
12144
12138
|
value = 0;
|
|
12145
12139
|
if (parseFloat(value) !== this.innerValue) {
|
|
12146
|
-
console.log('typeof value ',
|
|
12147
|
-
if (typeof value == "string")
|
|
12148
|
-
if (this.decimal == 0)
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12140
|
+
// console.log('typeof value ',typeof value);
|
|
12141
|
+
if (typeof value == "string")
|
|
12142
|
+
if (this.decimal == 0 || value.indexOf(',') != -1) {
|
|
12143
|
+
if (this.decimal == 0)
|
|
12144
|
+
value = parseFloat(value.split(".").join("").split(",").join(""));
|
|
12145
|
+
else
|
|
12146
|
+
value = parseFloat(value.split(".").join("").split(",").join("."));
|
|
12147
|
+
}
|
|
12153
12148
|
this.innerValue = value;
|
|
12154
12149
|
this.value = value;
|
|
12155
|
-
console.log('writeValue ini ',
|
|
12150
|
+
// console.log('writeValue ini ',this.value, this.formattedAmount);
|
|
12156
12151
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
12157
|
-
console.log('writeValue fin ',
|
|
12152
|
+
// console.log('writeValue fin ',this.value, this.formattedAmount);
|
|
12158
12153
|
}
|
|
12159
12154
|
// this.onChange(this.value);
|
|
12160
12155
|
}
|
|
@@ -12174,22 +12169,22 @@ class FHCurrencyFieldComponent {
|
|
|
12174
12169
|
// else
|
|
12175
12170
|
// this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
12176
12171
|
// this.writeValue(this.value);
|
|
12177
|
-
console.log('transformAmount ini ',
|
|
12172
|
+
// console.log('transformAmount ini ',this.value, this.formattedAmount);
|
|
12178
12173
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
12179
|
-
console.log('transformAmount fin ',
|
|
12174
|
+
// console.log('transformAmount fin ',this.value, this.formattedAmount);
|
|
12180
12175
|
}, 0);
|
|
12181
12176
|
// Remove or comment this line if you dont want
|
|
12182
12177
|
// to show the formatted amount in the textbox.
|
|
12183
12178
|
// element.target.value = this.formattedAmount;
|
|
12184
12179
|
}
|
|
12185
12180
|
catch (e) {
|
|
12186
|
-
console.log(e);
|
|
12181
|
+
// console.log(e);
|
|
12187
12182
|
}
|
|
12188
12183
|
}
|
|
12189
12184
|
transform(value, fractionSize = 2) {
|
|
12190
|
-
console.log('trasform ',
|
|
12185
|
+
// console.log('trasform ',value);
|
|
12191
12186
|
let [integer, fraction = ""] = (value || "").toString().split(".");
|
|
12192
|
-
console.log('integer, fraction ',
|
|
12187
|
+
// console.log('integer, fraction ',integer, fraction);
|
|
12193
12188
|
fraction =
|
|
12194
12189
|
fractionSize > 0
|
|
12195
12190
|
? "," + (fraction + "000000").substring(0, fractionSize)
|
|
@@ -12197,7 +12192,7 @@ class FHCurrencyFieldComponent {
|
|
|
12197
12192
|
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
12198
12193
|
if (integer == "")
|
|
12199
12194
|
integer = "0";
|
|
12200
|
-
console.log('trasform ',
|
|
12195
|
+
// console.log('trasform ',integer + fraction);
|
|
12201
12196
|
return integer + fraction;
|
|
12202
12197
|
}
|
|
12203
12198
|
focus_e($event) {
|
|
@@ -12208,7 +12203,7 @@ class FHCurrencyFieldComponent {
|
|
|
12208
12203
|
this.focus.emit(this.value);
|
|
12209
12204
|
}
|
|
12210
12205
|
catch (e) {
|
|
12211
|
-
console.log(e);
|
|
12206
|
+
// console.log(e);
|
|
12212
12207
|
}
|
|
12213
12208
|
}
|
|
12214
12209
|
setFocus() {
|
|
@@ -12231,7 +12226,7 @@ class FHCurrencyFieldComponent {
|
|
|
12231
12226
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
12232
12227
|
}
|
|
12233
12228
|
catch (e) {
|
|
12234
|
-
console.log(e);
|
|
12229
|
+
// console.log(e);
|
|
12235
12230
|
}
|
|
12236
12231
|
}
|
|
12237
12232
|
}
|
|
@@ -16886,7 +16881,6 @@ class dati_aggiuntivi {
|
|
|
16886
16881
|
p.types.push(arr[i].types);
|
|
16887
16882
|
p.names.push(arr[i].names);
|
|
16888
16883
|
if (arr[i].values == null) {
|
|
16889
|
-
console.log('NULL', arr[i].names, arr[i].values);
|
|
16890
16884
|
arr[i].values = "dbnull";
|
|
16891
16885
|
}
|
|
16892
16886
|
else {
|