@syncfusion/ej2-dropdowns 20.3.60 → 20.4.38

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +2 -44
  2. package/dist/ej2-dropdowns.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js +2 -2
  4. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-dropdowns.es2015.js +485 -310
  6. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es5.js +471 -296
  8. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  9. package/dist/global/ej2-dropdowns.min.js +2 -2
  10. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/auto-complete/auto-complete-model.d.ts +1 -1
  14. package/src/combo-box/combo-box.js +7 -5
  15. package/src/drop-down-base/drop-down-base-model.d.ts +0 -18
  16. package/src/drop-down-base/drop-down-base.d.ts +0 -22
  17. package/src/drop-down-base/drop-down-base.js +42 -37
  18. package/src/drop-down-list/drop-down-list-model.d.ts +18 -0
  19. package/src/drop-down-list/drop-down-list.d.ts +22 -0
  20. package/src/drop-down-list/drop-down-list.js +95 -41
  21. package/src/drop-down-tree/drop-down-tree-model.d.ts +15 -1
  22. package/src/drop-down-tree/drop-down-tree.d.ts +13 -1
  23. package/src/drop-down-tree/drop-down-tree.js +22 -5
  24. package/src/list-box/list-box-model.d.ts +18 -0
  25. package/src/list-box/list-box.d.ts +22 -0
  26. package/src/list-box/list-box.js +27 -14
  27. package/src/mention/mention-model.d.ts +2 -2
  28. package/src/mention/mention.d.ts +4 -1
  29. package/src/mention/mention.js +66 -27
  30. package/src/multi-select/checkbox-selection.js +10 -8
  31. package/src/multi-select/multi-select.js +203 -156
  32. package/styles/bootstrap5-dark.css +2 -2
  33. package/styles/bootstrap5.css +2 -2
  34. package/styles/drop-down-base/_bootstrap-dark-definition.scss +1 -0
  35. package/styles/drop-down-base/_bootstrap-definition.scss +1 -0
  36. package/styles/drop-down-base/_bootstrap4-definition.scss +1 -0
  37. package/styles/drop-down-base/_bootstrap5-definition.scss +1 -0
  38. package/styles/drop-down-base/_fabric-dark-definition.scss +1 -0
  39. package/styles/drop-down-base/_fabric-definition.scss +1 -0
  40. package/styles/drop-down-base/_fluent-definition.scss +1 -0
  41. package/styles/drop-down-base/_fusionnew-definition.scss +1 -0
  42. package/styles/drop-down-base/_highcontrast-definition.scss +1 -0
  43. package/styles/drop-down-base/_highcontrast-light-definition.scss +1 -0
  44. package/styles/drop-down-base/_layout.scss +1 -1
  45. package/styles/drop-down-base/_material-dark-definition.scss +1 -0
  46. package/styles/drop-down-base/_material-definition.scss +1 -0
  47. package/styles/drop-down-base/_material3-definition.scss +1 -0
  48. package/styles/drop-down-base/_tailwind-definition.scss +1 -0
  49. package/styles/drop-down-base/material-dark.css +1 -1
  50. package/styles/drop-down-tree/_layout.scss +3 -3
  51. package/styles/drop-down-tree/bootstrap5-dark.css +2 -2
  52. package/styles/drop-down-tree/bootstrap5.css +2 -2
  53. package/styles/material-dark.css +1 -1
  54. package/.eslintrc.json +0 -244
  55. package/tslint.json +0 -111
@@ -459,7 +459,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
459
459
  liElem.setAttribute('role', 'option');
460
460
  }
461
461
  else {
462
- ele.innerHTML = content;
462
+ if (!isNullOrUndefined(ele)) {
463
+ ele.innerHTML = content;
464
+ }
463
465
  }
464
466
  }
465
467
  };
@@ -490,14 +492,16 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
490
492
  * @returns {void}
491
493
  */
492
494
  DropDownBase.prototype.setEnableRtl = function () {
493
- if (this.list) {
494
- this.enableRtlElements.push(this.list);
495
- }
496
- if (this.enableRtl) {
497
- addClass(this.enableRtlElements, dropDownBaseClasses.rtl);
498
- }
499
- else {
500
- removeClass(this.enableRtlElements, dropDownBaseClasses.rtl);
495
+ if (!isNullOrUndefined(this.enableRtlElements)) {
496
+ if (this.list) {
497
+ this.enableRtlElements.push(this.list);
498
+ }
499
+ if (this.enableRtl) {
500
+ addClass(this.enableRtlElements, dropDownBaseClasses.rtl);
501
+ }
502
+ else {
503
+ removeClass(this.enableRtlElements, dropDownBaseClasses.rtl);
504
+ }
501
505
  }
502
506
  };
503
507
  /**
@@ -535,14 +539,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
535
539
  DropDownBase.prototype.getPersistData = function () {
536
540
  return this.addOnPersist([]);
537
541
  };
538
- /**
539
- * Sets the enabled state to DropDownBase.
540
- *
541
- * @returns {void}
542
- */
543
- DropDownBase.prototype.setEnabled = function () {
544
- this.element.setAttribute('aria-disabled', (this.enabled) ? 'false' : 'true');
545
- };
546
542
  /**
547
543
  * Sets the enabled state to DropDownBase.
548
544
  *
@@ -764,7 +760,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
764
760
  this.liCollections = [];
765
761
  this.trigger('actionFailure', e);
766
762
  this.l10nUpdate(true);
767
- addClass([this.list], dropDownBaseClasses.noData);
763
+ if (!isNullOrUndefined(this.list)) {
764
+ addClass([this.list], dropDownBaseClasses.noData);
765
+ }
768
766
  };
769
767
  /* eslint-disable @typescript-eslint/no-unused-vars */
770
768
  DropDownBase.prototype.onActionComplete = function (ulElement, list, e) {
@@ -894,10 +892,12 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
894
892
  if (!isNullOrUndefined(this.list) && !this.list.classList.contains(dropDownBaseClasses.noData)) {
895
893
  if (isNullOrUndefined(this.fixedHeaderElement)) {
896
894
  this.fixedHeaderElement = this.createElement('div', { className: dropDownBaseClasses.fixedHead });
897
- if (!this.list.querySelector('li').classList.contains(dropDownBaseClasses.group)) {
895
+ if (!isNullOrUndefined(this.list) && !this.list.querySelector('li').classList.contains(dropDownBaseClasses.group)) {
898
896
  this.fixedHeaderElement.style.display = 'none';
899
897
  }
900
- prepend([this.fixedHeaderElement], this.list);
898
+ if (!isNullOrUndefined(this.fixedHeaderElement) && !isNullOrUndefined(this.list)) {
899
+ prepend([this.fixedHeaderElement], this.list);
900
+ }
901
901
  this.setFixedHeader();
902
902
  }
903
903
  if (!isNullOrUndefined(this.fixedHeaderElement) && this.fixedHeaderElement.style.zIndex === '0') {
@@ -988,7 +988,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
988
988
  return item;
989
989
  };
990
990
  DropDownBase.prototype.setFixedHeader = function () {
991
- this.list.parentElement.style.display = 'block';
991
+ if (!isNullOrUndefined(this.list)) {
992
+ this.list.parentElement.style.display = 'block';
993
+ }
992
994
  var borderWidth = 0;
993
995
  if (this.list && this.list.parentElement) {
994
996
  borderWidth = parseInt(document.defaultView.getComputedStyle(this.list.parentElement, null).getPropertyValue('border-width'), 10);
@@ -1003,8 +1005,10 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1003
1005
  borderWidth = (borderTopWidth + borderBottomWidth + borderLeftWidth + borderRightWidth);
1004
1006
  }
1005
1007
  }
1006
- var liWidth = this.getValidLi().offsetWidth - borderWidth;
1007
- this.fixedHeaderElement.style.width = liWidth.toString() + 'px';
1008
+ if (!isNullOrUndefined(this.liCollections)) {
1009
+ var liWidth = this.getValidLi().offsetWidth - borderWidth;
1010
+ this.fixedHeaderElement.style.width = liWidth.toString() + 'px';
1011
+ }
1008
1012
  setStyleAttribute(this.fixedHeaderElement, { zIndex: 10 });
1009
1013
  var firstLi = this.ulElement.querySelector('.' + dropDownBaseClasses.group + ':not(.e-hide-listitem)');
1010
1014
  this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
@@ -1148,9 +1152,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1148
1152
  case 'enableRtl':
1149
1153
  this.setEnableRtl();
1150
1154
  break;
1151
- case 'enabled':
1152
- this.setEnabled();
1153
- break;
1154
1155
  case 'groupTemplate':
1155
1156
  this.renderGroupTemplate(this.list);
1156
1157
  if (this.ulElement && this.fixedHeaderElement) {
@@ -1199,7 +1200,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1199
1200
  wrapperElement.appendChild(this.list);
1200
1201
  }
1201
1202
  this.setEnableRtl();
1202
- this.setEnabled();
1203
1203
  if (!isEmptyData) {
1204
1204
  this.initialize(e);
1205
1205
  }
@@ -1291,11 +1291,17 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1291
1291
  this.trigger('beforeItemRender', { element: li, item: item });
1292
1292
  }
1293
1293
  if (itemsCount === 0 && isNullOrUndefined(this.list.querySelector('ul'))) {
1294
- this.list.innerHTML = '';
1295
- this.list.classList.remove(dropDownBaseClasses.noData);
1296
- this.list.appendChild(this.ulElement);
1294
+ if (!isNullOrUndefined(this.list)) {
1295
+ this.list.innerHTML = '';
1296
+ this.list.classList.remove(dropDownBaseClasses.noData);
1297
+ if (!isNullOrUndefined(this.ulElement)) {
1298
+ this.list.appendChild(this.ulElement);
1299
+ }
1300
+ }
1297
1301
  this.liCollections = liCollections;
1298
- append(liCollections, this.ulElement);
1302
+ if (!isNullOrUndefined(liCollections) && !isNullOrUndefined(this.ulElement)) {
1303
+ append(liCollections, this.ulElement);
1304
+ }
1299
1305
  this.updateAddItemList(this.list, itemsCount);
1300
1306
  }
1301
1307
  else {
@@ -1416,14 +1422,16 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1416
1422
  }
1417
1423
  detach(this.list);
1418
1424
  }
1425
+ this.liCollections = null;
1426
+ this.ulElement = null;
1427
+ this.list = null;
1428
+ this.enableRtlElements = null;
1429
+ this.rippleFun = null;
1419
1430
  _super.prototype.destroy.call(this);
1420
1431
  };
1421
1432
  __decorate([
1422
1433
  Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
1423
1434
  ], DropDownBase.prototype, "fields", void 0);
1424
- __decorate([
1425
- Property(false)
1426
- ], DropDownBase.prototype, "enablePersistence", void 0);
1427
1435
  __decorate([
1428
1436
  Property(null)
1429
1437
  ], DropDownBase.prototype, "itemTemplate", void 0);
@@ -1439,9 +1447,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1439
1447
  __decorate([
1440
1448
  Property('None')
1441
1449
  ], DropDownBase.prototype, "sortOrder", void 0);
1442
- __decorate([
1443
- Property(true)
1444
- ], DropDownBase.prototype, "enabled", void 0);
1445
1450
  __decorate([
1446
1451
  Property([])
1447
1452
  ], DropDownBase.prototype, "dataSource", void 0);
@@ -1702,8 +1707,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
1702
1707
  this.resetFocusElement();
1703
1708
  }
