@syncfusion/ej2-dropdowns 26.1.40 → 26.1.42

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 (57) hide show
  1. package/dist/ej2-dropdowns.min.js +2 -2
  2. package/dist/ej2-dropdowns.umd.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-dropdowns.es2015.js +169 -72
  5. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es5.js +170 -75
  7. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  8. package/dist/global/ej2-dropdowns.min.js +2 -2
  9. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +10 -10
  12. package/src/drop-down-list/drop-down-list.js +20 -9
  13. package/src/drop-down-tree/drop-down-tree.js +5 -3
  14. package/src/list-box/list-box.js +73 -31
  15. package/src/mention/mention.js +2 -2
  16. package/src/multi-select/multi-select.d.ts +1 -0
  17. package/src/multi-select/multi-select.js +70 -30
  18. package/styles/bootstrap-dark.css +1 -1
  19. package/styles/bootstrap.css +1 -1
  20. package/styles/bootstrap4.css +1 -1
  21. package/styles/bootstrap5-dark.css +1 -1
  22. package/styles/bootstrap5.css +1 -1
  23. package/styles/drop-down-tree/_layout.scss +1 -1
  24. package/styles/drop-down-tree/bootstrap-dark.css +1 -1
  25. package/styles/drop-down-tree/bootstrap.css +1 -1
  26. package/styles/drop-down-tree/bootstrap4.css +1 -1
  27. package/styles/drop-down-tree/bootstrap5-dark.css +1 -1
  28. package/styles/drop-down-tree/bootstrap5.css +1 -1
  29. package/styles/drop-down-tree/fabric-dark.css +1 -1
  30. package/styles/drop-down-tree/fabric.css +1 -1
  31. package/styles/drop-down-tree/fluent-dark.css +1 -1
  32. package/styles/drop-down-tree/fluent.css +1 -1
  33. package/styles/drop-down-tree/fluent2.css +1 -1
  34. package/styles/drop-down-tree/highcontrast-light.css +1 -1
  35. package/styles/drop-down-tree/highcontrast.css +1 -1
  36. package/styles/drop-down-tree/material-dark.css +1 -1
  37. package/styles/drop-down-tree/material.css +1 -1
  38. package/styles/drop-down-tree/material3-dark.css +1 -1
  39. package/styles/drop-down-tree/material3.css +1 -1
  40. package/styles/drop-down-tree/tailwind-dark.css +1 -1
  41. package/styles/drop-down-tree/tailwind.css +1 -1
  42. package/styles/fabric-dark.css +1 -1
  43. package/styles/fabric.css +1 -1
  44. package/styles/fluent-dark.css +1 -1
  45. package/styles/fluent.css +1 -1
  46. package/styles/fluent2.css +3 -2
  47. package/styles/highcontrast-light.css +1 -1
  48. package/styles/highcontrast.css +1 -1
  49. package/styles/material-dark.css +1 -1
  50. package/styles/material.css +1 -1
  51. package/styles/material3-dark.css +1 -1
  52. package/styles/material3.css +1 -1
  53. package/styles/multi-select/_fluent2-definition.scss +2 -1
  54. package/styles/multi-select/_theme.scss +3 -0
  55. package/styles/multi-select/fluent2.css +2 -1
  56. package/styles/tailwind-dark.css +1 -1
  57. package/styles/tailwind.css +1 -1
@@ -3913,7 +3913,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3913
3913
  this.removeSelection();
3914
3914
  li.classList.add(dropDownBaseClasses.selected);
3915
3915
  this.removeHover();
3916
- const value = li.getAttribute('data-value') !== "null" ? this.getFormattedValue(li.getAttribute('data-value')) : null;
3916
+ const value = li.getAttribute('data-value') !== null ? this.getFormattedValue(li.getAttribute('data-value')) : null;
3917
3917
  const selectedData = this.getDataByValue(value);
