@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 34.2.2
3
+ * version : 34.2.3
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-dropdowns",
3
- "version": "34.2.2",
3
+ "version": "34.2.3",
4
4
  "description": "Essential JS 2 DropDown Components",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -12,9 +12,9 @@
12
12
  "@syncfusion/ej2-data": "~34.2.2",
13
13
  "@syncfusion/ej2-inputs": "~34.2.2",
14
14
  "@syncfusion/ej2-lists": "~34.2.2",
15
- "@syncfusion/ej2-navigations": "~34.2.2",
15
+ "@syncfusion/ej2-navigations": "~34.2.3",
16
16
  "@syncfusion/ej2-notifications": "~34.2.2",
17
- "@syncfusion/ej2-popups": "~34.2.2"
17
+ "@syncfusion/ej2-popups": "~34.2.3"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -2099,10 +2099,12 @@ var ListBox = /** @class */ (function (_super) {
2099
2099
  return;
2100
2100
  }
2101
2101
  var isSpecialKey = e.keyCode >= 186 && e.keyCode <= 192;
2102
+ var isBracketKey = e.keyCode === 219 || e.keyCode === 220 || e.keyCode === 221 || e.keyCode === 222;
2102
2103
  var isNumericKeyPadSpecialKey = e.keyCode === 107 || e.keyCode === 109 || e.keyCode === 111;
2103
2104
  var isWordCharacter = e.key && e.key.match(/\w/);
2104
- var isWordAccentCharacter = e.key && e.key.match(/[A-Za-z0-9\u00C0-\u024F ,>/:;\-+=]/);
2105
- if (!isNullOrUndefined(isWordCharacter) || !isNullOrUndefined(isWordAccentCharacter) || isSpecialKey || isNumericKeyPadSpecialKey) {
2105
+ var isWordAccentCharacter = e.key && e.key.match(/[A-Za-z0-9\u00C0-\u024F ,>/:;\-+=[\]\\ ']/);
2106
+ if (!isNullOrUndefined(isWordCharacter) || !isNullOrUndefined(isWordAccentCharacter)
2107
+ || isSpecialKey || isBracketKey || isNumericKeyPadSpecialKey) {
2106
2108
  this.isValidKey = true;
2107
2109
  }
2108
2110
  this.isBackSpace = e.keyCode === 8;
@@ -1432,11 +1432,12 @@ var Mention = /** @class */ (function (_super) {
1432
1432
  value = this.displayTempElement.innerHTML;
1433
1433
  }
1434
1434
  if (this.isContentEditable(this.inputElement)) {
1435
- var defaultSuffix = this.isRTE ? '&#8203;' : '';
1435
+ var isMozilla = Browser.info.name === 'mozilla';
1436
+ var defaultSuffix = this.isRTE || isMozilla ? '&#8203;' : '';
1436
1437
  if (Browser.isAndroid) {
1437
1438
  return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
1438
1439
  }
1439
- else if (Browser.info.name === 'mozilla') {
1440
+ else if (isMozilla) {
1440
1441
  return '<span>&#65279;<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>&#65279;</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : defaultSuffix);
1441
1442
  }
1442
1443
  else {
@@ -706,6 +706,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
706
706
  [key: string]: Object;
707
707
  }[] | number[] | boolean[] | string[], e?: Object, isUpdated?: boolean): void;
708
708
  private updateActionList;
709
+ protected getAppendToElement(): HTMLElement;
709
710
  private refreshSelection;
710
711
  private hideGroupItem;
711
712
  protected getValidLi(): HTMLElement;
@@ -258,7 +258,8 @@ var MultiSelect = /** @class */ (function (_super) {
258
258
  if (!eventArgs.cancel) {
259
259
  _this.focusAtFirstListItem(true);
260
260
  if (_this.popupObj) {
261
- document.body.appendChild(_this.popupObj.element);
261
+ var appendToElement = _this.getAppendToElement();
262
+ appendToElement.appendChild(_this.popupObj.element);
262
263
  }
263
264
  if (_this.mode === 'CheckBox' && _this.enableGroupCheckBox && !isNullOrUndefined(_this.fields.groupBy)) {
264
265
  _this.updateListItems(_this.list.querySelectorAll('li.e-list-item'), _this.mainList.querySelectorAll('li.e-list-item'));
@@ -836,6 +837,16 @@ var MultiSelect = /** @class */ (function (_super) {
836
837
  this.onPopupShown(e);
837
838
  }
838
839
  };
840
+ MultiSelect.prototype.getAppendToElement = function () {
841
+ if (this.isAngular) {
842
+ var cdkPane = this.element && this.element.closest ? this.element.closest('.cdk-overlay-pane') : null;
843
+ var popoverEl = this.element && this.element.closest ? this.element.closest('[popover]') : null;
844
+ if (cdkPane && popoverEl) {
845
+ return cdkPane;
846
+ }
847
+ }
848
+ return document.body;
849
+ };
839
850
  MultiSelect.prototype.refreshSelection = function () {
840
851
  var value;
841
852
  var element;
@@ -2422,7 +2433,7 @@ var MultiSelect = /** @class */ (function (_super) {
2422
2433
  else {
2423
2434
  var listUl = this.list && this.list.querySelector('ul');
2424
2435
  var isFullList = this.isReact && this.itemTemplate && listUl != null &&
2425
- listUl.querySelectorAll('.e-list-item').length === this.mainData.length && !this.groupTemplate;
2436
+ listUl.querySelectorAll('.e-list-item').length === this.mainData.length && !this.groupTemplate && this.mode !== 'CheckBox';
2426
2437
  this.onActionComplete(isFullList ? listUl : list, this.mainData);
2427
2438
  }
2428
2439
  this.focusAtLastListItem(data);
@@ -3333,7 +3344,8 @@ var MultiSelect = /** @class */ (function (_super) {
3333
3344
  }
3334
3345
  if (!this.popupObj) {
3335
3346
  if (!isNullOrUndefined(this.popupWrapper)) {
3336
- document.body.appendChild(this.popupWrapper);
3347
+ var appendToElement = this.getAppendToElement();
3348
+ appendToElement.appendChild(this.popupWrapper);
3337
3349
  var checkboxFilter = this.popupWrapper.querySelector('.' + FILTERPARENT);
3338
3350
  if (this.mode === 'CheckBox' && !this.allowFiltering && checkboxFilter && this.filterParent) {
3339
3351
  checkboxFilter.remove();
@@ -6378,8 +6390,11 @@ var MultiSelect = /** @class */ (function (_super) {
6378
6390
  var mainLiLength = _this.ulElement.querySelectorAll('li.' + 'e-list-item').length;
6379
6391
  var liLength = _this.ulElement.querySelectorAll('li.'
6380
6392
  + dropDownBaseClasses.li + '.' + HIDE_LIST).length;
6393
+ var isFilterText = _this.allowFiltering && !isNullOrUndefined(_this.inputElement) &&
6394
+ _this.inputElement.value.trim() !== '';
6395
+ var isRemoteData = _this.dataSource instanceof DataManager;
6381
6396
  if (mainLiLength > 0 && (mainLiLength === liLength) && (liLength === _this.mainData.length) &&
6382
- !(_this.targetElement() !== '' && _this.allowCustomValue)) {
6397
+ !(_this.targetElement() !== '' && _this.allowCustomValue) && (!isRemoteData || !isFilterText)) {
6383
6398
  _this.beforePopupOpen = false;
6384
6399
  return;
6385
6400
  }
@@ -6807,7 +6822,8 @@ var MultiSelect = /** @class */ (function (_super) {
6807
6822
  var listParentHeight = formatUnit(this.popupHeight);
6808
6823
  listParent.style.height = (parseInt(listParentHeight, 10)).toString() + 'px';
6809
6824
  listParent.appendChild(item);
6810
- document.body.appendChild(listParent);
6825
+ var appendToElement = this.getAppendToElement();
6826
+ appendToElement.appendChild(listParent);
6811
6827
  this.virtualListHeight = listParent.getBoundingClientRect().height;
6812
6828
  var listItemHeight = Math.ceil(item.getBoundingClientRect().height) +
6813
6829
  parseInt(window.getComputedStyle(item).marginBottom, 10);