@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.
@@ -811,7 +811,7 @@ let QueryService = class QueryService {
811
811
  // console.log('QueryService url: '+ this.url);
812
812
  if (queryp.types != null && queryp.sql.indexOf('_MULTI') == -1)
813
813
  for (let i = 0; i < queryp.types.length; i++) {
814
- if (queryp.values[i] == null)
814
+ if (queryp.values[i] == null || queryp.values[i] == 'NaN-0NaN-0NaN' || queryp.values[i] == 'NaN')
815
815
  queryp.values[i] = 'dbnull';
816
816
  else {
817
817
  if (queryp.types[i] == 'boolean')
@@ -9620,28 +9620,32 @@ FHLogPanelComponent = __decorate([
9620
9620
  __metadata("design:paramtypes", [UtilityService])
9621
9621
  ], FHLogPanelComponent);
9622
9622
 
9623
- const noop$6 = () => { };
9623
+ const noop$6 = () => {
9624
+ };
9624
9625
  const ɵ0$6 = noop$6;
9625
9626
  const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
9626
9627
  provide: NG_VALUE_ACCESSOR,
9627
9628
  useExisting: forwardRef(() => FHCurrencyFieldComponent),
9628
- multi: true,
9629
+ multi: true
9629
9630
  };
9630
9631
  let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
9631
9632
  constructor() {
9632
9633
  this.decimal = 2;
9633
- this.label = "";
9634
+ this.label = '';
9634
9635
  this.required = false;
9635
9636
  this.enabled = true;
9636
9637
  this.hidden = false;
9637
- this.color = "";
9638
- this.m_color = "";
9638
+ this.color = '';
9639
+ this.m_color = '';
9639
9640
  this.label_width = "";
9640
9641
  this.change = new EventEmitter();
9641
9642
  this.enter_pressed = new EventEmitter();
9642
- this.onChange = (_) => { };
9643
- this.onTouched = () => { };
9644
- this.formattedAmount = "0,00";
9643
+ this.innerValue = 0;
9644
+ this.onChange = (_) => {
9645
+ };
9646
+ this.onTouched = () => {
9647
+ };
9648
+ this.formattedAmount = '0,00';
9645
9649
  this.value = 0;
9646
9650
  }
9647
9651
  kd(event) {
@@ -9649,14 +9653,6 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
9649
9653
  this.enter_pressed.emit();
9650
9654
  }
9651
9655
  }
9652
- click_select_allf(element) {
9653
- setTimeout(() => {
9654
- this.el.nativeElement.select();
9655
- }, 200);
9656
- }
9657
- select_allf(element) {
9658
- this.el.nativeElement.select();
9659
- }
9660
9656
  getStyle_color() {
9661
9657
  return this.m_color;
9662
9658
  }
@@ -9668,28 +9664,19 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
9668
9664
  }
9669
9665
  chg() {
9670
9666
  setTimeout(() => {
9671
- this.value = parseFloat(this.formattedAmount.split(".").join("").split(",").join("."));
9667
+ this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
9672
9668
  this.onChange(this.value);
9673
9669
  }, 50);
9674
9670
  }
9675
9671
  writeValue(value) {
9676
- // console.log(value,parseFloat(
9677
- // this.formattedAmount.split(".").join("").split(",").join(".")));
9678
- if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
9679
- this.formattedAmount = this.transform(this.value, this.decimal);
9680
- this.value = value;
9681
- return;
9682
- }
9683
9672
  if (value == null)
9684
9673
  value = 0;
9685
9674
  // if (value !== this.innerValue) {
9686
- if (typeof (value) == 'string') {
9687
- value = parseFloat(value.split(".").join("").split(",").join("."));
9688
- }
9675
+ this.innerValue = value;
9689
9676
  this.value = value;
9690
9677
  this.formattedAmount = this.transform(this.value, this.decimal);
9691
9678
  //}
9692
- // this.onChange(this.value);
9679
+ this.onChange(this.value);
9693
9680
  }
