@syncfusion/ej2-dropdowns 34.2.3 → 34.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 : 34.2.3
3
+ * version : 34.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": "34.2.3",
3
+ "version": "34.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": "~34.2.2",
11
+ "@syncfusion/ej2-base": "~34.2.4",
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.3",
15
+ "@syncfusion/ej2-navigations": "~34.2.4",
16
16
  "@syncfusion/ej2-notifications": "~34.2.2",
17
- "@syncfusion/ej2-popups": "~34.2.3"
17
+ "@syncfusion/ej2-popups": "~34.2.4"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -894,6 +894,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
894
894
  private getFilteredTreeData;
895
895
  private getChildren;
896
896
  private getDirectChildren;
897
+ private restoreRootParentValues;
897
898
  private updateFilteredAutoCheckValues;
898
899
  private updateSelectedValues;
899
900
  private setChipValues;
@@ -2264,6 +2264,17 @@ var DropDownTree = /** @class */ (function (_super) {
2264
2264
  this.triggerChangeEvent(this.keyEventArgs);
2265
2265
  this.isValueChange = false;
2266
2266
  }
2267
+ var treeData = this.treeObj.getTreeData();
2268
+ if (this.showCheckBox && this.treeSettings.autoCheck && treeData.length > 0 && this.treeData && this.treeData.length > 0) {
2269
+ for (var i = 0; i < treeData.length; i++) {
2270
+ for (var j = 0; j < this.treeData.length; j++) {
2271
+ if (treeData[i].id === this.treeData[j].id) {
2272
+ this.treeData[j].selected = treeData[i].selected !== undefined ?
2273
+ treeData[i].selected : false;
2274
+ }
2275
+ }
2276
+ }
2277
+ }
2267
2278
  };
