@fluxhub/fluxhub-lib 9.0.124 → 9.0.126

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.
@@ -806,7 +806,7 @@ var QueryService = /** @class */ (function () {
806
806
  // console.log('QueryService url: '+ this.url);
807
807
  if (queryp.types != null && queryp.sql.indexOf('_MULTI') == -1)
808
808
  for (var i = 0; i < queryp.types.length; i++) {
809
- if (queryp.values[i] == null)
809
+ if (queryp.values[i] == null || queryp.values[i] == 'NaN-0NaN-0NaN' || queryp.values[i] == 'NaN')
810
810
  queryp.values[i] = 'dbnull';
811
811
  else {
812
812
  if (queryp.types[i] == 'boolean')
@@ -8700,28 +8700,32 @@ var FHLogPanelComponent = /** @class */ (function () {
8700
8700
  return FHLogPanelComponent;
8701
8701
  }());
8702
8702
 
8703
- var noop$6 = function () { };
8703
+ var noop$6 = function () {
8704
+ };
8704
8705
  var ɵ0$6 = noop$6;
8705
8706
  var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
8706
8707
  provide: NG_VALUE_ACCESSOR,
8707
8708
  useExisting: forwardRef(function () { return FHCurrencyFieldComponent; }),
8708
- multi: true,
8709
+ multi: true
8709
8710
  };
8710
8711
  var FHCurrencyFieldComponent = /** @class */ (function () {
8711
8712
  function FHCurrencyFieldComponent() {
8712
8713
  this.decimal = 2;
8713
- this.label = "";
8714
+ this.label = '';
8714
8715
  this.required = false;
8715
8716
  this.enabled = true;
8716
8717
  this.hidden = false;
8717
- this.color = "";
8718
- this.m_color = "";
8718
+ this.color = '';
8719
+ this.m_color = '';
8719
8720
  this.label_width = "";
8720
8721
  this.change = new EventEmitter();
8721
8722
  this.enter_pressed = new EventEmitter();
8722
- this.onChange = function (_) { };
8723
- this.onTouched = function () { };
8724
- this.formattedAmount = "0,00";
8723
+ this.innerValue = 0;
8724
+ this.onChange = function (_) {
8725
+ };
8726
+ this.onTouched = function () {
8727
+ };
8728
+ this.formattedAmount = '0,00';
8725
8729
  this.value = 0;
8726
8730
  }
8727
8731
  FHCurrencyFieldComponent.prototype.kd = function (event) {
@@ -8729,15 +8733,6 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8729
8733
  this.enter_pressed.emit();
8730
8734
  }
8731
8735
  };
8732
- FHCurrencyFieldComponent.prototype.click_select_allf = function (element) {
8733
- var _this = this;
8734
- setTimeout(function () {
8735
- _this.el.nativeElement.select();
8736
- }, 200);
8737
- };
8738
- FHCurrencyFieldComponent.prototype.select_allf = function (element) {
8739
- this.el.nativeElement.select();
8740
- };
8741
8736
  FHCurrencyFieldComponent.prototype.getStyle_color = function () {
8742
8737
  return this.m_color;
8743
8738
  };
@@ -8750,25 +8745,19 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8750
8745
  FHCurrencyFieldComponent.prototype.chg = function () {
8751
8746
  var _this = this;
8752
8747
  setTimeout(function () {
8753
- _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join("."));
8748
+ _this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
8754
8749
  _this.onChange(_this.value);
8755
8750
  }, 50);
8756
8751
  };
8757
8752
  FHCurrencyFieldComponent.prototype.writeValue = function (value) {
8758
- if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
8759
- this.formattedAmount = this.transform(this.value, this.decimal);
8760
- return;
8761
- }
8762
8753
  if (value == null)
8763
8754
  value = 0;
8764
8755
  // if (value !== this.innerValue) {
8765
- if (typeof (value) == 'string') {
8766
- value = parseFloat(value.split(".").join("").split(",").join("."));
8767
- }
8756
+ this.innerValue = value;
8768
8757
  this.value = value;
8769
8758
  this.formattedAmount = this.transform(this.value, this.decimal);
8770
8759
  //}
8771
- // this.onChange(this.value);
8760
+ this.onChange(this.value);
8772
8761
  };
8773
8762
  FHCurrencyFieldComponent.prototype.registerOnChange = function (fn) {
8774
8763
  this.onChange = fn;
@@ -8782,7 +8771,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8782
8771
  // if (typeof (element.target.value) !== 'number')
8783
8772
  // this.formattedAmount = this.currencyPipe.transform(this.value);
8784
8773
  setTimeout(function () {
8785
- _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join("."));
8774
+ _this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
8786
8775
  // this.writeValue(this.value);
8787
8776
  _this.formattedAmount = _this.transform(_this.value, _this.decimal);
8788
8777
  }, 50);
@@ -8796,17 +8785,13 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8796
8785
  };
8797
8786
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8798
8787
  if (fractionSize === void 0) { fractionSize = 2; }
8799
- if (typeof (value) == 'string') {
8800
- value = parseFloat(value.split(".").join("").split(",").join("."));
8801
- }
8802
- var _a = __read((value || "").toString().split("."), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8803
- fraction =
8804
- fractionSize > 0
8805
- ? "," + (fraction + "000000").substring(0, fractionSize)
8806
- : "";
8807
- integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
8808
- if (integer == "")
8809
- integer = "0";
8788
+ var _a = __read((value || "").toString().split('.'), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8789
+ fraction = fractionSize > 0
8790
+ ? ',' + (fraction + '000000').substring(0, fractionSize)
8791
+ : "";
8792
+ integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
8793
+ if (integer == '')
8794
+ integer = '0';
8810
8795
  return integer + fraction;
8811
8796
  };
8812
8797
  FHCurrencyFieldComponent.prototype.removeCurrencyPipeFormat = function (element) {
@@ -8833,7 +8818,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8833
8818
  });
8834
8819
  };
