@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.
@@ -5434,16 +5434,16 @@
5434
5434
  if (this.curr_config == "-1")
5435
5435
  return;
5436
5436
  localStorage.removeItem(this.grid_key + "_COLS");
5437
- // localStorage.removeItem(this.grid_key + "_SORT");
5437
+ localStorage.removeItem(this.grid_key + "_SORT");
5438
5438
  localStorage.removeItem(this.grid_key + "_FILTER");
5439
5439
  localStorage.removeItem(this.grid_key + "_CFG_DEFAULT");
5440
5440
  localStorage.removeItem(this.grid_key + "_FILTER_UP");
5441
5441
  if (this.gf.getObj().COL != null)
5442
5442
  if (this.gf.getObj().COL != "")
5443
5443
  localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COL);
5444
- // if (this.gf.getObj().SORT != null)
5445
- // if (this.gf.getObj().SORT != "")
5446
- // localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
5444
+ if (this.gf.getObj().SORT != null)
5445
+ if (this.gf.getObj().SORT != "")
5446
+ localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
5447
5447
  if (this.gf.getObj().FILTER != null)
5448
5448
  if (this.gf.getObj().FILTER != "")
5449
5449
  localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
@@ -5507,12 +5507,12 @@
5507
5507
  var p = new QParam();
5508
5508
  p.sql = "INSERT_UPDATE_CFG_GRID";
5509
5509
  var p_col = "";
5510
- // let p_sort: string = "";
5510
+ var p_sort = "";
5511
5511
  var p_filter = "";
5512
5512
  if (localStorage.getItem(_this.grid_key + "_COLS") != null)
5513
5513
  p_col = localStorage.getItem(_this.grid_key + "_COLS");
5514
- // if (localStorage.getItem(this.grid_key + "_SORT") != null)
5515
- // p_sort = localStorage.getItem(this.grid_key + "_SORT");
5514
+ if (localStorage.getItem(_this.grid_key + "_SORT") != null)
5515
+ p_sort = localStorage.getItem(_this.grid_key + "_SORT");
5516
5516
  if (localStorage.getItem(_this.grid_key + "_FILTER") != null)
5517
5517
  p_filter = localStorage.getItem(_this.grid_key + "_FILTER");
5518
5518
  p.types = ["string", "string", "string", "string", "string", "string"];
@@ -5565,12 +5565,12 @@
5565
5565
  var p = new QParam();
5566
5566
  p.sql = "INSERT_UPDATE_CFG_GRID";
5567
5567
  var p_col = "";
5568
- // let p_sort: string = "";
5568
+ var p_sort = "";
5569
5569
  var p_filter = "";
5570
5570
  if (localStorage.getItem(_this.grid_key + "_COLS") != null)
5571
5571
  p_col = localStorage.getItem(_this.grid_key + "_COLS");
5572
- // if (localStorage.getItem(this.grid_key + "_SORT") != null)
5573
- // p_sort = localStorage.getItem(this.grid_key + "_SORT");
5572
+ if (localStorage.getItem(_this.grid_key + "_SORT") != null)
5573
+ p_sort = localStorage.getItem(_this.grid_key + "_SORT");
5574
5574
  if (localStorage.getItem(_this.grid_key + "_FILTER") != null)
5575
5575
  p_filter = localStorage.getItem(_this.grid_key + "_FILTER");
5576
5576
  p.types = [
@@ -6267,31 +6267,30 @@
6267
6267
  console.log(eer);
6268
6268
  }
6269
6269
  }
