@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.
@@ -13750,7 +13750,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13750
13750
  if (!eventArgs.cancel) {
13751
13751
  this.focusAtFirstListItem(true);
13752
13752
  if (this.popupObj) {
13753
- document.body.appendChild(this.popupObj.element);
13753
+ const appendToElement = this.getAppendToElement();
13754
+ appendToElement.appendChild(this.popupObj.element);
13754
13755
  }
13755
13756
  if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {
13756
13757
  this.updateListItems(this.list.querySelectorAll('li.e-list-item'), this.mainList.querySelectorAll('li.e-list-item'));
@@ -14327,6 +14328,16 @@ let MultiSelect = class MultiSelect extends DropDownBase {
14327
14328
  this.onPopupShown(e);
14328
14329
  }
14329
14330
  }
14331
+ getAppendToElement() {
14332
+ if (this.isAngular) {
14333
+ const cdkPane = this.element && this.element.closest ? this.element.closest('.cdk-overlay-pane') : null;
14334
+ const popoverEl = this.element && this.element.closest ? this.element.closest('[popover]') : null;
14335
+ if (cdkPane && popoverEl) {
14336
+ return cdkPane;
14337
+ }
14338
+ }
14339
+ return document.body;
14340
+ }
14330
14341
  refreshSelection() {
14331
14342
  let value;
14332
14343
  let element;
@@ -15903,7 +15914,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15903
15914
  else {
15904
15915
  const listUl = this.list && this.list.querySelector('ul');
15905
15916
  const isFullList = this.isReact && this.itemTemplate && listUl != null &&
15906
- listUl.querySelectorAll('.e-list-item').length === this.mainData.length && !this.groupTemplate;
15917
+ listUl.querySelectorAll('.e-list-item').length === this.mainData.length && !this.groupTemplate && this.mode !== 'CheckBox';
15907
15918
  this.onActionComplete(isFullList ? listUl : list, this.mainData);
15908
15919
  }
15909
15920
  this.focusAtLastListItem(data);
@@ -16801,7 +16812,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16801
16812
  }
16802
16813
  if (!this.popupObj) {
16803
16814
  if (!isNullOrUndefined(this.popupWrapper)) {
16804
- document.body.appendChild(this.popupWrapper);
16815
+ const appendToElement = this.getAppendToElement();
16816
+ appendToElement.appendChild(this.popupWrapper);
16805
16817
  const checkboxFilter = this.popupWrapper.querySelector('.' + FILTERPARENT);
16806
16818
  if (this.mode === 'CheckBox' && !this.allowFiltering && checkboxFilter && this.filterParent) {
16807
16819
  checkboxFilter.remove();
@@ -19823,8 +19835,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
19823
19835
  const mainLiLength = this.ulElement.querySelectorAll('li.' + 'e-list-item').length;
19824
19836
  const liLength = this.ulElement.querySelectorAll('li.'
19825
19837
  + dropDownBaseClasses.li + '.' + HIDE_LIST).length;
19838
+ const isFilterText = this.allowFiltering && !isNullOrUndefined(this.inputElement) &&
19839
+ this.inputElement.value.trim() !== '';
19840
+ const isRemoteData = this.dataSource instanceof DataManager;
19826
19841
  if (mainLiLength > 0 && (mainLiLength === liLength) && (liLength === this.mainData.length) &&
19827
- !(this.targetElement() !== '' && this.allowCustomValue)) {
19842
+ !(this.targetElement() !== '' && this.allowCustomValue) && (!isRemoteData || !isFilterText)) {
19828
19843
  this.beforePopupOpen = false;
19829
19844
  return;
19830
19845
  }
@@ -20249,7 +20264,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
20249
20264
  const listParentHeight = formatUnit(this.popupHeight);
20250
20265
  listParent.style.height = (parseInt(listParentHeight, 10)).toString() + 'px';
20251
20266
  listParent.appendChild(item);
20252
- document.body.appendChild(listParent);
20267
+ const appendToElement = this.getAppendToElement();
20268
+ appendToElement.appendChild(listParent);
20253
20269
  this.virtualListHeight = listParent.getBoundingClientRect().height;
20254
20270
  const listItemHeight = Math.ceil(item.getBoundingClientRect().height) +
20255
20271
  parseInt(window.getComputedStyle(item).marginBottom, 10);
@@ -23517,10 +23533,12 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
23517
23533
  return;
23518
23534
  }
23519
23535
  const isSpecialKey = e.keyCode >= 186 && e.keyCode <= 192;
23536
+ const isBracketKey = e.keyCode === 219 || e.keyCode === 220 || e.keyCode === 221 || e.keyCode === 222;
23520
23537
  const isNumericKeyPadSpecialKey = e.keyCode === 107 || e.keyCode === 109 || e.keyCode === 111;
23521
23538
  const isWordCharacter = e.key && e.key.match(/\w/);
23522
- const isWordAccentCharacter = e.key && e.key.match(/[A-Za-z0-9\u00C0-\u024F ,>/:;\-+=]/);
23523
- if (!isNullOrUndefined(isWordCharacter) || !isNullOrUndefined(isWordAccentCharacter) || isSpecialKey || isNumericKeyPadSpecialKey) {
23539
+ const isWordAccentCharacter = e.key && e.key.match(/[A-Za-z0-9\u00C0-\u024F ,>/:;\-+=[\]\\ ']/);
23540
+ if (!isNullOrUndefined(isWordCharacter) || !isNullOrUndefined(isWordAccentCharacter)
23541
+ || isSpecialKey || isBracketKey || isNumericKeyPadSpecialKey) {
23524
23542
  this.isValidKey = true;
23525
23543
  }
23526
23544
  this.isBackSpace = e.keyCode === 8;
@@ -25551,11 +25569,12 @@ let Mention = class Mention extends DropDownBase {
25551
25569
  value = this.displayTempElement.innerHTML;
25552
25570
  }
25553
25571
  if (this.isContentEditable(this.inputElement)) {
25554
- const defaultSuffix = this.isRTE ? '&#8203;' : '';
25572
+ const isMozilla = Browser.info.name === 'mozilla';
25573
+ const defaultSuffix = this.isRTE || isMozilla ? '&#8203;' : '';
25555
25574
  if (Browser.isAndroid) {
25556
25575
  return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
25557
25576
  }
25558
- else if (Browser.info.name === 'mozilla') {
25577
+ else if (isMozilla) {
25559
25578
  return '<span>&#65279;<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>&#65279;</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
25560
25579
  }
25561
25580
  else {