@syncfusion/ej2-dropdowns 28.2.3 → 28.2.5

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.3
3
+ * version : 28.2.5
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.1.41",
3
+ "_id": "@syncfusion/ej2-dropdowns@28.2.4",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-XHQSq89yLShgV5vMeiTTFCUt2tQ+wyqf7v3t/paW5IDkCrxAlfiU56sTuv5XyuZ3rBECWpmlDmIDP6kPz2bPMw==",
5
+ "_integrity": "sha512-wNFdoVKhrqgBPo0G2N2ic+Kzc0gUdRC/pgcwKGt2aCIH0kA8fdYR7iJEwwx0omyK3vTtEt4Hc3xBiLiyAiLJAw==",
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.1.41.tgz",
40
- "_shasum": "1d5b644c7717243d23cd17fa544fb0a9810b7b99",
39
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-28.2.4.tgz",
40
+ "_shasum": "57f885c886d4f3cf9f2066fa1665c5bbacab7e74",
41
41
  "_spec": "@syncfusion/ej2-dropdowns@*",
42
42
  "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
43
43
  "author": {
@@ -45,11 +45,11 @@
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.3",
52
+ "@syncfusion/ej2-navigations": "~28.2.5",
53
53
  "@syncfusion/ej2-notifications": "~28.2.3",
54
54
  "@syncfusion/ej2-popups": "~28.2.3"
55
55
  },
@@ -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.3",
79
+ "version": "28.2.5",
80
80
  "sideEffects": false,
81
81
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
82
82
  }
@@ -294,6 +294,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
294
294
  protected preventDefActionFilter: boolean;
295
295
  protected isDynamicData: boolean;
296
296
  protected isPrimitiveData: boolean;
297
+ protected isCustomFiltering: boolean;
297
298
  protected virtualListInfo: VirtualInfo;
298
299
  protected viewPortInfo: VirtualInfo;
299
300
  protected selectedValueInfo: VirtualInfo;
@@ -577,6 +578,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
577
578
  private setListData;
578
579
  protected handleVirtualKeyboardActions(e: KeyboardEventArgs, pageCount: number): void;
579
580
  protected updatePopupState(): void;
581
+ protected updatePopupPosition(): void;
580
582
  protected virtualSelectionAll(state: boolean, li: NodeListOf<HTMLElement> | HTMLElement[], event: MouseEvent | KeyboardEventArgs): void;
581
583
  protected updateRemoteData(): void;
582
584
  private bindChildItems;
