@syncfusion/ej2-dropdowns 20.3.47 → 20.3.48

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.
@@ -431,7 +431,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
431
431
  this.l10n = componentLocale;
432
432
  }
433
433
  else {
434
- this.l10n = new L10n(this.getModuleName() === 'listbox' ? 'listbox' : 'dropdowns', l10nLocale, this.locale);
434
+ this.l10n = new L10n(this.getModuleName() === 'listbox' ? 'listbox' :
435
+ this.getModuleName() === 'mention' ? 'mention' : 'dropdowns', l10nLocale, this.locale);
435
436
  }
436
437
  var content = actionFailure ?
437
438
  this.l10n.getConstant('actionFailureTemplate') : this.l10n.getConstant('noRecordsTemplate');
@@ -9592,7 +9593,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9592
9593
  this.resetList(tempData, field, query);
9593
9594
  }
9594
9595
  else {
9595
- var tempData = [this.inputElement.value];
9596
+ var tempData = JSON.parse(JSON.stringify(this.listData));
9597
+ tempData.splice(0, 0, this.inputElement.value);
9596
9598
  tempData[0] = (typeof customData === 'number' && !isNaN(parseFloat(tempData[0]))) ?
9597
9599
  parseFloat(tempData[0]) : tempData[0];
9598
9600
  tempData[0] = (typeof customData === 'boolean') ?
@@ -16294,6 +16296,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16294
16296
  Mention.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
16295
16297
  _super.prototype.onActionComplete.call(this, ulElement, list, e);
16296
16298
  if (this.isActive) {
16299
+ if (!isNullOrUndefined(ulElement)) {
16300
+ attributes(ulElement, { 'id': this.inputElement.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
16301
+ }
16297
16302
  var focusItem = ulElement.querySelector('.' + dropDownBaseClasses.li);
16298
16303
  if (focusItem) {
16299
16304
  focusItem.classList.add(dropDownBaseClasses.selected);
@@ -16428,6 +16433,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16428
16433
  */
16429
16434
  Mention.prototype.showPopup = function () {
16430
16435
  this.renderPopup();
16436
+ attributes(this.inputElement, { 'aria-activedescendant': this.selectedElementID });
16437
+ if (this.selectedElementID == null) {
16438
+ this.inputElement.removeAttribute('aria-activedescendant');
16439
+ }
16431
16440
  };
16432
16441
  /* eslint-disable valid-jsdoc, jsdoc/require-param */
16433
16442
  /**
@@ -16445,6 +16454,8 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16445
16454
  return;
16446
16455
  }
16447
16456
  EventHandler.remove(document, 'mousedown', this.onDocumentClick);
16457
+ this.inputElement.removeAttribute('aria-owns');
16458
+ this.inputElement.removeAttribute('aria-activedescendant');
16448
16459
  this.beforePopupOpen = false;
16449
16460
  var animModel = {
16450
16461
  name: 'FadeOut',
@@ -16507,6 +16518,11 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16507
16518
  _this.unWireListEvents();
16508
16519
  _this.wireListEvents();
16509
16520
  }
16521
+ _this.selectedElementID = _this.selectedLI ? _this.selectedLI.id : null;
16522
+ attributes(_this.inputElement, { 'aria-owns': _this.inputElement.id + '_options', 'aria-activedescendant': _this.selectedElementID });
16523
+ if (_this.selectedElementID == null) {
16524
+ _this.inputElement.removeAttribute('aria-activedescendant');
16525
+ }
16510
16526
  var animModel = { name: 'FadeIn', duration: 100 };
16511
16527
  _this.beforePopupOpen = true;
16512
16528
  var popupInstance = _this.popupObj;