2268
2279
  DropDownTree.prototype.beforeCheck = function (args) {
2269
2280
  if (args.isInteracted) {
@@ -2580,9 +2591,35 @@ var DropDownTree = /** @class */ (function (_super) {
2580
2591
  })
2581
2592
  .map(function (childNode) { return childNode.id.toString(); });
2582
2593
  };
2594
+ DropDownTree.prototype.restoreRootParentValues = function () {
2595
+ var _this = this;
2596
+ var treeData = this.getFilteredTreeData();
2597
+ treeData.forEach(function (node) {
2598
+ if (isNOU(node) || isNOU(node.id)) {
2599
+ return;
2600
+ }
2601
+ if (isNOU(node.pid)) {
2602
+ var rootId = node.id.toString();
2603
+ var currentValues_1 = _this.value.map(function (item) {
2604
+ return item.toString();
2605
+ });
2606
+ if (currentValues_1.indexOf(rootId) === -1) {
2607
+ var childValues = [];
2608
+ _this.getChildren(rootId, childValues);
2609
+ var hasSelectedChild = childValues.some(function (childId) { return currentValues_1.indexOf(childId) !== -1; });
2610
+ if (hasSelectedChild) {
2611
+ _this.value.push(rootId);
2612
+ }
2613
+ }
2614
+ }
2615
+ });
2616
+ };
2583
2617
  DropDownTree.prototype.updateFilteredAutoCheckValues = function () {
2584
2618
  var _this = this;
2585
2619
  var treeData = this.getFilteredTreeData();
2620
+ if (!this.isNodeChecked && Array.isArray(this.value) && this.value.length > 0 && this.showCheckBox) {
2621
+ this.restoreRootParentValues();
2622
+ }
2586
2623
  var currentValues = Array.isArray(this.value) ? this.value.map(function (item) { return item.toString(); }) : [];
2587
2624
  var removeParent = function (parentId) {
2588
2625
  _this.value = _this.value.filter(function (value) { return value.toString() !== parentId; });
@@ -2673,26 +2710,44 @@ var DropDownTree = /** @class */ (function (_super) {
2673
2710
  this.value = this.value.filter(function (value) { return removeValues.indexOf(value.toString()) === -1; });
2674
2711
  currentValues = this.value.map(function (item) { return item.toString(); });
2675
2712
  }
2676
- treeData.forEach(function (node) {
2677
- if (isNOU(node) || isNOU(node.id)) {
2678
- return;
2679
- }
2680
- if (!node.haschild) {
2681
- return;
2682
- }
2683
- var parentId = node.id.toString();
2684
- if (currentValues.indexOf(parentId) === -1) {
2685
- return;
2686
- }
2687
- var hasDirectChild = treeData.some(function (childNode) {
2688
- return !isNOU(childNode) && !isNOU(childNode.pid) && !isNOU(childNode.id) && childNode.pid.toString() === parentId &&
2689
- currentValues.indexOf(childNode.id.toString()) !== -1;
2713
+ var stabilized = false;
2714
+ var valueBeforeReconciliation = this.value.slice();
2715
+ var iterationCount = 0;
2716
+ var maxIterations = treeData.length + 1;
2717
+ while (!stabilized && iterationCount < maxIterations) {
2718
+ stabilized = true;
2719
+ iterationCount++;
2720
+ treeData.forEach(function (node) {
2721
+ if (isNOU(node) || isNOU(node.id)) {
2722
+ return;
2723
+ }
2724
+ if (!node.haschild) {
2725
+ return;
2726
+ }
2727
+ var parentId = node.id.toString();
2728
+ var directChildren = _this.getDirectChildren(parentId);
2729
+ if (!directChildren.length) {
2730
+ return;
2731
+ }
2732
+ var allDirectChildrenChecked = directChildren.every(function (childId) { return currentValues.indexOf(childId) !== -1; });
2733
+ if (allDirectChildrenChecked) {
2734
+ if (currentValues.indexOf(parentId) === -1) {
2735
+ _this.value.push(parentId);
2736
+ currentValues = _this.value.map(function (item) { return item.toString(); });
2737
+ stabilized = false;
2738
+ }
2739
+ }
2740
+ else if (currentValues.indexOf(parentId) !== -1) {
2741
+ removeParent(parentId);
2742
+ currentValues = _this.value.map(function (item) { return item.toString(); });
2743
+ stabilized = false;
2744
+ }
2690
2745
  });
2691
- if (!hasDirectChild) {
2692
- removeParent(parentId);
2693
- currentValues = _this.value.map(function (item) { return item.toString(); });
2694
- }
2695
- });
2746
+ }
2747
+ if ((valueBeforeReconciliation.length > 0 && this.value.length === 0) ||
2748
+ iterationCount >= maxIterations) {
2749
+ this.value = valueBeforeReconciliation;
2750
+ }
2696
2751
  };
2697
2752
  DropDownTree.prototype.updateSelectedValues = function () {
2698
2753
  var _this = this;
@@ -2094,7 +2094,7 @@ var ListBox = /** @class */ (function (_super) {
2094
2094
  };
2095
2095
  ListBox.prototype.KeyUp = function (e) {
2096
2096
  var _this = this;
2097
- if (this.allowFiltering && e.ctrlKey && e.keyCode === 65) {
2097
+ if (this.allowFiltering && ((e.ctrlKey && e.keyCode === 65) || e.keyCode === 16)) {
2098
2098
  e.preventDefault();
2099
2099
  return;
2100
2100
  }
@@ -2102,7 +2102,7 @@ var ListBox = /** @class */ (function (_super) {
2102
2102
  var isBracketKey = e.keyCode === 219 || e.keyCode === 220 || e.keyCode === 221 || e.keyCode === 222;
2103
2103
  var isNumericKeyPadSpecialKey = e.keyCode === 107 || e.keyCode === 109 || e.keyCode === 111;
2104
2104
  var isWordCharacter = e.key && e.key.match(/\w/);
2105
- var isWordAccentCharacter = e.key && e.key.match(/[A-Za-z0-9\u00C0-\u024F ,>/:;\-+=[\]\\ ']/);
2105
+ var isWordAccentCharacter = e.key && e.key.match(/[A-Za-z0-9\u00C0-\u024F ,>/:;\-+=[\]\\ '@!#$%^&*()]/);
2106
2106
  if (!isNullOrUndefined(isWordCharacter) || !isNullOrUndefined(isWordAccentCharacter)
2107
2107
  || isSpecialKey || isBracketKey || isNumericKeyPadSpecialKey) {
2108
2108
  this.isValidKey = true;
@@ -178,3 +178,7 @@ $list-border: 1px !default;
178
178
  $zero-border: 0 !default;
179
179
  $zero-width: 0% !default;
180
180
  $list-box-tool-tail-radius: $radius-8 !default;
181
+
182
+ .e-listbox-wrapper.e-wrapper li.e-list-item.e-focused {
183
+ background-color: $listbox-item-hover-bg;
184
+ }
@@ -72,6 +72,10 @@
72
72
  /* 5em */
73
73
 
74
74
 
75
+ .e-listbox-wrapper.e-wrapper li.e-list-item.e-focused {
76
+ background-color: var(--color-sf-content-bg-color-hover);
77
+ }
78
+
75
79
  .e-listbox-tool .e-moveup::before {
76
80
  content: "\e776";
77
81
  }
@@ -2114,6 +2114,10 @@ ejs-multiselect {
2114
2114
  color: var(--color-sf-content-text-color-alt1);
2115
2115
  }
2116
2116
 
2117
+ .e-listbox-wrapper.e-wrapper li.e-list-item.e-focused {
2118
+ background-color: var(--color-sf-content-bg-color-hover);
2119
+ }
2120
+
2117
2121
  .e-listbox-tool .e-moveup::before {
2118
2122
  content: "\e776";
2119
2123
  }
@@ -2652,6 +2652,10 @@ ejs-multiselect {
2652
2652
  height: 30px;
2653
2653
  }
2654
2654
 
2655
+ .e-listbox-wrapper.e-wrapper li.e-list-item.e-focused {
2656
+ background-color: var(--color-sf-content-bg-color-hover);
2657
+ }
2658
+
2655
2659
  .e-listbox-tool .e-moveup::before {
2656
2660
  content: "\e776";
2657
2661
  }