1704
1709
  }
1705
- this.hiddenElement.innerHTML = '';
1706
- this.inputElement.value = '';
1710
+ if (!isNullOrUndefined(this.hiddenElement)) {
1711
+ this.hiddenElement.innerHTML = '';
1712
+ }
1713
+ if (!isNullOrUndefined(this.inputElement)) {
1714
+ this.inputElement.value = '';
1715
+ }
1707
1716
  this.value = null;
1708
1717
  this.itemData = null;
1709
1718
  this.text = null;
@@ -1726,21 +1735,21 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
1726
1735
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
1727
1736
  var htmlAttr = _a[_i];
1728
1737
  if (htmlAttr === 'class') {
1729
- var updatedClassValue = (this.htmlAttributes[htmlAttr].replace(/\s+/g, ' ')).trim();
1738
+ var updatedClassValue = (this.htmlAttributes["" + htmlAttr].replace(/\s+/g, ' ')).trim();
1730
1739
  if (updatedClassValue !== '') {
1731
1740
  addClass([this.inputWrapper.container], updatedClassValue.split(' '));
1732
1741
  }
1733
1742
  }
1734
- else if (htmlAttr === 'disabled' && this.htmlAttributes[htmlAttr] === 'disabled') {
1743
+ else if (htmlAttr === 'disabled' && this.htmlAttributes["" + htmlAttr] === 'disabled') {
1735
1744
  this.enabled = false;
1736
1745
  this.setEnable();
1737
1746
  }
1738
- else if (htmlAttr === 'readonly' && !isNullOrUndefined(this.htmlAttributes[htmlAttr])) {
1747
+ else if (htmlAttr === 'readonly' && !isNullOrUndefined(this.htmlAttributes["" + htmlAttr])) {
1739
1748
  this.readonly = true;
1740
1749
  this.dataBind();
1741
1750
  }
1742
1751
  else if (htmlAttr === 'style') {
1743
- this.inputWrapper.container.setAttribute('style', this.htmlAttributes[htmlAttr]);
1752
+ this.inputWrapper.container.setAttribute('style', this.htmlAttributes["" + htmlAttr]);
1744
1753
  }
1745
1754
  else {
1746
1755
  var defaultAttr = ['title', 'id', 'placeholder',
@@ -1750,18 +1759,18 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
1750
1759
  defaultAttr.push('tabindex');
1751
1760
  }
1752
1761
  if (validateAttr.indexOf(htmlAttr) > -1 || htmlAttr.indexOf('data') === 0) {
1753
- this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
1762
+ this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
1754
1763
  }
1755
1764
  else if (defaultAttr.indexOf(htmlAttr) > -1) {
1756
1765
  if (htmlAttr === 'placeholder') {
1757
- Input.setPlaceholder(this.htmlAttributes[htmlAttr], this.inputElement);
1766
+ Input.setPlaceholder(this.htmlAttributes["" + htmlAttr], this.inputElement);
1758
1767
  }
1759
1768
  else {
1760
- this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
1769
+ this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
1761
1770
  }
1762
1771
  }
1763
1772
  else {
1764
- this.inputWrapper.container.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
1773
+ this.inputWrapper.container.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
1765
1774
  }
1766
1775
  }
1767
1776
  }
@@ -1817,7 +1826,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
1817
1826
  }
1818
1827
  };
1819
1828
  DropDownList.prototype.targetElement = function () {
1820
- return this.inputWrapper.container;
1829
+ return !isNullOrUndefined(this.inputWrapper) ? this.inputWrapper.container : null;
1821
1830
  };
1822
1831
  DropDownList.prototype.getNgDirective = function () {
1823
1832
  return 'EJS-DROPDOWNLIST';
@@ -1976,7 +1985,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
1976
1985
  }
1977
1986
  };
1978
1987
  DropDownList.prototype.unBindCommonEvent = function () {
1979
- if (this.targetElement()) {
1988
+ if (!isNullOrUndefined(this.inputWrapper) && this.targetElement()) {
1980
1989
  EventHandler.remove(this.targetElement(), 'blur', this.onBlurHandler);
1981
1990
  }
1982
1991
  var formElement = this.inputElement && closest(this.inputElement, 'form');
@@ -2006,9 +2015,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2006
2015
  * @returns {void}
2007
2016
  */
2008
2017
  DropDownList.prototype.wireListEvents = function () {
2009
- EventHandler.add(this.list, 'click', this.onMouseClick, this);
2010
- EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
2011
- EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
2018
+ if (!isNullOrUndefined(this.list)) {
2019
+ EventHandler.add(this.list, 'click', this.onMouseClick, this);
2020
+ EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
2021
+ EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
2022
+ }
2012
2023
  };
2013
2024
  DropDownList.prototype.onSearch = function (e) {
2014
2025
  if (e.charCode !== 32 && e.charCode !== 13) {
@@ -2286,9 +2297,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2286
2297
  this.setSelection(previousItem, event);
2287
2298
  };
2288
2299
  DropDownList.prototype.unWireEvent = function () {
2289
- EventHandler.remove(this.inputWrapper.container, 'mousedown', this.dropDownClick);
2290
- EventHandler.remove(this.inputWrapper.container, 'keypress', this.onSearch);
2291
- EventHandler.remove(this.inputWrapper.container, 'focus', this.focusIn);
2300
+ if (!isNullOrUndefined(this.inputWrapper)) {
2301
+ EventHandler.remove(this.inputWrapper.container, 'mousedown', this.dropDownClick);
2302
+ EventHandler.remove(this.inputWrapper.container, 'keypress', this.onSearch);
2303
+ EventHandler.remove(this.inputWrapper.container, 'focus', this.focusIn);
2304
+ }
2292
2305
  this.unBindCommonEvent();
2293
2306
  };
2294
2307
  /**
@@ -2297,9 +2310,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2297
2310
  * @returns {void}
2298
2311
  */
2299
2312
  DropDownList.prototype.unWireListEvents = function () {
2300
- EventHandler.remove(this.list, 'click', this.onMouseClick);
2301
- EventHandler.remove(this.list, 'mouseover', this.onMouseOver);
2302
- EventHandler.remove(this.list, 'mouseout', this.onMouseLeave);
2313
+ if (this.list) {
2314
+ EventHandler.remove(this.list, 'click', this.onMouseClick);
2315
+ EventHandler.remove(this.list, 'mouseover', this.onMouseOver);
2316
+ EventHandler.remove(this.list, 'mouseout', this.onMouseLeave);
2317
+ }
2303
2318
  };
2304
2319
  DropDownList.prototype.checkSelector = function (id) {
2305
2320
  return '[id="' + id.replace(/(:|\.|\[|\]|,|=|@|\\|\/|#)/g, '\\$1') + '"]';
@@ -2307,7 +2322,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2307
2322
  DropDownList.prototype.onDocumentClick = function (e) {
2308
2323
  var target = e.target;
2309
2324
  if (!(!isNullOrUndefined(this.popupObj) && closest(target, this.checkSelector(this.popupObj.element.id))) &&
2310
- !this.inputWrapper.container.contains(e.target)) {
2325
+ !isNullOrUndefined(this.inputWrapper) && !this.inputWrapper.container.contains(e.target)) {
2311
2326
  if (this.inputWrapper.container.classList.contains(dropDownListClasses.inputFocus) || this.isPopupOpen) {
2312
2327
  this.isDocumentClick = true;
2313
2328
  var isActive = this.isRequested;
@@ -2505,9 +2520,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2505
2520
  this.setScrollPosition(e);
2506
2521
  }
2507
2522
  if (Browser.info.name !== 'mozilla') {
2508
- attributes(this.targetElement(), { 'aria-label': this.inputElement.value });
2509
- attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id != '' ? this.inputElement.id : this.element.id });
2510
- this.targetElement().removeAttribute('aria-live');
2523
+ attributes(this.inputElement, { 'aria-label': this.inputElement.value });
2524
+ if (this.targetElement()) {
2525
+ attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id != '' ? this.inputElement.id : this.element.id });
2526
+ this.targetElement().removeAttribute('aria-live');
2527
+ }
2511
2528
  }
2512
2529
  if (this.isPopupOpen && !isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {
2513
2530
  attributes(this.targetElement(), { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });
@@ -2678,9 +2695,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2678
2695
  selectedElement.setAttribute('value', this.value.toString());
2679
2696
  }
2680
2697
  else {
2681
- this.hiddenElement.innerHTML = '<option selected>' + this.text + '</option>';
2682
- var selectedElement = this.hiddenElement.querySelector('option');
2683
- selectedElement.setAttribute('value', this.value.toString());
2698
+ if (!isNullOrUndefined(this.hiddenElement)) {
2699
+ this.hiddenElement.innerHTML = '<option selected>' + this.text + '</option>';
2700
+ var selectedElement = this.hiddenElement.querySelector('option');
2701
+ selectedElement.setAttribute('value', this.value.toString());
2702
+ }
2684
2703
  }
2685
2704
  }
2686
2705
  else {
@@ -3019,7 +3038,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3019
3038
  && ((this.dataSource instanceof DataManager)
3020
3039
  || (!isNullOrUndefined(this.dataSource) && !isNullOrUndefined(this.dataSource.length) &&
3021
3040
  this.dataSource.length !== 0)))) {
3022
- if (this.itemTemplate && (this.element.tagName === 'EJS-COMBOBOX' || this.element.tagName === 'EJS-DROPDOWNLIST') && this.allowFiltering) {
3041
+ if (this.itemTemplate && this.element.tagName === 'EJS-COMBOBOX' && this.allowFiltering) {
3023
3042
  setTimeout(function () {
3024
3043
  _this.updateActionCompleteDataValues(ulElement, list);
3025
3044
  }, 0);
@@ -3170,9 +3189,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3170
3189
  (_this.isDropDownClick && _this.getModuleName() === 'combobox')))) {
3171
3190
  offsetValue = _this.getOffsetValue(popupEle);
3172
3191
  var firstItem = _this.isEmptyList() ? _this.list : _this.liCollections[0];
3173
- left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -
3174
- parseInt(getComputedStyle(_this.inputElement).paddingLeft, 10) +
3175
- parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
3192
+ if (!isNullOrUndefined(_this.inputElement)) {
3193
+ left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) -
3194
+ parseInt(getComputedStyle(_this.inputElement).paddingLeft, 10) +
3195
+ parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
3196
+ }
3176
3197
  }
3177
3198
  _this.getFocusElement();
3178
3199
  _this.createPopup(popupEle, offsetValue, left);
@@ -3218,9 +3239,13 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3218
3239
  var eventArgs = { popup: popupInstance, event: e, cancel: false, animation: animModel };
3219
3240
  _this.trigger('open', eventArgs, function (eventArgs) {
3220
3241
  if (!eventArgs.cancel) {
3221
- addClass([_this.inputWrapper.container], [dropDownListClasses.iconAnimation]);
3242
+ if (!isNullOrUndefined(_this.inputWrapper)) {
3243
+ addClass([_this.inputWrapper.container], [dropDownListClasses.iconAnimation]);
3244
+ }
3222
3245
  _this.renderReactTemplates();
3223
- _this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
3246
+ if (!isNullOrUndefined(_this.popupObj)) {
3247
+ _this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
3248
+ }
3224
3249
  }
3225
3250
  else {
3226
3251
  _this.beforePopupOpen = false;
@@ -3479,11 +3504,13 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3479
3504
  EventHandler.remove(this.backIconElement, 'click', this.clickOnBackIcon);
3480
3505
  EventHandler.remove(this.clearIconElement, 'click', this.clearText);
3481
3506
  }
3482
- EventHandler.remove(this.filterInput, 'input', this.onInput);
3483
- EventHandler.remove(this.filterInput, 'keyup', this.onFilterUp);
3484
- EventHandler.remove(this.filterInput, 'keydown', this.onFilterDown);
3485
- EventHandler.remove(this.filterInput, 'blur', this.onBlurHandler);
3486
- EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
3507
+ if (!isNullOrUndefined(this.filterInput)) {
3508
+ EventHandler.remove(this.filterInput, 'input', this.onInput);
3509
+ EventHandler.remove(this.filterInput, 'keyup', this.onFilterUp);
3510
+ EventHandler.remove(this.filterInput, 'keydown', this.onFilterDown);
3511
+ EventHandler.remove(this.filterInput, 'blur', this.onBlurHandler);
3512
+ EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
3513
+ }
3487
3514
  this.filterInput = null;
3488
3515
  }
3489
3516
  attributes(this.targetElement(), { 'aria-expanded': 'false' });
@@ -3618,6 +3645,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3618
3645
  this.text = isNullOrUndefined(this.value) ? null : selectElement.options[selectElement.selectedIndex].textContent;
3619
3646
  this.initValue();
3620
3647
  }
3648
+ this.setEnabled();
3621
3649
  this.preventTabIndex(this.element);
3622
3650
  if (!this.enabled) {
3623
3651
  this.targetElement().tabIndex = -1;
@@ -3702,6 +3730,14 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3702
3730
  var contentEle = popupEle.querySelector('div.e-content');
3703
3731
  popupEle.insertBefore(this.header, contentEle);
3704
3732
  };
3733
+ /**
3734
+ * Sets the enabled state to DropDownBase.
3735
+ *
3736
+ * @returns {void}
3737
+ */
3738
+ DropDownList.prototype.setEnabled = function () {
3739
+ this.element.setAttribute('aria-disabled', (this.enabled) ? 'false' : 'true');
3740
+ };
3705
3741
  DropDownList.prototype.setOldText = function (text) {
3706
3742
  this.text = text;
3707
3743
  };
@@ -4077,7 +4113,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4077
4113
  };
4078
4114
  history.pushState({}, '');
4079
4115
  }
