@syncfusion/ej2-dropdowns 26.2.10 → 26.2.13

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.
@@ -2684,6 +2684,7 @@ let DropDownList = class DropDownList extends DropDownBase {
2684
2684
  this.isListSearched = false;
2685
2685
  this.preventChange = false;
2686
2686
  this.isTouched = false;
2687
+ this.isFocused = false;
2687
2688
  this.IsScrollerAtEnd = function () {
2688
2689
  return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
2689
2690
  };
@@ -3097,6 +3098,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3097
3098
  this.isActive = false;
3098
3099
  this.beforePopupOpen = false;
3099
3100
  }
3101
+ this.isFocused = false;
3100
3102
  }
3101
3103
  focusOutAction(e) {
3102
3104
  this.isInteracted = false;
@@ -3128,6 +3130,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3128
3130
  this.trigger('focus', args);
3129
3131
  }
3130
3132
  this.updateIconState();
3133
+ this.isFocused = true;
3131
3134
  }
3132
3135
  resetValueHandler(e) {
3133
3136
  const formElement = closest(this.inputElement, 'form');
@@ -8093,10 +8096,10 @@ let DropDownTree = class DropDownTree extends Component {
8093
8096
  }
8094
8097
  else {
8095
8098
  if (this.showCheckBox) {
8096
- const difference = this.value.filter((e) => {
8099
+ const difference = this.value.length !== this.treeObj.checkedNodes.length || this.value.filter((e) => {
8097
8100
  return this.treeObj.checkedNodes.indexOf(e) === -1;
8098
- });
8099
- if (difference.length > 0 || this.treeSettings.autoCheck) {
8101
+ }).length > 0;
8102
+ if (difference || this.treeSettings.autoCheck) {
8100
8103
  this.treeObj.checkedNodes = this.value.slice();
8101
8104
  this.treeObj.dataBind();
8102
8105
  this.setMultiSelect();
@@ -8112,7 +8115,7 @@ let DropDownTree = class DropDownTree extends Component {
8112
8115
  this.currentText = this.text;
8113
8116
  this.currentValue = this.value;
8114
8117
  if (!isNullOrUndefined(this.value) && this.value.length > 0 && !isNullOrUndefined(this.currentText)) {
8115
- this.inputWrapper.setAttribute('aria-label', this.currentText.split(',').join(' '));
8118
+ this.inputWrapper.setAttribute('aria-label', this.currentText.replace(/,/g, ', '));
8116
8119
  }
8117
8120
  if (this.isInitialized) {
8118
8121
  this.triggerChangeEvent();
@@ -9031,7 +9034,7 @@ let DropDownTree = class DropDownTree extends Component {
9031
9034
  this.currentText = this.text;
9032
9035
  this.currentValue = this.value;
9033
9036
  if (!isNullOrUndefined(this.value) && this.value.length > 0 && !isNullOrUndefined(this.currentText)) {
9034
- this.inputWrapper.setAttribute('aria-label', this.currentText.split(',').join(' '));
9037
+ this.inputWrapper.setAttribute('aria-label', this.currentText.replace(/,/g, ', '));
9035
9038
  }
9036
9039
  else {
9037
9040
  this.inputWrapper.setAttribute('aria-label', this.getModuleName());
@@ -10681,7 +10684,7 @@ let ComboBox = class ComboBox extends DropDownList {
10681
10684
  }
10682
10685
  }
10683
10686
  }
10684
- else if (this.allowCustom && this.isInteracted) {
10687
+ else if (this.allowCustom && this.isFocused) {
10685
10688
  this.isSelectCustom = true;
10686
10689
  }
10687
10690
  }
@@ -14658,6 +14661,12 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14658
14661
  if (this.enabled && !this.readonly) {
14659
14662
  let temp;
14660
14663
  if (this.value && this.value.length > 0) {
14664
+ if (this.allowFiltering) {
14665
+ this.refreshListItems(null);
14666
+ if (this.mode === 'CheckBox' && this.targetInputElement) {
14667
+ this.targetInputElement.value = '';
14668
+ }
14669
+ }
14661
14670
  const liElement = this.list && this.list.querySelectorAll('li.e-list-item');
14662
14671
  if (liElement && liElement.length > 0) {
14663
14672
  this.selectAllItems(false, e);
@@ -14675,6 +14684,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14675
14684
  this.clearAllCallback(e);
14676
14685
  }
14677
14686
  this.checkAndResetCache();
14687
+ Input.createSpanElement(this.overAllWrapper, this.createElement);
14688
+ this.calculateWidth();
14689
+ if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
14690
+ this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
14691
+ }
14678
14692
  if (this.enableVirtualization) {
14679
14693
  this.updateInitialData();
14680
14694
  if (this.chipCollectionWrapper) {
@@ -14743,11 +14757,13 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14743
14757
  }
14744
14758
  }
14745
14759
  resetValueHandler(e) {
14746
- const formElement = closest(this.inputElement, 'form');
14747
- if (formElement && e.target === formElement) {
14748
- const textVal = (this.element.tagName === this.getNgDirective()) ?
14749
- null : this.element.getAttribute('data-initial-value');
14750
- this.text = textVal;
14760
+ if (!isNullOrUndefined(this.inputElement)) {
14761
+ const formElement = closest(this.inputElement, 'form');
14762
+ if (formElement && e.target === formElement) {
14763
+ const textVal = (this.element.tagName === this.getNgDirective()) ?
14764
+ null : this.element.getAttribute('data-initial-value');
14765
+ this.text = textVal;
14766
+ }
14751
14767
  }
14752
14768
  }
14753
14769
  wireEvent() {
@@ -17857,13 +17873,21 @@ class CheckBoxSelection {
17857
17873
  setSearchBoxPosition() {
17858
17874
  const searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
17859
17875
  let selectAllHeight = 0;
17876
+ let footerHeight = 0;
17877
+ let headerHeight = 0;
17860
17878
  if (this.checkAllParent) {
17861
17879
  selectAllHeight = this.checkAllParent.getBoundingClientRect().height;
17862
17880
  }
17881
+ if (this.parent.header) {
17882
+ headerHeight = this.parent.header.getBoundingClientRect().height;
17883
+ }
17884
+ if (this.parent.footer) {
17885
+ footerHeight = this.parent.footer.getBoundingClientRect().height;
17886
+ }
17863
17887
  this.parent.popupObj.element.style.maxHeight = '100%';
17864
17888
  this.parent.popupObj.element.style.width = '100%';
17865
- this.parent.list.style.maxHeight = (window.innerHeight - searchBoxHeight - selectAllHeight) + 'px';
17866
- this.parent.list.style.height = (window.innerHeight - searchBoxHeight - selectAllHeight) + 'px';
17889
+ this.parent.list.style.maxHeight = (window.innerHeight - searchBoxHeight - selectAllHeight - headerHeight - footerHeight) + 'px';
17890
+ this.parent.list.style.height = (window.innerHeight - searchBoxHeight - selectAllHeight - headerHeight - footerHeight) + 'px';
17867
17891
  const clearElement = this.filterInput.parentElement.querySelector('.' + clearIcon);
17868
17892
  detach(this.filterInput);
17869
17893
  clearElement.parentElement.insertBefore(this.filterInput, clearElement);
@@ -21191,7 +21215,7 @@ let Mention = class Mention extends DropDownBase {
21191
21215
  if (isNullOrUndefined(text)) {
21192
21216
  return '';
21193
21217
  }
21194
- const textValue = text.replace(/\u00A0/g, ' ');
21218
+ const textValue = text.indexOf('\u200B') > -1 ? text.replace(/\u200B/g, '').replace(/\u00A0/g, ' ') : text.replace(/\u00A0/g, ' ');
21195
21219
  const words = textValue.split(/\s+/);
21196
21220
  const wordCnt = words.length - 1;
21197
21221
  return words[wordCnt].trim();
@@ -21839,7 +21863,13 @@ let Mention = class Mention extends DropDownBase {
21839
21863
  range.insertNode(frag);
21840
21864
  if (lastNode) {
21841
21865
  range = range.cloneRange();
21842
- range.setStartAfter(lastNode);
21866
+ if (this.isRTE) {
21867
+ range.setStart(lastNode, 0);
21868
+ range.setEnd(lastNode, lastNode.textContent.length);
21869
+ }
21870
+ else {
21871
+ range.setStartAfter(lastNode);
21872
+ }
21843
21873
  range.collapse(true);
21844
21874
  selection.removeAllRanges();
21845
21875
  selection.addRange(range);