3918
3918
  if (!this.initial && !preventSelect && !isNullOrUndefined(e)) {
3919
3919
  const items = this.detachChanges(selectedData);
@@ -3988,6 +3988,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3988
3988
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3989
3989
  setValue(e) {
3990
3990
  const dataItem = this.getItemData();
3991
+ this.isTouched = !isNullOrUndefined(e);
3991
3992
  if (dataItem.value === null) {
3992
3993
  Input.setValue(null, this.inputElement, this.floatLabelType, this.showClearButton);
3993
3994
  }
@@ -5859,7 +5860,9 @@ let DropDownList = class DropDownList extends DropDownBase {
5859
5860
  checkData(newProp) {
5860
5861
  if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource)) && this.itemTemplate && this.allowFiltering &&
5861
5862
  !(this.isListSearched && (newProp.dataSource instanceof DataManager))) {
5862
- this.list = null;
5863
+ if (this.list) {
5864
+ this.list.innerHTML = '';
5865
+ }
5863
5866
  this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };
5864
5867
  }
5865
5868
  this.isListSearched = false;
@@ -5901,7 +5904,13 @@ let DropDownList = class DropDownList extends DropDownBase {
5901
5904
  this.itemData = this.getDataByValue(currentValue);
5902
5905
  const dataItem = this.getItemData();
5903
5906
  let value = this.allowObjectBinding ? this.itemData : dataItem.value;
5904
- this.setProperties({ 'text': dataItem.text, 'value': value });
5907
+ const index = isNullOrUndefined(value) ? null : this.index;
5908
+ if (isNullOrUndefined(index) && (currentValue == value)) {
5909
+ this.setProperties({ 'text': dataItem.text, 'value': value });
5910
+ }
5911
+ else {
5912
+ this.setProperties({ 'text': dataItem.text, 'index': index, 'value': value });
5913
+ }
5905
5914
  }
5906
5915
  updateInputFields() {
5907
5916
  if (this.getModuleName() === 'dropdownlist') {
@@ -6494,12 +6503,14 @@ let DropDownList = class DropDownList extends DropDownBase {
6494
6503
  Input.setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
6495
6504
  }
6496
6505
  this.element.style.display = 'block';
6497
- if (this.inputWrapper.container.parentElement.tagName === this.getNgDirective()) {
6498
- detach(this.inputWrapper.container);
6499
- }
6500
- else {
6501
- this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);
6502
- detach(this.inputWrapper.container);
6506
+ if (this.inputWrapper.container && this.inputWrapper.container.parentElement) {
6507
+ if (this.inputWrapper.container.parentElement.tagName === this.getNgDirective()) {
6508
+ detach(this.inputWrapper.container);
6509
+ }
6510
+ else {
6511
+ this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);
6512
+ detach(this.inputWrapper.container);
6513
+ }
6503
6514
  }
6504
6515
  delete this.hiddenElement;
6505
6516
  this.filterInput = null;
@@ -7038,6 +7049,7 @@ let DropDownTree = class DropDownTree extends Component {
7038
7049
  this.isFilteredData = false;
7039
7050
  this.isFilterRestore = true;
7040
7051
  fields = this.cloneFields(this.fields);
7052
+ this.treeObj.element.classList.remove('e-filtering');
7041
7053
  }
7042
7054
  else if (args.preventDefaultAction) {
7043
7055
  fields = args.fields;
@@ -7058,6 +7070,7 @@ let DropDownTree = class DropDownTree extends Component {
7058
7070
  fields = this.nestedFilter(args.text, args.fields);
7059
7071
  }
7060
7072
  }
7073
+ this.treeObj.element.classList.add('e-filtering');
7061
7074
  }
7062
7075
  this.hideCheckAll(this.isFilteredData);
