@syncfusion/ej2-dropdowns 20.2.46 → 20.2.50

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.
@@ -2995,7 +2995,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2995
2995
  && ((this.dataSource instanceof DataManager)
2996
2996
  || (!isNullOrUndefined(this.dataSource) && !isNullOrUndefined(this.dataSource.length) &&
2997
2997
  this.dataSource.length !== 0)))) {
2998
- if (this.itemTemplate && this.element.tagName === 'EJS-COMBOBOX' && this.allowFiltering) {
2998
+ if (this.itemTemplate && (this.element.tagName === 'EJS-COMBOBOX' || this.element.tagName === 'EJS-DROPDOWNLIST') && this.allowFiltering) {
2999
2999
  setTimeout(function () {
3000
3000
  _this.updateActionCompleteDataValues(ulElement, list);
3001
3001
  }, 0);
@@ -3553,6 +3553,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3553
3553
  this.setFields();
3554
3554
  this.inputWrapper.container.style.width = formatUnit(this.width);
3555
3555
  this.inputWrapper.container.classList.add('e-ddl');
3556
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
3557
+ if (!isNullOrUndefined(this.inputWrapper) && !isNullOrUndefined(this.inputWrapper.buttons[0]) && this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0] && this.floatLabelType !== 'Never') {
3558
+ this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
3559
+ }
3556
3560
  this.wireEvent();
3557
3561
  this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
3558
3562
  this.element.removeAttribute('tabindex');
@@ -3564,7 +3568,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3564
3568
  this.updateDataAttribute(this.htmlAttributes);
3565
3569
  this.setHTMLAttributes();
3566
3570
  if (this.targetElement() === this.inputElement) {
3567
- this.element.removeAttribute('aria-labelledby');
3571
+ this.inputElement.removeAttribute('aria-labelledby');
3568
3572
  }
3569
3573
  if (this.value !== null || this.activeIndex !== null || this.text !== null) {
3570
3574
  this.initValue();
@@ -3746,6 +3750,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3746
3750
  break;
3747
3751
  case 'width':
3748
3752
  this_1.setEleWidth(newProp.width);
3753
+ Input.calculateWidth(this_1.inputElement, this_1.inputWrapper.container);
3749
3754
  break;
3750
3755
  case 'placeholder':
3751
3756
  Input.setPlaceholder(newProp.placeholder, this_1.inputElement);
@@ -3763,6 +3768,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3763
3768
  break;
3764
3769
  case 'cssClass':
3765
3770
  this_1.setCssClass(newProp.cssClass, oldProp.cssClass);
3771
+ Input.calculateWidth(this_1.inputElement, this_1.inputWrapper.container);
3766
3772
  break;
3767
3773
  case 'enableRtl':
3768
3774
  this_1.setEnableRtl();
@@ -3909,6 +3915,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3909
3915
  case 'floatLabelType':
3910
3916
  Input.removeFloating(this_1.inputWrapper);
3911
3917
  Input.addFloating(this_1.inputElement, newProp.floatLabelType, this_1.placeholder, this_1.createElement);
3918
+ if (!isNullOrUndefined(this_1.inputWrapper.buttons[0]) && this_1.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0] && this_1.floatLabelType !== 'Never') {
3919
+ this_1.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
3920
+ }
3912
3921
  break;
3913
3922
  case 'showClearButton':
3914
3923
  Input.setClearButton(newProp.showClearButton, this_1.inputElement, this_1.inputWrapper, null, this_1.createElement);
@@ -4096,6 +4105,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4096
4105
  }
4097
4106
  addClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
4098
4107
  this.onFocus(e);
4108
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4099
4109
  };
4100
4110
  /**
4101
4111
  * Moves the focus from the component if the component is already focused.
@@ -4113,6 +4123,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4113
4123
  this.targetElement().blur();
4114
4124
  }
4115
4125
  removeClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
4126
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
4116
4127
  };
4117
4128
  /**
4118
4129
  * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
@@ -7909,6 +7920,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
7909
7920
  this.preventFocus = false;
7910
7921
  }
7911
7922
  this.onFocus(e);
7923
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
7912
7924
  };
7913
7925
  ComboBox.prototype.dropDownClick = function (e) {
7914
7926
  e.preventDefault();
@@ -8604,6 +8616,10 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
8604
8616
  if (this.showPopupButton) {
8605
8617
  var button = Input.appendSpan(dropDownListClasses.icon, this.inputWrapper.container, this.createElement);
8606
8618
  this.inputWrapper.buttons[0] = button;
8619
+ Input.calculateWidth(this.inputElement, this.inputWrapper.container);
8620
+ if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
8621
+ this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
8622
+ }
8607
8623
  if (this.inputWrapper && this.inputWrapper.buttons && this.inputWrapper.buttons[0]) {
8608
8624
  EventHandler.add(this.inputWrapper.buttons[0], 'click', this.dropDownClick, this);
8609
8625
  }
@@ -9714,6 +9730,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9714
9730
  this.ulElement = this.mainList;
9715
9731
  }
9716
9732
  this.checkPlaceholderSize();
9733
+ Input.createSpanElement(this.overAllWrapper, this.createElement);
9734
+ Input.calculateWidth(this.inputElement, this.overAllWrapper);
9735
+ if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
9736
+ this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
9737
+ }
9717
9738
  };
9718
9739
  MultiSelect.prototype.checkPlaceholderSize = function () {
9719
9740
  if (this.showDropDownIcon) {
@@ -9844,6 +9865,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9844
9865
  if (this.isPopupOpen()) {
9845
9866
  this.refreshPopup();
9846
9867
  }
9868
+ Input.calculateWidth(this.inputElement, this.overAllWrapper);
9847
9869
  return true;
9848
9870
  }
9849
9871
  else {
@@ -12319,6 +12341,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12319
12341
  case 'cssClass':
12320
12342
  this.updateOldPropCssClass(oldProp.cssClass);
12321
12343
  this.updateCssClass();
12344
+ Input.calculateWidth(this.inputElement.parentElement.parentElement, this.overAllWrapper);
12322
12345
  break;
12323
12346
  case 'enableRtl':
12324
12347
  this.enableRTL(newProp.enableRtl);
@@ -12345,6 +12368,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12345
12368
  case 'floatLabelType':
12346
12369
  this.setFloatLabelType();
12347
12370
  this.addValidInputClass();
12371
+ Input.createSpanElement(this.overAllWrapper, this.createElement);
12372
+ Input.calculateWidth(this.inputElement.parentElement.parentElement, this.overAllWrapper);
12373
+ if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
12374
+ this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
12375
+ }
12348
12376
  break;
12349
12377
  case 'enableSelectionOrder':
12350
12378
  break;
@@ -12682,6 +12710,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12682
12710
  if (this.element.hasAttribute('data-val')) {
12683
12711
  this.element.setAttribute('data-val', 'false');
12684
12712
  }
12713
+ Input.createSpanElement(this.overAllWrapper, this.createElement);
12714
+ Input.calculateWidth(this.inputElement, this.overAllWrapper);
12715
+ if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
12716
+ this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
12717
+ }
12685
12718
  this.renderComplete();
12686
12719
  };
12687
12720
  MultiSelect.prototype.checkInitialValue = function () {