@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.
@@ -938,7 +938,7 @@
938
938
  // console.log('QueryService url: '+ this.url);
939
939
  if (queryp.types != null && queryp.sql.indexOf('_MULTI') == -1)
940
940
  for (var i = 0; i < queryp.types.length; i++) {
941
- if (queryp.values[i] == null)
941
+ if (queryp.values[i] == null || queryp.values[i] == 'NaN-0NaN-0NaN' || queryp.values[i] == 'NaN')
942
942
  queryp.values[i] = 'dbnull';
943
943
  else {
944
944
  if (queryp.types[i] == 'boolean')
@@ -8832,28 +8832,32 @@
8832
8832
  return FHLogPanelComponent;
8833
8833
  }());
8834
8834
 
8835
- var noop$6 = function () { };
8835
+ var noop$6 = function () {
8836
+ };
8836
8837
  var ɵ0$6 = noop$6;
8837
8838
  var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
8838
8839
  provide: forms.NG_VALUE_ACCESSOR,
8839
8840
  useExisting: core.forwardRef(function () { return FHCurrencyFieldComponent; }),
8840
- multi: true,
8841
+ multi: true
8841
8842
  };
8842
8843
  var FHCurrencyFieldComponent = /** @class */ (function () {
8843
8844
  function FHCurrencyFieldComponent() {
8844
8845
  this.decimal = 2;
8845
- this.label = "";
8846
+ this.label = '';
8846
8847
  this.required = false;
8847
8848
  this.enabled = true;
8848
8849
  this.hidden = false;
8849
- this.color = "";
8850
- this.m_color = "";
8850
+ this.color = '';
8851
+ this.m_color = '';
8851
8852
  this.label_width = "";
8852
8853
  this.change = new core.EventEmitter();
8853
8854
  this.enter_pressed = new core.EventEmitter();
8854
- this.onChange = function (_) { };
8855
- this.onTouched = function () { };
8856
- this.formattedAmount = "0,00";
8855
+ this.innerValue = 0;
8856
+ this.onChange = function (_) {
8857
+ };
8858
+ this.onTouched = function () {
8859
+ };
8860
+ this.formattedAmount = '0,00';
8857
8861
  this.value = 0;
8858
8862
  }
8859
8863
  FHCurrencyFieldComponent.prototype.kd = function (event) {
@@ -8861,15 +8865,6 @@
8861
8865
  this.enter_pressed.emit();
8862
8866
  }
8863
8867
  };
8864
- FHCurrencyFieldComponent.prototype.click_select_allf = function (element) {
8865
- var _this = this;
8866
- setTimeout(function () {
8867
- _this.el.nativeElement.select();
8868
- }, 200);
8869
- };
8870
- FHCurrencyFieldComponent.prototype.select_allf = function (element) {
8871
- this.el.nativeElement.select();
8872
- };
8873
8868
  FHCurrencyFieldComponent.prototype.getStyle_color = function () {
8874
8869
  return this.m_color;
8875
8870
  };
@@ -8882,25 +8877,19 @@
8882
8877
  FHCurrencyFieldComponent.prototype.chg = function () {
8883
8878
  var _this = this;
8884
8879
  setTimeout(function () {
8885
- _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join("."));
8880
+ _this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
8886
8881
  _this.onChange(_this.value);
8887
8882
  }, 50);
8888
8883
  };
8889
8884
  FHCurrencyFieldComponent.prototype.writeValue = function (value) {
8890
- if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
8891
- this.formattedAmount = this.transform(this.value, this.decimal);
8892
- return;
8893
- }
8894
8885
  if (value == null)
8895
8886
  value = 0;
8896
8887
  // if (value !== this.innerValue) {
8897
- if (typeof (value) == 'string') {
8898
- value = parseFloat(value.split(".").join("").split(",").join("."));
8899
- }
8888
+ this.innerValue = value;
8900
8889
  this.value = value;
8901
8890
  this.formattedAmount = this.transform(this.value, this.decimal);
8902
8891
  //}
8903
- // this.onChange(this.value);
8892
+ this.onChange(this.value);
8904
8893
  };
8905
8894
  FHCurrencyFieldComponent.prototype.registerOnChange = function (fn) {
8906
8895
  this.onChange = fn;
@@ -8914,7 +8903,7 @@
8914
8903
  // if (typeof (element.target.value) !== 'number')
8915
8904
  // this.formattedAmount = this.currencyPipe.transform(this.value);
8916
8905
  setTimeout(function () {
8917
- _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join("."));
8906
+ _this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
8918
8907
  // this.writeValue(this.value);
8919
8908
  _this.formattedAmount = _this.transform(_this.value, _this.decimal);
8920
8909
  }, 50);
@@ -8928,17 +8917,13 @@
8928
8917
  };
8929
8918
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8930
8919
  if (fractionSize === void 0) { fractionSize = 2; }
8931
- if (typeof (value) == 'string') {
8932
- value = parseFloat(value.split(".").join("").split(",").join("."));
8933
- }
8934
- var _a = __read((value || "").toString().split("."), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8935
- fraction =
8936
- fractionSize > 0
8937
- ? "," + (fraction + "000000").substring(0, fractionSize)
8938
- : "";
8939
- integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
8940
- if (integer == "")
8941
- integer = "0";
8920
+ var _a = __read((value || "").toString().split('.'), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8921
+ fraction = fractionSize > 0
8922
+ ? ',' + (fraction + '000000').substring(0, fractionSize)
8923
+ : "";
8924
+ integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
8925
+ if (integer == '')
8926
+ integer = '0';
8942
8927
  return integer + fraction;
8943
8928
  };
8944
8929
  FHCurrencyFieldComponent.prototype.removeCurrencyPipeFormat = function (element) {
@@ -8965,7 +8950,7 @@
8965
8950
  });
8966
8951
  };
8967
8952
  __decorate([
8968
- core.ViewChild("el"),
8953
+ core.ViewChild('el'),
8969
8954
  __metadata("design:type", core.ElementRef)
8970
8955
  ], FHCurrencyFieldComponent.prototype, "el", void 0);
8971
8956
  __decorate([
@@ -9010,10 +8995,10 @@
9010
8995
  ], FHCurrencyFieldComponent.prototype, "value", void 0);
9011
8996
  FHCurrencyFieldComponent = __decorate([
9012
8997
  core.Component({
9013
- selector: "FHCurrencyField",
8998
+ selector: 'FHCurrencyField',
9014
8999
  providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
9015
- 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 ",
9016
- styles: [""]
9000
+ 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 ",
9001
+ styles: ["\n\n "]
9017
9002
  }),
9018
9003
  __metadata("design:paramtypes", [])
9019
9004
  ], FHCurrencyFieldComponent);