@syncfusion/ej2-inputs 22.2.5 → 22.2.7
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/CHANGELOG.md +8 -0
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +67 -8
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +67 -8
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +6 -6
- package/src/form-validator/form-validator.js +60 -8
- package/src/textbox/textbox.d.ts +1 -0
- package/src/textbox/textbox.js +7 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 22.2.
|
|
3
|
+
* version : 22.2.7
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-inputs@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-inputs@22.
|
|
3
|
+
"_id": "@syncfusion/ej2-inputs@22.2.5",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-CaRDPv2lDQ41JkSSavDI6EqP9OFDIXzjWFpPRcK3uYyDJmN9GLpjEr3aDQ+lSUQz0RMucHYX3yGDWPwL3GEnPg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-inputs",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"/@syncfusion/ej2-schedule",
|
|
40
40
|
"/@syncfusion/ej2-vue-inputs"
|
|
41
41
|
],
|
|
42
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-inputs/-/ej2-inputs-22.
|
|
43
|
-
"_shasum": "
|
|
42
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-inputs/-/ej2-inputs-22.2.5.tgz",
|
|
43
|
+
"_shasum": "011d05921cd27fa496623263e41e13ac51776885",
|
|
44
44
|
"_spec": "@syncfusion/ej2-inputs@*",
|
|
45
45
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
46
46
|
"author": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@syncfusion/ej2-base": "~22.2.5",
|
|
52
52
|
"@syncfusion/ej2-buttons": "~22.2.5",
|
|
53
|
-
"@syncfusion/ej2-popups": "~22.2.
|
|
53
|
+
"@syncfusion/ej2-popups": "~22.2.7",
|
|
54
54
|
"@syncfusion/ej2-splitbuttons": "~22.2.5"
|
|
55
55
|
},
|
|
56
56
|
"deprecated": false,
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/inputs"
|
|
120
120
|
},
|
|
121
121
|
"typings": "index.d.ts",
|
|
122
|
-
"version": "22.2.
|
|
122
|
+
"version": "22.2.7",
|
|
123
123
|
"sideEffects": false,
|
|
124
124
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
125
125
|
}
|
|
@@ -306,13 +306,31 @@ var FormValidator = /** @class */ (function (_super) {
|
|
|
306
306
|
var element = elements_2[_i];
|
|
307
307
|
var input = element;
|
|
308
308
|
input.removeAttribute('aria-invalid');
|
|
309
|
-
input.
|
|
309
|
+
var inputParent = input.parentElement;
|
|
310
|
+
var grandParent = inputParent.parentElement;
|
|
311
|
+
if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
|
|
312
|
+
inputParent.classList.remove(this.errorClass);
|
|
313
|
+
}
|
|
314
|
+
else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
|
|
315
|
+
grandParent.classList.remove(this.errorClass);
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
input.classList.remove(this.errorClass);
|
|
319
|
+
}
|
|
310
320
|
if (input.name.length > 0) {
|
|
311
321
|
this.getInputElement(input.name);
|
|
312
322
|
this.getErrorElement(input.name);
|
|
313
323
|
this.hideMessage(input.name);
|
|
314
324
|
}
|
|
315
|
-
|
|
325
|
+
if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
|
|
326
|
+
inputParent.classList.remove(this.validClass);
|
|
327
|
+
}
|
|
328
|
+
else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
|
|
329
|
+
grandParent.classList.remove(this.validClass);
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
input.classList.remove(this.validClass);
|
|
333
|
+
}
|
|
316
334
|
}
|
|
317
335
|
};
|
|
318
336
|
FormValidator.prototype.createHTML5Rules = function () {
|
|
@@ -560,8 +578,20 @@ var FormValidator = /** @class */ (function (_super) {
|
|
|
560
578
|
// Set aria attributes to invalid elements
|
|
561
579
|
this.inputElement.setAttribute('aria-invalid', 'true');
|
|
562
580
|
this.inputElement.setAttribute('aria-describedby', this.inputElement.id + '-info');
|
|
563
|
-
this.inputElement.
|
|
564
|
-
|
|
581
|
+
var inputParent = this.inputElement.parentElement;
|
|
582
|
+
var grandParent = inputParent.parentElement;
|
|
583
|
+
if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
|
|
584
|
+
inputParent.classList.add(this.errorClass);
|
|
585
|
+
inputParent.classList.remove(this.validClass);
|
|
586
|
+
}
|
|
587
|
+
else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
|
|
588
|
+
grandParent.classList.add(this.errorClass);
|
|
589
|
+
grandParent.classList.remove(this.validClass);
|
|
590
|
+
}
|
|
591
|
+
else {
|
|
592
|
+
this.inputElement.classList.add(this.errorClass);
|
|
593
|
+
this.inputElement.classList.remove(this.validClass);
|
|
594
|
+
}
|
|
565
595
|
if (!this.infoElement) {
|
|
566
596
|
this.createErrorElement(name, errorRule.message, this.inputElement);
|
|
567
597
|
}
|
|
@@ -570,8 +600,18 @@ var FormValidator = /** @class */ (function (_super) {
|
|
|
570
600
|
}
|
|
571
601
|
eventArgs.errorElement = this.infoElement;
|
|
572
602
|
eventArgs.status = 'failure';
|
|
573
|
-
|
|
574
|
-
|
|
603
|
+
if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
|
|
604
|
+
inputParent.classList.add(this.errorClass);
|
|
605
|
+
inputParent.classList.remove(this.validClass);
|
|
606
|
+
}
|
|
607
|
+
else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
|
|
608
|
+
grandParent.classList.add(this.errorClass);
|
|
609
|
+
grandParent.classList.remove(this.validClass);
|
|
610
|
+
}
|
|
611
|
+
else {
|
|
612
|
+
this.inputElement.classList.add(this.errorClass);
|
|
613
|
+
this.inputElement.classList.remove(this.validClass);
|
|
614
|
+
}
|
|
575
615
|
this.optionalValidationStatus(name, eventArgs);
|
|
576
616
|
this.trigger('validationComplete', eventArgs);
|
|
577
617
|
// Set aria-required to required rule elements
|
|
@@ -713,8 +753,20 @@ var FormValidator = /** @class */ (function (_super) {
|
|
|
713
753
|
if (this.infoElement) {
|
|
714
754
|
this.infoElement.style.display = 'none';
|
|
715
755
|
this.removeErrorRules(name);
|
|
716
|
-
this.inputElement.
|
|
717
|
-
|
|
756
|
+
var inputParent = this.inputElement.parentElement;
|
|
757
|
+
var grandParent = inputParent.parentElement;
|
|
758
|
+
if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
|
|
759
|
+
inputParent.classList.add(this.validClass);
|
|
760
|
+
inputParent.classList.remove(this.errorClass);
|
|
761
|
+
}
|
|
762
|
+
else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
|
|
763
|
+
grandParent.classList.add(this.validClass);
|
|
764
|
+
grandParent.classList.remove(this.errorClass);
|
|
765
|
+
}
|
|
766
|
+
else {
|
|
767
|
+
this.inputElement.classList.add(this.validClass);
|
|
768
|
+
this.inputElement.classList.remove(this.errorClass);
|
|
769
|
+
}
|
|
718
770
|
this.inputElement.setAttribute('aria-invalid', 'false');
|
|
719
771
|
}
|
|
720
772
|
};
|
package/src/textbox/textbox.d.ts
CHANGED
|
@@ -231,6 +231,7 @@ export declare class TextBox extends Component<HTMLInputElement | HTMLTextAreaEl
|
|
|
231
231
|
private resetForm;
|
|
232
232
|
private focusHandler;
|
|
233
233
|
private focusOutHandler;
|
|
234
|
+
private keydownHandler;
|
|
234
235
|
private inputHandler;
|
|
235
236
|
private changeHandler;
|
|
236
237
|
private raiseChangeEvent;
|
package/src/textbox/textbox.js
CHANGED
|
@@ -393,6 +393,7 @@ var TextBox = /** @class */ (function (_super) {
|
|
|
393
393
|
TextBox.prototype.wireEvents = function () {
|
|
394
394
|
EventHandler.add(this.respectiveElement, 'focus', this.focusHandler, this);
|
|
395
395
|
EventHandler.add(this.respectiveElement, 'blur', this.focusOutHandler, this);
|
|
396
|
+
EventHandler.add(this.respectiveElement, 'keydown', this.keydownHandler, this);
|
|
396
397
|
EventHandler.add(this.respectiveElement, 'input', this.inputHandler, this);
|
|
397
398
|
EventHandler.add(this.respectiveElement, 'change', this.changeHandler, this);
|
|
398
399
|
if (this.isForm) {
|
|
@@ -462,6 +463,11 @@ var TextBox = /** @class */ (function (_super) {
|
|
|
462
463
|
};
|
|
463
464
|
this.trigger('blur', eventArgs);
|
|
464
465
|
};
|
|
466
|
+
TextBox.prototype.keydownHandler = function (args) {
|
|
467
|
+
if ((args.keyCode === 13 || args.keyCode === 9) && !((this.previousValue === null || this.previousValue === "") && (this.value === null || this.value === "") && this.respectiveElement.value === "")) {
|
|
468
|
+
this.setProperties({ value: this.respectiveElement.value }, true);
|
|
469
|
+
}
|
|
470
|
+
};
|
|
465
471
|
TextBox.prototype.inputHandler = function (args) {
|
|
466
472
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias
|
|
467
473
|
var textboxObj = this;
|
|
@@ -545,6 +551,7 @@ var TextBox = /** @class */ (function (_super) {
|
|
|
545
551
|
TextBox.prototype.unWireEvents = function () {
|
|
546
552
|
EventHandler.remove(this.respectiveElement, 'focus', this.focusHandler);
|
|
547
553
|
EventHandler.remove(this.respectiveElement, 'blur', this.focusOutHandler);
|
|
554
|
+
EventHandler.remove(this.respectiveElement, 'keydown', this.keydownHandler);
|
|
548
555
|
EventHandler.remove(this.respectiveElement, 'input', this.inputHandler);
|
|
549
556
|
EventHandler.remove(this.respectiveElement, 'change', this.changeHandler);
|
|
550
557
|
if (this.isForm) {
|