6270
- /* try {
6270
+ try {
6271
6271
  this.gridOptions.api.setSortModel(null);
6272
- } catch (eer) {
6272
+ }
6273
+ catch (eer) {
6273
6274
  console.log(eer);
6274
- }
6275
- if (
6276
- localStorage.getItem(this.grid_key + "_SORT") != null &&
6277
- (b_mantieni_ck || forza)
6278
- )
6275
+ }
6276
+ if (localStorage.getItem(this.grid_key + "_SORT") != null &&
6277
+ (b_mantieni_ck || forza))
6279
6278
  if (localStorage.getItem(this.grid_key + "_SORT") != "") {
6280
- // console.log('setto sort: '+localStorage.getItem(this.grid_key+'_SORT'));
6281
- // console.log(localStorage.getItem(this.grid_key+'_SORT'));
6282
- try {
6283
- this.gridOptions.api.setSortModel(
6284
- JSON.parse(localStorage.getItem(this.grid_key + "_SORT"))
6285
- );
6286
- } catch (eer) {
6287
- console.log(eer);
6288
- }
6279
+ // console.log('setto sort: '+localStorage.getItem(this.grid_key+'_SORT'));
6280
+ // console.log(localStorage.getItem(this.grid_key+'_SORT'));
6281
+ try {
6282
+ this.gridOptions.api.setSortModel(JSON.parse(localStorage.getItem(this.grid_key + "_SORT")));
6283
+ }
6284
+ catch (eer) {
6285
+ console.log(eer);
6286
+ }
6289
6287
  }
6290
- try {
6288
+ try {
6291
6289
  this.gridOptions.api.setFilterModel(null);
6292
- } catch (eer) {
6290
+ }
6291
+ catch (eer) {
6293
6292
  console.log(eer);
6294
- }*/
6293
+ }
6295
6294
  if (localStorage.getItem(this.grid_key + "_FILTER") != null &&
6296
6295
  (b_mantieni_ck || forza))
6297
6296
  if (localStorage.getItem(this.grid_key + "_FILTER") != "") {
@@ -6363,7 +6362,7 @@
6363
6362
  if (localStorage.getItem(this.grid_key + "_MANTIENI") != "NO") {
6364
6363
  this.gf.setByDescri(localStorage.getItem(this.grid_key + "_CFG_DEFAULT"));
6365
6364
  localStorage.setItem(this.grid_key + "_COLS", this.gf.getObj().COLS);
6366
- // localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
6365
+ localStorage.setItem(this.grid_key + "_SORT", this.gf.getObj().SORT);
6367
6366
  localStorage.setItem(this.grid_key + "_FILTER", this.gf.getObj().FILTER);
6368
6367
  this.curr_config = this.gf.getValue();
6369
6368
  }
@@ -6477,14 +6476,9 @@
6477
6476
  if (this.no_pref)
6478
6477
  return;
6479
6478
  if (this.b_init) {
6480
- localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
6479
+ // localStorage.setItem(this.grid_key + "_COLS", JSON.stringify(this.gridOptions.columnApi.getColumnState()));
6481
6480
  // console.log('salvo s: '+this.gridOptions.api.getSortModel());
6482
- /*
6483
-
6484
- localStorage.setItem(
6485
- this.grid_key + "_SORT",
6486
- JSON.stringify(this.gridOptions.api.getSortModel())
6487
- );*/
6481
+ localStorage.setItem(this.grid_key + "_SORT", JSON.stringify(this.gridOptions.api.getSortModel()));
6488
6482
  }
6489
6483
  };
6490
6484
  FHGridComponent.prototype.onVirtualRowRemoved = function ($event) {
@@ -8804,27 +8798,28 @@
8804
8798
  else
8805
8799
  _this.value = parseFloat(_this.value.split(".").join("").split(",").join("."));
8806
8800
  }
8807
- console.log("this.value ", _this.value);
8801
+ // console.log("this.value ", this.value);
8808
8802
  _this.onChange(_this.value);
8809
8803
  }, 0);
8810
8804
  };
