@syncfusion/ej2-dropdowns 35.1.42 → 35.1.46

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 : 35.1.42
3
+ * version : 35.1.46
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-dropdowns",
3
- "version": "35.1.42",
3
+ "version": "35.1.46",
4
4
  "description": "Essential JS 2 DropDown Components",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -10,9 +10,9 @@
10
10
  "dependencies": {
11
11
  "@syncfusion/ej2-base": "~35.1.37",
12
12
  "@syncfusion/ej2-data": "~35.1.37",
13
- "@syncfusion/ej2-inputs": "~35.1.42",
14
- "@syncfusion/ej2-lists": "~35.1.37",
15
- "@syncfusion/ej2-navigations": "~35.1.42",
13
+ "@syncfusion/ej2-inputs": "~35.1.43",
14
+ "@syncfusion/ej2-lists": "~35.1.43",
15
+ "@syncfusion/ej2-navigations": "~35.1.46",
16
16
  "@syncfusion/ej2-notifications": "~35.1.37",
17
17
  "@syncfusion/ej2-popups": "~35.1.42"
18
18
  },
@@ -201,7 +201,9 @@ var VirtualScroll = /** @class */ (function () {
201
201
  this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
202
202
  }
203
203
  this.parent.updateVirtualReOrderList(true);
204
- if (this.parent.value.length < this.parent.itemCount && this.parent.value.length !== this.parent.totalItemCount) {
204
+ var totalCount = this.parent.dataSource instanceof DataManager
205
+ ? this.parent.totalItemCount : this.parent.dataSource.length;
206
+ if (this.parent.value.length < this.parent.itemCount && this.parent.value.length !== totalCount) {
205
207
  var oldUlElement_1 = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
206
208
  if (oldUlElement_1) {
207
209
  this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement_1);
@@ -362,8 +362,7 @@ var DropDownList = /** @class */ (function (_super) {
362
362
  'aria-disabled': 'false',
363
363
  'role': 'combobox',
364
364
  'aria-expanded': 'false',
365
- 'aria-live': 'polite',
366
- 'aria-labelledby': this.hiddenElement.id
365
+ 'aria-live': 'polite'
367
366
  };
368
367
  };
369
368
  DropDownList.prototype.setEnableRtl = function () {
@@ -3687,6 +3686,9 @@ var DropDownList = /** @class */ (function (_super) {
3687
3686
  if (isNullOrUndefined(this.inputElement.getAttribute('type'))) {
3688
3687
  this.inputElement.setAttribute('type', 'text');
3689
3688
  }
3689
+ if (this.getModuleName() === 'dropdownlist') {
3690
+ this.inputElement.setAttribute('aria-label', this.getModuleName());
3691
+ }
3690
3692
  this.inputElement.setAttribute('aria-expanded', 'false');
3691
3693
  }
3692
3694
  else {
@@ -3773,7 +3775,7 @@ var DropDownList = /** @class */ (function (_super) {
3773
3775
  if (!this.targetElement().hasAttribute('aria-label')) {
3774
3776
  attributes(this.targetElement(), { 'aria-label': this.getModuleName() });
3775
3777
  }
3776
- if (!this.inputElement.hasAttribute('aria-labelledby')) {
3778
+ if (this.getModuleName() !== 'dropdownlist' && !this.inputElement.hasAttribute('aria-labelledby')) {
3777
3779
  this.inputElement.setAttribute('aria-labelledby', this.hiddenElement.id);
3778
3780
  }
3779
3781
  this.inputElement.setAttribute('aria-expanded', 'false');
@@ -3781,9 +3783,19 @@ var DropDownList = /** @class */ (function (_super) {
3781
3783
  attributes(this.targetElement(), this.getAriaAttributes());
3782
3784
  this.updateDataAttribute(this.htmlAttributes);
3783
3785
  this.setHTMLAttributes();
3784
- if (this.targetElement() === this.inputElement) {
3786
+ if (this.getModuleName() !== 'dropdownlist' && this.targetElement() === this.inputElement) {
3785
3787
  this.inputElement.removeAttribute('aria-labelledby');
3786
3788
  }
3789
+ if (this.getModuleName() === 'dropdownlist' && this.targetElement() === this.inputWrapper.container) {
3790
+ var floatLabel = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
3791
+ if (!isNullOrUndefined(this.element.id) && this.element.id !== '' && !isNullOrUndefined(floatLabel)) {
3792
+ floatLabel.id = 'label_' + this.element.id.replace(/ /g, '_');
3793
+ attributes(this.inputWrapper.container, { 'aria-labelledby': floatLabel.id });
3794
+ }
3795
+ else {
3796
+ this.inputWrapper.container.removeAttribute('aria-labelledby');
3797
+ }
3798
+ }
3787
3799
  if (this.value !== null || this.activeIndex !== null || this.text !== null) {
3788
3800
  if (this.enableVirtualization) {
3789
3801
  this.listItemHeight = this.getListHeight();
@@ -3842,7 +3854,12 @@ var DropDownList = /** @class */ (function (_super) {
3842
3854
  var floatLabelElement = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
3843
3855
  if (!isNullOrUndefined(this.element.id) && this.element.id !== '' && !isNullOrUndefined(floatLabelElement)) {
3844
3856
  floatLabelElement.id = 'label_' + this.element.id.replace(/ /g, '_');
3845
- attributes(this.inputElement, { 'aria-labelledby': floatLabelElement.id });
3857
+ attributes(this.getModuleName() === 'dropdownlist'
3858
+ ? this.inputWrapper.container
3859
+ : this.inputElement, { 'aria-labelledby': floatLabelElement.id });
3860
+ if (this.getModuleName() === 'dropdownlist' && this.inputElement) {
3861
+ this.inputElement.removeAttribute('aria-labelledby');
3862
+ }
3846
3863
  }
3847
3864
  this.renderComplete();
3848
3865
  this.listItemHeight = this.getListHeight();
@@ -4059,7 +4076,7 @@ var DropDownList = /** @class */ (function (_super) {
4059
4076
  if (label) {
4060
4077
  label.remove();
4061
4078
  }
4062
- this_1.inputElement.removeAttribute('aria-labelledby');
4079
+ this_1.inputWrapper.container.removeAttribute('aria-labelledby');
4063
4080
  }
4064
4081
  else if (this_1.floatLabelType !== 'Never' && !this_1.value) {
4065
4082
  var floatLabel = this_1.inputWrapper.container
@@ -4091,7 +4108,7 @@ var DropDownList = /** @class */ (function (_super) {
4091
4108
  }
4092
4109
  floatLabel.style.width = this_1.inputElement.offsetWidth + 'px';
4093
4110
  floatLabel.textContent = newProp.placeholder;
4094
- this_1.inputElement.setAttribute('aria-labelledby', floatLabel.id);
4111
+ this_1.inputWrapper.container.setAttribute('aria-labelledby', floatLabel.id);
4095
4112
  }
4096
4113
  }
4097
4114
  break;
@@ -4304,14 +4321,28 @@ var DropDownList = /** @class */ (function (_super) {
4304
4321
  this_1.updateSelectElementData(this_1.allowFiltering);
4305
4322
  }
4306
4323
  break;
4307
- case 'floatLabelType':
4324
+ case 'floatLabelType': {
4308
4325
  Input.removeFloating(this_1.inputWrapper);
4309
4326
  Input.addFloating(this_1.inputElement, newProp.floatLabelType, this_1.placeholder, this_1.createElement);
4310
4327
  if (!isNullOrUndefined(this_1.inputWrapper.buttons[0]) &&
4311
4328
  this_1.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0] && this_1.floatLabelType !== 'Never') {
4312
4329
  this_1.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
4313
4330
  }
4331
+ if (this_1.getModuleName() === 'dropdownlist') {
4332
+ var floatLabelElement = this_1.inputWrapper.container.getElementsByClassName('e-float-text')[0];
4333
+ if (!isNullOrUndefined(this_1.element.id) &&
4334
+ this_1.element.id !== '' && !isNullOrUndefined(floatLabelElement)) {
4335
+ floatLabelElement.id = 'label_' + this_1.element.id.replace(/ /g, '_');
4336
+ attributes(this_1.inputWrapper.container, {
4337
+ 'aria-labelledby': floatLabelElement.id
4338
+ });
4339
+ }
4340
+ else {
4341
+ this_1.inputWrapper.container.removeAttribute('aria-labelledby');
4342
+ }
4343
+ }
4314
4344
  break;
4345
+ }
4315
4346
  case 'showClearButton':
4316
4347
  if (!this_1.inputWrapper.clearButton) {
4317
4348
  Input.setClearButton(newProp.showClearButton, this_1.inputElement, this_1.inputWrapper, null, this_1.createElement);
@@ -4420,7 +4451,7 @@ var DropDownList = /** @class */ (function (_super) {
4420
4451
  }
4421
4452
  if (label && this.getModuleName() === 'dropdownlist' && (!this.placeholder || this.placeholder.trim() === '')) {
4422
4453
  label.remove();
4423
- this.inputElement.removeAttribute('aria-labelledby');
4454
+ this.inputWrapper.container.removeAttribute('aria-labelledby');
4424
4455
  }
4425
4456
  };
4426
4457
  /**