@fluxhub/fluxhub-lib 10.0.72 → 10.0.74

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.
@@ -8689,10 +8689,7 @@
8689
8689
  this.value.split(".").join("").split(",").join(".")
8690
8690
  );
8691
8691
  }*/
8692
- if (isNaN(_this.value)) {
8693
- console.log('this.value ', _this.value);
8694
- _this.value = 0;
8695
- }
8692
+ //if(isNaN(this.value)){console.log('this.value ',this.value);this.value=0;}
8696
8693
  _this.onChange(_this.value);
8697
8694
  }, 0);
8698
8695
  };
@@ -8714,9 +8711,9 @@
8714
8711
  }
8715
8712
  this.innerValue = value;
8716
8713
  this.value = value;
8717
- // console.log('writeValue ini ',this.value);
8714
+ console.log('transform ini 1 ', this.value);
8718
8715
  this.formattedAmount = this.transform(this.value, this.decimal);
8719
- // console.log('writeValue fin ',this.value);
8716
+ console.log('transform fin 2 ', this.formattedAmount);
8720
8717
  }
8721
8718
  // this.onChange(this.value);
8722
8719
  };
@@ -8737,8 +8734,10 @@
8737
8734
  // else
8738
8735
  // this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
8739
8736
  // this.writeValue(this.value);
8737
+ console.log('transform ini 2 ', _this.value);
8740
8738
  _this.formattedAmount = _this.transform(_this.value, _this.decimal);
8741
8739
  }, 0);
8740
+ console.log('transform fin 2 ', this.formattedAmount);
8742
8741
  // Remove or comment this line if you dont want
8743
8742
  // to show the formatted amount in the textbox.
8744
8743
  // element.target.value = this.formattedAmount;
@@ -8749,6 +8748,7 @@
8749
8748
  };
8750
8749
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8751
8750
  if (fractionSize === void 0) { fractionSize = 2; }
8751
+ console.log('transform ', value);
8752
8752
  var _a = __read((value || "").toString().split("."), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8753
8753
  fraction =
8754
8754
  fractionSize > 0
@@ -8757,6 +8757,9 @@
8757
8757
  integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
8758
8758
  if (integer == "")
8759
8759
  integer = "0";
8760
+ console.log('integer ', integer);
8761
+ if (fractionSize == 0)
8762
+ return integer;
8760
8763
  return integer + fraction;
8761
8764
  };
8762
8765
  FHCurrencyFieldComponent.prototype.focus_e = function () {
@@ -8788,7 +8791,7 @@
8788
8791
  { type: i0.Component, args: [{
8789
8792
  selector: "FHCurrencyField",
8790
8793
  providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
8791
- 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 ",
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 ",
8792
8795
  styles: [""]
8793
8796
  },] }
8794
8797
  ];