@fluxhub/fluxhub-lib 9.0.125 → 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,28 +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
- // console.log(value,parseFloat(
8891
- // this.formattedAmount.split(".").join("").split(",").join(".")));
8892
- if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
8893
- this.formattedAmount = this.transform(this.value, this.decimal);
8894
- this.value = value;
8895
- return;
8896
- }
8897
8885
  if (value == null)
8898
8886
  value = 0;
8899
8887
  // if (value !== this.innerValue) {
8900
- if (typeof (value) == 'string') {
8901
- value = parseFloat(value.split(".").join("").split(",").join("."));
8902
- }
8888
+ this.innerValue = value;
8903
8889
  this.value = value;
8904
8890
  this.formattedAmount = this.transform(this.value, this.decimal);
8905
8891
  //}
8906
- // this.onChange(this.value);
8892
+ this.onChange(this.value);
8907
8893
  };
8908
8894
  FHCurrencyFieldComponent.prototype.registerOnChange = function (fn) {
8909
8895
  this.onChange = fn;
@@ -8917,7 +8903,7 @@
8917
8903
  // if (typeof (element.target.value) !== 'number')
8918
8904
  // this.formattedAmount = this.currencyPipe.transform(this.value);
8919
8905
  setTimeout(function () {
8920
- _this.value = parseFloat(_this.formattedAmount.split(".").join("").split(",").join("."));
8906
+ _this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
8921
8907
  // this.writeValue(this.value);
8922
8908
  _this.formattedAmount = _this.transform(_this.value, _this.decimal);
8923
8909
  }, 50);
@@ -8931,17 +8917,13 @@
8931
8917
  };
8932
8918
  FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
8933
8919
  if (fractionSize === void 0) { fractionSize = 2; }
8934
- if (typeof (value) == 'string') {
8935
- value = parseFloat(value.split(".").join("").split(",").join("."));
8936
- }
8937
- var _a = __read((value || "").toString().split("."), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
8938
- fraction =
8939
- fractionSize > 0
8940
- ? "," + (fraction + "000000").substring(0, fractionSize)
8941
- : "";
8942
- integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
8943
- if (integer == "")
8944
- 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';
8945
8927
  return integer + fraction;
8946
8928
  };
8947
8929
  FHCurrencyFieldComponent.prototype.removeCurrencyPipeFormat = function (element) {
@@ -8968,7 +8950,7 @@
8968
8950
  });
8969
8951
  };
8970
8952
  __decorate([
8971
- core.ViewChild("el"),
8953
+ core.ViewChild('el'),
8972
8954
  __metadata("design:type", core.ElementRef)
8973
8955
  ], FHCurrencyFieldComponent.prototype, "el", void 0);
8974
8956
  __decorate([
@@ -9013,10 +8995,10 @@
9013
8995
  ], FHCurrencyFieldComponent.prototype, "value", void 0);
9014
8996
  FHCurrencyFieldComponent = __decorate([
9015
8997
  core.Component({
9016
- selector: "FHCurrencyField",
8998
+ selector: 'FHCurrencyField',
9017
8999
  providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
9018
- 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 ",
9019
- 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 "]
9020
9002
  }),
9021
9003
  __metadata("design:paramtypes", [])
9022
9004
  ], FHCurrencyFieldComponent);