@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.
- package/bundles/fluxhub-fluxhub-lib.umd.js +28 -46
- 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 -79
- package/esm2015/lib/services/doquery.service.js +2 -2
- package/esm5/lib/controls/fhcurrencyfield.js +31 -49
- package/esm5/lib/services/doquery.service.js +2 -2
- package/fesm2015/fluxhub-fluxhub-lib.js +39 -76
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +28 -46
- 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
|
@@ -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.
|
|
8855
|
-
this.
|
|
8856
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
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(
|
|
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:
|
|
8998
|
+
selector: 'FHCurrencyField',
|
|
9017
8999
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
|
|
9018
|
-
template: "\n <mat-form-field
|
|
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);
|