@fluxhub/fluxhub-lib 10.0.74 → 10.0.76

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,32 +8672,23 @@
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("")));
8676
8675
  if (_this.decimal == 0)
8677
8676
  _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join(""));
8678
8677
  else
8679
8678
  _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;}
8679
+ if (typeof _this.value == "string") {
8680
+ if (_this.decimal == 0)
8681
+ _this.value = parseFloat(_this.value.split(".").join("").split(",").join(""));
8682
+ else
8683
+ _this.value = parseFloat(_this.value.split(".").join("").split(",").join("."));
8684
+ }
8685
+ console.log("this.value ", _this.value);
8693
8686
  _this.onChange(_this.value);
8694
8687
  }, 0);
8695
8688
  };
8696
8689
  FHCurrencyFieldComponent.prototype.writeValue = function (value) {
8697
8690
  if (value == null)
8698
8691
  value = 0;
8699
- if (isNaN(value))
8700
- value = 0;
8701
8692
  if (value !== this.innerValue) {
8702
8693
  if (typeof value == "string") {
8703
8694
  if (this.decimal == 0)
@@ -8705,15 +8696,11 @@
8705
8696
  else
8706
8697
  value = parseFloat(value.split(".").join("").split(",").join("."));
8707
8698
  }
8708
- if (isNaN(value)) {
8709
- console.log('writeValue ', this.value);
8710
- this.value = 0;
8711
- }
8712
8699
  this.innerValue = value;
8713
8700
  this.value = value;
8714
- console.log('transform ini 1 ', this.value);
8701
+ // console.log('writeValue ini ',this.value);
8715
8702
  this.formattedAmount = this.transform(this.value, this.decimal);
8716
- console.log('transform fin 2 ', this.formattedAmount);
8703
+ // console.log('writeValue fin ',this.value);
8717
8704
  }
8718
8705
  // this.onChange(this.value);
8719
8706
  };
@@ -8734,10 +8721,8 @@
8734
8721
  // else
8735
8722
  // this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
8736
8723
  // this.writeValue(this.value);
8737
- console.log('transform ini 2 ', _this.value);
8738
8724
  _this.formattedAmount = _this.transform(_this.value, _this.decimal);
8739
8725
  }, 0);
8740
- console.log('transform fin 2 ', this.formattedAmount);
8741
8726
  // Remove or comment this line if you dont want
8742
8727
  // to show the formatted amount in the textbox.
8743
8728
  // element.target.value = this.formattedAmount;
@@ -8748,7 +8733,6 @@
8748
8733
  };
8749
8734
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8750
8735
  if (fractionSize === void 0) { fractionSize = 2; }
8751
- console.log('transform ', value);
8752
8736
  var _a = __read((value || "").toString().split("."), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8753
8737
  fraction =
8754
8738
  fractionSize > 0
@@ -8757,9 +8741,6 @@
8757
8741
  integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
8758
8742
  if (integer == "")
8759
8743
  integer = "0";
8760
- console.log('integer ', integer);
8761
- if (fractionSize == 0)
8762
- return integer;
8763
8744
  return integer + fraction;
8764
8745
  };
8765
8746
  FHCurrencyFieldComponent.prototype.focus_e = function () {
@@ -8791,7 +8772,7 @@
8791
8772
  { type: i0.Component, args: [{
8792
8773
  selector: "FHCurrencyField",
8793
8774
  providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
8794
- template: "\n <mat-form-field\n [hidden]=\"!enabled || hidden\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input\n type=\"text\"\n style=\"text-align:right\"\n #el\n matInput\n [disabled]=\"!enabled\"\n [(ngModel)]=\"formattedAmount\"\n (blur)=\"transformAmount($event); focus_out.emit(value)\"\n [style.color]=\"getStyle_color()\"\n (keydown)=\"kd($event)\"\n (focus)=\"focus_e()\"\n\n />\n </mat-form-field>\n <mat-form-field\n [hidden]=\"enabled || hidden\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input\n type=\"text\"\n style=\"text-align:right\"\n [style.color]=\"getStyle_color()\"\n #el1\n matInput\n [disabled]=\"true\"\n [(ngModel)]=\"formattedAmount\"\n />\n </mat-form-field>\n ",
8775
+ template: "\n <mat-form-field\n [hidden]=\"!enabled || hidden\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input\n type=\"text\"\n style=\"text-align:right\"\n #el\n matInput\n [disabled]=\"!enabled\"\n [(ngModel)]=\"formattedAmount\"\n (blur)=\"transformAmount($event); focus_out.emit(value)\"\n [style.color]=\"getStyle_color()\"\n (keydown)=\"kd($event)\"\n (focus)=\"focus_e()\"\n (keyup)=\"chg()\"\n />\n </mat-form-field>\n <mat-form-field\n [hidden]=\"enabled || hidden\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input\n type=\"text\"\n style=\"text-align:right\"\n [style.color]=\"getStyle_color()\"\n #el1\n matInput\n [disabled]=\"true\"\n [(ngModel)]=\"formattedAmount\"\n />\n </mat-form-field>\n ",
8795
8776
  styles: [""]
8796
8777
  },] }
8797
8778
  ];