@syncfusion/ej2-dropdowns 23.2.7 → 24.1.41

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.
@@ -253,14 +253,17 @@ var DropDownTree = /** @class */ (function (_super) {
253
253
  DropDownTree.prototype.render = function () {
254
254
  var isTree = select('#' + this.element.id + '_tree', document);
255
255
  if (isTree) {
256
- var popupDiv = select('#' + this.element.id + '_popup', document);
256
+ var popupDiv = select('#' + this.element.id + '_options', document);
257
257
  detach(popupDiv ? popupDiv : isTree.parentElement);
258
258
  }
259
259
  this.ensureAutoCheck();
260
260
  if (this.element.tagName === 'INPUT') {
261
261
  this.inputEle = this.element;
262
262
  if (isNOU(this.inputEle.getAttribute('role'))) {
263
- this.inputEle.setAttribute('role', 'textbox');
263
+ this.inputEle.setAttribute('aria-expanded', 'false');
264
+ this.inputEle.setAttribute('role', 'combobox');
265
+ this.inputEle.setAttribute('aria-haspopup', 'tree');
266
+ this.inputEle.setAttribute('aria-controls', this.element.id + "_options");
264
267
  }
265
268
  if (isNOU(this.inputEle.getAttribute('type'))) {
266
269
  this.inputEle.setAttribute('type', 'text');
@@ -428,8 +431,12 @@ var DropDownTree = /** @class */ (function (_super) {
428
431
  }
429
432
  _this.treeObj.fields = _this.getTreeFields(fields);
430
433
  _this.treeObj.dataBind();
431
- if (_this.hasTemplate && _this.portals) {
432
- _this.portals = [].concat(_this.treeObj.portals);
434
+ if (_this.hasTemplate && _this.portals && _this.treeObj.portals) {
435
+ for (var i = 0; i < _this.treeObj.portals.length; i++) {
436
+ if (_this.portals.indexOf(_this.treeObj.portals[i]) == -1) {
437
+ _this.portals.push(_this.treeObj.portals[i]);
438
+ }
439
+ }
433
440
  if (_this.isReact) {
434
441
  _this.renderReactTemplates();
435
442
  }
@@ -889,16 +896,7 @@ var DropDownTree = /** @class */ (function (_super) {
889
896
  }
890
897
  };
891
898
  DropDownTree.prototype.getAriaAttributes = function () {
892
- var disable = this.enabled ? 'false' : 'true';
893
- return {
894
- 'aria-disabled': disable,
895
- 'aria-owns': this.element.id + '_options',
896
- 'role': 'listbox',
897
- 'aria-haspopup': 'true',
898
- 'aria-expanded': 'false',
899
- 'aria-activedescendant': 'null',
900
- 'aria-labelledby': this.hiddenElement.id
901
- };
899
+ return {};
902
900
  };
903
901
  DropDownTree.prototype.updateOverFlowView = function () {
904
902
  this.overFlowWrapper.classList.remove(TOTAL_COUNT_WRAPPER);
@@ -1249,7 +1247,7 @@ var DropDownTree = /** @class */ (function (_super) {
1249
1247
  }
1250
1248
  }
1251
1249
  else {
1252
- this.inputWrapper.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
1250
+ this.inputEle.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
1253
1251
  }
1254
1252
  }
1255
1253
  }
@@ -1503,8 +1501,10 @@ var DropDownTree = /** @class */ (function (_super) {
1503
1501
  addClass([_this.inputWrapper], [ICONANIMATION]);
1504
1502
  if (_this.isFirstRender) {
1505
1503
  _this.popupEle = _this.createElement('div', {
1506
- id: _this.element.id + '_popup', className: POPUP_CLASS + ' ' + (_this.cssClass != null ? _this.cssClass : '')
1504
+ id: _this.element.id + '_options', className: POPUP_CLASS + ' ' + (_this.cssClass != null ? _this.cssClass : '')
1507
1505
  });
1506
+ _this.popupEle.setAttribute('role', 'region');
1507
+ _this.popupEle.setAttribute('aria-label', _this.element.id);
1508
1508
  document.body.appendChild(_this.popupEle);
1509
1509
  _this.createPopup(_this.popupEle);
1510
1510
  }
@@ -1540,7 +1540,7 @@ var DropDownTree = /** @class */ (function (_super) {
1540
1540
  }
1541
1541
  }
1542
1542
  if (!isCancelled) {
1543
- attributes(_this.inputWrapper, { 'aria-expanded': 'true' });
1543
+ attributes(_this.inputEle, { 'aria-expanded': 'true' });
1544
1544
  _this.popupObj.show(null, (_this.zIndex === 1000) ? _this.inputEle : null);
1545
1545
  removeClass([_this.popupEle], DDTHIDEICON);
1546
1546
  _this.updatePopupHeight();
@@ -1992,8 +1992,12 @@ var DropDownTree = /** @class */ (function (_super) {
1992
1992
  }
1993
1993
  };
1994
1994
  DropDownTree.prototype.onNodeExpanded = function (args) {
1995
- if (this.hasTemplate && this.portals) {
1996
- this.portals = [].concat(this.treeObj.portals);
1995
+ if (this.hasTemplate && this.portals && this.treeObj.portals) {
1996
+ for (var i = 0; i < this.treeObj.portals.length; i++) {
1997
+ if (this.portals.indexOf(this.treeObj.portals[i]) == -1) {
1998
+ this.portals.push(this.treeObj.portals[i]);
1999
+ }
2000
+ }
1997
2001
  /* eslint-enable */
1998
2002
  this.renderReactTemplates();
1999
2003
  }
@@ -3027,7 +3031,7 @@ var DropDownTree = /** @class */ (function (_super) {
3027
3031
  if (this.popupEle) {
3028
3032
  addClass([this.popupEle], DDTHIDEICON);
3029
3033
  }
3030
- attributes(this.inputWrapper, { 'aria-expanded': 'false' });
3034
+ attributes(this.inputEle, { 'aria-expanded': 'false' });
3031
3035
  if (this.popupObj && this.isPopupOpen) {
3032
3036
  this.popupObj.hide();
3033
3037
  if (this.inputFocus) {
@@ -137,6 +137,12 @@ var ListBox = /** @class */ (function (_super) {
137
137
  var hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
138
138
  hiddenSelect.style.visibility = 'hidden';
139
139
  this.list.classList.add('e-listbox-wrapper');
140
+ this.list.querySelector('.e-list-parent').setAttribute('role', 'presentation');
141
+ var groupHdrs = this.list.querySelectorAll('.e-list-group-item');
142
+ for (var i = 0; i < groupHdrs.length; i++) {
143
+ groupHdrs[i].removeAttribute('tabindex');
144
+ groupHdrs[i].setAttribute('role', 'option');
145
+ }
140
146
  if (this.itemTemplate) {
141
147
  this.list.classList.add('e-list-template');
142
148
  }
@@ -1201,7 +1207,8 @@ var ListBox = /** @class */ (function (_super) {
1201
1207
  'autocomplete': 'off',
1202
1208
  'autocorrect': 'off',
1203
1209
  'autocapitalize': 'off',
1204
- 'spellcheck': 'false'
1210
+ 'spellcheck': 'false',
1211
+ 'role': 'textbox'
1205
1212
  });
1206
1213
  if (this.height.toString().indexOf('%') < 0) {
1207
1214
  addClass([this.list], 'e-filter-list');
@@ -149,6 +149,7 @@ var Mention = /** @class */ (function (_super) {
149
149
  }
150
150
  }
151
151
  this.inputElement.setAttribute('role', 'textbox');
152
+ this.inputElement.setAttribute('aria-label', 'mention');
152
153
  this.queryString = this.elementValue();
153
154
  this.wireEvent();
154
155
  };
@@ -459,7 +460,10 @@ var Mention = /** @class */ (function (_super) {
459
460
  var value = this.getFormattedValue(focusItem.getAttribute('data-value'));
460
461
  this.selectEventCallback(focusItem, this.getDataByValue(value), value, true);
461
462
  }
462
- if (this.beforePopupOpen) {
463
+ if (this.beforePopupOpen && this.isPopupOpen) {
464
+ if (this.initRemoteRender && !isNullOrUndefined(this.popupObj.element)) {
465
+ this.popupObj.element.remove();
466
+ }
463
467
  this.renderPopup();
464
468
  }
465
469
  }
@@ -282,7 +282,10 @@ var CheckBoxSelection = /** @class */ (function () {
282
282
  'role': 'combobox',
283
283
  'autocomplete': 'off',
284
284
  'autocapitalize': 'off',
285
- 'spellcheck': 'false'
285
+ 'spellcheck': 'false',
286
+ 'aria-label': 'multiselect',
287
+ 'aria-expanded': 'true',
288
+ 'aria-controls': args.popupElement.id
286
289
  });
287
290
  this.clearIconElement = this.filterInput.parentElement.querySelector('.' + clearIcon);
288
291
  if (!Browser.isDevice && this.clearIconElement) {
@@ -259,7 +259,7 @@ var MultiSelect = /** @class */ (function (_super) {
259
259
  if (_this.popupObj) {
260
260
  _this.popupObj.show(eventArgs.animation, (_this.zIndex === 1000) ? _this.element : null);
261
261
  }
262
- attributes(_this.inputElement, { 'aria-expanded': 'true', 'aria-owns': _this.inputElement.id + '_options' });
262
+ attributes(_this.inputElement, { 'aria-expanded': 'true', 'aria-owns': _this.element.id + '_popup', 'aria-controls': _this.element.id });
263
263
  _this.updateAriaActiveDescendant();
264
264
  if (_this.isFirstClick) {
265
265
  _this.loadTemplate();
@@ -340,7 +340,7 @@ var MultiSelect = /** @class */ (function (_super) {
340
340
  };
341
341
  MultiSelect.prototype.updateListARIA = function () {
342
342
  if (!isNullOrUndefined(this.ulElement)) {
343
- attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
343
+ attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false', 'aria-label': 'list' });
344
344
  }
345
345
  var disableStatus = !isNullOrUndefined(this.inputElement) && (this.inputElement.disabled) ? true : false;
346
346
  if (!this.isPopupOpen() && !isNullOrUndefined(this.inputElement)) {
@@ -3937,6 +3937,8 @@ var MultiSelect = /** @class */ (function (_super) {
3937
3937
  this.setWidth(this.width);
3938
3938
  this.overAllWrapper.appendChild(this.componentWrapper);
3939
3939
  this.popupWrapper = this.createElement('div', { id: this.element.id + '_popup', className: POPUP_WRAPPER });
3940
+ this.popupWrapper.setAttribute('aria-label', this.element.id);
3941
+ this.popupWrapper.setAttribute('role', 'dialog');
3940
3942
  if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {
3941
3943
  this.delimiterWrapper = this.createElement('span', { className: DELIMITER_WRAPPER, styles: 'display:none' });
3942
3944
  this.componentWrapper.appendChild(this.delimiterWrapper);
@@ -43,6 +43,9 @@
43
43
  @if $ddt-skin-name == 'Material3' {
44
44
  margin: $ddt-dd-icon-margin;
45
45
  }
46
+ @if $ddt-skin-name == 'FluentUI' {
47
+ min-height: $ddt-dd-icon-width;
48
+ }
46
49
  }
47
50
 
48
51
  .e-input-group-icon.e-ddt-icon {
@@ -84,6 +87,9 @@
84
87
  @else {
85
88
  right: $ddt-dd-icon-width;
86
89
  }
90
+ @if $ddt-skin-name == 'FluentUI' {
91
+ bottom: 0;
92
+ }
87
93
  }
88
94
 
89
95
  .e-ddt-icon {
@@ -86,6 +86,7 @@
86
86
  }
87
87
  .e-ddt.e-input-group.e-control-wrapper .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper .e-clear-icon {
88
88
  box-sizing: content-box;
89
+ min-height: 30px;
89
90
  }
90
91
  .e-ddt.e-input-group.e-control-wrapper .e-input-group-icon.e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper .e-input-group-icon.e-ddt-icon {
91
92
  border: 0;
@@ -100,6 +101,7 @@
100
101
  }
101
102
  .e-ddt.e-input-group.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon, .e-ddt.e-input-group.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon {
102
103
  right: 30px;
104
+ bottom: 0;
103
105
  }
104
106
  .e-ddt.e-input-group.e-control-wrapper.e-show-chip .e-ddt-icon, .e-ddt.e-input-group.e-control-wrapper.e-show-text .e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-chip .e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-text .e-ddt-icon {
105
107
  position: absolute;
@@ -86,6 +86,7 @@
86
86
  }
87
87
  .e-ddt.e-input-group.e-control-wrapper .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper .e-clear-icon {
88
88
  box-sizing: content-box;
89
+ min-height: 30px;
89
90
  }
90
91
  .e-ddt.e-input-group.e-control-wrapper .e-input-group-icon.e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper .e-input-group-icon.e-ddt-icon {
91
92
  border: 0;
@@ -100,6 +101,7 @@
100
101
  }
101
102
  .e-ddt.e-input-group.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon, .e-ddt.e-input-group.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon {
102
103
  right: 30px;
104
+ bottom: 0;
103
105
  }
104
106
  .e-ddt.e-input-group.e-control-wrapper.e-show-chip .e-ddt-icon, .e-ddt.e-input-group.e-control-wrapper.e-show-text .e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-chip .e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-text .e-ddt-icon {
105
107
  position: absolute;
@@ -868,6 +868,7 @@ ejs-dropdownlist {
868
868
  }
869
869
  .e-ddt.e-input-group.e-control-wrapper .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper .e-clear-icon {
870
870
  box-sizing: content-box;
871
+ min-height: 30px;
871
872
  }
872
873
  .e-ddt.e-input-group.e-control-wrapper .e-input-group-icon.e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper .e-input-group-icon.e-ddt-icon {
873
874
  border: 0;
@@ -882,6 +883,7 @@ ejs-dropdownlist {
882
883
  }
883
884
  .e-ddt.e-input-group.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon, .e-ddt.e-input-group.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon {
884
885
  right: 30px;
886
+ bottom: 0;
885
887
  }
886
888
  .e-ddt.e-input-group.e-control-wrapper.e-show-chip .e-ddt-icon, .e-ddt.e-input-group.e-control-wrapper.e-show-text .e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-chip .e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-text .e-ddt-icon {
887
889
  position: absolute;
package/styles/fluent.css CHANGED
@@ -868,6 +868,7 @@ ejs-dropdownlist {
868
868
  }
869
869
  .e-ddt.e-input-group.e-control-wrapper .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper .e-clear-icon {
870
870
  box-sizing: content-box;
871
+ min-height: 30px;
871
872
  }
872
873
  .e-ddt.e-input-group.e-control-wrapper .e-input-group-icon.e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper .e-input-group-icon.e-ddt-icon {
873
874
  border: 0;
@@ -882,6 +883,7 @@ ejs-dropdownlist {
882
883
  }
883
884
  .e-ddt.e-input-group.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon, .e-ddt.e-input-group.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon {
884
885
  right: 30px;
886
+ bottom: 0;
885
887
  }
886
888
  .e-ddt.e-input-group.e-control-wrapper.e-show-chip .e-ddt-icon, .e-ddt.e-input-group.e-control-wrapper.e-show-text .e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-chip .e-ddt-icon, .e-ddt.e-float-input.e-control-wrapper.e-show-text .e-ddt-icon {
887
889
  position: absolute;