@fluxhub/fluxhub-lib 10.0.71 → 10.0.73

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.
@@ -8672,25 +8672,24 @@
8672
8672
  FHCurrencyFieldComponent.prototype.chg = function () {
8673
8673
  var _this = this;
8674
8674
  setTimeout(function () {
8675
- console.log(_this.formattedAmount.split(".").join("").split(",").join(""), parseFloat(_this.formattedAmount.split(".").join("").split(",").join("")), typeof _this.value);
8676
- /* if (this.decimal == 0)
8677
- this.value = parseFloat(
8678
- this.formattedAmount.split(".").join("").split(",").join("")
8679
- );
8680
- else
8681
- this.value = parseFloat(
8682
- this.formattedAmount.split(".").join("").split(",").join(".")
8683
- );*/
8684
- if (typeof _this.value == "string") {
8685
- if (_this.decimal == 0)
8686
- _this.value = parseFloat(_this.value.split(".").join("").split(",").join(""));
8687
- else
8688
- _this.value = parseFloat(_this.value.split(".").join("").split(",").join("."));
8689
- }
8690
- if (isNaN(_this.value)) {
8691
- console.log('this.value ', _this.value);
8692
- _this.value = 0;
8693
- }
8675
+ console.log(_this.formattedAmount.split(".").join("").split(",").join(""), parseFloat(_this.formattedAmount.split(".").join("").split(",").join("")));
8676
+ if (_this.decimal == 0)
8677
+ _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join(""));
8678
+ else
8679
+ _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join("."));
8680
+ console.log('VALUE: ', _this.value);
8681
+ /*
8682
+ if (typeof this.value == "string") {
8683
+ if (this.decimal == 0)
8684
+ this.value = parseFloat(
8685
+ this.value.split(".").join("").split(",").join("")
8686
+ );
8687
+ else
8688
+ this.value = parseFloat(
8689
+ this.value.split(".").join("").split(",").join(".")
8690
+ );
8691
+ }*/
8692
+ //if(isNaN(this.value)){console.log('this.value ',this.value);this.value=0;}
8694
8693
  _this.onChange(_this.value);
8695
8694
  }, 0);
8696
8695
  };
@@ -8712,9 +8711,9 @@
8712
8711
  }
8713
8712
  this.innerValue = value;
8714
8713
  this.value = value;
8715
- // console.log('writeValue ini ',this.value);
8714
+ console.log('transform ini 1 ', this.value);
8716
8715
  this.formattedAmount = this.transform(this.value, this.decimal);
8717
- // console.log('writeValue fin ',this.value);
8716
+ console.log('transform fin 2 ', this.formattedAmount);
8718
8717
  }
8719
8718
  // this.onChange(this.value);
8720
8719
  };
@@ -8735,8 +8734,10 @@
8735
8734
  // else
8736
8735
  // this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
8737
8736
  // this.writeValue(this.value);
8737
+ console.log('transform ini 2 ', _this.value);
8738
8738
  _this.formattedAmount = _this.transform(_this.value, _this.decimal);
8739
8739
  }, 0);
8740
+ console.log('transform fin 2 ', this.formattedAmount);
8740
8741
  // Remove or comment this line if you dont want
8741
8742
  // to show the formatted amount in the textbox.
8742
8743
  // element.target.value = this.formattedAmount;
@@ -8747,6 +8748,7 @@
8747
8748
  };
8748
8749
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8749
8750
  if (fractionSize === void 0) { fractionSize = 2; }
8751
+ console.log('transform ', value);
8750
8752
  var _a = __read((value || "").toString().split("."), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8751
8753
  fraction =
8752
8754
  fractionSize > 0
@@ -8755,6 +8757,9 @@
8755
8757
  integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
8756
8758
  if (integer == "")
8757
8759
  integer = "0";
8760
+ console.log('integer ', integer);
8761
+ if (fractionSize == 0)
8762
+ return integer;
8758
8763
  return integer + fraction;
8759
8764
  };
8760
8765
  FHCurrencyFieldComponent.prototype.focus_e = function () {