7063
7076
  if (flag) {
@@ -8124,6 +8137,7 @@ let DropDownTree = class DropDownTree extends Component {
8124
8137
  /* To render the popup element */
8125
8138
  renderPopup() {
8126
8139
  if (this.isFilteredData) {
8140
+ this.treeObj.element.classList.remove('e-filtering');
8127
8141
  this.filterObj.value = '';
8128
8142
  this.treeObj.fields = this.getTreeFields(this.fields);
8129
8143
  this.isFilterRestore = true;
@@ -8191,10 +8205,9 @@ let DropDownTree = class DropDownTree extends Component {
8191
8205
  this.popupObj.refreshPosition();
8192
8206
  if (!(this.showCheckBox && this.showSelectAll) && (!this.popupDiv.classList.contains(NODATA)
8193
8207
  && this.treeItems.length > 0)) {
8194
- let focusedElement;
8195
- if (this.value != null && this.text != null) {
8208
+ let focusedElement = this.value != null && this.text != null ? this.treeObj.element.querySelector('[data-uid="' + this.value[0] + '"]') : null;
8209
+ if (focusedElement) {
8196
8210
  this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
8197
- focusedElement = this.treeObj.element.querySelector('[data-uid="' + this.value[0] + '"]');
8198
8211
  focusedElement.setAttribute('tabindex', '0');
8199
8212
  }
8200
8213
  else {
@@ -12113,6 +12126,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12113
12126
  this.isCustomRendered = true;
12114
12127
  this.remoteCustomValue = this.enableVirtualization ? false : this.remoteCustomValue;
12115
12128
  }
12129
+ if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy) && !isNullOrUndefined(this.fields.disabled)) {
12130
+ this.disableGroupHeader();
12131
+ }
12116
12132
  if (this.dataSource instanceof DataManager && this.mode === 'CheckBox' && this.allowFiltering) {
12117
12133
  this.removeFocus();
12118
12134
  }
@@ -12276,9 +12292,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12276
12292
  return (!isNullOrUndefined(liElement) ? liElement : this.liCollections[0]);
12277
12293
  }
12278
12294
  checkSelectAll() {
12279
- const groupItemLength = this.list.querySelectorAll('li.e-list-group-item.e-active').length;
12295
+ const groupItemLength = !isNullOrUndefined(this.fields.disabled) ? this.list.querySelectorAll('li.e-list-group-item.e-active:not(.e-disabled)').length : this.list.querySelectorAll('li.e-list-group-item.e-active').length;
12280
12296
  const listItem = this.list.querySelectorAll('li.e-list-item');
12281
- const searchCount = this.enableVirtualization ? this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)').length : this.list.querySelectorAll('li.' + dropDownBaseClasses.li).length;
12297
+ const searchCount = this.enableVirtualization ? this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)').length : !isNullOrUndefined(this.fields.disabled) ? this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-disabled)').length : this.list.querySelectorAll('li.' + dropDownBaseClasses.li).length;
12282
12298
  let searchActiveCount = this.list.querySelectorAll('li.' + dropDownBaseClasses.selected).length;
12283
12299
  if (this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {
12284
12300
  searchActiveCount = searchActiveCount - groupItemLength;
@@ -13658,7 +13674,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13658
13674
  }
13659
13675
  const focusedLi = this.list ? this.list.querySelector('.e-item-focus') : null;
13660
13676
  if (this.isDisabledElement(focusedLi)) {
13661
- if (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem):not(.e-disabled)').length === 0) {
13677
+ if (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem):not(.e-disabled)').length === 0 || (this.keyCode === 38 && this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy) && focusedLi === this.list.querySelector('li.e-list-group-item'))) {
13662
13678
  this.removeFocus();
13663
13679
  return;
13664
13680
  }
@@ -14057,9 +14073,17 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14057
14073
  checkMaxSelection() {
14058
14074
  const limit = this.value && this.value.length ? this.value.length : 0;
14059
14075
  if (limit === this.maximumSelectionLength) {
14060
- const collection = this.list.querySelectorAll('li.'
14076
+ const activeItems = this.list.querySelectorAll('li.'
14077
+ + dropDownBaseClasses.li + '.e-active');
14078
+ removeClass(activeItems, 'e-disable');
14079
+ const inactiveItems = this.list.querySelectorAll('li.'
14061
14080
  + dropDownBaseClasses.li + ':not(.e-active)');
14062
- addClass(collection, 'e-disable');
14081
+ addClass(inactiveItems, 'e-disable');
14082
+ }
14083
+ if (limit < this.maximumSelectionLength) {
14084
+ const collection = this.list.querySelectorAll('li.'
14085
+ + dropDownBaseClasses.li);
14086
+ removeClass(collection, 'e-disable');
14063
14087
  }
14064
14088
  }
14065
14089
  dispatchSelect(value, eve, element, isNotTrigger, length) {
@@ -14612,7 +14636,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14612
14636
  if (this.mode === 'CheckBox') {
14613
14637
  this.refreshPlaceHolder();
14614
14638
  this.refreshInputHight();
14615
- if (this.changeOnBlur && isClearAll && (isNullOrUndefined(this.value) || this.value.length === 0)) {
14639
+ if (!this.changeOnBlur && isClearAll && (isNullOrUndefined(this.value) || this.value.length === 0)) {
14616
14640
  this.updateValueState(e, this.value, this.tempValues);
14617
14641
  }
14618
14642
  }
@@ -15429,17 +15453,19 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15429
15453
  }
15430
15454
  findGroupAttrtibutes(listElement, checked, unChecked, count, position) {
15431
15455
  while (!listElement.classList.contains('e-list-group-item')) {
15432
- if (listElement.classList.contains('e-list-icon')) {
15433
- listElement = listElement.parentElement;
15434
- }
15435
- if (listElement.getElementsByClassName('e-frame')[0].classList.contains('e-check') &&
15436
- listElement.classList.contains('e-list-item')) {
15437
- checked++;
15438
- }
15439
- else if (listElement.classList.contains('e-list-item')) {
15440
- unChecked++;
15456
+ if (!(this.fields.disabled && this.isDisabledElement(listElement))) {
15457
+ if (listElement.classList.contains('e-list-icon')) {
15458
+ listElement = listElement.parentElement;
15459
+ }
15460
+ if (listElement.getElementsByClassName('e-frame')[0].classList.contains('e-check') &&
15461
+ listElement.classList.contains('e-list-item')) {
15462
+ checked++;
15463
+ }
15464
+ else if (listElement.classList.contains('e-list-item')) {
15465
+ unChecked++;
15466
+ }
15467
+ count++;
15441
15468
  }
15442
- count++;
15443
15469
  listElement = position ? listElement.nextElementSibling : listElement.previousElementSibling;
15444
15470
  if (listElement == null) {
15445
15471
  break;
@@ -15448,7 +15474,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15448
15474
  return [checked, unChecked, count];
15449
15475
  }
15450
15476
  updateCheckBox(groupHeader, checked, unChecked, count) {
15451
- if (groupHeader === null) {
15477
+ if (groupHeader === null || (!isNullOrUndefined(this.fields.disabled) && count === 0)) {
15452
15478
  return;
15453
15479
  }
15454
15480
  const checkBoxElement = groupHeader.getElementsByClassName('e-frame')[0];
@@ -15477,6 +15503,28 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15477
15503
  groupHeader.setAttribute('aria-selected', 'false');
15478
15504
  }
15479
15505
  }
15506
+ disableGroupHeader() {
15507
+ const collection = this.list.querySelectorAll('li.e-list-group-item');
15508
+ if (collection) {
15509
+ for (let index = 0; index < collection.length; index++) {
15510
+ let isDisabled = true;
15511
+ let target = collection[index].nextElementSibling;
15512
+ while (!target.classList.contains('e-list-group-item')) {
15513
+ if (!this.isDisabledElement(target)) {
15514
+ isDisabled = false;
15515
+ break;
15516
+ }
15517
+ target = target.nextElementSibling;
15518
+ if (target == null) {
15519
+ break;
15520
+ }
15521
+ }
15522
+ if (isDisabled) {
15523
+ this.disableListItem(collection[index]);
15524
+ }
15525
+ }
15526
+ }
15527
+ }
15480
15528
  deselectHeader() {
15481
15529
  const limit = this.value && this.value.length ? this.value.length : 0;
15482
15530
  const collection = this.list.querySelectorAll('li.e-list-group-item:not(.e-active)');
@@ -15850,22 +15898,24 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15850
15898
  return;
15851
15899
  }
15852
15900
  while (listElement.classList.contains('e-list-item')) {
15853
- if (state) {
15854
- if (!listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
15855
- let selectionLimit = this.value && this.value.length ? this.value.length : 0;
15856
- if (listElement.classList.contains('e-active')) {
15857
- selectionLimit -= 1;
15901
+ if (!(this.fields.disabled && this.isDisabledElement(listElement))) {
15902
+ if (state) {
15903
+ if (!listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
15904
+ let selectionLimit = this.value && this.value.length ? this.value.length : 0;
15905
+ if (listElement.classList.contains('e-active')) {
15906
+ selectionLimit -= 1;
15907
+ }
15908
+ if (selectionLimit < this.maximumSelectionLength) {
15909
+ this.updateListSelection(listElement, event);
15910
+ }
15858
15911
  }
15859
- if (selectionLimit < this.maximumSelectionLength) {
15912
+ }
15913
+ else {
15914
+ if (listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
15860
15915
  this.updateListSelection(listElement, event);
15861
15916
  }
15862
15917
  }
15863
15918
  }
15864
- else {
15865
- if (listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
15866
- this.updateListSelection(listElement, event);
15867
- }
15868
- }
15869
15919
  listElement = listElement.nextElementSibling;
15870
15920
  if (listElement == null) {
15871
15921
  break;
@@ -16165,7 +16215,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16165
16215
  }
16166
16216
  if (this.mode === 'CheckBox') {
16167
16217
  this.updateDelimView();
16168
- if (!(isRemoveAll || this.isSelectAll) && this.isSelectAllTarget) {
16218
+ if ((!(isRemoveAll || this.isSelectAll) && this.isSelectAllTarget) || (this.isSelectAll && this.isSelectAllTarget)) {
16169
16219
  this.updateDelimeter(this.delimiterChar, event);
16170
16220
  }
16171
16221
  this.refreshInputHight();
@@ -16717,7 +16767,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16717
16767
  * @returns {void}
16718
16768
  */
16719
16769
  render() {
16720
- if (!isNullOrUndefined(this.value)) {
16770
+ if (!isNullOrUndefined(this.value) && this.value.length > 0) {
16721
16771
  // eslint-disable-next-line
16722
16772
  this.value = [...this.value];
16723
16773
  }
@@ -17112,6 +17162,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17112
17162
  this.removeDisabledItemsValue(this.value);
17113
17163
  this.updateVal(this.value, oldValue, 'value');
17114
17164
  }
17165
+ if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {
17166
+ this.disableGroupHeader();
17167
+ }
17115
17168
  }
17116
17169
  }
17117
17170
  }
@@ -17979,6 +18032,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
17979
18032
  */
17980
18033
  addItem(items, itemIndex) {
17981
18034
  super.addItem(items, itemIndex);
18035
+ if (this.allowFiltering && this.filterInput.value !== '') {
18036
+ this.filteringAction(this.jsonData, new Query(), this.fields);
18037
+ }
17982
18038
  }
17983
18039
  /**
17984
18040
  * Build and render the component.
@@ -18574,11 +18630,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18574
18630
  }
18575
18631
  }
18576
18632
  updateListItems(sourceElem, destElem) {
18577
- const i = 0;
18578
18633
  destElem.innerHTML = '';
18579
- while (i < sourceElem.childNodes.length) {
18580
- destElem.appendChild(sourceElem.childNodes[i]);
18581
- }
18634
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18635
+ destElem.append(...sourceElem.childNodes);
18582
18636
  }
18583
18637
  removeSelected(listObj, elems) {
18584
18638
  if (listObj.selectionSettings.showCheckbox) {
@@ -18706,6 +18760,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
18706
18760
  */
18707
18761
  addItems(items, itemIndex) {
18708
18762
  super.addItem(items, itemIndex);
18763
+ if (this.allowFiltering && this.filterInput.value !== '') {
18764
+ this.filteringAction(this.jsonData, new Query(), this.fields);
18765
+ }
18709
18766
  }
18710
18767
  /**
18711
18768
  * Removes a item from the list. By default, removed the last item in the list,
@@ -19204,8 +19261,13 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19204
19261
  }
19205
19262
  getDataByElems(elems) {
19206
19263
  const data = [];
19207
- for (let i = 0, len = elems.length; i < len; i++) {
19208
- data.push(this.getDataByValue(this.getFormattedValue(elems[i].getAttribute('data-value'))));
19264
+ const len = elems.length;
19265
+ for (let i = 0; i < len; i++) {
19266
+ const elem = elems[i];
19267
+ const value = elem.getAttribute('data-value');
19268
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19269
+ const formattedValue = this.getFormattedValue(value);
19270
+ data.push(this.getDataByValue(formattedValue));
19209
19271
  }
19210
19272
  return data;
19211
19273
  }
@@ -19377,16 +19439,38 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19377
19439
  fListBox.value = [];
19378
19440
  if (elems.length) {
19379
19441
  this.removeSelected(fListBox, elems);
19442
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19443
+ const ulChildren = Array.prototype.slice.call(fListBox.ulElement.children);
19444
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19445
+ const listItems = Array.prototype.slice.call(fListBox.ulElement.querySelectorAll('.e-list-item'));
19446
+ const lData = fListBox.listData;
19447
+ const sData = fListBox.sortedData;
19448
+ const jData = fListBox.jsonData;
19449
+ let eData;
19450
+ const listDataMap = {};
19451
+ if (elems.length > 199) {
19452
+ for (const item of fListBox.listData) {
19453
+ if (!isNullOrUndefined(item)) {
19454
+ const key = fListBox.getFormattedValue(getValue((fListBox.fields.value ? fListBox.fields.value : 'value'), item));
19455
+ listDataMap[key] = item;
19456
+ }
19457
+ }
19458
+ }
19380
19459
  elems.forEach((ele) => {
19381
- idx.push(Array.prototype.indexOf.call(fListBox.ulElement.children, ele)); // update sortable elem
19382
- // To update lb view data
19383
- dataLiIdx.push(Array.prototype.indexOf.call(fListBox.ulElement.querySelectorAll('.e-list-item'), ele));
19384
- // To update lb listdata data
19385
- dataIdx.push(Array.prototype.indexOf.call(fListBox.listData, fListBox.getDataByElems([ele])[0]));
19386
- // To update lb sorted data
19387
- sortIdx.push(Array.prototype.indexOf.call(fListBox.sortedData, fListBox.getDataByElems([ele])[0]));
19388
- // To update lb original data
19389
- jsonIdx.push(Array.prototype.indexOf.call(fListBox.jsonData, fListBox.getDataByElems([ele])[0]));
19460
+ if (elems.length < 200) {
19461
+ eData = fListBox.getDataByElems([ele])[0];
19462
+ }
19463
+ else {
19464
+ const value = ele.getAttribute('data-value');
19465
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19466
+ const formattedValue = fListBox.getFormattedValue(value);
19467
+ eData = listDataMap[formattedValue];
19468
+ }
19469
+ idx.push(ulChildren.indexOf(ele));
19470
+ dataLiIdx.push(listItems.indexOf(ele));
19471
+ dataIdx.push(lData.indexOf(eData));
19472
+ sortIdx.push(sData.indexOf(eData));
19473
+ jsonIdx.push(jData.indexOf(eData));
19390
19474
  });
19391
19475
  if (this.sortOrder !== 'None') {
19392
19476
  sortIdx.forEach((i) => {
@@ -19525,17 +19609,27 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19525
19609
  // eslint-disable-next-line prefer-spread
19526
19610
  flistboxarray = Array.apply(null, { length: fListBox.ulElement.childElementCount }).map(Number.call, Number);
19527
19611
  }
19528
- for (let i = 0; i < fListBox.ulElement.childElementCount; i++) {
19529
- if (fListBox.ulElement.childNodes[i].classList.contains('e-disabled')) {
19530
- // eslint-disable-next-line @typescript-eslint/tslint/config
19531
- flistboxarray = flistboxarray.filter(function (item) { return item !== i; });
19532
- tempLiColl.push(fListBox.ulElement.childNodes[i]);
19612
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19613
+ const childNodes = fListBox.ulElement.childNodes;
19614
+ const childElementCount = fListBox.ulElement.childElementCount;
19615
+ const newFlistboxArray = [];
19616
+ for (let i = 0; i < childElementCount; i++) {
19617
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19618
+ const childNode = childNodes[i];
19619
+ if (childNode.classList.contains('e-disabled')) {
19620
+ tempLiColl.push(childNode);
19533
19621
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
19534
19622
  tempData.push(fListBox.listData[i]);
19535
19623
  }
19624
+ else {
19625
+ newFlistboxArray.push(i);
19626
+ }
19627
+ }
19628
+ flistboxarray = newFlistboxArray;
19629
+ if (!isRefresh) {
19630
+ moveTo(fListBox.ulElement, tListBox.ulElement, flistboxarray, index);
19631
+ fListBox.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
19536
19632
  }
19537
- moveTo(fListBox.ulElement, tListBox.ulElement, flistboxarray, index);
19538
- this.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
19539
19633
  if (isKey) {
19540
19634
  this.list.focus();
19541
19635
  }
@@ -19591,7 +19685,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19591
19685
  if (isRefresh) {
19592
19686
  const sourceElem = tListBox.renderItems(listData, tListBox.fields);
19593
19687
  tListBox.updateListItems(sourceElem, tListBox.ulElement);
19594
- this.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
19688
+ fListBox.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
19595
19689
  }
19596
19690
  else {
19597
19691
  tListBox.sortedData = listData;
@@ -19878,11 +19972,13 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
19878
19972
  }
19879
19973
  }
19880
19974
  resizeHandler() {
19881
- if (this.list.scrollWidth > this.list.offsetWidth) {
19882
- this.list.querySelector('.e-list-parent').style.display = 'inline-block';
19883
- }
19884
- else {
19885
- this.list.querySelector('.e-list-parent').style.display = 'block';
19975
+ if (this.list && !(this.cssClass && this.cssClass.indexOf('e-horizontal-listbox') > -1)) {
19976
+ if (this.list.scrollWidth > this.list.offsetWidth) {
19977
+ this.list.querySelector('.e-list-parent').style.display = 'inline-block';
19978
+ }
19979
+ else {
19980
+ this.list.querySelector('.e-list-parent').style.display = 'block';
19981
+ }
19886
19982
  }
19887
19983
  }
19888
19984
  getValidIndex(cli, index, keyCode) {
@@ -20018,6 +20114,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
20018
20114
  }
20019
20115
  checkDisabledState(inst) {
20020
20116
  if (isNullOrUndefined(inst.ulElement)) {
20117
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
20021
20118
  if (!isNullOrUndefined(this.dataSource) && isNullOrUndefined(this.dataSource.length)) {
20022
20119
  return false;
20023
20120
  }
@@ -21679,10 +21776,10 @@ let Mention = class Mention extends DropDownBase {
21679
21776
  }
21680
21777
  if (this.isContentEditable(this.inputElement)) {
21681
21778
  if (Browser.isAndroid) {
21682
- return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21779
+ return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
21683
21780
  }
21684
21781
  else {
21685
- return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
21782
+ return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
21686
21783
  }
21687
21784
  }
21688
21785
  else {