@syncfusion/ej2-dropdowns 20.3.50 → 20.3.56

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.
@@ -3482,6 +3482,9 @@ let DropDownList = class DropDownList extends DropDownBase {
3482
3482
  if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
3483
3483
  updatedCssClassValues = (this.cssClass.replace(/\s+/g, ' ')).trim();
3484
3484
  }
3485
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
3486
+ this.enabled = false;
3487
+ }
3485
3488
  this.inputWrapper = Input.createInput({
3486
3489
  element: this.inputElement,
3487
3490
  buttons: this.isPopupButton() ? [dropDownListClasses.icon] : null,
@@ -4496,7 +4499,7 @@ let DropDownTree = class DropDownTree extends Component {
4496
4499
  this.updateDataAttribute();
4497
4500
  this.setHTMLAttributes();
4498
4501
  this.setAttributes();
4499
- this.popupDiv = this.createElement('div', { className: CONTENT, attrs: { 'tabindex': '0' } });
4502
+ this.popupDiv = this.createElement('div', { className: CONTENT });
4500
4503
  this.popupDiv.classList.add(DROPDOWN);
4501
4504
  this.tree = this.createElement('div', { id: this.element.id + '_tree' });
4502
4505
  this.popupDiv.appendChild(this.tree);
@@ -5828,14 +5831,14 @@ let DropDownTree = class DropDownTree extends Component {
5828
5831
  const isFooter = closest(target, '.' + FOOTER);
5829
5832
  const isScroller = target.classList.contains(DROPDOWN) ? true :
5830
5833
  (matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
5831
- if ((this.isPopupOpen && (this.inputWrapper.contains(target) || isTree || isFilter || isScroller || isHeader || isFooter)) ||
5834
+ if ((this.isPopupOpen && (this.inputWrapper.contains(target) || isTree || isScroller || isHeader || isFooter)) ||
5832
5835
  ((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
5833
5836
  (this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
5834
5837
  || target.classList.contains(CHECKBOXFRAME)))))) {
5835
5838
  this.isDocumentClick = false;
5836
5839
  e.preventDefault();
5837
5840
  }
5838
- else if (!this.inputWrapper.contains(target) && this.inputFocus) {
5841
+ else if (!this.inputWrapper.contains(target) && this.inputFocus && !isFilter) {
5839
5842
  this.focusOut(e);
5840
5843
  }
5841
5844
  }
@@ -12552,6 +12555,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12552
12555
  if (this.mode !== 'CheckBox') {
12553
12556
  this.hideOverAllClear();
12554
12557
  }
12558
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
12559
+ this.enabled = false;
12560
+ }
12555
12561
  this.wireEvent();
12556
12562
  this.enable(this.enabled);
12557
12563
  this.enableRTL(this.enableRtl);
@@ -14979,7 +14985,13 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14979
14985
  }
14980
14986
  }
14981
14987
  }
14982
- const elems = Array.prototype.slice.call(this.element.nextElementSibling.querySelectorAll('.e-grabbed'));
14988
+ let elems;
14989
+ if (this.isAngular) {
14990
+ elems = Array.prototype.slice.call(this.element.getElementsByClassName('e-list-parent')[0].querySelectorAll('.e-grabbed'));
14991
+ }
14992
+ else {
14993
+ elems = Array.prototype.slice.call(this.element.nextElementSibling.querySelectorAll('.e-grabbed'));
14994
+ }
14983
14995
  return elems;
14984
14996
  }
14985
14997
  getDragArgs(args, isDragEnd) {
@@ -15812,7 +15824,7 @@ let Mention = class Mention extends DropDownBase {
15812
15824
  if (!isNullOrUndefined(this.spinnerElement)) {
15813
15825
  hideSpinner(this.spinnerElement);
15814
15826
  }
15815
- if (!isNullOrUndefined(this.spinnerTemplate)) {
15827
+ if (!isNullOrUndefined(this.spinnerTemplate) && !isNullOrUndefined(this.spinnerTemplateElement)) {
15816
15828
  detach(this.spinnerTemplateElement);
15817
15829
  }
15818
15830
  }
@@ -15833,7 +15845,6 @@ let Mention = class Mention extends DropDownBase {
15833
15845
  }
15834
15846
  if (!isNullOrUndefined(this.spinnerTemplate)) {
15835
15847
  this.setSpinnerTemplate();
15836
- this.popupObj.element.appendChild(this.spinnerTemplateElement);
15837
15848
  }
15838
15849
  }
15839
15850
  }