9694
9681
  registerOnChange(fn) {
9695
9682
  this.onChange = fn;
@@ -9702,7 +9689,7 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
9702
9689
  // if (typeof (element.target.value) !== 'number')
9703
9690
  // this.formattedAmount = this.currencyPipe.transform(this.value);
9704
9691
  setTimeout(() => {
9705
- this.value = parseFloat(this.formattedAmount.split(".").join("").split(",").join("."));
9692
+ this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
9706
9693
  // this.writeValue(this.value);
9707
9694
  this.formattedAmount = this.transform(this.value, this.decimal);
9708
9695
  }, 50);
@@ -9715,17 +9702,13 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
9715
9702
  }
9716
9703
  }
9717
9704
  transform(value, fractionSize = 2) {
9718
- if (typeof (value) == 'string') {
9719
- value = parseFloat(value.split(".").join("").split(",").join("."));
9720
- }
9721
- let [integer, fraction = ""] = (value || "").toString().split(".");
9722
- fraction =
9723
- fractionSize > 0
9724
- ? "," + (fraction + "000000").substring(0, fractionSize)
9725
- : "";
9726
- integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
9727
- if (integer == "")
9728
- integer = "0";
9705
+ let [integer, fraction = ""] = (value || "").toString().split('.');
9706
+ fraction = fractionSize > 0
9707
+ ? ',' + (fraction + '000000').substring(0, fractionSize)
9708
+ : "";
9709
+ integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
9710
+ if (integer == '')
9711
+ integer = '0';
9729
9712
  return integer + fraction;
9730
9713
  }
9731
9714
  removeCurrencyPipeFormat(element) {
@@ -9752,7 +9735,7 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
9752
9735
  }
9753
9736
  };
9754
9737
  __decorate([
9755
- ViewChild("el"),
9738
+ ViewChild('el'),
9756
9739
  __metadata("design:type", ElementRef)
9757
9740
  ], FHCurrencyFieldComponent.prototype, "el", void 0);
9758
9741
  __decorate([
@@ -9797,45 +9780,25 @@ __decorate([
9797
9780
  ], FHCurrencyFieldComponent.prototype, "value", void 0);
9798
9781
  FHCurrencyFieldComponent = __decorate([
9799
9782
  Component({
9800
- selector: "FHCurrencyField",
9783
+ selector: 'FHCurrencyField',
9801
9784
  providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
9802
9785
  template: `
9803
- <mat-form-field
9804
- [hidden]="!enabled || hidden"
9805
- appearance="outline"
9806
- floatLabel="always"
9807
- ><mat-label>{{ label }}</mat-label>
9808
- <input
9809
- type="text"
9810
- style="text-align:right"
9811
- #el
9812
- matInput
9813
- [disabled]="!enabled"
9814
- [(ngModel)]="formattedAmount"
9815
- (focusout)="chg()"
9816
- [style.color]="getStyle_color()"
9817
- (keydown)="kd($event)"
9818
- (click)="click_select_allf($event)"
9819
- (focus)="removeCurrencyPipeFormat($event); select_allf($event)"
9820
- />
9786
+ <mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
9787
+ <input type="text" style="text-align:right" #el matInput
9788
+ [disabled]="!enabled" [(ngModel)]="formattedAmount"
9789
+ (blur)="transformAmount($event)" [style.color]="getStyle_color()" (keydown)="kd($event)"
9790
+ (focus)="removeCurrencyPipeFormat($event)" (keyup)="chg()"
9791
+ pattern="[-+]?[0-9]*[.,]?[0-9]+">
9821
9792
  </mat-form-field>
9822
- <mat-form-field
9823
- [hidden]="enabled || hidden"
9824
- appearance="outline"
9825
- floatLabel="always"
9826
- ><mat-label>{{ label }}</mat-label>
9827
- <input
9828
- type="text"
9829
- style="text-align:right"
9830
- [style.color]="getStyle_color()"
9831
- #el1
9832
- matInput
9833
- [disabled]="true"
9834
- [(ngModel)]="formattedAmount"
9835
- />
9793
+ <mat-form-field [hidden]="enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
9794
+ <input type="text" style="text-align:right" [style.color]="getStyle_color()" #el1 matInput [disabled]="true"
9795
+ [(ngModel)]="formattedAmount"
9796
+ >
9836
9797
  </mat-form-field>
9837
9798
  `,
9838
- styles: [``]
9799
+ styles: [`
9800
+
9801
+ `]
9839
9802
  }),
9840
9803
  __metadata("design:paramtypes", [])
9841
9804
  ], FHCurrencyFieldComponent);