ng-inail-common 1.0.430 → 1.0.434
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/ng-inail-common.umd.js +24 -3
- package/bundles/ng-inail-common.umd.js.map +1 -1
- package/bundles/ng-inail-common.umd.min.js +1 -1
- package/bundles/ng-inail-common.umd.min.js.map +1 -1
- package/esm2015/lib/components/ux/input-money/input-money.component.js +34 -4
- package/esm5/lib/components/ux/input-money/input-money.component.js +35 -4
- package/fesm2015/ng-inail-common.js +27 -3
- package/fesm2015/ng-inail-common.js.map +1 -1
- package/fesm5/ng-inail-common.js +28 -3
- package/fesm5/ng-inail-common.js.map +1 -1
- package/lib/components/ux/input-money/input-money.component.d.ts +3 -0
- package/package.json +1 -1
|
@@ -9955,10 +9955,16 @@
|
|
|
9955
9955
|
_this.getDescError = ( /**
|
|
9956
9956
|
* @return {?}
|
|
9957
9957
|
*/function () { return _this.descError; });
|
|
9958
|
+
_this.isTypingAtTheBeginning = ( /**
|
|
9959
|
+
* @return {?}
|
|
9960
|
+
*/function () { return _this.formControlElement.nativeElement.selectionStart === 0; });
|
|
9961
|
+
// isValueFullSelected = (): boolean => this.inputValue != undefined && this.inputValue.length > 0
|
|
9962
|
+
// && (this.formControlElement.nativeElement.selectionEnd - this.formControlElement.nativeElement.selectionStart) === this.inputValue.length
|
|
9963
|
+
// isWrongMinus = (ev: KeyboardEvent): boolean => ev.key == '-' && (isBlankOrNull(this.inputValue) || this.inputValue?.indexOf('-') > 0);
|
|
9958
9964
|
_this.isWrongMinus = ( /**
|
|
9959
9965
|
* @param {?} ev
|
|
9960
9966
|
* @return {?}
|
|
9961
|
-
*/function (ev) { return ev.key == '-' &&
|
|
9967
|
+
*/function (ev) { return ev.key == '-' && !_this.isTypingAtTheBeginning(); });
|
|
9962
9968
|
_this.isWrongComma = ( /**
|
|
9963
9969
|
* @param {?} ev
|
|
9964
9970
|
* @return {?}
|
|
@@ -9967,6 +9973,17 @@
|
|
|
9967
9973
|
* @param {?} ev
|
|
9968
9974
|
* @return {?}
|
|
9969
9975
|
*/function (ev) { return ev.key == ',' && _this.numberOfDecimals <= 0; });
|
|
9976
|
+
_this.isCtrlACV = ( /**
|
|
9977
|
+
* @param {?} ev
|
|
9978
|
+
* @return {?}
|
|
9979
|
+
*/function (ev) { return (ev.key == 'a' || ev.key == 'c' || ev.key == 'v') && ev.composed === true && ev.ctrlKey === true; });
|
|
9980
|
+
_this.isDecimalDigit = ( /**
|
|
9981
|
+
* @return {?}
|
|
9982
|
+
*/function () {
|
|
9983
|
+
/** @type {?} */
|
|
9984
|
+
var index = _this.inputValue.indexOf(',');
|
|
9985
|
+
return index >= 0 && _this.formControlElement.nativeElement.selectionStart > index;
|
|
9986
|
+
});
|
|
9970
9987
|
_this.isWrongDigit = ( /**
|
|
9971
9988
|
* @param {?} ev
|
|
9972
9989
|
* @return {?}
|
|
@@ -9978,7 +9995,7 @@
|
|
|
9978
9995
|
|| _this.isWrongMinus(ev)
|
|
9979
9996
|
|| _this.isWrongComma(ev)
|
|
9980
9997
|
|| _this.isCommaWithNoDecimals(ev)
|
|
9981
|
-
|| _this.isMaximumNumberOfDecimalsReached(ev);
|
|
9998
|
+
|| (_this.isDecimalDigit() && _this.isMaximumNumberOfDecimalsReached(ev));
|
|
9982
9999
|
});
|
|
9983
10000
|
return _this;
|
|
9984
10001
|
}
|
|
@@ -10143,7 +10160,11 @@
|
|
|
10143
10160
|
* @return {?}
|
|
10144
10161
|
*/
|
|
10145
10162
|
function () {
|
|
10163
|
+
var _this = this;
|
|
10146
10164
|
this.impostaValoreVisibile();
|
|
10165
|
+
setTimeout(( /**
|
|
10166
|
+
* @return {?}
|
|
10167
|
+
*/function () { return _this.formControlElement.nativeElement.select(); }));
|
|
10147
10168
|
};
|
|
10148
10169
|
/**
|
|
10149
10170
|
* @param {?} ev
|
|
@@ -10170,7 +10191,7 @@
|
|
|
10170
10191
|
* @return {?}
|
|
10171
10192
|
*/
|
|
10172
10193
|
function (ev) {
|
|
10173
|
-
if (this.isWrongDigit(ev)) {
|
|
10194
|
+
if (this.isWrongDigit(ev) && !this.isCtrlACV(ev)) {
|
|
10174
10195
|
ev.preventDefault();
|
|
10175
10196
|
}
|
|
10176
10197
|
};
|