@syncfusion/ej2-inputs 22.2.5 → 22.2.9

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 22.2.5
3
+ * version : 22.2.9
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.1.39",
3
+ "_id": "@syncfusion/ej2-inputs@22.2.7",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Ktw+lY6NdO0Nlc92tQ+HO2fDPo5Uz86+rE7w9tAyBBehxxwAx6xqnM342AEKfqNajEdd9ln3+GqSlwykBlpHbw==",
5
+ "_integrity": "sha512-0hx3hO3kTQC0NH+7B7fz/0AKH40oIczyevk7gqF2fDCpEp/wYqDa90KpVhJO1PB5CiIv2Viaj6nMMG8C8onJYA==",
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.1.39.tgz",
43
- "_shasum": "bc3c93fe2b2c1aff8d5a05f2ea96cbf62f9b052d",
42
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-inputs/-/ej2-inputs-22.2.7.tgz",
43
+ "_shasum": "acfc7de93f0416695774f7a3a39f1e8066b6db65",
44
44
  "_spec": "@syncfusion/ej2-inputs@*",
45
45
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
46
46
  "author": {
@@ -48,10 +48,10 @@
48
48
  },
49
49
  "bundleDependencies": false,
50
50
  "dependencies": {
51
- "@syncfusion/ej2-base": "~22.2.5",
52
- "@syncfusion/ej2-buttons": "~22.2.5",
53
- "@syncfusion/ej2-popups": "~22.2.5",
54
- "@syncfusion/ej2-splitbuttons": "~22.2.5"
51
+ "@syncfusion/ej2-base": "~22.2.9",
52
+ "@syncfusion/ej2-buttons": "~22.2.9",
53
+ "@syncfusion/ej2-popups": "~22.2.9",
54
+ "@syncfusion/ej2-splitbuttons": "~22.2.8"
55
55
  },
56
56
  "deprecated": false,
57
57
  "description": "A package of Essential JS 2 input components such as Textbox, Color-picker, Masked-textbox, Numeric-textbox, Slider, Upload, and Form-validator that is used to get input from the users.",
@@ -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.5",
122
+ "version": "22.2.9",
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.classList.remove(this.errorClass);
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
- input.classList.remove(this.validClass);
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.classList.add(this.errorClass);
564
- this.inputElement.classList.remove(this.validClass);
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
- this.inputElement.classList.add(this.errorClass);
574
- this.inputElement.classList.remove(this.validClass);
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.classList.add(this.validClass);
717
- this.inputElement.classList.remove(this.errorClass);
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
  };
@@ -2098,7 +2098,9 @@ var Slider = /** @class */ (function (_super) {
2098
2098
  if (this.isMaterialTooltip) {
2099
2099
  this.initialTooltip = false;
2100
2100
  }
2101
- this.changeEvent('changed', evt);
2101
+ if (evt.target != handle) {
2102
+ this.changeEvent('changed', evt);
2103
+ }
2102
2104
  if (this.type !== 'Default') {
2103
2105
  this.setRangeBar();
2104
2106
  }
@@ -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;
@@ -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) {