@syncfusion/ej2-dropdowns 28.2.4 → 28.2.6

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 : 28.2.4
3
+ * version : 28.2.6
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-dropdowns@*",
3
- "_id": "@syncfusion/ej2-dropdowns@28.2.3",
3
+ "_id": "@syncfusion/ej2-dropdowns@28.2.5",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-WulRpVG/X8MKND+b8VTrUWqLsSAuAuKBXGfbE+MjWzmsCBEnJGLHs6AXGK/h3nZDkYfnnEls6NzbntieoldQQg==",
5
+ "_integrity": "sha512-PEYRLr+QeaImw6iVHWRMDP1EndPRaamD7tIxEYFXUClMXROKTg3Qg8CW4Wn3h+KhF+xt2N+TFlpxlMjzEcgsgg==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -36,8 +36,8 @@
36
36
  "/@syncfusion/ej2-spreadsheet",
37
37
  "/@syncfusion/ej2-vue-dropdowns"
38
38
  ],
39
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-28.2.3.tgz",
40
- "_shasum": "ca88d206fbb04487749275d9457708a7755a54a7",
39
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-28.2.5.tgz",
40
+ "_shasum": "254f237a6d180239a7288b2413ae5dbcfe4186ec",
41
41
  "_spec": "@syncfusion/ej2-dropdowns@*",
42
42
  "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
43
43
  "author": {
@@ -45,13 +45,13 @@
45
45
  },
46
46
  "bundleDependencies": false,
47
47
  "dependencies": {
48
- "@syncfusion/ej2-base": "~28.2.3",
48
+ "@syncfusion/ej2-base": "~28.2.5",
49
49
  "@syncfusion/ej2-data": "~28.2.3",
50
50
  "@syncfusion/ej2-inputs": "~28.2.3",
51
51
  "@syncfusion/ej2-lists": "~28.2.3",
52
- "@syncfusion/ej2-navigations": "~28.2.4",
52
+ "@syncfusion/ej2-navigations": "~28.2.6",
53
53
  "@syncfusion/ej2-notifications": "~28.2.3",
54
- "@syncfusion/ej2-popups": "~28.2.3"
54
+ "@syncfusion/ej2-popups": "~28.2.6"
55
55
  },
56
56
  "deprecated": false,
57
57
  "description": "Essential JS 2 DropDown Components",
@@ -76,7 +76,7 @@
76
76
  "module": "./index.js",
77
77
  "name": "@syncfusion/ej2-dropdowns",
78
78
  "typings": "index.d.ts",
79
- "version": "28.2.4",
79
+ "version": "28.2.6",
80
80
  "sideEffects": false,
81
81
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
82
82
  }
