@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.
@@ -6054,7 +6054,9 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6054
6054
  if (this.isMaterialTooltip) {
6055
6055
  this.initialTooltip = false;
6056
6056
  }
6057
- this.changeEvent('changed', evt);
6057
+ if (evt.target != handle) {
6058
+ this.changeEvent('changed', evt);
6059
+ }
6058
6060
  if (this.type !== 'Default') {
6059
6061
  this.setRangeBar();
6060
6062
  }
@@ -7279,13 +7281,31 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
7279
7281
  var element = elements_2[_i];
7280
7282
  var input = element;
7281
7283
  input.removeAttribute('aria-invalid');
7282
- input.classList.remove(this.errorClass);
7284
+ var inputParent = input.parentElement;
7285
+ var grandParent = inputParent.parentElement;
7286
+ if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
7287
+ inputParent.classList.remove(this.errorClass);
7288
+ }
7289
+ else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
7290
+ grandParent.classList.remove(this.errorClass);
7291
+ }
7292
+ else {
7293
+ input.classList.remove(this.errorClass);
7294
+ }
7283
7295
  if (input.name.length > 0) {
7284
7296
  this.getInputElement(input.name);
7285
7297
  this.getErrorElement(input.name);
7286
7298
  this.hideMessage(input.name);
7287
7299
  }
7288
- input.classList.remove(this.validClass);
7300
+ if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
7301
+ inputParent.classList.remove(this.validClass);
7302
+ }
7303
+ else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
7304
+ grandParent.classList.remove(this.validClass);
7305
+ }
7306
+ else {
7307
+ input.classList.remove(this.validClass);
7308
+ }
7289
7309
  }
7290
7310
  };
7291
7311
  FormValidator.prototype.createHTML5Rules = function () {
@@ -7533,8 +7553,20 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
7533
7553
  // Set aria attributes to invalid elements
7534
7554
  this.inputElement.setAttribute('aria-invalid', 'true');
7535
7555
  this.inputElement.setAttribute('aria-describedby', this.inputElement.id + '-info');
7536
- this.inputElement.classList.add(this.errorClass);
7537
- this.inputElement.classList.remove(this.validClass);
7556
+ var inputParent = this.inputElement.parentElement;
7557
+ var grandParent = inputParent.parentElement;
7558
+ if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
7559
+ inputParent.classList.add(this.errorClass);
7560
+ inputParent.classList.remove(this.validClass);
7561
+ }
7562
+ else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
7563
+ grandParent.classList.add(this.errorClass);
7564
+ grandParent.classList.remove(this.validClass);
7565
+ }
7566
+ else {
7567
+ this.inputElement.classList.add(this.errorClass);
7568
+ this.inputElement.classList.remove(this.validClass);
7569
+ }
7538
7570
  if (!this.infoElement) {
7539
7571
  this.createErrorElement(name, errorRule.message, this.inputElement);
7540
7572
  }
@@ -7543,8 +7575,18 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
7543
7575
  }
7544
7576
  eventArgs.errorElement = this.infoElement;
7545
7577
  eventArgs.status = 'failure';
7546
- this.inputElement.classList.add(this.errorClass);
7547
- this.inputElement.classList.remove(this.validClass);
7578
+ if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
7579
+ inputParent.classList.add(this.errorClass);
7580
+ inputParent.classList.remove(this.validClass);
7581
+ }
7582
+ else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
7583
+ grandParent.classList.add(this.errorClass);
7584
+ grandParent.classList.remove(this.validClass);
7585
+ }
7586
+ else {
7587
+ this.inputElement.classList.add(this.errorClass);
7588
+ this.inputElement.classList.remove(this.validClass);
7589
+ }
7548
7590
  this.optionalValidationStatus(name, eventArgs);
7549
7591
  this.trigger('validationComplete', eventArgs);
7550
7592
  // Set aria-required to required rule elements
@@ -7686,8 +7728,20 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
7686
7728
  if (this.infoElement) {
7687
7729
  this.infoElement.style.display = 'none';
7688
7730
  this.removeErrorRules(name);
7689
- this.inputElement.classList.add(this.validClass);
7690
- this.inputElement.classList.remove(this.errorClass);
7731
+ var inputParent = this.inputElement.parentElement;
7732
+ var grandParent = inputParent.parentElement;
7733
+ if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
7734
+ inputParent.classList.add(this.validClass);
7735
+ inputParent.classList.remove(this.errorClass);
7736
+ }
7737
+ else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {
7738
+ grandParent.classList.add(this.validClass);
7739
+ grandParent.classList.remove(this.errorClass);
7740
+ }
7741
+ else {
7742
+ this.inputElement.classList.add(this.validClass);
7743
+ this.inputElement.classList.remove(this.errorClass);
7744
+ }
7691
7745
  this.inputElement.setAttribute('aria-invalid', 'false');
7692
7746
  }
7693
7747
  };
@@ -13677,6 +13731,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13677
13731
  TextBox.prototype.wireEvents = function () {
13678
13732
  EventHandler.add(this.respectiveElement, 'focus', this.focusHandler, this);
13679
13733
  EventHandler.add(this.respectiveElement, 'blur', this.focusOutHandler, this);
13734
+ EventHandler.add(this.respectiveElement, 'keydown', this.keydownHandler, this);
13680
13735
  EventHandler.add(this.respectiveElement, 'input', this.inputHandler, this);
13681
13736
  EventHandler.add(this.respectiveElement, 'change', this.changeHandler, this);
13682
13737
  if (this.isForm) {
@@ -13746,6 +13801,11 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13746
13801
  };
13747
13802
  this.trigger('blur', eventArgs);
13748
13803
  };
13804
+ TextBox.prototype.keydownHandler = function (args) {
13805
+ if ((args.keyCode === 13 || args.keyCode === 9) && !((this.previousValue === null || this.previousValue === "") && (this.value === null || this.value === "") && this.respectiveElement.value === "")) {
13806
+ this.setProperties({ value: this.respectiveElement.value }, true);
13807
+ }
13808
+ };
13749
13809
  TextBox.prototype.inputHandler = function (args) {
13750
13810
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias
13751
13811
  var textboxObj = this;
@@ -13829,6 +13889,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13829
13889
  TextBox.prototype.unWireEvents = function () {
13830
13890
  EventHandler.remove(this.respectiveElement, 'focus', this.focusHandler);
13831
13891
  EventHandler.remove(this.respectiveElement, 'blur', this.focusOutHandler);
13892
+ EventHandler.remove(this.respectiveElement, 'keydown', this.keydownHandler);
13832
13893
  EventHandler.remove(this.respectiveElement, 'input', this.inputHandler);
13833
13894
  EventHandler.remove(this.respectiveElement, 'change', this.changeHandler);
13834
13895
  if (this.isForm) {