@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.
- package/bundles/fluxhub-fluxhub-lib.umd.js +28 -43
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhcurrencyfield.js +42 -76
- package/esm2015/lib/services/doquery.service.js +2 -2
- package/esm5/lib/controls/fhcurrencyfield.js +31 -46
- package/esm5/lib/services/doquery.service.js +2 -2
- package/fesm2015/fluxhub-fluxhub-lib.js +39 -73
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +28 -43
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhcurrencyfield.d.ts +3 -5
- package/package.json +1 -1
|
@@ -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.
|
|
9643
|
-
this.
|
|
9644
|
-
|
|
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,25 +9664,19 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9668
9664
|
}
|
|
9669
9665
|
chg() {
|
|
9670
9666
|
setTimeout(() => {
|
|
9671
|
-
this.value = parseFloat(this.formattedAmount.split(
|
|
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
|
-
if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
|
|
9677
|
-
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9678
|
-
return;
|
|
9679
|
-
}
|
|
9680
9672
|
if (value == null)
|
|
9681
9673
|
value = 0;
|
|
9682
9674
|
// if (value !== this.innerValue) {
|
|
9683
|
-
|
|
9684
|
-
value = parseFloat(value.split(".").join("").split(",").join("."));
|
|
9685
|
-
}
|
|
9675
|
+
this.innerValue = value;
|
|
9686
9676
|
this.value = value;
|
|
9687
9677
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9688
9678
|
//}
|
|
9689
|
-
|
|
9679
|
+
this.onChange(this.value);
|
|
9690
9680
|
}
|
|
9691
9681
|
registerOnChange(fn) {
|
|
9692
9682
|
this.onChange = fn;
|
|
@@ -9699,7 +9689,7 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9699
9689
|
// if (typeof (element.target.value) !== 'number')
|
|
9700
9690
|
// this.formattedAmount = this.currencyPipe.transform(this.value);
|
|
9701
9691
|
setTimeout(() => {
|
|
9702
|
-
this.value = parseFloat(this.formattedAmount.split(
|
|
9692
|
+
this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
9703
9693
|
// this.writeValue(this.value);
|
|
9704
9694
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9705
9695
|
}, 50);
|
|
@@ -9712,17 +9702,13 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9712
9702
|
}
|
|
9713
9703
|
}
|
|
9714
9704
|
transform(value, fractionSize = 2) {
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
: "";
|
|
9723
|
-
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
9724
|
-
if (integer == "")
|
|
9725
|
-
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';
|
|
9726
9712
|
return integer + fraction;
|
|
9727
9713
|
}
|
|
9728
9714
|
removeCurrencyPipeFormat(element) {
|
|
@@ -9749,7 +9735,7 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9749
9735
|
}
|
|
9750
9736
|
};
|
|
9751
9737
|
__decorate([
|
|
9752
|
-
ViewChild(
|
|
9738
|
+
ViewChild('el'),
|
|
9753
9739
|
__metadata("design:type", ElementRef)
|
|
9754
9740
|
], FHCurrencyFieldComponent.prototype, "el", void 0);
|
|
9755
9741
|
__decorate([
|
|
@@ -9794,45 +9780,25 @@ __decorate([
|
|
|
9794
9780
|
], FHCurrencyFieldComponent.prototype, "value", void 0);
|
|
9795
9781
|
FHCurrencyFieldComponent = __decorate([
|
|
9796
9782
|
Component({
|
|
9797
|
-
selector:
|
|
9783
|
+
selector: 'FHCurrencyField',
|
|
9798
9784
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
|
|
9799
9785
|
template: `
|
|
9800
|
-
<mat-form-field
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
type="text"
|
|
9807
|
-
style="text-align:right"
|
|
9808
|
-
#el
|
|
9809
|
-
matInput
|
|
9810
|
-
[disabled]="!enabled"
|
|
9811
|
-
[(ngModel)]="formattedAmount"
|
|
9812
|
-
(focusout)="chg()"
|
|
9813
|
-
[style.color]="getStyle_color()"
|
|
9814
|
-
(keydown)="kd($event)"
|
|
9815
|
-
(click)="click_select_allf($event)"
|
|
9816
|
-
(focus)="removeCurrencyPipeFormat($event); select_allf($event)"
|
|
9817
|
-
/>
|
|
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]+">
|
|
9818
9792
|
</mat-form-field>
|
|
9819
|
-
<mat-form-field
|
|
9820
|
-
[
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
><mat-label>{{ label }}</mat-label>
|
|
9824
|
-
<input
|
|
9825
|
-
type="text"
|
|
9826
|
-
style="text-align:right"
|
|
9827
|
-
[style.color]="getStyle_color()"
|
|
9828
|
-
#el1
|
|
9829
|
-
matInput
|
|
9830
|
-
[disabled]="true"
|
|
9831
|
-
[(ngModel)]="formattedAmount"
|
|
9832
|
-
/>
|
|
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
|
+
>
|
|
9833
9797
|
</mat-form-field>
|
|
9834
9798
|
`,
|
|
9835
|
-
styles: [
|
|
9799
|
+
styles: [`
|
|
9800
|
+
|
|
9801
|
+
`]
|
|
9836
9802
|
}),
|
|
9837
9803
|
__metadata("design:paramtypes", [])
|
|
9838
9804
|
], FHCurrencyFieldComponent);
|