@@ -16620,6 +16631,24 @@ let Mention = class Mention extends DropDownBase {
16620
16631
  }
16621
16632
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
16622
16633
  setValue(e) {
16634
+ if (!this.isReact) {
16635
+ if (!isNullOrUndefined(this.displayTemplate)) {
16636
+ this.setDisplayTemplate();
16637
+ }
16638
+ this.updateMentionValue(e);
16639
+ return true;
16640
+ }
16641
+ else {
16642
+ if (!isNullOrUndefined(this.displayTemplate)) {
16643
+ this.setDisplayTemplate(e);
16644
+ }
16645
+ else {
16646
+ this.updateMentionValue(e);
16647
+ }
16648
+ return true;
16649
+ }
16650
+ }
16651
+ updateMentionValue(e) {
16623
16652
  const dataItem = this.getItemData();
16624
16653
  let textSuffix;
16625
16654
  let value;
@@ -16645,7 +16674,6 @@ let Mention = class Mention extends DropDownBase {
16645
16674
  this.hidePopup();
16646
16675
  }
16647
16676
  this.onChangeEvent(e);
16648
- return true;
16649
16677
  }
16650
16678
  else {
16651
16679
  endPos = this.getTriggerCharPosition() + this.mentionChar.length;
@@ -16677,13 +16705,12 @@ let Mention = class Mention extends DropDownBase {
16677
16705
  this.hidePopup();
16678
16706
  }
16679
16707
  this.onChangeEvent(e);
16680
- return true;
16681
16708
  }
16682
16709
  }
16683
16710
  mentionVal(value) {
16684
16711
  let showChar = this.showMentionChar ? this.mentionChar : '';
16685
- if (!isNullOrUndefined(this.displayTemplate)) {
16686
- value = this.setDisplayTemplate();
16712
+ if (!isNullOrUndefined(this.displayTemplate) && !isNullOrUndefined(this.displayTempElement)) {
16713
+ value = this.displayTempElement.innerHTML;
16687
16714
  }
16688
16715
  if (this.isContentEditable(this.inputElement)) {
16689
16716
  return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
@@ -16692,7 +16719,7 @@ let Mention = class Mention extends DropDownBase {
16692
16719
  return showChar + value;
16693
16720
  }
16694
16721
  }
16695
- setDisplayTemplate() {
16722
+ setDisplayTemplate(e) {
16696
16723
  let compiledString;
16697
16724
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16698
16725
  if (this.isReact) {
@@ -16717,8 +16744,17 @@ let Mention = class Mention extends DropDownBase {
16717
16744
  this.displayTempElement.appendChild(displayCompTemp[i]);
16718
16745
  }
16719
16746
  }
16720
- this.renderReactTemplates();
16721
- return this.displayTempElement.innerHTML;
16747
+ if (!this.isReact) {
16748
+ this.renderTemplates();
16749
+ }
16750
+ else {
16751
+ this.renderTemplates(() => {
16752
+ this.updateMentionValue(e);
16753
+ });
16754
+ }
16755
+ }
16756
+ renderTemplates(callBack) {
16757
+ this.renderReactTemplates(callBack);
16722
16758
  }
16723
16759
  setSpinnerTemplate() {
16724
16760
  let compiledString;
@@ -16745,7 +16781,15 @@ let Mention = class Mention extends DropDownBase {
16745
16781
  this.spinnerTemplateElement.appendChild(spinnerCompTemp[i]);
16746
16782
  }
16747
16783
  }
16748
- this.renderReactTemplates();
16784
+ if (!this.isReact) {
16785
+ this.renderTemplates();
16786
+ this.popupObj.element.appendChild(this.spinnerTemplateElement);
16787
+ }
16788
+ else {
16789
+ this.renderTemplates(() => {
16790
+ this.popupObj.element.appendChild(this.spinnerTemplateElement);
16791
+ });
16792
+ }
16749
16793
  }
16750
16794
  onChangeEvent(eve) {
16751
16795
  this.isSelected = false;