@@ -136,6 +136,7 @@ var DropDownBase = /** @class */ (function (_super) {
136
136
  _this.CurrentEvent = null;
137
137
  _this.isDynamicData = false;
138
138
  _this.isPrimitiveData = false;
139
+ _this.isCustomFiltering = false;
139
140
  _this.virtualListInfo = {
140
141
  currentPageNumber: null,
141
142
  direction: null,
@@ -724,7 +725,7 @@ var DropDownBase = /** @class */ (function (_super) {
724
725
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
725
726
  newQuery.queries[queryElements].e.nos = e.count;
726
727
  }
727
- if (_this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal')) {
728
+ if (_this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal') && !_this.isCustomFiltering) {
728
729
  isReOrder = false;
729
730
  }
730
731
  }
@@ -748,6 +749,7 @@ var DropDownBase = /** @class */ (function (_super) {
748
749
  _this.trigger('actionComplete', e, function (e) {
749
750
  if (!e.cancel) {
750
751
  _this.isRequesting = false;
752
+ _this.isCustomFiltering = false;
751
753
  var listItems = e.result;
752
754
  if (_this.isIncrementalRequest) {
753
755
  ulElement = _this.renderItems(listItems, fields);
@@ -785,6 +787,7 @@ var DropDownBase = /** @class */ (function (_super) {
785
787
  }
786
788
  if (_this.isVirtualizationEnabled) {
787
789
  _this.getFilteringSkeletonCount();
790
+ _this.updatePopupPosition();
788
791
  }
789
792
  if (_this.virtualSelectAll && _this.virtualSelectAllData) {
790
793
  _this.virtualSelectionAll(_this.virtualSelectAllState, _this.liCollections, _this.CurrentEvent);
@@ -826,7 +829,7 @@ var DropDownBase = /** @class */ (function (_super) {
826
829
  newQuery.queries[queryElements].e.nos = listItems.count;
827
830
  listItems = (newQuery).executeLocal(dataManager);
828
831
  }
829
- if (_this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal')) {
832
+ if (_this.getModuleName() === 'multiselect' && (newQuery.queries[queryElements].e.condition === 'or' || newQuery.queries[queryElements].e.operator === 'equal') && !_this.isCustomFiltering) {
830
833
  isReOrder = false;
831
834
  }
832
835
  }
@@ -859,6 +862,7 @@ var DropDownBase = /** @class */ (function (_super) {
859
862
  var localDataArgs = { cancel: false, result: listItems };
860
863
  _this.isPreventChange = _this.isAngular && _this.preventChange ? true : _this.isPreventChange;
861
864
  _this.trigger('actionComplete', localDataArgs, function (localDataArgs) {
865
+ _this.isCustomFiltering = false;
862
866
  if (_this.isIncrementalRequest) {
863
867
  ulElement = _this.renderItems(localDataArgs.result, fields);
864
868
  return;
@@ -893,6 +897,9 @@ var DropDownBase = /** @class */ (function (_super) {
893
897
  DropDownBase.prototype.updatePopupState = function () {
894
898
  // Used this method in component side.
895
899
  };
900
+ DropDownBase.prototype.updatePopupPosition = function () {
901
+ // Used this method in component side.
902
+ };
896
903
  DropDownBase.prototype.virtualSelectionAll = function (state, li, event) {
897
904
  // Used this method in component side.
898
905
  };
@@ -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';
@@ -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,9 +1715,11 @@ 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)
1719
- && _this.treeItems.length > 0)) {
1720
- var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[0] + '"]') : null;
1718
+ if (_this.showSelectAll && !_this.allowFiltering) {
1719
+ _this.checkAllParent.focus();
1720
+ }
1721
+ if ((!_this.popupDiv.classList.contains(NODATA) && _this.treeItems.length > 0)) {
1722
+ var focusedElement = _this.value != null || _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[0] + '"]') : null;
1721
1723
  if (focusedElement) {
1722
1724
  _this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
1723
1725
  focusedElement.setAttribute('tabindex', '0');
@@ -2057,7 +2059,9 @@ var DropDownTree = /** @class */ (function (_super) {
2057
2059
  this.updateTemplate();
2058
2060
  }
2059
2061
  this.treeObj.fields = this.getTreeFields(this.fields);
2062
+ this.setProperties({ value: this.oldValue }, true);
2060
2063
  this.treeObj.dataBind();
2064
+ this.updateValue(this.value);
2061
2065
  };
2062
2066
  DropDownTree.prototype.getEventArgs = function (args) {
2063
2067
  var checkData = args.data;
@@ -2631,6 +2635,9 @@ var DropDownTree = /** @class */ (function (_super) {
2631
2635
  }
2632
2636
  chip.appendChild(chipContent);
2633
2637
  this.chipCollection.appendChild(chip);
2638
+ if (this.isReact) {
2639
+ this.renderReactTemplates();
2640
+ }
2634
2641
  };
2635
2642
  DropDownTree.prototype.setSelectAllWrapper = function (state) {
2636
2643
  if (this.isFirstRender) {
@@ -3071,8 +3078,10 @@ var DropDownTree = /** @class */ (function (_super) {
3071
3078
  this.updateFilterPlaceHolder();
3072
3079
  break;
3073
3080
  case 'value':
3074
- this.oldValue = oldProp.value;
3075
- this.updateValue(newProp.value);
3081
+ if (JSON.stringify(oldProp.value) !== JSON.stringify(newProp.value)) {
3082
+ this.oldValue = oldProp.value;
3083
+ this.updateValue(newProp.value);
3084
+ }
3076
3085
  break;
3077
3086
  case 'text':
3078
3087
  this.updateText(newProp.text);
@@ -3360,6 +3369,9 @@ var DropDownTree = /** @class */ (function (_super) {
3360
3369
  addClass([this.inputWrapper], [INPUTFOCUS]);
3361
3370
  }
3362
3371
  }
3372
+ if (this.isFilteredData) {
3373
+ this.treeObj['treeData'] = this.treeData;
3374
+ }
3363
3375
  if (this.destroyPopupOnHide) {
3364
3376
  this.isFirstRender = true;
3365
3377
  this.destroyPopup();
@@ -120,6 +120,7 @@ export declare class ListBox extends DropDownBase {
120
120
  private popupWrapper;
121
121
  private targetInputElement;
122
122
  private isValidKey;
123
+ private isBackSpace;
123
124
  private isFiltered;
124
125
  private clearFilterIconElem;
125
126
  private remoteFilterAction;
@@ -100,6 +100,7 @@ var ListBox = /** @class */ (function (_super) {
100
100
  function ListBox(options, element) {
101
101
  var _this = _super.call(this, options, element) || this;
102
102
  _this.isValidKey = false;
103
+ _this.isBackSpace = false;
103
104
  _this.isDataSourceUpdate = false;
104
105
  _this.keyDownStatus = false;
105
106
  return _this;
@@ -368,6 +369,7 @@ var ListBox = /** @class */ (function (_super) {
368
369
  }
369
370
  };
370
371
  ListBox.prototype.onActionComplete = function (ulElement, list, e) {
372
+ var _this = this;
371
373
  var searchEle;
372
374
  var filterElem;
373
375
  var txtLength;
@@ -434,8 +436,9 @@ var ListBox = /** @class */ (function (_super) {
434
436
  }
435
437
  filterElem.selectionStart = txtLength;
436
438
  filterElem.selectionEnd = txtLength;
437
- if (filterElem.value !== '') {
439
+ if (filterElem.value !== '' || (filterElem.value === '' && this.isBackSpace)) {
438
440
  filterElem.focus();
441
+ setTimeout(function () { _this.isBackSpace = false; });
439
442
  }
440
443
  }
441
444
  }
@@ -2040,7 +2043,7 @@ var ListBox = /** @class */ (function (_super) {
2040
2043
  };
2041
2044
  ListBox.prototype.KeyUp = function (e) {
2042
2045
  var _this = this;
2043
- if (this.allowFiltering && ((e.ctrlKey && e.keyCode === 65) || (e.keyCode === 8 && !this.filterInput.value))) {
2046
+ if (this.allowFiltering && e.ctrlKey && e.keyCode === 65) {
2044
2047
  e.preventDefault();
2045
2048
  return;
2046
2049
  }
@@ -2049,6 +2052,7 @@ var ListBox = /** @class */ (function (_super) {
2049
2052
  if (!isNullOrUndefined(isWordCharacter)) {
2050
2053
  this.isValidKey = true;
2051
2054
  }
2055
+ this.isBackSpace = e.keyCode === 8;
2052
2056
  this.isValidKey = (e.keyCode === 8) || (e.keyCode === 46) || this.isValidKey;
2053
2057
  if (this.isValidKey) {
2054
2058
  this.isValidKey = false;
@@ -738,6 +738,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
738
738
  private refreshPopup;
739
739
  private checkTextLength;
740
740
  private popupKeyActions;
741
+ protected updatePopupPosition(): void;
741
742
  private updateAriaAttribute;
742
743
  private homeNavigation;
743
744
  private updateSelectionList;
@@ -1590,6 +1590,9 @@ var MultiSelect = /** @class */ (function (_super) {
1590
1590
  break;
1591
1591
  }
1592
1592
  };
1593
+ MultiSelect.prototype.updatePopupPosition = function () {
1594
+ this.refreshPopup();
1595
+ };
1593
1596
  MultiSelect.prototype.updateAriaAttribute = function () {
1594
1597
  var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
1595
1598
  if (!isNullOrUndefined(focusedItem)) {
@@ -3464,6 +3467,7 @@ var MultiSelect = /** @class */ (function (_super) {
3464
3467
  _this.isFiltered = true;
3465
3468
  _this.customFilterQuery = query;
3466
3469
  _this.remoteFilterAction = true;
3470
+ _this.isCustomFiltering = true;
3467
3471
  _this.dataUpdater(dataSource, query, fields);
3468
3472
  },
3469
3473
  event: e,