4080
- if (!isNullOrUndefined(this.list.children[0]) || this.list.classList.contains(dropDownBaseClasses.noData)) {
4116
+ if (!isNullOrUndefined(this.list) && (!isNullOrUndefined(this.list.children[0]) || this.list.classList.contains(dropDownBaseClasses.noData))) {
4081
4117
  this.renderPopup(e);
4082
4118
  }
4083
4119
  };
@@ -4093,7 +4129,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4093
4129
  DropDownList.prototype.hidePopup = function (e) {
4094
4130
  /* eslint-enable valid-jsdoc, jsdoc/require-param */
4095
4131
  if (this.isEscapeKey && this.getModuleName() === 'dropdownlist') {
4096
- Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
4132
+ if (!isNullOrUndefined(this.inputElement)) {
4133
+ Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
4134
+ }
4097
4135
  this.isEscapeKey = false;
4098
4136
  if (!isNullOrUndefined(this.index)) {
4099
4137
  var element = this.findListElement(this.ulElement, 'li', 'data-value', this.value);
@@ -4203,6 +4241,21 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4203
4241
  this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);
4204
4242
  detach(this.inputWrapper.container);
4205
4243
  }
4244
+ this.hiddenElement = null;
4245
+ this.inputWrapper = null;
4246
+ this.keyboardModule = null;
4247
+ this.ulElement = null;
4248
+ this.list = null;
4249
+ this.popupObj = null;
4250
+ this.rippleFun = null;
4251
+ this.selectedLI = null;
4252
+ this.liCollections = null;
4253
+ this.item = null;
4254
+ this.inputWrapper = null;
4255
+ this.footer = null;
4256
+ this.header = null;
4257
+ this.previousSelectedLI = null;
4258
+ this.valueTempElement = null;
4206
4259
  _super.prototype.destroy.call(this);
4207
4260
  };
4208
4261
  /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
@@ -4244,6 +4297,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4244
4297
  __decorate$1([
4245
4298
  Property('100%')
4246
4299
  ], DropDownList.prototype, "width", void 0);
4300
+ __decorate$1([
4301
+ Property(true)
4302
+ ], DropDownList.prototype, "enabled", void 0);
4303
+ __decorate$1([
4304
+ Property(false)
4305
+ ], DropDownList.prototype, "enablePersistence", void 0);
4247
4306
  __decorate$1([
4248
4307
  Property('300px')
4249
4308
  ], DropDownList.prototype, "popupHeight", void 0);
@@ -4423,6 +4482,9 @@ var Fields = /** @__PURE__ @class */ (function (_super) {
4423
4482
  __decorate$2([
4424
4483
  Property(null)
4425
4484
  ], Fields.prototype, "query", void 0);
4485
+ __decorate$2([
4486
+ Property('selectable')
4487
+ ], Fields.prototype, "selectable", void 0);
4426
4488
  __decorate$2([
4427
4489
  Property('selected')
4428
4490
  ], Fields.prototype, "selected", void 0);
@@ -5232,7 +5294,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
5232
5294
  temp = this.getOverflowVal(index);
5233
5295
  data += temp;
5234
5296
  temp = this.overFlowWrapper.innerHTML;
5235
- this.overFlowWrapper.innerHTML = data;
5297
+ if (this.enableHtmlSanitizer) {
5298
+ this.overFlowWrapper.innerText = data;
5299
+ }
5300
+ else {
5301
+ this.overFlowWrapper.innerHTML = data;
5302
+ }
5236
5303
  wrapperleng = this.overFlowWrapper.offsetWidth;
5237
5304
  overAllContainer = this.inputWrapper.offsetWidth;
5238
5305
  if ((wrapperleng + downIconWidth + this.clearIconWidth) > overAllContainer) {
@@ -5764,6 +5831,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
5764
5831
  nodeClicked: this.onNodeClicked.bind(this),
5765
5832
  dataBound: this.OnDataBound.bind(this),
5766
5833
  allowMultiSelection: this.allowMultiSelection,
5834
+ enableHtmlSanitizer: this.enableHtmlSanitizer,
5767
5835
  showCheckBox: this.showCheckBox,
5768
5836
  autoCheck: this.treeSettings.autoCheck,
5769
5837
  sortOrder: this.sortOrder,
@@ -6056,7 +6124,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6056
6124
  dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
6057
6125
  child: this.cloneChildField(fields.child), hasChildren: fields.hasChildren, expanded: fields.expanded,
6058
6126
  iconCss: fields.iconCss, imageUrl: fields.imageUrl, htmlAttributes: fields.htmlAttributes, query: fields.query,
6059
- selected: fields.selected, tableName: fields.tableName, tooltip: fields.tooltip
6127
+ selected: fields.selected, selectable: fields.selectable, tableName: fields.tableName, tooltip: fields.tooltip
6060
6128
  };
6061
6129
  return clonedField;
6062
6130
  };
@@ -6069,7 +6137,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6069
6137
  dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
6070
6138
  child: (fields.child ? this.cloneChildField(fields.child) : null), hasChildren: fields.hasChildren,
6071
6139
  expanded: fields.expanded, iconCss: fields.iconCss, imageUrl: fields.imageUrl, htmlAttributes: fields.htmlAttributes,
6072
- query: fields.query, selected: fields.selected, tableName: fields.tableName, tooltip: fields.tooltip
6140
+ query: fields.query, selected: fields.selected, selectable: fields.selectable, tableName: fields.tableName, tooltip: fields.tooltip
6073
6141
  };
6074
6142
  return clonedField;
6075
6143
  }
@@ -6079,7 +6147,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6079
6147
  dataSource: fields.dataSource, id: fields.value, text: fields.text, parentID: fields.parentValue,
6080
6148
  child: this.getTreeChildren(fields.child), hasChildren: fields.hasChildren, expanded: fields.expanded,
6081
6149
  iconCss: fields.iconCss, imageUrl: fields.imageUrl, isChecked: fields.selected,
6082
- htmlAttributes: fields.htmlAttributes, query: fields.query, selected: fields.selected,
6150
+ htmlAttributes: fields.htmlAttributes, query: fields.query, selectable: fields.selectable, selected: fields.selected,
6083
6151
  tableName: fields.tableName, tooltip: fields.tooltip
6084
6152
  };
6085
6153
  return treeFields;
@@ -6574,7 +6642,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
6574
6642
  });
6575
6643
  var chipContent = this.createElement('span', { className: CHIP_CONTENT });
6576
6644
  var chipClose = this.createElement('span', { className: CHIP_CLOSE + ' ' + ICONS });
6577
- chipContent.innerHTML = text;
6645
+ if (this.enableHtmlSanitizer) {
6646
+ chipContent.innerText = text;
6647
+ }
6648
+ else {
6649
+ chipContent.innerHTML = text;
6650
+ }
6578
6651
  chip.appendChild(chipContent);
6579
6652
  this.chipCollection.appendChild(chip);
