@syncfusion/ej2-dropdowns 33.1.49 → 33.2.4

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 : 33.1.49
3
+ * version : 33.2.4
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": "33.1.49",
3
+ "version": "33.2.4",
4
4
  "description": "Essential JS 2 DropDown Components",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,13 +8,13 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-dropdowns.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~33.1.45",
12
- "@syncfusion/ej2-data": "~33.1.45",
13
- "@syncfusion/ej2-inputs": "~33.1.49",
14
- "@syncfusion/ej2-lists": "~33.1.47",
15
- "@syncfusion/ej2-navigations": "~33.1.49",
16
- "@syncfusion/ej2-notifications": "~33.1.49",
17
- "@syncfusion/ej2-popups": "~33.1.44"
11
+ "@syncfusion/ej2-base": "~33.2.3",
12
+ "@syncfusion/ej2-data": "~33.2.3",
13
+ "@syncfusion/ej2-inputs": "~33.2.4",
14
+ "@syncfusion/ej2-lists": "~33.2.3",
15
+ "@syncfusion/ej2-navigations": "~33.2.4",
16
+ "@syncfusion/ej2-notifications": "~33.2.3",
17
+ "@syncfusion/ej2-popups": "~33.2.3"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -667,9 +667,6 @@ var DropDownTree = /** @class */ (function (_super) {
667
667
  if (formElement) {
668
668
  EventHandler.add(formElement, 'reset', this.resetValueHandler, this);
669
669
  }
670
- if (this.keyboardModule && typeof this.keyboardModule.destroy === 'function') {
671
- this.keyboardModule.destroy();
672
- }
673
670
  this.keyboardModule = new KeyboardEvents(this.inputWrapper, {
674
671
  keyAction: this.keyActionHandler.bind(this),
675
672
  keyConfigs: this.keyConfigs,
@@ -677,9 +674,6 @@ var DropDownTree = /** @class */ (function (_super) {
677
674
  });
678
675
  };
679
676
  DropDownTree.prototype.wireTreeEvents = function () {
680
- if (this.keyboardModule && typeof this.keyboardModule.destroy === 'function') {
681
- this.keyboardModule.destroy();
682
- }
683
677
  this.keyboardModule = new KeyboardEvents(this.tree, {
684
678
  keyAction: this.treeAction.bind(this),
685
679
  keyConfigs: this.keyConfigs,
@@ -1942,6 +1936,9 @@ var DropDownTree = /** @class */ (function (_super) {
1942
1936
  removeClass([this.popupDiv], NODATA);
1943
1937
  this.hideCheckAll(false);
1944
1938
  }
1939
+ else {
1940
+ this.hideCheckAll(this.treeItems.length <= 1);
1941
+ }
1945
1942
  if (!this.isFilteredData) {
1946
1943
  this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
1947
1944
  }
@@ -3356,6 +3353,9 @@ var DropDownTree = /** @class */ (function (_super) {
3356
3353
  EventHandler.remove(element, 'mouseup', this.removeChip);
3357
3354
  }
3358
3355
  }
3356
+ if (this.keyboardModule) {
3357
+ this.keyboardModule.destroy();
3358
+ }
3359
3359
  this.chipWrapper = null;
3360
3360
  this.chipCollection = null;
3361
3361
  this.checkAllParent = null;
@@ -495,7 +495,7 @@ var Mention = /** @class */ (function (_super) {
495
495
  }
496
496
  else if (this.allowSpaces && this.queryString !== '' && currentRange && currentRange.trim() !== '' && currentRange.replace('\u00a0', ' ').lastIndexOf(' ') < currentRange.length - 1 &&
497
497
  e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8 && (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) ||
498
- (this.liCollections && this.liCollections.length > 0))) {
498
+ ((this.liCollections && this.liCollections.length > 0) || (this.isPopupOpen && this.list && this.list.classList.contains('e-nodata'))))) {
499
499
  this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
500
500
  this.searchLists(e);
501
501
  }
@@ -995,6 +995,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
995
995
  */
996
996
  private removeDisabledItemsValue;
997
997
  private checkInitialValue;
998
+ private executeLocalForLargeSelection;
998
999
  private checkAutoFocus;
999
1000
  private updatevirtualizationList;
1000
1001
  private setFloatLabelType;
@@ -6547,7 +6547,11 @@ var MultiSelect = /** @class */ (function (_super) {
6547
6547
  });
6548
6548
  }
6549
6549
  else {
6550
- listItems_3 = new DataManager(this.dataSource).executeLocal(new Query().where(predicate));
6550
+ listItems_3 = this.executeLocalForLargeSelection(this.dataSource, this.value, {
6551
+ fields: this.fields,
6552
+ allowObjectBinding: this.allowObjectBinding,
6553
+ isPrimitiveData: this.isPrimitiveData
6554
+ });
6551
6555
  }
6552
6556
  }
6553
6557
  if (!(this.dataSource instanceof DataManager)) {
@@ -6576,6 +6580,55 @@ var MultiSelect = /** @class */ (function (_super) {
6576
6580
  this.element.setAttribute('data-initial-value', this.text);
6577
6581
  }
6578
6582
  };
6583
+ MultiSelect.prototype.executeLocalForLargeSelection = function (dataSource, values, options) {
6584
+ if (!dataSource || !dataSource.length || !values || !values.length) {
6585
+ return [];
6586
+ }
6587
+ var fields = options.fields, allowObjectBinding = options.allowObjectBinding, isPrimitiveData = options.isPrimitiveData, _a = options.predicateChunkSize, predicateChunkSize = _a === void 0 ? 100 : _a;
6588
+ if (values.length === dataSource.length) {
6589
+ return dataSource.slice();
6590
+ }
6591
+ var field = isPrimitiveData ? '' : fields.value;
6592
+ var allResults = [];
6593
+ var predicate = null;
6594
+ var count = 0;
6595
+ var flushPredicate = function () {
6596
+ if (!predicate) {
6597
+ return;
6598
+ }
6599
+ var query = new Query().where(predicate);
6600
+ var result = new DataManager(dataSource).executeLocal(query);
6601
+ allResults.push.apply(allResults, result);
6602
+ predicate = null;
6603
+ count = 0;
6604
+ };
6605
+ for (var i = 0; i < values.length; i++) {
6606
+ var value = allowObjectBinding
6607
+ ? getValue(fields.value || '', values[i])
6608
+ : values[i];
6609
+ predicate = predicate
6610
+ ? predicate.or(field, 'equal', value)
6611
+ : new Predicate(field, 'equal', value);
6612
+ count++;
6613
+ if (count === predicateChunkSize) {
6614
+ flushPredicate();
6615
+ }
6616
+ }
6617
+ flushPredicate();
6618
+ var uniqueMap = {};
6619
+ var resultArray = [];
6620
+ for (var i = 0; i < allResults.length; i++) {
6621
+ var item = allResults[i];
6622
+ var key = isPrimitiveData
6623
+ ? item.toString()
6624
+ : getValue(fields.value, item);
6625
+ if (!uniqueMap.hasOwnProperty(key)) {
6626
+ uniqueMap[key] = item;
6627
+ resultArray.push(item);
6628
+ }
6629
+ }
6630
+ return resultArray;
6631
+ };
6579
6632
  MultiSelect.prototype.checkAutoFocus = function () {
6580
6633
  if (this.element.hasAttribute('autofocus')) {
6581
6634
  this.inputElement.focus();