@fluxhub/fluxhub-lib 9.0.126 → 9.0.128
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 +53 -24
- 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 +48 -16
- package/esm2015/lib/services/doquery.service.js +10 -12
- package/esm5/lib/controls/fhcurrencyfield.js +45 -14
- package/esm5/lib/services/doquery.service.js +10 -12
- package/fesm2015/fluxhub-fluxhub-lib.js +56 -26
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +53 -24
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhcurrencyfield.d.ts +3 -1
- 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)
|
|
815
815
|
queryp.values[i] = 'dbnull';
|
|
816
816
|
else {
|
|
817
817
|
if (queryp.types[i] == 'boolean')
|
|
@@ -833,17 +833,15 @@ let QueryService = class QueryService {
|
|
|
833
833
|
queryp.values[i] = '' + queryp.values[i];
|
|
834
834
|
if (queryp.types[i] == 'date')
|
|
835
835
|
queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
|
|
836
|
-
if (queryp.types[i] == '
|
|
836
|
+
if (queryp.types[i] == 'date') {
|
|
837
|
+
queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
|
|
838
|
+
if (queryp.values[i].split('0').join('') == 'NaN-NaN-NaN')
|
|
839
|
+
queryp.values[i] = null;
|
|
840
|
+
}
|
|
841
|
+
if (queryp.types[i] == 'datetime') {
|
|
837
842
|
queryp.values[i] = this.uti_s.sql_date_time(queryp.values[i]);
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
queryp.values[i] = 'dbnull';
|
|
841
|
-
else {
|
|
842
|
-
if (isNaN(queryp.values[i]))
|
|
843
|
-
queryp.values[i] = '0';
|
|
844
|
-
else
|
|
845
|
-
queryp.values[i] = '' + queryp.values[i];
|
|
846
|
-
}
|
|
843
|
+
if (queryp.values[i].split('0').join('') == 'NaN-NaN-NaN NaN:NaN')
|
|
844
|
+
queryp.values[i] = null;
|
|
847
845
|
}
|
|
848
846
|
if (queryp.types[i] == 'string' && queryp.values[i] == null)
|
|
849
847
|
queryp.values[i] = 'dbnull';
|
|
@@ -9639,6 +9637,8 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9639
9637
|
this.m_color = '';
|
|
9640
9638
|
this.label_width = "";
|
|
9641
9639
|
this.change = new EventEmitter();
|
|
9640
|
+
this.focus = new EventEmitter();
|
|
9641
|
+
this.focus_out = new EventEmitter();
|
|
9642
9642
|
this.enter_pressed = new EventEmitter();
|
|
9643
9643
|
this.innerValue = 0;
|
|
9644
9644
|
this.onChange = (_) => {
|
|
@@ -9664,19 +9664,37 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9664
9664
|
}
|
|
9665
9665
|
chg() {
|
|
9666
9666
|
setTimeout(() => {
|
|
9667
|
-
this.
|
|
9667
|
+
if (this.decimal == 0)
|
|
9668
|
+
this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join(''));
|
|
9669
|
+
else
|
|
9670
|
+
this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
9671
|
+
if (typeof (this.value) == 'string') {
|
|
9672
|
+
if (this.decimal == 0)
|
|
9673
|
+
this.value = parseFloat(this.value.split('.').join('').split(',').join(''));
|
|
9674
|
+
else
|
|
9675
|
+
this.value = parseFloat(this.value.split('.').join('').split(',').join('.'));
|
|
9676
|
+
}
|
|
9677
|
+
console.log('this.value ', this.value);
|
|
9668
9678
|
this.onChange(this.value);
|
|
9669
|
-
},
|
|
9679
|
+
}, 0);
|
|
9670
9680
|
}
|
|
9671
9681
|
writeValue(value) {
|
|
9672
9682
|
if (value == null)
|
|
9673
9683
|
value = 0;
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9684
|
+
if (value !== this.innerValue) {
|
|
9685
|
+
if (typeof (value) == 'string') {
|
|
9686
|
+
if (this.decimal == 0)
|
|
9687
|
+
value = parseFloat(value.split('.').join('').split(',').join(''));
|
|
9688
|
+
else
|
|
9689
|
+
value = parseFloat(value.split('.').join('').split(',').join('.'));
|
|
9690
|
+
}
|
|
9691
|
+
this.innerValue = value;
|
|
9692
|
+
this.value = value;
|
|
9693
|
+
// console.log('writeValue ini ',this.value);
|
|
9694
|
+
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9695
|
+
// console.log('writeValue fin ',this.value);
|
|
9696
|
+
}
|
|
9697
|
+
// this.onChange(this.value);
|
|
9680
9698
|
}
|
|
9681
9699
|
registerOnChange(fn) {
|
|
9682
9700
|
this.onChange = fn;
|
|
@@ -9689,10 +9707,13 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9689
9707
|
// if (typeof (element.target.value) !== 'number')
|
|
9690
9708
|
// this.formattedAmount = this.currencyPipe.transform(this.value);
|
|
9691
9709
|
setTimeout(() => {
|
|
9692
|
-
|
|
9710
|
+
//if(this.decimal==0)
|
|
9711
|
+
// this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join(''));
|
|
9712
|
+
// else
|
|
9713
|
+
// this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
9693
9714
|
// this.writeValue(this.value);
|
|
9694
9715
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9695
|
-
},
|
|
9716
|
+
}, 0);
|
|
9696
9717
|
// Remove or comment this line if you dont want
|
|
9697
9718
|
// to show the formatted amount in the textbox.
|
|
9698
9719
|
// element.target.value = this.formattedAmount;
|
|
@@ -9711,10 +9732,10 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9711
9732
|
integer = '0';
|
|
9712
9733
|
return integer + fraction;
|
|
9713
9734
|
}
|
|
9714
|
-
|
|
9735
|
+
focus_e() {
|
|
9715
9736
|
try {
|
|
9716
9737
|
// this.value=this.value.split('.').join('');
|
|
9717
|
-
this.
|
|
9738
|
+
this.focus.emit(this.value);
|
|
9718
9739
|
}
|
|
9719
9740
|
catch (e) {
|
|
9720
9741
|
console.log(e);
|
|
@@ -9770,6 +9791,14 @@ __decorate([
|
|
|
9770
9791
|
Output(),
|
|
9771
9792
|
__metadata("design:type", EventEmitter)
|
|
9772
9793
|
], FHCurrencyFieldComponent.prototype, "change", void 0);
|
|
9794
|
+
__decorate([
|
|
9795
|
+
Output(),
|
|
9796
|
+
__metadata("design:type", EventEmitter)
|
|
9797
|
+
], FHCurrencyFieldComponent.prototype, "focus", void 0);
|
|
9798
|
+
__decorate([
|
|
9799
|
+
Output(),
|
|
9800
|
+
__metadata("design:type", EventEmitter)
|
|
9801
|
+
], FHCurrencyFieldComponent.prototype, "focus_out", void 0);
|
|
9773
9802
|
__decorate([
|
|
9774
9803
|
Output(),
|
|
9775
9804
|
__metadata("design:type", EventEmitter)
|
|
@@ -9783,12 +9812,13 @@ FHCurrencyFieldComponent = __decorate([
|
|
|
9783
9812
|
selector: 'FHCurrencyField',
|
|
9784
9813
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
|
|
9785
9814
|
template: `
|
|
9815
|
+
|
|
9786
9816
|
<mat-form-field [hidden]="!enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
|
|
9787
9817
|
<input type="text" style="text-align:right" #el matInput
|
|
9788
9818
|
[disabled]="!enabled" [(ngModel)]="formattedAmount"
|
|
9789
|
-
(blur)="transformAmount($event)" [style.color]="getStyle_color()" (keydown)="kd($event)"
|
|
9790
|
-
(focus)="
|
|
9791
|
-
|
|
9819
|
+
(blur)="transformAmount($event);focus_out.emit(value);" [style.color]="getStyle_color()" (keydown)="kd($event)"
|
|
9820
|
+
(focus)="focus_e()" (keyup)="chg()"
|
|
9821
|
+
>
|
|
9792
9822
|
</mat-form-field>
|
|
9793
9823
|
<mat-form-field [hidden]="enabled || hidden" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
|
|
9794
9824
|
<input type="text" style="text-align:right" [style.color]="getStyle_color()" #el1 matInput [disabled]="true"
|