@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
|
@@ -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)
|
|
942
942
|
queryp.values[i] = 'dbnull';
|
|
943
943
|
else {
|
|
944
944
|
if (queryp.types[i] == 'boolean')
|
|
@@ -960,17 +960,15 @@
|
|
|
960
960
|
queryp.values[i] = '' + queryp.values[i];
|
|
961
961
|
if (queryp.types[i] == 'date')
|
|
962
962
|
queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
|
|
963
|
-
if (queryp.types[i] == '
|
|
963
|
+
if (queryp.types[i] == 'date') {
|
|
964
|
+
queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
|
|
965
|
+
if (queryp.values[i].split('0').join('') == 'NaN-NaN-NaN')
|
|
966
|
+
queryp.values[i] = null;
|
|
967
|
+
}
|
|
968
|
+
if (queryp.types[i] == 'datetime') {
|
|
964
969
|
queryp.values[i] = this.uti_s.sql_date_time(queryp.values[i]);
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
queryp.values[i] = 'dbnull';
|
|
968
|
-
else {
|
|
969
|
-
if (isNaN(queryp.values[i]))
|
|
970
|
-
queryp.values[i] = '0';
|
|
971
|
-
else
|
|
972
|
-
queryp.values[i] = '' + queryp.values[i];
|
|
973
|
-
}
|
|
970
|
+
if (queryp.values[i].split('0').join('') == 'NaN-NaN-NaN NaN:NaN')
|
|
971
|
+
queryp.values[i] = null;
|
|
974
972
|
}
|
|
975
973
|
if (queryp.types[i] == 'string' && queryp.values[i] == null)
|
|
976
974
|
queryp.values[i] = 'dbnull';
|
|
@@ -8851,6 +8849,8 @@
|
|
|
8851
8849
|
this.m_color = '';
|
|
8852
8850
|
this.label_width = "";
|
|
8853
8851
|
this.change = new core.EventEmitter();
|
|
8852
|
+
this.focus = new core.EventEmitter();
|
|
8853
|
+
this.focus_out = new core.EventEmitter();
|
|
8854
8854
|
this.enter_pressed = new core.EventEmitter();
|
|
8855
8855
|
this.innerValue = 0;
|
|
8856
8856
|
this.onChange = function (_) {
|
|
@@ -8877,19 +8877,37 @@
|
|
|
8877
8877
|
FHCurrencyFieldComponent.prototype.chg = function () {
|
|
8878
8878
|
var _this = this;
|
|
8879
8879
|
setTimeout(function () {
|
|
8880
|
-
_this.
|
|
8880
|
+
if (_this.decimal == 0)
|
|
8881
|
+
_this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join(''));
|
|
8882
|
+
else
|
|
8883
|
+
_this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
8884
|
+
if (typeof (_this.value) == 'string') {
|
|
8885
|
+
if (_this.decimal == 0)
|
|
8886
|
+
_this.value = parseFloat(_this.value.split('.').join('').split(',').join(''));
|
|
8887
|
+
else
|
|
8888
|
+
_this.value = parseFloat(_this.value.split('.').join('').split(',').join('.'));
|
|
8889
|
+
}
|
|
8890
|
+
console.log('this.value ', _this.value);
|
|
8881
8891
|
_this.onChange(_this.value);
|
|
8882
|
-
},
|
|
8892
|
+
}, 0);
|
|
8883
8893
|
};
|
|
8884
8894
|
FHCurrencyFieldComponent.prototype.writeValue = function (value) {
|
|
8885
8895
|
if (value == null)
|
|
8886
8896
|
value = 0;
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8897
|
+
if (value !== this.innerValue) {
|
|
8898
|
+
if (typeof (value) == 'string') {
|
|
8899
|
+
if (this.decimal == 0)
|
|
8900
|
+
value = parseFloat(value.split('.').join('').split(',').join(''));
|
|
8901
|
+
else
|
|
8902
|
+
value = parseFloat(value.split('.').join('').split(',').join('.'));
|
|
8903
|
+
}
|
|
8904
|
+
this.innerValue = value;
|
|
8905
|
+
this.value = value;
|
|
8906
|
+
// console.log('writeValue ini ',this.value);
|
|
8907
|
+
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
8908
|
+
// console.log('writeValue fin ',this.value);
|
|
8909
|
+
}
|
|
8910
|
+
// this.onChange(this.value);
|
|
8893
8911
|
};
|
|
8894
8912
|
FHCurrencyFieldComponent.prototype.registerOnChange = function (fn) {
|
|
8895
8913
|
this.onChange = fn;
|
|
@@ -8903,10 +8921,13 @@
|
|
|
8903
8921
|
// if (typeof (element.target.value) !== 'number')
|
|
8904
8922
|
// this.formattedAmount = this.currencyPipe.transform(this.value);
|
|
8905
8923
|
setTimeout(function () {
|
|
8906
|
-
|
|
8924
|
+
//if(this.decimal==0)
|
|
8925
|
+
// this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join(''));
|
|
8926
|
+
// else
|
|
8927
|
+
// this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
8907
8928
|
// this.writeValue(this.value);
|
|
8908
8929
|
_this.formattedAmount = _this.transform(_this.value, _this.decimal);
|
|
8909
|
-
},
|
|
8930
|
+
}, 0);
|
|
8910
8931
|
// Remove or comment this line if you dont want
|
|
8911
8932
|
// to show the formatted amount in the textbox.
|
|
8912
8933
|
// element.target.value = this.formattedAmount;
|
|
@@ -8926,10 +8947,10 @@
|
|
|
8926
8947
|
integer = '0';
|
|
8927
8948
|
return integer + fraction;
|
|
8928
8949
|
};
|
|
8929
|
-
FHCurrencyFieldComponent.prototype.
|
|
8950
|
+
FHCurrencyFieldComponent.prototype.focus_e = function () {
|
|
8930
8951
|
try {
|
|
8931
8952
|
// this.value=this.value.split('.').join('');
|
|
8932
|
-
this.
|
|
8953
|
+
this.focus.emit(this.value);
|
|
8933
8954
|
}
|
|
8934
8955
|
catch (e) {
|
|
8935
8956
|
console.log(e);
|
|
@@ -8985,6 +9006,14 @@
|
|
|
8985
9006
|
core.Output(),
|
|
8986
9007
|
__metadata("design:type", core.EventEmitter)
|
|
8987
9008
|
], FHCurrencyFieldComponent.prototype, "change", void 0);
|
|
9009
|
+
__decorate([
|
|
9010
|
+
core.Output(),
|
|
9011
|
+
__metadata("design:type", core.EventEmitter)
|
|
9012
|
+
], FHCurrencyFieldComponent.prototype, "focus", void 0);
|
|
9013
|
+
__decorate([
|
|
9014
|
+
core.Output(),
|
|
9015
|
+
__metadata("design:type", core.EventEmitter)
|
|
9016
|
+
], FHCurrencyFieldComponent.prototype, "focus_out", void 0);
|
|
8988
9017
|
__decorate([
|
|
8989
9018
|
core.Output(),
|
|
8990
9019
|
__metadata("design:type", core.EventEmitter)
|
|
@@ -8997,7 +9026,7 @@
|
|
|
8997
9026
|
core.Component({
|
|
8998
9027
|
selector: 'FHCurrencyField',
|
|
8999
9028
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
|
|
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)
|
|
9029
|
+
template: "\n\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);focus_out.emit(value);\" [style.color]=\"getStyle_color()\" (keydown)=\"kd($event)\"\n (focus)=\"focus_e()\" (keyup)=\"chg()\"\n >\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
9030
|
styles: ["\n\n "]
|
|
9002
9031
|
}),
|
|
9003
9032
|
__metadata("design:paramtypes", [])
|