8835
8820
  __decorate([
8836
- ViewChild("el"),
8821
+ ViewChild('el'),
8837
8822
  __metadata("design:type", ElementRef)
8838
8823
  ], FHCurrencyFieldComponent.prototype, "el", void 0);
8839
8824
  __decorate([
@@ -8878,10 +8863,10 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
8878
8863
  ], FHCurrencyFieldComponent.prototype, "value", void 0);
8879
8864
  FHCurrencyFieldComponent = __decorate([
8880
8865
  Component({
8881
- selector: "FHCurrencyField",
8866
+ selector: 'FHCurrencyField',
8882
8867
  providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
8883
- 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 (focusout)=\"chg()\"\n [style.color]=\"getStyle_color()\"\n (keydown)=\"kd($event)\"\n (click)=\"click_select_allf($event)\"\n (focus)=\"removeCurrencyPipeFormat($event); select_allf($event)\"\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 ",
8884
- styles: [""]
8868
+ template: "\n <mat-form-field [hidden]=\"!enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" style=\"text-align:right\" #el matInput\n [disabled]=\"!enabled\" [(ngModel)]=\"formattedAmount\"\n (blur)=\"transformAmount($event)\" [style.color]=\"getStyle_color()\" (keydown)=\"kd($event)\"\n (focus)=\"removeCurrencyPipeFormat($event)\" (keyup)=\"chg()\"\n pattern=\"[-+]?[0-9]*[.,]?[0-9]+\">\n </mat-form-field>\n <mat-form-field [hidden]=\"enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" style=\"text-align:right\" [style.color]=\"getStyle_color()\" #el1 matInput [disabled]=\"true\"\n [(ngModel)]=\"formattedAmount\"\n >\n </mat-form-field>\n ",
8869
+ styles: ["\n\n "]
8885
8870
  }),
8886
8871
  __metadata("design:paramtypes", [])
8887
8872
  ], FHCurrencyFieldComponent);