@fluxhub/fluxhub-lib 9.0.125 → 9.0.127
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 +71 -60
- 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 +80 -85
- package/esm2015/lib/services/doquery.service.js +8 -10
- package/esm5/lib/controls/fhcurrencyfield.js +68 -55
- package/esm5/lib/services/doquery.service.js +8 -10
- package/fesm2015/fluxhub-fluxhub-lib.js +83 -90
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +71 -60
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhcurrencyfield.d.ts +6 -6
- package/package.json +1 -1
|
@@ -828,17 +828,15 @@ var QueryService = /** @class */ (function () {
|
|
|
828
828
|
queryp.values[i] = '' + queryp.values[i];
|
|
829
829
|
if (queryp.types[i] == 'date')
|
|
830
830
|
queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
|
|
831
|
-
if (queryp.types[i] == '
|
|
831
|
+
if (queryp.types[i] == 'date') {
|
|
832
|
+
queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
|
|
833
|
+
if (queryp.values[i].split('0').join('') == 'NaN-NaN-NaN')
|
|
834
|
+
queryp.values[i] = 'dbnull';
|
|
835
|
+
}
|
|
836
|
+
if (queryp.types[i] == 'datetime') {
|
|
832
837
|
queryp.values[i] = this.uti_s.sql_date_time(queryp.values[i]);
|
|
833
|
-
|
|
834
|
-
if (queryp.values[i] + '' == '')
|
|
838
|
+
if (queryp.values[i].split('0').join('') == 'NaN-NaN-NaN NaN:NaN')
|
|
835
839
|
queryp.values[i] = 'dbnull';
|
|
836
|
-
else {
|
|
837
|
-
if (isNaN(queryp.values[i]))
|
|
838
|
-
queryp.values[i] = '0';
|
|
839
|
-
else
|
|
840
|
-
queryp.values[i] = '' + queryp.values[i];
|
|
841
|
-
}
|
|
842
840
|
}
|
|
843
841
|
if (queryp.types[i] == 'string' && queryp.values[i] == null)
|
|
844
842
|
queryp.values[i] = 'dbnull';
|
|
@@ -8700,28 +8698,34 @@ var FHLogPanelComponent = /** @class */ (function () {
|
|
|
8700
8698
|
return FHLogPanelComponent;
|
|
8701
8699
|
}());
|
|
8702
8700
|
|
|
8703
|
-
var noop$6 = function () {
|
|
8701
|
+
var noop$6 = function () {
|
|
8702
|
+
};
|
|
8704
8703
|
var ɵ0$6 = noop$6;
|
|
8705
8704
|
var CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
|
|
8706
8705
|
provide: NG_VALUE_ACCESSOR,
|
|
8707
8706
|
useExisting: forwardRef(function () { return FHCurrencyFieldComponent; }),
|
|
8708
|
-
multi: true
|
|
8707
|
+
multi: true
|
|
8709
8708
|
};
|
|
8710
8709
|
var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
8711
8710
|
function FHCurrencyFieldComponent() {
|
|
8712
8711
|
this.decimal = 2;
|
|
8713
|
-
this.label =
|
|
8712
|
+
this.label = '';
|
|
8714
8713
|
this.required = false;
|
|
8715
8714
|
this.enabled = true;
|
|
8716
8715
|
this.hidden = false;
|
|
8717
|
-
this.color =
|
|
8718
|
-
this.m_color =
|
|
8716
|
+
this.color = '';
|
|
8717
|
+
this.m_color = '';
|
|
8719
8718
|
this.label_width = "";
|
|
8720
8719
|
this.change = new EventEmitter();
|
|
8720
|
+
this.focus = new EventEmitter();
|
|
8721
|
+
this.focus_out = 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,27 +8745,36 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8750
8745
|
FHCurrencyFieldComponent.prototype.chg = function () {
|
|
8751
8746
|
var _this = this;
|
|
8752
8747
|
setTimeout(function () {
|
|
8753
|
-
_this.
|
|
8748
|
+
if (_this.decimal == 0)
|
|
8749
|
+
_this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join(''));
|
|
8750
|
+
else
|
|
8751
|
+
_this.value = parseFloat(_this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
8752
|
+
if (typeof (_this.value) == 'string') {
|
|
8753
|
+
if (_this.decimal == 0)
|
|
8754
|
+
_this.value = parseFloat(_this.value.split('.').join('').split(',').join(''));
|
|
8755
|
+
else
|
|
8756
|
+
_this.value = parseFloat(_this.value.split('.').join('').split(',').join('.'));
|
|
8757
|
+
}
|
|
8758
|
+
console.log('this.value ', _this.value);
|
|
8754
8759
|
_this.onChange(_this.value);
|
|
8755
|
-
},
|
|
8760
|
+
}, 0);
|
|
8756
8761
|
};
|
|
8757
8762
|
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
8763
|
if (value == null)
|
|
8766
8764
|
value = 0;
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8765
|
+
if (value !== this.innerValue) {
|
|
8766
|
+
if (typeof (value) == 'string') {
|
|
8767
|
+
if (this.decimal == 0)
|
|
8768
|
+
value = parseFloat(value.split('.').join('').split(',').join(''));
|
|
8769
|
+
else
|
|
8770
|
+
value = parseFloat(value.split('.').join('').split(',').join('.'));
|
|
8771
|
+
}
|
|
8772
|
+
this.innerValue = value;
|
|
8773
|
+
this.value = value;
|
|
8774
|
+
// console.log('writeValue ini ',this.value);
|
|
8775
|
+
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
8776
|
+
// console.log('writeValue fin ',this.value);
|
|
8770
8777
|
}
|
|
8771
|
-
this.value = value;
|
|
8772
|
-
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
8773
|
-
//}
|
|
8774
8778
|
// this.onChange(this.value);
|
|
8775
8779
|
};
|
|
8776
8780
|
FHCurrencyFieldComponent.prototype.registerOnChange = function (fn) {
|
|
@@ -8785,10 +8789,13 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8785
8789
|
// if (typeof (element.target.value) !== 'number')
|
|
8786
8790
|
// this.formattedAmount = this.currencyPipe.transform(this.value);
|
|
8787
8791
|
setTimeout(function () {
|
|
8788
|
-
|
|
8792
|
+
//if(this.decimal==0)
|
|
8793
|
+
// this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join(''));
|
|
8794
|
+
// else
|
|
8795
|
+
// this.value = parseFloat(this.formattedAmount.split('.').join('').split(',').join('.'));
|
|
8789
8796
|
// this.writeValue(this.value);
|
|
8790
8797
|
_this.formattedAmount = _this.transform(_this.value, _this.decimal);
|
|
8791
|
-
},
|
|
8798
|
+
}, 0);
|
|
8792
8799
|
// Remove or comment this line if you dont want
|
|
8793
8800
|
// to show the formatted amount in the textbox.
|
|
8794
8801
|
// element.target.value = this.formattedAmount;
|
|
@@ -8799,23 +8806,19 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8799
8806
|
};
|
|
8800
8807
|
FHCurrencyFieldComponent.prototype.transform = function (value, fractionSize) {
|
|
8801
8808
|
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";
|
|
8809
|
+
var _a = __read((value || "").toString().split('.'), 2), integer = _a[0], _b = _a[1], fraction = _b === void 0 ? "" : _b;
|
|
8810
|
+
fraction = fractionSize > 0
|
|
8811
|
+
? ',' + (fraction + '000000').substring(0, fractionSize)
|
|
8812
|
+
: "";
|
|
8813
|
+
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
8814
|
+
if (integer == '')
|
|
8815
|
+
integer = '0';
|
|
8813
8816
|
return integer + fraction;
|
|
8814
8817
|
};
|
|
8815
|
-
FHCurrencyFieldComponent.prototype.
|
|
8818
|
+
FHCurrencyFieldComponent.prototype.focus_e = function () {
|
|
8816
8819
|
try {
|
|
8817
8820
|
// this.value=this.value.split('.').join('');
|
|
8818
|
-
this.
|
|
8821
|
+
this.focus.emit(this.value);
|
|
8819
8822
|
}
|
|
8820
8823
|
catch (e) {
|
|
8821
8824
|
console.log(e);
|
|
@@ -8836,7 +8839,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8836
8839
|
});
|
|
8837
8840
|
};
|
|
8838
8841
|
__decorate([
|
|
8839
|
-
ViewChild(
|
|
8842
|
+
ViewChild('el'),
|
|
8840
8843
|
__metadata("design:type", ElementRef)
|
|
8841
8844
|
], FHCurrencyFieldComponent.prototype, "el", void 0);
|
|
8842
8845
|
__decorate([
|
|
@@ -8871,6 +8874,14 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8871
8874
|
Output(),
|
|
8872
8875
|
__metadata("design:type", EventEmitter)
|
|
8873
8876
|
], FHCurrencyFieldComponent.prototype, "change", void 0);
|
|
8877
|
+
__decorate([
|
|
8878
|
+
Output(),
|
|
8879
|
+
__metadata("design:type", EventEmitter)
|
|
8880
|
+
], FHCurrencyFieldComponent.prototype, "focus", void 0);
|
|
8881
|
+
__decorate([
|
|
8882
|
+
Output(),
|
|
8883
|
+
__metadata("design:type", EventEmitter)
|
|
8884
|
+
], FHCurrencyFieldComponent.prototype, "focus_out", void 0);
|
|
8874
8885
|
__decorate([
|
|
8875
8886
|
Output(),
|
|
8876
8887
|
__metadata("design:type", EventEmitter)
|
|
@@ -8881,10 +8892,10 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
8881
8892
|
], FHCurrencyFieldComponent.prototype, "value", void 0);
|
|
8882
8893
|
FHCurrencyFieldComponent = __decorate([
|
|
8883
8894
|
Component({
|
|
8884
|
-
selector:
|
|
8895
|
+
selector: 'FHCurrencyField',
|
|
8885
8896
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
|
|
8886
|
-
template: "\n <mat-form-field
|
|
8887
|
-
styles: [""]
|
|
8897
|
+
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 ",
|
|
8898
|
+
styles: ["\n\n "]
|
|
8888
8899
|
}),
|
|
8889
8900
|
__metadata("design:paramtypes", [])
|
|
8890
8901
|
], FHCurrencyFieldComponent);
|