@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
|
@@ -806,7 +806,7 @@ var QueryService = /** @class */ (function () {
|
|
|
806
806
|
// console.log('QueryService url: '+ this.url);
|
|
807
807
|
if (queryp.types != null && queryp.sql.indexOf('_MULTI') == -1)
|
|
808
808
|
for (var i = 0; i < queryp.types.length; i++) {
|
|
809
|
-
if (queryp.values[i] == null)
|
|
809
|
+
if (queryp.values[i] == null || queryp.values[i] == 'NaN-0NaN-0NaN' || queryp.values[i] == 'NaN')
|
|
810
810
|
queryp.values[i] = 'dbnull';
|
|
811
811
|
else {
|
|
812
812
|
if (queryp.types[i] == 'boolean')
|
|
@@ -8700,28 +8700,32 @@ var FHLogPanelComponent = /** @class */ (function () {
|
|
|
8700
8700
|
return FHLogPanelComponent;
|
|
8701
8701
|
}());
|
|
8702
8702
|
|
|
8703
|
-
var noop$6 = function () {
|
|
8703
|
+
var noop$6 = function () {
|
|
8704
|
+
};
|
|
8704
8705
|
var ɵ0$6 = noop$6;
|
|
8705
8706
|
var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
|
|
8706
8707
|
provide: NG_VALUE_ACCESSOR,
|
|
8707
8708
|
useExisting: forwardRef(function () { return FHCurrencyFieldComponent; }),
|
|
8708
|
-
multi: true
|
|
8709
|
+
multi: true
|
|
8709
8710
|
};
|
|
8710
8711
|
var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
8711
8712
|
function FHCurrencyFieldComponent() {
|
|
8712
8713
|
this.decimal = 2;
|
|
8713
|
-
this.label =
|
|
8714
|
+
this.label = '';
|
|
8714
8715
|
this.required = false;
|
|
8715
8716
|
this.enabled = true;
|
|
8716
8717
|
this.hidden = false;
|
|
8717
|
-
this.color =
|
|
8718
|
-
this.m_color =
|
|
8718
|
+
this.color = '';
|
|
8719
|
+
this.m_color = '';
|
|
8719
8720
|
this.label_width = "";
|
|
8720
8721
|
this.change = new EventEmitter();
|
|
8721
8722
|
this.enter_pressed = new EventEmitter();
|
|
8722
|
-
this.
|
|
8723
|
-
this.
|
|
8724
|
-
|
|
8723
|
+
this.innerValue = 0;
|
|
8724
|
+
this.onChange = function (_) {
|
|
8725
|
+
};
|
|
8726
|
+
this.onTouched = function () {
|
|
8727
|
+
};
|
|
8728
|
+
this.formattedAmount = '0,00';
|
|
8725
8729
|
this.value = 0;
|
|
8726
8730
|
}
|
|
8727
8731
|
FHCurrencyFieldComponent.prototype.kd = function (event) {
|
|
@@ -8729,15 +8733,6 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8729
8733
|
this.enter_pressed.emit();
|
|
8730
8734
|
}
|
|
8731
8735
|
};
|
|
8732
|
-
FHCurrencyFieldComponent.prototype.click_select_allf = function (element) {
|
|
8733
|
-
var _this = this;
|
|
8734
|
-
setTimeout(function () {
|
|
8735
|
-
_this.el.nativeElement.select();
|
|
8736
|
-
}, 200);
|
|
8737
|
-
};
|
|
8738
|
-
FHCurrencyFieldComponent.prototype.select_allf = function (element) {
|
|
8739
|
-
this.el.nativeElement.select();
|
|
8740
|
-
};
|
|
8741
8736
|
FHCurrencyFieldComponent.prototype.getStyle_color = function () {
|
|
8742
8737
|
return this.m_color;
|
|
8743
8738
|
};
|
|
@@ -8750,28 +8745,19 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8750
8745
|
FHCurrencyFieldComponent.prototype.chg = function () {
|
|
8751
8746
|
var _this = this;
|
|
8752
8747
|
setTimeout(function () {
|
|
8753
|
-
_this.value = parseFloat(_this.formattedAmount.split(
|
|
8748
|
+
_this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
8754
8749
|
_this.onChange(_this.value);
|
|
8755
8750
|
}, 50);
|
|
8756
8751
|
};
|
|
8757
8752
|
FHCurrencyFieldComponent.prototype.writeValue = function (value) {
|
|
8758
|
-
// console.log(value,parseFloat(
|
|
8759
|
-
// this.formattedAmount.split(".").join("").split(",").join(".")));
|
|
8760
|
-
if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
|
|
8761
|
-
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
8762
|
-
this.value = value;
|
|
8763
|
-
return;
|
|
8764
|
-
}
|
|
8765
8753
|
if (value == null)
|
|
8766
8754
|
value = 0;
|
|
8767
8755
|
// if (value !== this.innerValue) {
|
|
8768
|
-
|
|
8769
|
-
value = parseFloat(value.split(".").join("").split(",").join("."));
|
|
8770
|
-
}
|
|
8756
|
+
this.innerValue = value;
|
|
8771
8757
|
this.value = value;
|
|
8772
8758
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
8773
8759
|
//}
|
|
8774
|
-
|
|
8760
|
+
this.onChange(this.value);
|
|
8775
8761
|
};
|
|
8776
8762
|
FHCurrencyFieldComponent.prototype.registerOnChange = function (fn) {
|
|
8777
8763
|
this.onChange = fn;
|
|
@@ -8785,7 +8771,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8785
8771
|
// if (typeof (element.target.value) !== 'number')
|
|
8786
8772
|
// this.formattedAmount = this.currencyPipe.transform(this.value);
|
|
8787
8773
|
setTimeout(function () {
|
|
8788
|
-
_this.value = parseFloat(_this.formattedAmount.split(
|
|
8774
|
+
_this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
8789
8775
|
// this.writeValue(this.value);
|
|
8790
8776
|
_this.formattedAmount = _this.transform(_this.value, _this.decimal);
|
|
8791
8777
|
}, 50);
|
|
@@ -8799,17 +8785,13 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8799
8785
|
};
|
|
8800
8786
|
FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
|
|
8801
8787
|
if (fractionSize === void 0) { fractionSize = 2; }
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
: "";
|
|
8810
|
-
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
8811
|
-
if (integer == "")
|
|
8812
|
-
integer = "0";
|
|
8788
|
+
var _a = __read((value || "").toString().split('.'), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
|
|
8789
|
+
fraction = fractionSize > 0
|
|
8790
|
+
? ',' + (fraction + '000000').substring(0, fractionSize)
|
|
8791
|
+
: "";
|
|
8792
|
+
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
8793
|
+
if (integer == '')
|
|
8794
|
+
integer = '0';
|
|
8813
8795
|
return integer + fraction;
|
|
8814
8796
|
};
|
|
8815
8797
|
FHCurrencyFieldComponent.prototype.removeCurrencyPipeFormat = function (element) {
|
|
@@ -8836,7 +8818,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8836
8818
|
});
|
|
8837
8819
|
};
|
|
8838
8820
|
__decorate([
|
|
8839
|
-
ViewChild(
|
|
8821
|
+
ViewChild('el'),
|
|
8840
8822
|
__metadata("design:type", ElementRef)
|
|
8841
8823
|
], FHCurrencyFieldComponent.prototype, "el", void 0);
|
|
8842
8824
|
__decorate([
|
|
@@ -8881,10 +8863,10 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8881
8863
|
], FHCurrencyFieldComponent.prototype, "value", void 0);
|
|
8882
8864
|
FHCurrencyFieldComponent = __decorate([
|
|
8883
8865
|
Component({
|
|
8884
|
-
selector:
|
|
8866
|
+
selector: 'FHCurrencyField',
|
|
8885
8867
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
|
|
8886
|
-
template: "\n <mat-form-field
|
|
8887
|
-
styles: [""]
|
|
8868
|
+
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 ",
|
|
8869
|
+
styles: ["\n\n "]
|
|
8888
8870
|
}),
|
|
8889
8871
|
__metadata("design:paramtypes", [])
|
|
8890
8872
|
], FHCurrencyFieldComponent);
|