8811
8805
  FHCurrencyFieldComponent.prototype.writeValue = function (value) {
8812
- console.log('inif ', value, this.innerValue);
8806
+ // console.log('inif ',parseFloat(value), value,this.innerValue);
8813
8807
  if (value == null)
8814
8808
  value = 0;
8815
8809
  if (parseFloat(value) !== this.innerValue) {
8816
- console.log('typeof value ', typeof value);
8817
- if (typeof value == "string") {
8818
- if (this.decimal == 0)
8819
- value = parseFloat(value.split(".").join("").split(",").join(""));
8820
- else
8821
- value = parseFloat(value.split(".").join("").split(",").join("."));
8822
- }
8810
+ // console.log('typeof value ',typeof value);
8811
+ if (typeof value == "string")
8812
+ if (this.decimal == 0 || value.indexOf(',') != -1) {
8813
+ if (this.decimal == 0)
8814
+ value = parseFloat(value.split(".").join("").split(",").join(""));
8815
+ else
8816
+ value = parseFloat(value.split(".").join("").split(",").join("."));
8817
+ }
8823
8818
  this.innerValue = value;
8824
8819
  this.value = value;
8825
- console.log('writeValue ini ', this.value, this.formattedAmount);
8820
+ // console.log('writeValue ini ',this.value, this.formattedAmount);
8826
8821
  this.formattedAmount = this.transform(this.value, this.decimal);
8827
- console.log('writeValue fin ', this.value, this.formattedAmount);
8822
+ // console.log('writeValue fin ',this.value, this.formattedAmount);
8828
8823
  }
8829
8824
  // this.onChange(this.value);
8830
8825
  };
@@ -8845,23 +8840,23 @@
8845
8840
  // else
8846
8841
  // this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
8847
8842
  // this.writeValue(this.value);
8848
- console.log('transformAmount ini ', _this.value, _this.formattedAmount);
8843
+ // console.log('transformAmount ini ',this.value, this.formattedAmount);
8849
8844
  _this.formattedAmount = _this.transform(_this.value, _this.decimal);
8850
- console.log('transformAmount fin ', _this.value, _this.formattedAmount);
8845
+ // console.log('transformAmount fin ',this.value, this.formattedAmount);
8851
8846
  }, 0);
8852
8847
  // Remove or comment this line if you dont want
8853
8848
  // to show the formatted amount in the textbox.
8854
8849
  // element.target.value = this.formattedAmount;
8855
8850
  }
8856
8851
  catch (e) {
8857
- console.log(e);
8852
+ // console.log(e);
8858
8853
  }
8859
8854
  };
8860
8855
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8861
8856
  if (fractionSize === void 0) { fractionSize = 2; }
8862
- console.log('trasform ', value);
8857
+ // console.log('trasform ',value);
8863
8858
  var _a = __read((value || "").toString().split("."), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8864
- console.log('integer, fraction ', integer, fraction);
8859
+ // console.log('integer, fraction ',integer, fraction);
8865
8860
  fraction =
8866
8861
  fractionSize > 0
8867
8862
  ? "," + (fraction + "000000").substring(0, fractionSize)
@@ -8869,7 +8864,7 @@
8869
8864
  integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
8870
8865
  if (integer == "")
8871
8866
  integer = "0";
8872
- console.log('trasform ', integer + fraction);
8867
+ // console.log('trasform ',integer + fraction);
8873
8868
  return integer + fraction;
8874
8869
  };
8875
8870
  FHCurrencyFieldComponent.prototype.focus_e = function ($event) {
@@ -8880,7 +8875,7 @@
8880
8875
  this.focus.emit(this.value);
8881
8876
  }
8882
8877
  catch (e) {
8883
- console.log(e);
8878
+ // console.log(e);
8884
8879
  }
8885
8880
  };
8886
8881
  FHCurrencyFieldComponent.prototype.setFocus = function () {
@@ -8904,7 +8899,7 @@
8904
8899
  this.formattedAmount = this.transform(this.value, this.decimal);
8905
8900
  }
8906
8901
  catch (e) {
8907
- console.log(e);
8902
+ // console.log(e);
8908
8903
  }
8909
8904
  };
8910
8905
  return FHCurrencyFieldComponent;
@@ -16235,7 +16230,6 @@
16235
16230
  p.types.push(arr[i].types);
16236
16231
  p.names.push(arr[i].names);
16237
16232
  if (arr[i].values == null) {
16238
- console.log('NULL', arr[i].names, arr[i].values);
16239
16233
  arr[i].values = "dbnull";
16240
16234
  }
16241
16235
  else {