@@ -450,7 +450,8 @@ var DropDownBase = /** @class */ (function (_super) {
450
450
  };
451
451
  DropDownBase.prototype.getSkeletonCount = function (retainSkeleton) {
452
452
  this.virtualListHeight = this.listContainerHeight != null ? parseInt(this.listContainerHeight, 10) : this.virtualListHeight;
453
- var actualCount = this.virtualListHeight > 0 ? Math.floor(this.virtualListHeight / this.listItemHeight) : 0;
453
+ var actualCount = this.virtualListHeight > 0 && this.listItemHeight > 0 ?
454
+ Math.floor(this.virtualListHeight / this.listItemHeight) : 0;
454
455
  this.skeletonCount = actualCount * 4 < this.itemCount ? this.itemCount : actualCount * 4;
455
456
  this.itemCount = retainSkeleton ? this.itemCount : this.skeletonCount;
456
457
  this.virtualItemCount = this.itemCount;
@@ -2564,6 +2564,7 @@ var DropDownList = /** @class */ (function (_super) {
2564
2564
  }
2565
2565
  var args = { cancel: false };
2566
2566
  this.trigger('beforeOpen', args, function (args) {
2567
+ var initialPopupHeight;
2567
2568
  if (!args.cancel) {
2568
2569
  var popupEle = _this.createElement('div', {
2569
2570
  id: _this.element.id + '_popup', className: 'e-ddl e-popup ' + (_this.cssClass !== null ? _this.cssClass : '')
@@ -2584,6 +2585,7 @@ var DropDownList = /** @class */ (function (_super) {
2584
2585
  }
2585
2586
  document.body.appendChild(popupEle);
2586
2587
  popupEle.style.top = '0px';
2588
+ initialPopupHeight = popupEle.clientHeight;
2587
2589
  if (_this.enableVirtualization && _this.itemTemplate) {
2588
2590
  var listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
2589
2591
  _this.listItemHeight = listitems.length > 0 ? Math.ceil(listitems[0].getBoundingClientRect().height) +
@@ -2781,7 +2783,7 @@ var DropDownList = /** @class */ (function (_super) {
2781
2783
  // Add the resizer div to the popup
2782
2784
  if (_this.list && _this.list.parentElement) {
2783
2785
  _this.list.parentElement.classList.add('e-resize');
2784
- if (_this.popupHeight.toString().toLowerCase() !== 'auto') {
2786
+ if (_this.popupHeight.toString().toLowerCase() !== 'auto' && initialPopupHeight > parseInt(_this.popupHeight.toString(), 10)) {
2785
2787
  _this.list.parentElement.style.height = '100%';
2786
2788
  }
2787
2789
  _this.list.parentElement.style.paddingBottom = (_this.getModuleName() === 'dropdownlist' && _this.allowFiltering && _this.searchBoxHeight) ? (_this.searchBoxHeight + resizePaddingBottom).toString() + 'px' : resizePaddingBottom.toString() + 'px';
@@ -826,6 +826,8 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
826
826
  private getChildType;
827
827
  private renderTree;
828
828
  private renderPopup;
829
+ private removeFocus;
830
+ private updateFocus;
829
831
  private reactCallBack;
830
832
  private updatePopupHeight;
831
833
  private createPopup;
@@ -1347,7 +1347,7 @@ var DropDownTree = /** @class */ (function (_super) {
1347
1347
  this.inputEle.setAttribute('aria-label', this.getModuleName());
1348
1348
  var id = this.element.getAttribute('id');
1349
1349
  this.hiddenElement.id = id + '_hidden';
1350
- this.inputWrapper.setAttribute('tabindex', '0');
1350
+ this.inputWrapper.setAttribute('tabindex', this.inputWrapper.classList.contains('e-disabled') ? '-1' : '0');
1351
1351
  this.inputWrapper.setAttribute('aria-label', this.getModuleName());
1352
1352
  attributes(this.inputWrapper, this.getAriaAttributes());
1353
1353
  };
@@ -1715,7 +1715,7 @@ var DropDownTree = /** @class */ (function (_super) {
1715
1715
  removeClass([_this.popupEle], DDTHIDEICON);
1716
1716
  _this.updatePopupHeight();
1717
1717
  _this.popupObj.refreshPosition();
1718
- if (!(_this.showCheckBox && _this.showSelectAll) && (!_this.popupDiv.classList.contains(NODATA)
1718
+ if (!(_this.showSelectAll || _this.allowFiltering) && (!_this.popupDiv.classList.contains(NODATA)
1719
1719
  && _this.treeItems.length > 0)) {
1720
1720
  var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[0] + '"]') : null;
1721
1721
  if (focusedElement) {
@@ -1726,17 +1726,9 @@ var DropDownTree = /** @class */ (function (_super) {
1726
1726
  var oldFocussedNode = _this.treeObj.element.querySelector('.e-node-focus');
1727
1727
  focusedElement = _this.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable)') ||
1728
1728
  _this.treeObj.element.querySelector('li:not(.e-disable)');
1729
- if (oldFocussedNode && oldFocussedNode !== focusedElement) {
1730
- oldFocussedNode.setAttribute('tabindex', '-1');
1731
- removeClass([oldFocussedNode], 'e-node-focus');
1732
- }
1733
- }
1734
- if (!isNOU(focusedElement)) {
1735
- if (!_this.allowFiltering) {
1736
- focusedElement.focus();
1737
- }
1738
- addClass([focusedElement], ['e-node-focus']);
1729
+ _this.removeFocus(focusedElement, oldFocussedNode);
1739
1730
  }
1731
+ _this.updateFocus(focusedElement);
1740
1732
  }
1741
1733
  if (_this.treeObj.checkedNodes.length > 0 && !_this.isFilterRestore) {
1742
1734
  var nodes = _this.treeObj.element.querySelectorAll('li');
@@ -1747,6 +1739,12 @@ var DropDownTree = /** @class */ (function (_super) {
1747
1739
  _this.checkSelectAll = false;
1748
1740
  }
1749
1741
  }
1742
+ if (_this.showSelectAll && !_this.allowFiltering) {
1743
+ var oldFocussedNode = _this.treeObj.element.querySelector('.e-node-focus');
1744
+ var focusedElement = _this.popupEle.querySelector('.e-selectall-parent');
1745
+ _this.removeFocus(focusedElement, oldFocussedNode);
1746
+ _this.updateFocus(focusedElement);
1747
+ }
1750
1748
  if (_this.allowFiltering) {
1751
1749
  removeClass([_this.inputWrapper], [INPUTFOCUS]);
1752
1750
  _this.filterObj.element.focus();
@@ -1756,6 +1754,18 @@ var DropDownTree = /** @class */ (function (_super) {
1756
1754
  }
1757
1755
  });
1758
1756
  };
1757
+ DropDownTree.prototype.removeFocus = function (focusedElement, oldFocusedElement) {
1758
+ if (oldFocusedElement && oldFocusedElement !== focusedElement) {
1759
+ oldFocusedElement.setAttribute('tabindex', '-1');
1760
+ removeClass([oldFocusedElement], 'e-node-focus');
1761
+ }
1762
+ };
1763
+ DropDownTree.prototype.updateFocus = function (focusedElement) {
1764
+ if (!isNOU(focusedElement)) {
1765
+ focusedElement.focus();
1766
+ addClass([focusedElement], ['e-node-focus']);
1767
+ }
1768
+ };
1759
1769
  DropDownTree.prototype.reactCallBack = function () {
1760
1770
  if (!isNOU(this.popupObj)) {
1761
1771
  this.updatePopupHeight();
@@ -2057,7 +2067,9 @@ var DropDownTree = /** @class */ (function (_super) {
2057
2067
  this.updateTemplate();
2058
2068
  }
2059
2069
  this.treeObj.fields = this.getTreeFields(this.fields);
2070
+ this.setProperties({ value: this.oldValue }, true);
2060
2071
  this.treeObj.dataBind();
2072
+ this.updateValue(this.value);
2061
2073
  };
2062
2074
  DropDownTree.prototype.getEventArgs = function (args) {
2063
2075
  var checkData = args.data;
@@ -3074,8 +3086,10 @@ var DropDownTree = /** @class */ (function (_super) {
3074
3086
  this.updateFilterPlaceHolder();
3075
3087
  break;
3076
3088
  case 'value':
3077
- this.oldValue = oldProp.value;
3078
- this.updateValue(newProp.value);
3089
+ if (JSON.stringify(oldProp.value) !== JSON.stringify(newProp.value)) {
3090
+ this.oldValue = oldProp.value;
3091
+ this.updateValue(newProp.value);
3092
+ }
3079
3093
  break;
3080
3094
  case 'text':
3081
3095
  this.updateText(newProp.text);
@@ -3837,7 +3837,7 @@ var MultiSelect = /** @class */ (function (_super) {
3837
3837
  (this.mode === 'Box' || this.mode === 'Default'))) ||
3838
3838
  (this.enableVirtualization && value != null && text != null && !isCustomData)) {
3839
3839
  var currentText = [];
3840
- var textValues = this.isDynamicRemoteVirtualData && text != null && text !== '' ? text : this.text != null && this.text !== '' ? this.text + this.delimiterChar + text : text;
3840
+ var textValues = this.isDynamicRemoteVirtualData && text != null && text !== '' ? text : this.text != null && this.text !== '' && !this.text.includes(text) ? this.text + this.delimiterChar + text : text;
3841
3841
  currentText.push(textValues);
3842
3842
  this.setProperties({ text: currentText.toString() }, true);
3843
3843
  this.addChip(text, value);