6580
6653
  if (this.showClearButton) {
@@ -7396,6 +7469,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7396
7469
  __decorate$2([
7397
7470
  Property(false)
7398
7471
  ], DropDownTree.prototype, "showCheckBox", void 0);
7472
+ __decorate$2([
7473
+ Property(false)
7474
+ ], DropDownTree.prototype, "enableHtmlSanitizer", void 0);
7399
7475
  __decorate$2([
7400
7476
  Property(true)
7401
7477
  ], DropDownTree.prototype, "showClearButton", void 0);
@@ -7697,7 +7773,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
7697
7773
  };
7698
7774
  ComboBox.prototype.getFocusElement = function () {
7699
7775
  var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();
7700
- var selected = this.list.querySelector('.' + dropDownListClasses.selected);
7776
+ var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : this.list;
7701
7777
  var isSelected = dataItem.text === this.inputElement.value && !isNullOrUndefined(selected);
7702
7778
  if (isSelected) {
7703
7779
  return selected;
@@ -7857,9 +7933,11 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
7857
7933
  }
7858
7934
  else if (this.inputElement.value === '') {
7859
7935
  this.activeIndex = null;
7860
- this.list.scrollTop = 0;
7861
- var focusItem = this.list.querySelector('.' + dropDownListClasses.li);
7862
- this.setHoverList(focusItem);
7936
+ if (!isNullOrUndefined(this.list)) {
7937
+ this.list.scrollTop = 0;
7938
+ var focusItem = this.list.querySelector('.' + dropDownListClasses.li);
7939
+ this.setHoverList(focusItem);
7940
+ }
7863
7941
  }
7864
7942
  else {
7865
7943
  this.activeIndex = null;
@@ -8158,7 +8236,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
8158
8236
  this.removeFillSelection();
8159
8237
  }
8160
8238
  var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();
8161
- var selected = this.list.querySelector('.' + dropDownListClasses.selected);
8239
+ var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : null;
8162
8240
  if (this.inputElement && dataItem.text === this.inputElement.value && !isNullOrUndefined(selected)) {
8163
8241
  if (this.isSelected) {
8164
8242
  this.onChangeEvent(e);
@@ -9052,7 +9130,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9052
9130
  var htmlAttr = _a[_i];
9053
9131
  switch (htmlAttr) {
9054
9132
  case 'class': {
9055
- var updatedClassValue = (this.htmlAttributes[htmlAttr].replace(/\s+/g, ' ')).trim();
9133
+ var updatedClassValue = (this.htmlAttributes["" + htmlAttr].replace(/\s+/g, ' ')).trim();
9056
9134
  if (updatedClassValue !== '') {
9057
9135
  addClass([this.overAllWrapper], updatedClassValue.split(' '));
9058
9136
  addClass([this.popupWrapper], updatedClassValue.split(' '));
@@ -9064,7 +9142,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9064
9142
  break;
9065
9143
  case 'placeholder':
9066
9144
  if (!this.placeholder) {
9067
- this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
9145
+ this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
9068
9146
  this.setProperties({ placeholder: this.inputElement.placeholder }, true);
9069
9147
  this.refreshPlaceHolder();
9070
9148
  }
@@ -9074,16 +9152,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9074
9152
  var validateAttr = ['name', 'required', 'aria-required', 'form'];
9075
9153
  var containerAttr = ['title', 'role', 'style', 'class'];
9076
9154
  if (defaultAttr.indexOf(htmlAttr) > -1) {
9077
- this.element.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
9155
+ this.element.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
9078
9156
  }
9079
9157
  else if (htmlAttr.indexOf('data') === 0 || validateAttr.indexOf(htmlAttr) > -1) {
9080
- this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
9158
+ this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
9081
9159
  }
9082
9160
  else if (containerAttr.indexOf(htmlAttr) > -1) {
9083
- this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
9161
+ this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
9084
9162
  }
9085
- else if (htmlAttr !== 'size') {
9086
- this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
9163
+ else if (htmlAttr !== 'size' && !isNullOrUndefined(this.inputElement)) {
9164
+ this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
9087
9165
  }
9088
9166
  break;
9089
9167
  }
@@ -9092,11 +9170,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9092
9170
  }
9093
9171
  };
9094
9172
  MultiSelect.prototype.updateReadonly = function (state) {
9095
- if (state || this.mode === 'CheckBox') {
9096
- this.inputElement.setAttribute('readonly', 'true');
9097
- }
9098
- else {
9099
- this.inputElement.removeAttribute('readonly');
9173
+ if (!isNullOrUndefined(this.inputElement)) {
9174
+ if (state || this.mode === 'CheckBox') {
9175
+ this.inputElement.setAttribute('readonly', 'true');
9176
+ }
9177
+ else {
9178
+ this.inputElement.removeAttribute('readonly');
9179
+ }
9100
9180
  }
9101
9181
  };
9102
9182
  MultiSelect.prototype.updateClearButton = function (state) {
@@ -9239,8 +9319,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9239
9319
  if (!isNullOrUndefined(this.ulElement)) {
9240
9320
  attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
9241
9321
  }
9242
- var disableStatus = (this.inputElement.disabled) ? true : false;
9243
- if (!this.isPopupOpen()) {
9322
+ var disableStatus = !isNullOrUndefined(this.inputElement) && (this.inputElement.disabled) ? true : false;
9323
+ if (!this.isPopupOpen() && !isNullOrUndefined(this.inputElement)) {
9244
9324
  attributes(this.inputElement, this.getAriaAttributes());
9245
9325
  }
9246
9326
  if (disableStatus) {
@@ -9350,7 +9430,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9350
9430
  this.checkForCustomValue(this.tempQuery, this.fields);
9351
9431
  return;
9352
9432
  }
9353
- if (this.value && this.value.length && ((this.mode !== 'CheckBox' && this.inputElement.value.trim() !== '') ||
9433
+ if (this.value && this.value.length && ((this.mode !== 'CheckBox' && !isNullOrUndefined(this.inputElement) && this.inputElement.value.trim() !== '') ||
9354
9434
  this.mode === 'CheckBox' || ((this.keyCode === 8 || this.keyCode === 46) && this.allowFiltering &&
9355
9435
  this.allowCustomValue && this.dataSource instanceof DataManager && this.inputElement.value === ''))) {
9356
9436
  this.refreshSelection();
@@ -9420,8 +9500,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9420
9500
  }
9421
9501
  element.setAttribute('aria-selected', 'true');
9422
9502
  if (this.mode === 'CheckBox' && element.classList.contains('e-active')) {
9423
- var ariaValue = element.firstElementChild.getAttribute('aria-checked');
9424
- if (isNullOrUndefined(ariaValue) || ariaValue === 'false') {
9503
+ var ariaValue = element.getElementsByClassName('e-check').length;
9504
+ if (ariaValue === 0) {
9425
9505
  var args = {
9426
9506
  module: 'CheckBoxSelection',
9427
9507
  enable: this.mode === 'CheckBox',
@@ -9814,11 +9894,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9814
9894
  }
9815
9895
  };
9816
9896
  MultiSelect.prototype.refreshInputHight = function () {
9817
- if ((!this.value || !this.value.length) && (isNullOrUndefined(this.text) || this.text === '')) {
9818
- this.searchWrapper.classList.remove(ZERO_SIZE);
9819
- }
9820
- else {
9821
- this.searchWrapper.classList.add(ZERO_SIZE);
9897
+ if (!isNullOrUndefined(this.searchWrapper)) {
9898
+ if ((!this.value || !this.value.length) && (isNullOrUndefined(this.text) || this.text === '')) {
9899
+ this.searchWrapper.classList.remove(ZERO_SIZE);
9900
+ }
9901
+ else {
9902
+ this.searchWrapper.classList.add(ZERO_SIZE);
9903
+ }
9822
9904
  }
9823
9905
  };
9824
9906
  MultiSelect.prototype.validateValues = function (newValue, oldValue) {
@@ -10619,7 +10701,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10619
10701
  HIDE_LIST :
10620
10702
  dropDownBaseClasses.selected);
10621
10703
  if (this.mode === 'CheckBox') {
10622
- element2.firstElementChild.setAttribute('aria-checked', 'false');
10623
10704
  removeClass([element2.firstElementChild.lastElementChild], 'e-check');
10624
10705
  }
10625
10706
  }
@@ -10629,7 +10710,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10629
10710
  HIDE_LIST :
10630
10711
  dropDownBaseClasses.selected);
10631
10712
  if (this.mode === 'CheckBox') {
10632
- element2.firstElementChild.setAttribute('aria-checked', 'true');
10633
10713
  addClass([element2.firstElementChild.lastElementChild], 'e-check');
10634
10714
  }
10635
10715
  }
@@ -10890,109 +10970,111 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
10890
10970
  _super.prototype.render.call(this);
10891
10971
  }
10892
10972
  if (!this.popupObj) {
10893
- document.body.appendChild(this.popupWrapper);
10894
- var checkboxFilter = this.popupWrapper.querySelector('.' + FILTERPARENT);
10895
- if (this.mode === 'CheckBox' && !this.allowFiltering && checkboxFilter && this.filterParent) {
10896
- checkboxFilter.remove();
10897
- this.filterParent = null;
10898
- }
10899
- var overAllHeight = parseInt(this.popupHeight, 10);
10900
- this.popupWrapper.style.visibility = 'hidden';
10901
- if (this.headerTemplate) {
10902
- this.setHeaderTemplate();
10903
- overAllHeight -= this.header.offsetHeight;
10904
- }
10905
- append([this.list], this.popupWrapper);
10906
- if (this.footerTemplate) {
10907
- this.setFooterTemplate();
10908
- overAllHeight -= this.footer.offsetHeight;
10909
- }
10910
- if (this.mode === 'CheckBox' && this.showSelectAll) {
10911
- this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
10912
- overAllHeight -= this.selectAllHeight;
10913
- }
10914
- else if (this.mode === 'CheckBox' && !this.showSelectAll && (!this.headerTemplate && !this.footerTemplate)) {
10915
- this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
10916
- overAllHeight = parseInt(this.popupHeight, 10);
10917
- }
10918
- else if (this.mode === 'CheckBox' && !this.showSelectAll) {
10919
- this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
10920
- overAllHeight = parseInt(this.popupHeight, 10);
10921
- if (this.headerTemplate && this.header) {
10973
+ if (!isNullOrUndefined(this.popupWrapper)) {
10974
+ document.body.appendChild(this.popupWrapper);
10975
+ var checkboxFilter = this.popupWrapper.querySelector('.' + FILTERPARENT);
10976
+ if (this.mode === 'CheckBox' && !this.allowFiltering && checkboxFilter && this.filterParent) {
10977
+ checkboxFilter.remove();
10978
+ this.filterParent = null;
10979
+ }
10980
+ var overAllHeight = parseInt(this.popupHeight, 10);
10981
+ this.popupWrapper.style.visibility = 'hidden';
10982
+ if (this.headerTemplate) {
10983
+ this.setHeaderTemplate();
10922
10984
  overAllHeight -= this.header.offsetHeight;
10923
10985
  }
10924
- if (this.footerTemplate && this.footer) {
10986
+ append([this.list], this.popupWrapper);
10987
+ if (this.footerTemplate) {
10988
+ this.setFooterTemplate();
10925
10989
  overAllHeight -= this.footer.offsetHeight;
10926
10990
  }
10927
- }
10928
- if (this.mode === 'CheckBox') {
10929
- var args = {
10930
- module: 'CheckBoxSelection',
10931
- enable: this.mode === 'CheckBox',
10932
- popupElement: this.popupWrapper
10933
- };
10934
- if (this.allowFiltering) {
10935
- this.notify('searchBox', args);
10936
- overAllHeight -= this.searchBoxHeight;
10991
+ if (this.mode === 'CheckBox' && this.showSelectAll) {
10992
+ this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
10993
+ overAllHeight -= this.selectAllHeight;
10937
10994
  }
10938
- addClass([this.popupWrapper], 'e-checkbox');
10939
- }
10940
- if (this.popupHeight !== 'auto') {
10941
- this.list.style.maxHeight = formatUnit(overAllHeight);
10942
- this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
10943
- }
10944
- else {
10945
- this.list.style.maxHeight = formatUnit(this.popupHeight);
10946
- }
10947
- this.popupObj = new Popup(this.popupWrapper, {
10948
- width: this.calcPopupWidth(), targetType: 'relative', position: { X: 'left', Y: 'bottom' },
10949
- relateTo: this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
10950
- enableRtl: this.enableRtl, zIndex: this.zIndex,
10951
- close: function () {
10952
- if (_this.popupObj.element.parentElement) {
10953
- _this.popupObj.unwireScrollEvents();
10954
- // For restrict the page scrolling in safari browser
10955
- var checkboxFilterInput = _this.popupWrapper.querySelector('.' + FILTERINPUT);
10956
- if (_this.mode === 'CheckBox' && checkboxFilterInput && document.activeElement === checkboxFilterInput) {
10957
- checkboxFilterInput.blur();
10958
- }
10959
- detach(_this.popupObj.element);
10960
- }
10961
- },
10962
- open: function () {
10963
- _this.popupObj.resolveCollision();
10964
- if (!_this.isFirstClick) {
10965
- var ulElement = _this.list.querySelector('ul');
10966
- if (ulElement) {
10967
- if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
10968
- _this.targetElement().trim() !== '')) {
10969
- _this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
10970
- }
10971
- }
10972
- _this.isFirstClick = true;
10995
+ else if (this.mode === 'CheckBox' && !this.showSelectAll && (!this.headerTemplate && !this.footerTemplate)) {
10996
+ this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
10997
+ overAllHeight = parseInt(this.popupHeight, 10);
10998
+ }
10999
+ else if (this.mode === 'CheckBox' && !this.showSelectAll) {
11000
+ this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
11001
+ overAllHeight = parseInt(this.popupHeight, 10);
11002
+ if (this.headerTemplate && this.header) {
11003
+ overAllHeight -= this.header.offsetHeight;
10973
11004
  }
10974
- _this.popupObj.wireScrollEvents();
10975
- if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
10976
- _this.targetElement().trim() !== '')) {
10977
- _this.loadTemplate();
11005
+ if (this.footerTemplate && this.footer) {
11006
+ overAllHeight -= this.footer.offsetHeight;
10978
11007
  }
10979
- _this.setScrollPosition();
10980
- if (_this.allowFiltering) {
10981
- _this.notify('inputFocus', {
10982
- module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', value: 'focus'
10983
- });
11008
+ }
11009
+ if (this.mode === 'CheckBox') {
11010
+ var args = {
11011
+ module: 'CheckBoxSelection',
11012
+ enable: this.mode === 'CheckBox',
11013
+ popupElement: this.popupWrapper
11014
+ };
11015
+ if (this.allowFiltering) {
11016
+ this.notify('searchBox', args);
11017
+ overAllHeight -= this.searchBoxHeight;
10984
11018
  }
10985
- }, targetExitViewport: function () {
10986
- if (!Browser.isDevice) {
10987
- _this.hidePopup();
11019
+ addClass([this.popupWrapper], 'e-checkbox');
11020
+ }
11021
+ if (this.popupHeight !== 'auto') {
11022
+ this.list.style.maxHeight = formatUnit(overAllHeight);
11023
+ this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
11024
+ }
11025
+ else {
11026
+ this.list.style.maxHeight = formatUnit(this.popupHeight);
11027
+ }
11028
+ this.popupObj = new Popup(this.popupWrapper, {
11029
+ width: this.calcPopupWidth(), targetType: 'relative', position: { X: 'left', Y: 'bottom' },
11030
+ relateTo: this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
11031
+ enableRtl: this.enableRtl, zIndex: this.zIndex,
11032
+ close: function () {
11033
+ if (_this.popupObj.element.parentElement) {
11034
+ _this.popupObj.unwireScrollEvents();
11035
+ // For restrict the page scrolling in safari browser
11036
+ var checkboxFilterInput = _this.popupWrapper.querySelector('.' + FILTERINPUT);
11037
+ if (_this.mode === 'CheckBox' && checkboxFilterInput && document.activeElement === checkboxFilterInput) {
11038
+ checkboxFilterInput.blur();
11039
+ }
11040
+ detach(_this.popupObj.element);
11041
+ }
11042
+ },
11043
+ open: function () {
11044
+ _this.popupObj.resolveCollision();
11045
+ if (!_this.isFirstClick) {
11046
+ var ulElement = _this.list.querySelector('ul');
11047
+ if (ulElement) {
11048
+ if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
11049
+ _this.targetElement().trim() !== '')) {
11050
+ _this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
11051
+ }
11052
+ }
11053
+ _this.isFirstClick = true;
11054
+ }
11055
+ _this.popupObj.wireScrollEvents();
11056
+ if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
11057
+ _this.targetElement().trim() !== '')) {
11058
+ _this.loadTemplate();
11059
+ }
11060
+ _this.setScrollPosition();
11061
+ if (_this.allowFiltering) {
11062
+ _this.notify('inputFocus', {
11063
+ module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', value: 'focus'
11064
+ });
11065
+ }
11066
+ }, targetExitViewport: function () {
11067
+ if (!Browser.isDevice) {
11068
+ _this.hidePopup();
11069
+ }
10988
11070
  }
11071
+ });
11072
+ if (this.mode === 'CheckBox' && Browser.isDevice && this.allowFiltering) {
11073
+ this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
10989
11074
  }
10990
- });
10991
- if (this.mode === 'CheckBox' && Browser.isDevice && this.allowFiltering) {
10992
- this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
11075
+ this.popupObj.close();
11076
+ this.popupWrapper.style.visibility = '';
10993
11077
  }
10994
- this.popupObj.close();
10995
- this.popupWrapper.style.visibility = '';
10996
11078
  }
10997
11079
  };
10998
11080
  MultiSelect.prototype.setHeaderTemplate = function () {
@@ -11255,7 +11337,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11255
11337
  var temp;
11256
11338
  var tempData = this.listData;
11257
11339
  this.listData = this.mainData;
11258
- this.hiddenElement.innerHTML = '';
11340
+ if (!isNullOrUndefined(this.hiddenElement)) {
11341
+ this.hiddenElement.innerHTML = '';
11342
+ }
11259
11343
  if (!isNullOrUndefined(this.value)) {
11260
11344
  for (var index = 0; !isNullOrUndefined(this.value[index]); index++) {
11261
11345
  var listValue = this.findListElement(((!isNullOrUndefined(this.mainList)) ? this.mainList : this.ulElement), 'li', 'data-value', this.value[index]);
@@ -11273,7 +11357,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11273
11357
  data += temp + delimiterChar + ' ';
11274
11358
  text.push(temp);
11275
11359
  }
11276
- this.hiddenElement.innerHTML += '<option selected value ="' + this.value[index] + '">' + index + '</option>';
11360
+ if (!isNullOrUndefined(this.hiddenElement)) {
11361
+ this.hiddenElement.innerHTML += '<option selected value ="' + this.value[index] + '">' + index + '</option>';
11362
+ }
11277
11363
  }
11278
11364
  }
11279
11365
  this.setProperties({ text: text.toString() }, true);
@@ -11485,10 +11571,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11485
11571
  selectItems[temp1 - 1].setAttribute('aria-selected', 'false');
11486
11572
  if (this.mode === 'CheckBox') {
11487
11573
  if (selectedItems && (selectedItems.length > (temp1 - 1))) {
11488
- selectedItems[temp1 - 1].firstElementChild.setAttribute('aria-checked', 'false');
11489
11574
  removeClass([selectedItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
11490
11575
  }
11491
- selectItems[temp1 - 1].firstElementChild.setAttribute('aria-checked', 'false');
11492
11576
  removeClass([selectItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
11493
11577
  }
11494
11578
  temp1--;
@@ -11546,9 +11630,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11546
11630
  addClass([element], className);
11547
11631
  this.updateMainList(false, element.getAttribute('data-value'), mainElement);
11548
11632
  element.setAttribute('aria-selected', 'true');
11549
- if (this.mode === 'CheckBox') {
11550
- var ariaCheck = element.firstElementChild.getAttribute('aria-checked');
11551
- if (ariaCheck === 'false' || isNullOrUndefined(ariaCheck)) {
11633
+ if (this.mode === 'CheckBox' && element.classList.contains('e-active')) {
11634
+ var ariaCheck = element.getElementsByClassName('e-check').length;
11635
+ if (ariaCheck === 0) {
11552
11636
  this.notify('updatelist', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', li: element, e: this });
11553
11637
  }
11554
11638
  }
@@ -11867,9 +11951,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11867
11951
  if (this.chipCollectionWrapper) {
11868
11952
  this.chipCollectionWrapper.style.display = 'none';
11869
11953
  }
11870
- this.viewWrapper.style.display = '';
11871
- this.viewWrapper.style.width = '';
11872
- this.viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER$1);
11954
+ if (!isNullOrUndefined(this.viewWrapper)) {
11955
+ this.viewWrapper.style.display = '';
11956
+ this.viewWrapper.style.width = '';
11957
+ this.viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER$1);
11958
+ }
11873
11959
  if (this.value && this.value.length) {
11874
11960
  var data = '';
11875
11961
  var temp = void 0;
@@ -11957,8 +12043,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11957
12043
  }
11958
12044
  }
11959
12045
  else {
11960
- this.viewWrapper.innerHTML = '';
11961
- this.viewWrapper.style.display = 'none';
12046
+ if (!isNullOrUndefined(this.viewWrapper)) {
12047
+ this.viewWrapper.innerHTML = '';
12048
+ this.viewWrapper.style.display = 'none';
12049
+ }
11962
12050
  }
11963
12051
  };
11964
12052
  MultiSelect.prototype.checkClearIconWidth = function () {
@@ -12031,29 +12119,41 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12031
12119
  return temp;
12032
12120
  };
12033
12121
  MultiSelect.prototype.unWireEvent = function () {
12034
- EventHandler.remove(this.componentWrapper, 'mousedown', this.wrapperClick);
12122
+ if (!isNullOrUndefined(this.componentWrapper)) {
12123
+ EventHandler.remove(this.componentWrapper, 'mousedown', this.wrapperClick);
12124
+ }
12035
12125
  EventHandler.remove(window, 'resize', this.windowResize);
12036
- EventHandler.remove(this.inputElement, 'focus', this.focusInHandler);
12037
- EventHandler.remove(this.inputElement, 'keydown', this.onKeyDown);
12038
- if (this.mode !== 'CheckBox') {
12039
- EventHandler.remove(this.inputElement, 'input', this.onInput);
12126
+ if (!isNullOrUndefined(this.inputElement)) {
12127
+ EventHandler.remove(this.inputElement, 'focus', this.focusInHandler);
12128
+ EventHandler.remove(this.inputElement, 'keydown', this.onKeyDown);
12129
+ if (this.mode !== 'CheckBox') {
12130
+ EventHandler.remove(this.inputElement, 'input', this.onInput);
12131
+ }
12132
+ EventHandler.remove(this.inputElement, 'keyup', this.keyUp);
12133
+ var formElement = closest(this.inputElement, 'form');
12134
+ if (formElement) {
12135
+ EventHandler.remove(formElement, 'reset', this.resetValueHandler);
12136
+ }
12137
+ EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);
12040
12138
  }
12041
- EventHandler.remove(this.inputElement, 'keyup', this.keyUp);
12042
- var formElement = closest(this.inputElement, 'form');
12043
- if (formElement) {
12044
- EventHandler.remove(formElement, 'reset', this.resetValueHandler);
12139
+ if (!isNullOrUndefined(this.componentWrapper)) {
12140
+ EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);
12141
+ EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);
12142
+ }
12143
+ if (!isNullOrUndefined(this.overAllClear)) {
12144
+ EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
12145
+ }
12146
+ if (!isNullOrUndefined(this.inputElement)) {
12147
+ EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
12045
12148
  }
12046
- EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);
12047
- EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);
12048
- EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);
12049
- EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
12050
- EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
12051
12149
  };
12052
12150
  MultiSelect.prototype.selectAllItem = function (state, event, list) {
12053
12151
  var li;
12054
- li = this.list.querySelectorAll(state ?
12055
- 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
12056
- 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
12152
+ if (!isNullOrUndefined(this.list)) {
12153
+ li = this.list.querySelectorAll(state ?
12154
+ 'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
12155
+ 'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
12156
+ }
12057
12157
  if (this.value && this.value.length && event && event.target
12058
12158
  && closest(event.target, '.e-close-hooker') && this.allowFiltering) {
12059
12159
  li = this.mainList.querySelectorAll(state ?
@@ -12866,11 +12966,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12866
12966
  }
12867
12967
  };
12868
12968
  MultiSelect.prototype.addValidInputClass = function () {
12869
- if ((!isNullOrUndefined(this.value) && this.value.length) || this.floatLabelType === 'Always') {
12870
- addClass([this.overAllWrapper], 'e-valid-input');
12871
- }
12872
- else {
12873
- removeClass([this.overAllWrapper], 'e-valid-input');
12969
+ if (!isNullOrUndefined(this.overAllWrapper)) {
12970
+ if ((!isNullOrUndefined(this.value) && this.value.length) || this.floatLabelType === 'Always') {
12971
+ addClass([this.overAllWrapper], 'e-valid-input');
12972
+ }
12973
+ else {
12974
+ removeClass([this.overAllWrapper], 'e-valid-input');
12975
+ }
12874
12976
  }
12875
12977
  };
12876
12978
  MultiSelect.prototype.dropDownIcon = function () {
@@ -12923,13 +13025,17 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12923
13025
  _super.prototype.destroy.call(this);
12924
13026
  var temp = ['readonly', 'aria-disabled', 'placeholder'];
12925
13027
  var length = temp.length;
12926
- while (length > 0) {
12927
- this.inputElement.removeAttribute(temp[length - 1]);
12928
- length--;
13028
+ if (!isNullOrUndefined(this.inputElement)) {
13029
+ while (length > 0) {
13030
+ this.inputElement.removeAttribute(temp[length - 1]);
13031
+ length--;
13032
+ }
12929
13033
  }
12930
- this.element.removeAttribute('data-initial-value');
12931
- this.element.style.display = 'block';
12932
- if (this.overAllWrapper.parentElement) {
13034
+ if (!isNullOrUndefined(this.element)) {
13035
+ this.element.removeAttribute('data-initial-value');
13036
+ this.element.style.display = 'block';
13037
+ }
13038
+ if (this.overAllWrapper && this.overAllWrapper.parentElement) {
12933
13039
  if (this.overAllWrapper.parentElement.tagName === this.getNgDirective()) {
12934
13040
  remove(this.overAllWrapper);
12935
13041
  }
@@ -12938,6 +13044,25 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12938
13044
  remove(this.overAllWrapper);
12939
13045
  }
12940
13046
  }
13047
+ this.componentWrapper = null;
13048
+ this.overAllClear = null;
13049
+ this.overAllWrapper = null;
13050
+ this.hiddenElement = null;
13051
+ this.searchWrapper = null;
13052
+ this.viewWrapper = null;
13053
+ this.chipCollectionWrapper = null;
13054
+ this.targetInputElement = null;
13055
+ this.popupWrapper = null;
13056
+ this.inputElement = null;
13057
+ this.delimiterWrapper = null;
13058
+ this.popupObj = null;
13059
+ this.popupWrapper = null;
13060
+ this.liCollections = null;
13061
+ this.header = null;
13062
+ this.mainList = null;
13063
+ this.mainListCollection = null;
13064
+ this.footer = null;
13065
+ this.selectAllEventEle = null;
12941
13066
  };
12942
13067
  __decorate$5([
12943
13068
  Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
@@ -13289,6 +13414,12 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
13289
13414
  CheckBoxSelection.prototype.destroy = function () {
13290
13415
  this.removeEventListener();
13291
13416
  EventHandler.remove(document, 'mousedown', this.onDocumentClick);
13417
+ this.checkAllParent = null;
13418
+ this.clearIconElement = null;
13419
+ this.filterInput = null;
13420
+ this.filterInputObj = null;
13421
+ this.checkWrapper = null;
13422
+ this.selectAllSpan = null;
13292
13423
  };
13293
13424
  CheckBoxSelection.prototype.listSelection = function (args) {
13294
13425
  var target;
@@ -13337,12 +13468,10 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
13337
13468
  e.preventDefault();
13338
13469
  };
13339
13470
  CheckBoxSelection.prototype.changeState = function (wrapper, state, e, isPrevent, selectAll$$1) {
13340
- var ariaState;
13341
13471
  var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME$1)[0];
13342
13472
  if (state === 'check' && !frameSpan.classList.contains(CHECK$1)) {
13343
13473
  frameSpan.classList.remove(INDETERMINATE);
13344
13474
  frameSpan.classList.add(CHECK$1);
13345
- ariaState = 'true';
13346
13475
  if (selectAll$$1) {
13347
13476
  this.parent.selectAllItems(true, e);
13348
13477
  this.setLocale(true);
@@ -13350,7 +13479,6 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
13350
13479
  }
13351
13480
  else if (state === 'uncheck' && (frameSpan.classList.contains(CHECK$1) || frameSpan.classList.contains(INDETERMINATE))) {
13352
13481
  removeClass([frameSpan], [CHECK$1, INDETERMINATE]);
13353
- ariaState = 'false';
13354
13482
  if (selectAll$$1) {
13355
13483
  this.parent.selectAllItems(false, e);
13356
13484
  this.setLocale();
@@ -13359,16 +13487,11 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
13359
13487
  else if (state === 'indeterminate' && !(frameSpan.classList.contains(INDETERMINATE))) {
13360
13488
  removeClass([frameSpan], [CHECK$1]);
13361
13489
  frameSpan.classList.add(INDETERMINATE);
13362
- ariaState = 'false';
13363
13490
  if (selectAll$$1) {
13364
13491
  this.parent.selectAllItems(false, e);
13365
13492
  this.setLocale();
13366
13493
  }
13367
13494
  }
13368
- ariaState = state === 'check' ? 'true' : state === 'uncheck' ? 'false' : ariaState;
13369
- if (!isNullOrUndefined(ariaState)) {
13370
- wrapper.setAttribute('aria-checked', ariaState);
13371
- }
13372
13495
  };
13373
13496
  CheckBoxSelection.prototype.setSearchBox = function (args) {
13374
13497
  if (isNullOrUndefined(this.parent.filterParent)) {
@@ -13529,8 +13652,8 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
13529
13652
  e.preventDefault();
13530
13653
  }
13531
13654
  }
13532
- if (!(!isNullOrUndefined(this.parent.popupObj) && closest(target, '[id="' + this.parent.popupObj.element.id + '"]')) &&
13533
- !this.parent.overAllWrapper.contains(e.target)) {
13655
+ if (!(!isNullOrUndefined(this.parent.popupObj) && closest(target, '[id="' + this.parent.popupObj.element.id + '"]'))
13656
+ && !isNullOrUndefined(this.parent.overAllWrapper) && !this.parent.overAllWrapper.contains(e.target)) {
13534
13657
  if (this.parent.overAllWrapper.classList.contains(dropDownBaseClasses.focus) || this.parent.isPopupOpen()) {
13535
13658
  this.parent.inputFocus = false;
13536
13659
  this.parent.scrollFocusStatus = false;
@@ -13543,7 +13666,7 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
13543
13666
  this.parent.scrollFocusStatus = (Browser.isIE || Browser.info.name === 'edge') &&
13544
13667
  (document.activeElement === this.filterInput);
13545
13668
  }
13546
- if (!this.parent.overAllWrapper.contains(e.target) && this.parent.overAllWrapper.classList.contains('e-input-focus') &&
13669
+ if (!isNullOrUndefined(this.parent.overAllWrapper) && !this.parent.overAllWrapper.contains(e.target) && this.parent.overAllWrapper.classList.contains('e-input-focus') &&
13547
13670
  !this.parent.isPopupOpen()) {
13548
13671
  if (Browser.isIE) {
13549
13672
  this.parent.onBlurHandler();
@@ -13574,7 +13697,7 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
13574
13697
  }
13575
13698
  };
13576
13699
  CheckBoxSelection.prototype.checkSelectAll = function (e) {
13577
- if (e.value === 'check' && this.checkAllParent.getAttribute('aria-checked') !== 'true') {
13700
+ if (e.value === 'check') {
13578
13701
  this.changeState(this.checkAllParent, e.value, null, null, false);
13579
13702
  this.setLocale(true);
13580
13703
  }
@@ -13758,6 +13881,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
13758
13881
  this.isCustomFiltering = false;
13759
13882
  this.initialSelectedOptions = this.value;
13760
13883
  _super.prototype.render.call(this);
13884
+ this.setEnabled();
13761
13885
  this.renderComplete();
13762
13886
  };
13763
13887
  ListBox.prototype.initWrapper = function () {
@@ -14055,10 +14179,10 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14055
14179
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14056
14180
  var event = args.event;
14057
14181
  var wrapper;
14058
- if (args.target && (args.target.classList.contains("e-listbox-wrapper") || args.target.classList.contains("e-list-item")
14059
- || args.target.classList.contains("e-filter-parent") || args.target.classList.contains("e-input-group"))) {
14060
- if (args.target.classList.contains("e-list-item") || args.target.classList.contains("e-filter-parent")
14061
- || args.target.classList.contains("e-input-group")) {
14182
+ if (args.target && (args.target.classList.contains('e-listbox-wrapper') || args.target.classList.contains('e-list-item')
14183
+ || args.target.classList.contains('e-filter-parent') || args.target.classList.contains('e-input-group'))) {
14184
+ if (args.target.classList.contains('e-list-item') || args.target.classList.contains('e-filter-parent')
14185
+ || args.target.classList.contains('e-input-group')) {
14062
14186
  wrapper = args.target.closest('.e-listbox-wrapper');
14063
14187
  }
14064
14188
  else {
@@ -14113,7 +14237,8 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14113
14237
  var getArgs = this.getDragArgs({ target: args.droppedElement }, true);
14114
14238
  var sourceArgs = { previousData: this.dataSource };
14115
14239
  var destArgs = { previousData: listObj.dataSource };
14116
- var dragArgs = extend({}, getArgs, { target: args.target, source: { previousData: this.dataSource }, previousIndex: args.previousIndex, currentIndex: args.currentIndex });
14240
+ var dragArgs = extend({}, getArgs, { target: args.target, source: { previousData: this.dataSource },
14241
+ previousIndex: args.previousIndex, currentIndex: args.currentIndex });
14117
14242
  if (listObj !== this) {
14118
14243
  var sourceArgs1 = extend(sourceArgs, { currentData: this.listData });
14119
14244
  dragArgs = extend(dragArgs, { source: sourceArgs1, destination: destArgs });
@@ -14250,7 +14375,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14250
14375
  };
14251
14376
  ListBox.prototype.updateListItems = function (sourceElem, destElem) {
14252
14377
  var i = 0;
14253
- destElem.innerHTML = "";
14378
+ destElem.innerHTML = '';
14254
14379
  while (i < sourceElem.childNodes.length) {
14255
14380
  destElem.appendChild(sourceElem.childNodes[i]);
14256
14381
  }
@@ -14279,6 +14404,14 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14279
14404
  }
14280
14405
  return listObj;
14281
14406
  };
14407
+ /**
14408
+ * Sets the enabled state to DropDownBase.
14409
+ *
14410
+ * @returns {void}
14411
+ */
14412
+ ListBox.prototype.setEnabled = function () {
14413
+ this.element.setAttribute('aria-disabled', (this.enabled) ? 'false' : 'true');
14414
+ };
14282
14415
  ListBox.prototype.listOption = function (dataSource, fields) {
14283
14416
  this.listCurrentOptions = _super.prototype.listOption.call(this, dataSource, fields);
14284
14417
  this.listCurrentOptions = extend({}, this.listCurrentOptions, { itemCreated: this.triggerBeforeItemRender.bind(this) }, true);
@@ -14728,9 +14861,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
14728
14861
  prepend([this.filterParent], this.list);
14729
14862
  attributes(this.filterInput, {
14730
14863
  'aria-disabled': 'false',
14731
- 'aria-owns': this.element.id + '_options',
14732
- 'role': 'listbox',
14733
- 'aria-activedescendant': null,
14864
+ 'aria-label': 'search list item',
14734
14865
  'autocomplete': 'off',
14735
14866
  'autocorrect': 'off',
14736
14867
  'autocapitalize': 'off',
@@ -15178,7 +15309,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15178
15309
  listData = listData
15179
15310
  .filter(function (data) { return data.isHeader !== true; });
15180
15311
  tListBox.listData = tListBox.jsonData = listData;
15181
- if (fListBox.listData.length == fListBox.jsonData.length) {
15312
+ if (fListBox.listData.length === fListBox.jsonData.length) {
15182
15313
  fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];
15183
15314
  }
15184
15315
  else if (this.allowFiltering) {
@@ -15324,7 +15455,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15324
15455
  }
15325
15456
  }
15326
15457
  }
15327
- else if (e.keyCode !== 37 && e.keyCode !== 39 && e.code !== "KeyA") {
15458
+ else if (e.keyCode !== 37 && e.keyCode !== 39 && e.code !== 'KeyA') {
15328
15459
  this.upDownKeyHandler(e);
15329
15460
  }
15330
15461
  }
@@ -15368,8 +15499,8 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15368
15499
  }
15369
15500
  if (this.selectionSettings.showCheckbox && e.ctrlKey && e.shiftKey && (e.keyCode === 36 || e.keyCode === 35)) {
15370
15501
  var selectedidx = Array.prototype.indexOf.call(ul.children, fli);
15371
- var sidx = e.code === "Home" ? 0 : selectedidx;
15372
- var eidx = e.code === "Home" ? selectedidx : ul.children.length - 1;
15502
+ var sidx = e.code === 'Home' ? 0 : selectedidx;
15503
+ var eidx = e.code === 'Home' ? selectedidx : ul.children.length - 1;
15373
15504
  for (var i = sidx; i <= eidx; i++) {
15374
15505
  var item = ul.children[i];
15375
15506
  this.notify('updatelist', { li: item, e: {
@@ -15527,7 +15658,6 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15527
15658
  dvalue_1 = _this.getFormattedValue(li.getAttribute('data-value'));
15528
15659
  if (values.indexOf(dvalue_1) < 0) {
15529
15660
  li.getElementsByClassName('e-check')[0].classList.remove('e-check');
15530
- li.getElementsByClassName('e-checkbox-wrapper')[0].removeAttribute('aria-checked');
15531
15661
  li.removeAttribute('aria-selected');
15532
15662
  }
15533
15663
  });
@@ -15879,6 +16009,12 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15879
16009
  __decorate$6([
15880
16010
  Property('')
15881
16011
  ], ListBox.prototype, "height", void 0);
16012
+ __decorate$6([
16013
+ Property(true)
16014
+ ], ListBox.prototype, "enabled", void 0);
16015
+ __decorate$6([
16016
+ Property(false)
16017
+ ], ListBox.prototype, "enablePersistence", void 0);
15882
16018
  __decorate$6([
15883
16019
  Property(false)
15884
16020
  ], ListBox.prototype, "allowDragAndDrop", void 0);
@@ -16053,6 +16189,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16053
16189
  this.isFiltered = false;
16054
16190
  this.beforePopupOpen = false;
16055
16191
  this.initRemoteRender = false;
16192
+ this.isListResetted = false;
16056
16193
  this.isPopupOpen = false;
16057
16194
  this.isCollided = false;
16058
16195
  this.lineBreak = false;
@@ -16119,6 +16256,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16119
16256
  /**
16120
16257
  * Hides the spinner loader.
16121
16258
  *
16259
+ * @private
16122
16260
  * @returns {void}
16123
16261
  */
16124
16262
  Mention.prototype.hideSpinner = function () {
@@ -16174,6 +16312,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16174
16312
  break;
16175
16313
  case 'tab':
16176
16314
  if (this.isPopupOpen) {
16315
+ e.preventDefault();
16177
16316
  var li = this.list.querySelector('.' + dropDownBaseClasses.selected);
16178
16317
  if (li) {
16179
16318
  this.setSelection(li, e);
@@ -16213,7 +16352,8 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16213
16352
  var startIndex = 0;
16214
16353
  startIndex = e.action === 'down' && isNullOrUndefined(this.activeIndex) ? 0 : this.liCollections.length - 1;
16215
16354
  index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index;
16216
- var nextItem = isNullOrUndefined(this.activeIndex) ? this.liCollections[startIndex] : this.liCollections[index];
16355
+ var nextItem = isNullOrUndefined(this.activeIndex) ?
16356
+ this.liCollections[startIndex] : this.liCollections[index];
16217
16357
  if (!isNullOrUndefined(nextItem)) {
16218
16358
  this.setSelection(nextItem, e);
16219
16359
  }
@@ -16238,9 +16378,14 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16238
16378
  }
16239
16379
  var currentRange = this.getTextRange();
16240
16380
  var lastWordRange = this.getLastLetter(currentRange);
16381
+ // eslint-disable-next-line security/detect-non-literal-regexp
16241
16382
  var Regex = new RegExp(this.mentionChar, 'g');
16242
16383
  var charRegex = new RegExp('[a-zA-Z]', 'g');
16243
16384
  if (e.key === 'Shift' || e.keyCode === 37 || e.keyCode === 39) {
16385
+ if ((e.keyCode === 37 || e.keyCode === 39) && !isNullOrUndefined(currentRange) &&
16386
+ currentRange.indexOf(this.mentionChar) === -1 && this.isPopupOpen) {
16387
+ this.hidePopup();
16388
+ }
16244
16389
  return;
16245
16390
  }
16246
16391
  if ((!currentRange || !lastWordRange) || e.code === 'Enter' || e.keyCode === 27 ||
@@ -16269,7 +16414,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16269
16414
  if (!this.isContentEditable(this.inputElement)) {
16270
16415
  this.showPopup();
16271
16416
  }
16272
- else if (this.isContentEditable(this.inputElement) && this.range && this.range.startContainer !== this.inputElement) {
16417
+ else if (this.isContentEditable(this.inputElement) && this.range && this.range.startContainer !== this.inputElement && e.keyCode !== 9) {
16273
16418
  this.showPopup();
16274
16419
  }
16275
16420
  }
@@ -16298,8 +16443,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16298
16443
  this.searchLists(e);
16299
16444
  }
16300
16445
  else if (this.queryString === '' && this.isPopupOpen && e.keyCode !== 38 && e.keyCode !== 40) {
16301
- this.resetList(this.dataSource, this.fields);
16446
+ this.searchLists(e);
16447
+ if (!this.isListResetted) {
16448
+ this.resetList(this.dataSource, this.fields);
16449
+ }
16302
16450
  }
16451
+ this.isListResetted = false;
16303
16452
  };
16304
16453
  Mention.prototype.isMatchedText = function () {
16305
16454
  var isMatched = false;
@@ -16333,7 +16482,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16333
16482
  this.activeIndex = null;
16334
16483
  var eventArgs = {
16335
16484
  preventDefaultAction: false,
16336
- text: this.elementValue(),
16485
+ text: this.queryString,
16337
16486
  updateData: function (dataSource, query, fields) {
16338
16487
  if (eventArgs.cancel) {
16339
16488
  return;
@@ -16351,8 +16500,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16351
16500
  };
16352
16501
  Mention.prototype.filterAction = function (dataSource, query, fields) {
16353
16502
  this.beforePopupOpen = true;
16354
- if (this.queryString !== '' && (this.queryString.length >= this.minLength)) {
16503
+ if (this.queryString.length >= this.minLength) {
16355
16504
  this.resetList(dataSource, fields, query);
16505
+ this.isListResetted = true;
16356
16506
  }
16357
16507
  else {
16358
16508
  if (this.isPopupOpen) {
@@ -16474,12 +16624,14 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16474
16624
  }
16475
16625
  }
16476
16626
  else {
16477
- var selectedElem = this.range.startContainer;
16478
- if (!isNullOrUndefined(selectedElem)) {
16479
- var workingNodeContent = selectedElem.textContent;
16480
- var selectStartOffset = this.range.startOffset;
16481
- if (workingNodeContent && selectStartOffset >= 0) {
16482
- text = workingNodeContent.substring(0, selectStartOffset);
16627
+ if (this.range) {
16628
+ var selectedElem = this.range.startContainer;
16629
+ if (!isNullOrUndefined(selectedElem)) {
16630
+ var workingNodeContent = selectedElem.textContent;
16631
+ var selectStartOffset = this.range.startOffset;
16632
+ if (workingNodeContent && selectStartOffset >= 0) {
16633
+ text = workingNodeContent.substring(0, selectStartOffset);
16634
+ }
16483
16635
  }
16484
16636
  }
16485
16637
  }
@@ -16503,6 +16655,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16503
16655
  * @returns {void}
16504
16656
  */
16505
16657
  Mention.prototype.showPopup = function () {
16658
+ this.beforePopupOpen = true;
16659
+ if (isNullOrUndefined(this.list)) {
16660
+ this.initValue();
16661
+ }
16506
16662
  this.renderPopup();
16507
16663
  attributes(this.inputElement, { 'aria-activedescendant': this.selectedElementID });
16508
16664
  if (this.selectedElementID == null) {
@@ -16568,18 +16724,13 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16568
16724
  }
16569
16725
  }
16570
16726
  append([_this.list], popupEle_1);
16571
- if ((!_this.popupObj || !document.body.contains(_this.popupObj.element)) || !document.contains(popupEle_1) && isNullOrUndefined(_this.target)) {
16727
+ if ((!_this.popupObj || !document.body.contains(_this.popupObj.element)) ||
16728
+ !document.contains(popupEle_1) && isNullOrUndefined(_this.target)) {
16572
16729
  document.body.appendChild(popupEle_1);
16573
16730
  }
16574
16731
  var coordinates_1;
16575
16732
  popupEle_1.style.visibility = 'hidden';
16576
- if (_this.popupHeight !== 'auto') {
16577
- _this.list.style.maxHeight = (parseInt(_this.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property
16578
- popupEle_1.style.maxHeight = formatUnit(_this.popupHeight);
16579
- }
16580
- else {
16581
- popupEle_1.style.height = 'auto';
16582
- }
16733
+ _this.setHeight(popupEle_1);
16583
16734
  var offsetValue = 0;
16584
16735
  var left = 0;
16585
16736
  _this.initializePopup(popupEle_1, offsetValue, left);
@@ -16602,6 +16753,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16602
16753
  if (!eventArgs.cancel) {
16603
16754
  _this.renderReactTemplates();
16604
16755
  _this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.inputElement : null);
16756
+ if (isNullOrUndefined(_this.getTriggerCharPosition())) {
16757
+ return;
16758
+ }
16605
16759
  coordinates_1 = _this.getCoordinates(_this.inputElement, _this.getTriggerCharPosition());
16606
16760
  if (!_this.isCollided) {
16607
16761
  popupEle_1.style.cssText = 'top: '.concat(coordinates_1.top.toString(), 'px;\n left: ').concat(coordinates_1.left.toString(), 'px;\nposition: absolute;\n display: block;');
@@ -16611,6 +16765,8 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16611
16765
  _this.isCollided = false;
16612
16766
  }
16613
16767
  popupEle_1.style.width = _this.popupWidth !== '100%' && !isNullOrUndefined(_this.popupWidth) ? formatUnit(_this.popupWidth) : 'auto';
16768
+ _this.setHeight(popupEle_1);
16769
+ popupEle_1.style.zIndex = _this.zIndex === 1000 ? getZindexPartial(popupEle_1).toString() : _this.zIndex.toString();
16614
16770
  }
16615
16771
  else {
16616
16772
  _this.beforePopupOpen = false;
@@ -16623,6 +16779,15 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16623
16779
  }
16624
16780
  });
16625
16781
  };
16782
+ Mention.prototype.setHeight = function (popupEle) {
16783
+ if (this.popupHeight !== 'auto') {
16784
+ this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2).toString() + 'px'; // due to box-sizing property
16785
+ popupEle.style.maxHeight = formatUnit(this.popupHeight);
16786
+ }
16787
+ else {
16788
+ popupEle.style.height = 'auto';
16789
+ }
16790
+ };
16626
16791
  Mention.prototype.checkCollision = function (popupEle) {
16627
16792
  if (!Browser.isDevice || (Browser.isDevice && !(this.getModuleName() === 'mention'))) {
16628
16793
  var collision = isCollide(popupEle);
@@ -16703,7 +16868,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16703
16868
  computed = getComputedStyle(element);
16704
16869
  div.style.position = 'absolute';
16705
16870
  div.style.visibility = 'hidden';
16871
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16706
16872
  properties.forEach(function (prop) {
16873
+ // eslint-disable-next-line security/detect-object-injection
16707
16874
  div.style[prop] = computed[prop];
16708
16875
  });
16709
16876
  div.textContent = element.value.substring(0, position);
@@ -16737,13 +16904,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16737
16904
  }
16738
16905
  else {
16739
16906
  coordinates = {
16740
- top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize),
16907
+ top: rect.top + windowTop + parseInt(getComputedStyle(this.inputElement).fontSize, 10),
16741
16908
  left: rect.left + windowLeft
16742
16909
  };
16743
16910
  }
16744
16911
  return coordinates;
16745
16912
  };
16746
-
16747
16913
  Mention.prototype.initValue = function () {
16748
16914
  this.renderList();
16749
16915
  if (this.dataSource instanceof DataManager) {
@@ -16939,8 +17105,8 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16939
17105
  }
16940
17106
  return items;
16941
17107
  };
16942
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
16943
17108
  Mention.prototype.setValue = function (e) {
17109
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16944
17110
  if (!this.isReact) {
16945
17111
  if (!isNullOrUndefined(this.displayTemplate)) {
16946
17112
  this.setDisplayTemplate();
@@ -16968,7 +17134,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
16968
17134
  var selection = this.inputElement.ownerDocument.getSelection();
16969
17135
  var startPos = this.getTriggerCharPosition();
16970
17136
  textSuffix = typeof this.suffixText === 'string' ? this.suffixText : '';
16971
- if (dataItem.value !== null) {
17137
+ if (dataItem.text !== null) {
16972
17138
  value = this.mentionVal(dataItem.text);
16973
17139
  }
16974
17140
  if (!this.isContentEditable(this.inputElement)) {
@@ -17000,6 +17166,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
17000
17166
  var frag = document.createDocumentFragment();
17001
17167
  var node = void 0;
17002
17168
  var lastNode = void 0;
17169
+ // eslint-disable-next-line no-cond-assign
17003
17170
  while (node = element.firstChild) {
17004
17171
  lastNode = frag.appendChild(node);
17005
17172
  }
@@ -17055,6 +17222,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
17055
17222
  this.displayTempElement.appendChild(displayCompTemp[i]);
17056
17223
  }
17057
17224
  }
17225
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17058
17226
  if (!this.isReact) {
17059
17227
  this.renderTemplates();
17060
17228
  }
@@ -17064,6 +17232,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
17064
17232
  });
17065
17233
  }
17066
17234
  };
17235
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17067
17236
  Mention.prototype.renderTemplates = function (callBack) {
17068
17237
  this.renderReactTemplates(callBack);
17069
17238
  };
@@ -17093,6 +17262,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
17093
17262
  this.spinnerTemplateElement.appendChild(spinnerCompTemp[i]);
17094
17263
  }
17095
17264
  }
17265
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17096
17266
  if (!this.isReact) {
17097
17267
  this.renderTemplates();
17098
17268
  this.popupObj.element.appendChild(this.spinnerTemplateElement);
@@ -17187,7 +17357,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
17187
17357
  this.setHover(currentLi);
17188
17358
  };
17189
17359
  Mention.prototype.setHover = function (li) {
17190
- if (this.enabled && this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover)) {
17360
+ if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover)) {
17191
17361
  this.removeHover();
17192
17362
  addClass([li], dropDownBaseClasses.hover);
17193
17363
  }
@@ -17212,8 +17382,13 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
17212
17382
  * @returns {void}
17213
17383
  */
17214
17384
  Mention.prototype.search = function (text, positionX, positionY) {
17215
- if ((this.ignoreCase && (text === this.elementValue() || text === this.elementValue().toLowerCase()))
17216
- || !this.ignoreCase && text === this.elementValue()) {
17385
+ if (this.isContentEditable(this.inputElement)) {
17386
+ this.range = this.getCurrentRange();
17387
+ }
17388
+ var currentRange = this.getTextRange();
17389
+ var lastWordRange = this.getLastLetter(currentRange);
17390
+ if ((this.ignoreCase && (text === lastWordRange || text === lastWordRange.toLowerCase()))
17391
+ || !this.ignoreCase && text === lastWordRange) {
17217
17392
  this.resetList(this.dataSource, this.fields);
17218
17393
  }
17219
17394
  else {