@syncfusion/ej2-dropdowns 28.1.33 → 28.1.36

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.
Files changed (43) hide show
  1. package/dist/ej2-dropdowns.min.js +1 -10
  2. package/dist/ej2-dropdowns.umd.min.js +1 -10
  3. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-dropdowns.es2015.js +30 -11
  5. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es5.js +30 -11
  7. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  8. package/dist/global/ej2-dropdowns.min.js +1 -10
  9. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  10. package/dist/global/index.d.ts +0 -9
  11. package/package.json +6 -10
  12. package/src/combo-box/combo-box.js +1 -0
  13. package/src/drop-down-base/drop-down-base.js +1 -1
  14. package/src/drop-down-list/drop-down-list.d.ts +1 -0
  15. package/src/drop-down-list/drop-down-list.js +12 -1
  16. package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
  17. package/src/drop-down-tree/drop-down-tree.js +13 -6
  18. package/src/list-box/list-box.d.ts +1 -1
  19. package/src/list-box/list-box.js +1 -1
  20. package/src/multi-select/multi-select.js +2 -2
  21. package/styles/bootstrap5-dark-lite.css +1 -0
  22. package/styles/bootstrap5-dark.css +1 -0
  23. package/styles/bootstrap5-lite.css +1 -0
  24. package/styles/bootstrap5.3-lite.css +1 -0
  25. package/styles/bootstrap5.3.css +1 -0
  26. package/styles/bootstrap5.css +1 -0
  27. package/styles/drop-down-base/tailwind3.css +5 -5
  28. package/styles/drop-down-list/_layout.scss +1 -1
  29. package/styles/drop-down-list/tailwind3.css +1 -0
  30. package/styles/fluent-dark-lite.css +1 -0
  31. package/styles/fluent-dark.css +1 -0
  32. package/styles/fluent-lite.css +1 -0
  33. package/styles/fluent.css +1 -0
  34. package/styles/list-box/tailwind3.css +1 -1
  35. package/styles/multi-select/_layout.scss +1 -3
  36. package/styles/multi-select/bootstrap5-dark.css +1 -0
  37. package/styles/multi-select/bootstrap5.3.css +1 -0
  38. package/styles/multi-select/bootstrap5.css +1 -0
  39. package/styles/multi-select/fluent-dark.css +1 -0
  40. package/styles/multi-select/fluent.css +1 -0
  41. package/styles/multi-select/tailwind3.css +5 -5
  42. package/styles/tailwind3-lite.css +12 -11
  43. package/styles/tailwind3.css +12 -11
@@ -1315,7 +1315,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1315
1315
  for (var i = 0; i < totalSkeletonCount; i++) {
1316
1316
  var liElement = this.createElement('li', { className: dropDownBaseClasses.virtualList, styles: 'overflow: inherit' });
1317
1317
  if (this.isVirtualizationEnabled && this.itemTemplate) {
1318
- liElement.style.height = this.listItemHeight + 'px';
1318
+ liElement.style.height = (this.listItemHeight - parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom, 10)) + 'px';
1319
1319
  }
1320
1320
  var skeleton = new Skeleton({
1321
1321
  shape: 'Text',
@@ -4744,6 +4744,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4744
4744
  if (this.isFiltering() && this.getModuleName() === 'combobox' && isNullOrUndefined(this.list)) {
4745
4745
  this.getInitialData = true;
4746
4746
  this.renderList();
4747
+ if (!this.isSecondClick && !this.isDropDownClick) {
4748
+ this.executeCloneElements();
4749
+ }
4747
4750
  }
4748
4751
  this.typedString = this.filterInput.value;
4749
4752
  this.preventAutoFill = false;
@@ -5003,6 +5006,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5003
5006
  this.getFilteringSkeletonCount();
5004
5007
  }
5005
5008
  this.renderReactTemplates();
5009
+ if (this.filterInput && this.filterInput.value === '' && this.getModuleName() === 'combobox') {
5010
+ this.executeCloneElements();
5011
+ }
5006
5012
  }
5007
5013
  };
5008
5014
  DropDownList.prototype.setSearchBox = function (popupElement) {
@@ -6893,10 +6899,15 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
6893
6899
  isOpen: true
6894
6900
  });
6895
6901
  }
