intelicoreact 0.1.77 → 0.1.78
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.
|
@@ -67,8 +67,6 @@ function InputMask() {
|
|
|
67
67
|
isIconLeft = _ref.isIconLeft,
|
|
68
68
|
isIconRight = _ref.isIconRight,
|
|
69
69
|
value = _ref.value,
|
|
70
|
-
_ref$onChange = _ref.onChange,
|
|
71
|
-
onChangeProp = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
72
70
|
_ref$blinkErrors = _ref.blinkErrors,
|
|
73
71
|
blinkErrors = _ref$blinkErrors === void 0 ? true : _ref$blinkErrors,
|
|
74
72
|
_ref$blinkDuration = _ref.blinkDuration,
|
|
@@ -82,6 +80,8 @@ function InputMask() {
|
|
|
82
80
|
_ref$error = _ref.error,
|
|
83
81
|
customError = _ref$error === void 0 ? '' : _ref$error,
|
|
84
82
|
ref = _ref.ref,
|
|
83
|
+
_ref$onChange = _ref.onChange,
|
|
84
|
+
onChangeProp = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
85
85
|
_ref$onFocus = _ref.onFocus,
|
|
86
86
|
onFocusProp = _ref$onFocus === void 0 ? function () {} : _ref$onFocus,
|
|
87
87
|
_ref$onBlur = _ref.onBlur,
|
|
@@ -758,6 +758,8 @@ function InputMask() {
|
|
|
758
758
|
|
|
759
759
|
var _onKeyDown = /*#__PURE__*/function () {
|
|
760
760
|
var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(e) {
|
|
761
|
+
var _innerValue$0$ref;
|
|
762
|
+
|
|
761
763
|
var i,
|
|
762
764
|
key,
|
|
763
765
|
ctrlKey,
|
|
@@ -779,55 +781,56 @@ function InputMask() {
|
|
|
779
781
|
|
|
780
782
|
case 3:
|
|
781
783
|
key = e.key, ctrlKey = e.ctrlKey, altKey = e.altKey;
|
|
784
|
+
e.target = ((_innerValue$0$ref = innerValue[0].ref) === null || _innerValue$0$ref === void 0 ? void 0 : _innerValue$0$ref.current) || e.target;
|
|
782
785
|
onKeyDownProp(e, i);
|
|
783
786
|
|
|
784
787
|
if (!(_indexConstants.KEYBOARD_SERVICE_KEYS.includes(key) && _config.EXCLUDED_KEYS.includes(key))) {
|
|
785
|
-
_context2.next =
|
|
788
|
+
_context2.next = 8;
|
|
786
789
|
break;
|
|
787
790
|
}
|
|
788
791
|
|
|
789
792
|
return _context2.abrupt("return", true);
|
|
790
793
|
|
|
791
|
-
case
|
|
794
|
+
case 8:
|
|
792
795
|
setError(false);
|
|
793
796
|
clearErrorMessage();
|
|
794
797
|
|
|
795
798
|
if (!(ctrlKey || altKey)) {
|
|
796
|
-
_context2.next =
|
|
799
|
+
_context2.next = 13;
|
|
797
800
|
break;
|
|
798
801
|
}
|
|
799
802
|
|
|
800
803
|
if (!_indexConstants.KEYBOARD_SERVICE_KEYS.includes(key)) handleKeyCombinations(e, i);
|
|
801
804
|
return _context2.abrupt("return", true);
|
|
802
805
|
|
|
803
|
-
case
|
|
806
|
+
case 13:
|
|
804
807
|
e.preventDefault();
|
|
805
808
|
e.stopPropagation();
|
|
806
809
|
|
|
807
810
|
if (!_indexConstants.KEYBOARD_SERVICE_KEYS.includes(key)) {
|
|
808
|
-
_context2.next =
|
|
811
|
+
_context2.next = 19;
|
|
809
812
|
break;
|
|
810
813
|
}
|
|
811
814
|
|
|
812
815
|
_context2.t0 = handleServiceKeyDown(e, i);
|
|
813
|
-
_context2.next =
|
|
816
|
+
_context2.next = 22;
|
|
814
817
|
break;
|
|
815
818
|
|
|
816
|
-
case
|
|
817
|
-
_context2.next =
|
|
819
|
+
case 19:
|
|
820
|
+
_context2.next = 21;
|
|
818
821
|
return handleKeyDown(e, i);
|
|
819
822
|
|
|
820
|
-
case
|
|
823
|
+
case 21:
|
|
821
824
|
_context2.t0 = _context2.sent;
|
|
822
825
|
|
|
823
|
-
case
|
|
826
|
+
case 22:
|
|
824
827
|
handleResult = _context2.t0;
|
|
825
828
|
|
|
826
829
|
if (blinkErrors && !handleResult && i !== null) {
|
|
827
830
|
setBlinkError(true);
|
|
828
831
|
}
|
|
829
832
|
|
|
830
|
-
case
|
|
833
|
+
case 24:
|
|
831
834
|
case "end":
|
|
832
835
|
return _context2.stop();
|
|
833
836
|
}
|