@syncfusion/ej2-dropdowns 34.2.2 → 34.2.3

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.
@@ -14017,7 +14017,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14017
14017
  if (!eventArgs.cancel) {
14018
14018
  _this.focusAtFirstListItem(true);
14019
14019
  if (_this.popupObj) {
14020
- document.body.appendChild(_this.popupObj.element);
14020
+ var appendToElement = _this.getAppendToElement();
14021
+ appendToElement.appendChild(_this.popupObj.element);
14021
14022
  }
14022
14023
  if (_this.mode === 'CheckBox' && _this.enableGroupCheckBox && !isNullOrUndefined(_this.fields.groupBy)) {
14023
14024
  _this.updateListItems(_this.list.querySelectorAll('li.e-list-item'), _this.mainList.querySelectorAll('li.e-list-item'));
@@ -14595,6 +14596,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14595
14596
  this.onPopupShown(e);
14596
14597
  }
14597
14598
  };
14599
+ MultiSelect.prototype.getAppendToElement = function () {
14600
+ if (this.isAngular) {
14601
+ var cdkPane = this.element && this.element.closest ? this.element.closest('.cdk-overlay-pane') : null;
14602
+ var popoverEl = this.element && this.element.closest ? this.element.closest('[popover]') : null;
14603
+ if (cdkPane && popoverEl) {
14604
+ return cdkPane;
14605
+ }
14606
+ }
14607
+ return document.body;
14608
+ };
14598
14609
  MultiSelect.prototype.refreshSelection = function () {
14599
14610
  var value;
14600
14611
  var element;
@@ -16176,7 +16187,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16176
16187
  else {
16177
16188
  var listUl = this.list && this.list.querySelector('ul');
16178
16189
  var isFullList = this.isReact && this.itemTemplate && listUl != null &&
16179
- listUl.querySelectorAll('.e-list-item').length === this.mainData.length && !this.groupTemplate;
16190
+ listUl.querySelectorAll('.e-list-item').length === this.mainData.length && !this.groupTemplate && this.mode !== 'CheckBox';
16180
16191
  this.onActionComplete(isFullList ? listUl : list, this.mainData);
16181
16192
  }
16182
16193
  this.focusAtLastListItem(data);
@@ -17087,7 +17098,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
17087
17098
  }
17088
17099
  if (!this.popupObj) {
17089
17100
  if (!isNullOrUndefined(this.popupWrapper)) {
17090
- document.body.appendChild(this.popupWrapper);
17101
+ var appendToElement = this.getAppendToElement();
17102
+ appendToElement.appendChild(this.popupWrapper);
17091
17103
  var checkboxFilter = this.popupWrapper.querySelector('.' + FILTERPARENT);
17092
17104
  if (this.mode === 'CheckBox' && !this.allowFiltering && checkboxFilter && this.filterParent) {
17093
17105
  checkboxFilter.remove();
@@ -20132,8 +20144,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
20132
20144
  var mainLiLength = _this.ulElement.querySelectorAll('li.' + 'e-list-item').length;
20133
20145
  var liLength = _this.ulElement.querySelectorAll('li.'
20134
20146
  + dropDownBaseClasses.li + '.' + HIDE_LIST).length;
20147
+ var isFilterText = _this.allowFiltering && !isNullOrUndefined(_this.inputElement) &&
20148
+ _this.inputElement.value.trim() !== '';
20149
+ var isRemoteData = _this.dataSource instanceof DataManager;
20135
20150
  if (mainLiLength > 0 && (mainLiLength === liLength) && (liLength === _this.mainData.length) &&
20136
- !(_this.targetElement() !== '' && _this.allowCustomValue)) {
20151
+ !(_this.targetElement() !== '' && _this.allowCustomValue) && (!isRemoteData || !isFilterText)) {
20137
20152
  _this.beforePopupOpen = false;
20138
20153
  return;
20139
20154
  }
@@ -20561,7 +20576,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
20561
20576
  var listParentHeight = formatUnit(this.popupHeight);
20562
20577
  listParent.style.height = (parseInt(listParentHeight, 10)).toString() + 'px';
20563
20578
  listParent.appendChild(item);
20564
- document.body.appendChild(listParent);
20579
+ var appendToElement = this.getAppendToElement();
20580
+ appendToElement.appendChild(listParent);
20565
20581
  this.virtualListHeight = listParent.getBoundingClientRect().height;
20566
20582
  var listItemHeight = Math.ceil(item.getBoundingClientRect().height) +
20567
20583
  parseInt(window.getComputedStyle(item).marginBottom, 10);
@@ -23890,10 +23906,12 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
23890
23906
  return;
23891
23907
  }
23892
23908
  var isSpecialKey = e.keyCode >= 186 && e.keyCode <= 192;
23909
+ var isBracketKey = e.keyCode === 219 || e.keyCode === 220 || e.keyCode === 221 || e.keyCode === 222;
23893
23910
  var isNumericKeyPadSpecialKey = e.keyCode === 107 || e.keyCode === 109 || e.keyCode === 111;
23894
23911
  var isWordCharacter = e.key && e.key.match(/\w/);
23895
- var isWordAccentCharacter = e.key && e.key.match(/[A-Za-z0-9\u00C0-\u024F ,>/:;\-+=]/);
23896
- if (!isNullOrUndefined(isWordCharacter) || !isNullOrUndefined(isWordAccentCharacter) || isSpecialKey || isNumericKeyPadSpecialKey) {
23912
+ var isWordAccentCharacter = e.key && e.key.match(/[A-Za-z0-9\u00C0-\u024F ,>/:;\-+=[\]\\ ']/);
23913
+ if (!isNullOrUndefined(isWordCharacter) || !isNullOrUndefined(isWordAccentCharacter)
23914
+ || isSpecialKey || isBracketKey || isNumericKeyPadSpecialKey) {
23897
23915
  this.isValidKey = true;
23898
23916
  }
23899
23917
  this.isBackSpace = e.keyCode === 8;
@@ -25959,11 +25977,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
25959
25977
  value = this.displayTempElement.innerHTML;
25960
25978
  }
25961
25979
  if (this.isContentEditable(this.inputElement)) {
25962
- var defaultSuffix = this.isRTE ? '&#8203;' : '';
25980
+ var isMozilla = Browser.info.name === 'mozilla';
25981
+ var defaultSuffix = this.isRTE || isMozilla ? '&#8203;' : '';
25963
25982
  if (Browser.isAndroid) {
25964
25983
  return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
25965
25984
  }
25966
- else if (Browser.info.name === 'mozilla') {
25985
+ else if (isMozilla) {
25967
25986
  return '<span>&#65279;<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>&#65279;</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
25968
25987
  }
25969
25988
  else {