6902
+ if (!this.isSecondClick && !this.isDropDownClick) {
6903
+ this.executeCloneElements();
6904
+ }
6905
+ };
6906
+ DropDownList.prototype.executeCloneElements = function () {
6896
6907
  // eslint-disable-next-line @typescript-eslint/no-this-alias
6897
6908
  var proxy = this;
6898
6909
  var duration = (this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
6899
- if (!this.isSecondClick && this.isReact && !this.isDropDownClick && this.isFiltering() && this.itemTemplate != null) {
6910
+ if (this.isReact && this.isFiltering() && this.itemTemplate != null) {
6900
6911
  setTimeout(function () {
6901
6912
  proxy.cloneElements();
6902
6913
  proxy.isSecondClick = true;
@@ -7456,6 +7467,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7456
7467
  _this.selectedData = [];
7457
7468
  _this.filterDelayTime = 300;
7458
7469
  _this.isClicked = false;
7470
+ _this.documentClickContext = _this.onDocumentClick.bind(_this);
7459
7471
  // Specifies if the checkAll method has been called
7460
7472
  _this.isCheckAllCalled = false;
7461
7473
  _this.isFromFilterChange = false;
@@ -7749,6 +7761,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7749
7761
  }
7750
7762
  else if (args.preventDefaultAction) {
7751
7763
  fields = args.fields;
7764
+ _this.treeObj.element.classList.add('e-filtering');
7752
7765
  }
7753
7766
  else {
7754
7767
  if (_this.treeDataType === 1) {
@@ -7975,7 +7988,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7975
7988
  if (this.showSelectAll && this.checkAllParent) {
7976
7989
  EventHandler.remove(this.checkAllParent, 'mouseup', this.clickHandler);
7977
7990
  }
7978
- EventHandler.remove(document, 'mousedown', this.onDocumentClick);
7991
+ document.removeEventListener('mousedown', this.documentClickContext);
7979
7992
  };
7980
7993
  /* Trigger when the dropdown is clicked */
7981
7994
  DropDownTree.prototype.dropDownClick = function (e) {
@@ -9002,7 +9015,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9002
9015
  if (_this.treeObj.checkedNodes.length > 0 && !_this.isFilterRestore) {
9003
9016
  var nodes = _this.treeObj.element.querySelectorAll('li');
9004
9017
  var checkedNodes = _this.treeObj.element.querySelectorAll('li[aria-checked=true]');
9005
- if ((checkedNodes.length === nodes.length || _this.checkSelectAll) && _this.checkBoxElement) {
9018
+ if ((checkedNodes.length === nodes.length) && _this.checkBoxElement) {
9006
9019
  var wrap = closest(_this.checkBoxElement, '.' + CHECKBOXWRAP);
9007
9020
  _this.changeState(wrap, 'check');
9008
9021
  _this.checkSelectAll = false;
@@ -9065,7 +9078,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9065
9078
  _this.isPopupOpen = false;
9066
9079
  },
9067
9080
  open: function () {
9068
- EventHandler.add(document, 'mousedown', _this.onDocumentClick, _this);
9081
+ document.addEventListener('mousedown', _this.documentClickContext);
9069
9082
  _this.isPopupOpen = true;
9070
9083
  },
9071
9084
  targetExitViewport: function () {
@@ -9172,7 +9185,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9172
9185
  }
9173
9186
  if (this.isFilterRestore) {
9174
9187
  this.restoreFilterSelection();
9175
- this.isFilterRestore = false;
9188
+ if (!this.showSelectAll) {
9189
+ this.isFilterRestore = false;
9190
+ }
9176
9191
  }
9177
9192
  };
9178
9193
  DropDownTree.prototype.restoreFilterSelection = function () {
@@ -9435,15 +9450,18 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9435
9450
  this.ensurePlaceHolder();
9436
9451
  }
9437
9452
  if (this.showSelectAll && this.checkBoxElement) {
9453
+ var nodes = this.treeObj.element.querySelectorAll('li');
9438
9454
  var checkedNodes = this.treeObj.element.querySelectorAll('li[aria-checked=true]');
9439
9455
  var wrap = closest(this.checkBoxElement, '.' + CHECKBOXWRAP);
9440
- if (wrap && args.action === 'uncheck' && (args.isInteracted || checkedNodes.length === 0 || (!isNullOrUndefined(args.data[0]) && args.data[0].isChecked === 'false'))) {
9456
+ if ((wrap && args.action === 'uncheck' && (args.isInteracted || checkedNodes.length === 0 ||
9457
+ (!isNullOrUndefined(args.data[0]) && args.data[0].isChecked === 'false'))) || !args.isInteracted && this.isFilterRestore) {
9458
+ this.isFilterRestore = false;
9441
9459
  this.isReverseUpdate = true;
9442
9460
  this.changeState(wrap, 'uncheck');
9443
9461
  this.isReverseUpdate = false;
9444
9462
  }
9445
9463
  else if (wrap && args.action === 'check'
9446
- && checkedNodes.length === this.fields.dataSource.length
9464
+ && checkedNodes.length === nodes.length
9447
9465
  && (args.isInteracted || this.isCheckAllCalled || (!isNullOrUndefined(args.data[0]) && args.data[0].isChecked === 'true'))) {
9448
9466
  this.isReverseUpdate = true;
9449
9467
  this.isCheckAllCalled = false;
@@ -11358,6 +11376,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
11358
11376
  _super.prototype.clearAll.call(this, e);
11359
11377
  }
11360
11378
  if (this.isFiltering() && !isNullOrUndefined(e) && e.target === this.inputWrapper.clearButton) {
11379
+ this.typedString = this.filterInput.value;
11361
11380
  this.searchLists(e);
11362
11381
  }
11363
11382
  };
@@ -15873,7 +15892,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
15873
15892
  this.list.scrollTop = 0;
15874
15893
  this.virtualListInfo = null;
15875
15894
  this.previousStartIndex = 0;
15876
- this.previousEndIndex = 0;
15895
+ this.previousEndIndex = this.itemCount;
15877
15896
  }
15878
15897
  this.isClearAllAction = false;
15879
15898
  }
@@ -18065,7 +18084,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18065
18084
  _this.viewPortInfo.endIndex : _this.itemCount;
18066
18085
  _this.virtualListInfo = _this.viewPortInfo;
18067
18086
  _this.previousStartIndex = 0;
18068
- _this.previousEndIndex = 0;
18087
+ _this.previousEndIndex = _this.itemCount;
18069
18088
  }
18070
18089
  var dataSourceCount = void 0;
18071
18090
  if (_this.dataSource instanceof DataManager) {
@@ -21549,7 +21568,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
21549
21568
  ctrlKey: e.ctrlKey, shiftKey: e.shiftKey
21550
21569
  });
21551
21570
  }
21552
- else if (e.keyCode === 65 && e.ctrlKey) {
21571
+ else if (e.keyCode === 65 && e.ctrlKey && this.selectionSettings.mode === 'Multiple') {
21553
21572
  this.selectAll();
21554
21573
  }
21555
21574
  else if ((e.keyCode === 38 || e.keyCode === 40) && e.ctrlKey && e.shiftKey) {