@syncfusion/ej2-dropdowns 26.2.8 → 26.2.10

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 (109) hide show
  1. package/dist/ej2-dropdowns.min.js +2 -2
  2. package/dist/ej2-dropdowns.umd.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-dropdowns.es2015.js +67 -24
  5. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es5.js +68 -24
  7. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  8. package/dist/global/ej2-dropdowns.min.js +2 -2
  9. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +12 -12
  12. package/src/common/virtual-scroll.js +5 -7
  13. package/src/drop-down-base/drop-down-base.js +10 -5
  14. package/src/drop-down-list/drop-down-list.js +4 -1
  15. package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
  16. package/src/drop-down-tree/drop-down-tree.js +39 -3
  17. package/src/list-box/list-box.js +6 -6
  18. package/src/multi-select/multi-select.js +4 -2
  19. package/styles/auto-complete/fluent2.css +3 -1031
  20. package/styles/auto-complete/material3-dark.css +1 -54
  21. package/styles/auto-complete/material3.css +2 -109
  22. package/styles/bootstrap-dark.css +9 -0
  23. package/styles/bootstrap.css +9 -0
  24. package/styles/bootstrap4.css +9 -0
  25. package/styles/bootstrap5-dark.css +9 -0
  26. package/styles/bootstrap5.css +9 -0
  27. package/styles/combo-box/fluent2.css +3 -1031
  28. package/styles/combo-box/material3-dark.css +1 -54
  29. package/styles/combo-box/material3.css +2 -109
  30. package/styles/drop-down-base/_theme.scss +2 -0
  31. package/styles/drop-down-base/bootstrap-dark.css +2 -0
  32. package/styles/drop-down-base/bootstrap.css +2 -0
  33. package/styles/drop-down-base/bootstrap4.css +2 -0
  34. package/styles/drop-down-base/bootstrap5-dark.css +2 -0
  35. package/styles/drop-down-base/bootstrap5.css +2 -0
  36. package/styles/drop-down-base/fabric-dark.css +2 -0
  37. package/styles/drop-down-base/fabric.css +2 -0
  38. package/styles/drop-down-base/fluent-dark.css +2 -0
  39. package/styles/drop-down-base/fluent.css +2 -0
  40. package/styles/drop-down-base/fluent2.css +7 -1033
  41. package/styles/drop-down-base/highcontrast-light.css +2 -0
  42. package/styles/drop-down-base/highcontrast.css +2 -0
  43. package/styles/drop-down-base/material-dark.css +2 -0
  44. package/styles/drop-down-base/material.css +2 -0
  45. package/styles/drop-down-base/material3-dark.css +3 -54
  46. package/styles/drop-down-base/material3.css +5 -110
  47. package/styles/drop-down-base/tailwind-dark.css +2 -0
  48. package/styles/drop-down-base/tailwind.css +2 -0
  49. package/styles/drop-down-list/fluent2.css +5 -1033
  50. package/styles/drop-down-list/material3-dark.css +1 -54
  51. package/styles/drop-down-list/material3.css +3 -110
  52. package/styles/drop-down-tree/fluent2.css +3 -1031
  53. package/styles/drop-down-tree/material3-dark.css +1 -54
  54. package/styles/drop-down-tree/material3.css +2 -109
  55. package/styles/fabric-dark.css +9 -0
  56. package/styles/fabric.css +9 -0
  57. package/styles/fluent-dark.css +9 -0
  58. package/styles/fluent.css +9 -0
  59. package/styles/fluent2.css +14 -1033
  60. package/styles/highcontrast-light.css +9 -0
  61. package/styles/highcontrast.css +9 -0
  62. package/styles/list-box/_layout.scss +6 -0
  63. package/styles/list-box/bootstrap-dark.css +6 -0
  64. package/styles/list-box/bootstrap.css +6 -0
  65. package/styles/list-box/bootstrap4.css +6 -0
  66. package/styles/list-box/bootstrap5-dark.css +6 -0
  67. package/styles/list-box/bootstrap5.css +6 -0
  68. package/styles/list-box/fabric-dark.css +6 -0
  69. package/styles/list-box/fabric.css +6 -0
  70. package/styles/list-box/fluent-dark.css +6 -0
  71. package/styles/list-box/fluent.css +6 -0
  72. package/styles/list-box/fluent2.css +9 -1031
  73. package/styles/list-box/highcontrast-light.css +6 -0
  74. package/styles/list-box/highcontrast.css +6 -0
  75. package/styles/list-box/material-dark.css +6 -0
  76. package/styles/list-box/material.css +6 -0
  77. package/styles/list-box/material3-dark.css +7 -54
  78. package/styles/list-box/material3.css +8 -109
  79. package/styles/list-box/tailwind-dark.css +6 -0
  80. package/styles/list-box/tailwind.css +6 -0
  81. package/styles/material-dark.css +9 -0
  82. package/styles/material.css +9 -0
  83. package/styles/material3-dark.css +10 -54
  84. package/styles/material3.css +12 -110
  85. package/styles/mention/fluent2.css +3 -1031
  86. package/styles/mention/material3-dark.css +1 -54
  87. package/styles/mention/material3.css +2 -109
  88. package/styles/multi-select/_layout.scss +1 -0
  89. package/styles/multi-select/bootstrap-dark.css +1 -0
  90. package/styles/multi-select/bootstrap.css +1 -0
  91. package/styles/multi-select/bootstrap4.css +1 -0
  92. package/styles/multi-select/bootstrap5-dark.css +1 -0
  93. package/styles/multi-select/bootstrap5.css +1 -0
  94. package/styles/multi-select/fabric-dark.css +1 -0
  95. package/styles/multi-select/fabric.css +1 -0
  96. package/styles/multi-select/fluent-dark.css +1 -0
  97. package/styles/multi-select/fluent.css +1 -0
  98. package/styles/multi-select/fluent2.css +6 -1033
  99. package/styles/multi-select/highcontrast-light.css +1 -0
  100. package/styles/multi-select/highcontrast.css +1 -0
  101. package/styles/multi-select/material-dark.css +1 -0
  102. package/styles/multi-select/material.css +1 -0
  103. package/styles/multi-select/material3-dark.css +2 -54
  104. package/styles/multi-select/material3.css +4 -110
  105. package/styles/multi-select/tailwind-dark.css +1 -0
  106. package/styles/multi-select/tailwind.css +1 -0
  107. package/styles/tailwind-dark.css +9 -0
  108. package/styles/tailwind.css +9 -0
  109. package/hotfix/26.1.35_Vol2.txt +0 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 26.2.8
3
+ * version : 26.2.10
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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@26.2.7",
3
+ "_id": "@syncfusion/ej2-dropdowns@26.2.9",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-kwC+xK1MaSajrZXTbUmKfxWOqRYb4bzePPHfSkKxoQkbUTDn542o+LFnvLVG/UdZ8s/OD4P5ChDl0XjAH6sOPA==",
5
+ "_integrity": "sha512-FmGQY901PecxDoSQU29n/Xg66dFNx1+X63xqrb+d1I+vMbZi/71gaqEOg+r1KEBNqZMOC5SiB/90NKPLjXpCgQ==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -35,8 +35,8 @@
35
35
  "/@syncfusion/ej2-spreadsheet",
36
36
  "/@syncfusion/ej2-vue-dropdowns"
37
37
  ],
38
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-26.2.7.tgz",
39
- "_shasum": "c5edcee9ab776cb2ee557c2d36fc4f32f973aed5",
38
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-26.2.9.tgz",
39
+ "_shasum": "ca85eded8151858bb317bca8a9560ec4acf2bafd",
40
40
  "_spec": "@syncfusion/ej2-dropdowns@*",
41
41
  "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
42
42
  "author": {
@@ -44,13 +44,13 @@
44
44
  },
45
45
  "bundleDependencies": false,
46
46
  "dependencies": {
47
- "@syncfusion/ej2-base": "~26.2.5",
48
- "@syncfusion/ej2-data": "~26.2.5",
49
- "@syncfusion/ej2-inputs": "~26.2.5",
50
- "@syncfusion/ej2-lists": "~26.2.5",
51
- "@syncfusion/ej2-navigations": "~26.2.8",
52
- "@syncfusion/ej2-notifications": "~26.2.5",
53
- "@syncfusion/ej2-popups": "~26.2.8"
47
+ "@syncfusion/ej2-base": "~26.2.10",
48
+ "@syncfusion/ej2-data": "~26.2.10",
49
+ "@syncfusion/ej2-inputs": "~26.2.10",
50
+ "@syncfusion/ej2-lists": "~26.2.10",
51
+ "@syncfusion/ej2-navigations": "~26.2.10",
52
+ "@syncfusion/ej2-notifications": "~26.2.10",
53
+ "@syncfusion/ej2-popups": "~26.2.10"
54
54
  },
55
55
  "deprecated": false,
56
56
  "description": "Essential JS 2 DropDown Components",
@@ -75,7 +75,7 @@
75
75
  "module": "./index.js",
76
76
  "name": "@syncfusion/ej2-dropdowns",
77
77
  "typings": "index.d.ts",
78
- "version": "26.2.8",
78
+ "version": "26.2.10",
79
79
  "sideEffects": false,
80
80
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
81
81
  }
@@ -450,10 +450,8 @@ var VirtualScroll = /** @class */ (function () {
450
450
  else if (this.parent.isScrollActionTriggered) {
451
451
  this.parent.isPreventKeyAction = false;
452
452
  this.parent.isScrollActionTriggered = false;
453
- var virtualListCount = this.parent.list.querySelectorAll('.e-virtual-list').length;
454
- var listElement = this.parent.list.querySelector('.' + 'e-list-item');
455
- var translateY = scrollArgs.offset.top - (listElement.offsetHeight * virtualListCount);
456
- this.parent.list.getElementsByClassName('e-virtual-ddl-content')[0].style.transform = "translate(0px," + translateY + "px)";
453
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
454
+ this.parent.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.parent.getTransformValues();
457
455
  }
458
456
  this.parent.previousInfo = this.parent.viewPortInfo;
459
457
  }
@@ -487,13 +485,13 @@ var VirtualScroll = /** @class */ (function () {
487
485
  }
488
486
  }
489
487
  else if (infoType.direction === 'up') {
490
- if (infoType.startIndex && infoType.endIndex) {
488
+ if ((infoType.startIndex && infoType.endIndex) || (Math.ceil(exactTopIndex) > this.parent.previousStartIndex)) {
491
489
  var loadAtIndex = Math.round(((infoType.startIndex * rowHeight) + (pageSizeBy4 * rowHeight)) / rowHeight);
492
- if (exactTopIndex < loadAtIndex) {
490
+ if (exactTopIndex < loadAtIndex || (Math.ceil(exactTopIndex) > this.parent.previousStartIndex)) {
493
491
  var idxAddedToExactTop = (pageSizeBy4) > infoViewIndices ? pageSizeBy4 :
494
492
  (infoViewIndices + infoViewIndices / 4);
495
493
  var eIndex = Math.round(exactTopIndex + idxAddedToExactTop);
496
- infoType.endIndex = (eIndex < totalItemCount || this.component == "multiselect") ? eIndex : totalItemCount;
494
+ infoType.endIndex = (eIndex < totalItemCount) ? eIndex : totalItemCount;
497
495
  var sIndex = infoType.endIndex - this.parent.virtualItemCount;
498
496
  infoType.startIndex = sIndex > 0 ? sIndex : 0;
499
497
  infoType.endIndex = sIndex < 0 ? this.parent.virtualItemCount : infoType.endIndex;
@@ -337,7 +337,7 @@ var DropDownBase = /** @class */ (function (_super) {
337
337
  }
338
338
  }
339
339
  else {
340
- if (noDataElement[i] instanceof HTMLElement || noDataElement[i] instanceof Text) {
340
+ if (noDataElement[i] instanceof HTMLElement || ((noDataElement[i] instanceof Text) && (noDataElement[i]).textContent !== '')) {
341
341
  ele.appendChild(noDataElement[i]);
342
342
  }
343
343
  }
@@ -1152,10 +1152,15 @@ var DropDownBase = /** @class */ (function (_super) {
1152
1152
  }
1153
1153
  };
1154
1154
  DropDownBase.prototype.getPageCount = function (returnExactCount) {
1155
- var liHeight = this.list.classList.contains(dropDownBaseClasses.noData) ? null :
1156
- getComputedStyle(this.getItems()[0], null).getPropertyValue('height');
1157
- var pageCount = Math.round(this.list.getBoundingClientRect().height / parseInt(liHeight, 10));
1158
- return returnExactCount ? pageCount : Math.round(pageCount);
1155
+ if (this.list) {
1156
+ var liHeight = this.list.classList.contains(dropDownBaseClasses.noData) ? null :
1157
+ getComputedStyle(this.getItems()[0], null).getPropertyValue('height');
1158
+ var pageCount = Math.round(this.list.getBoundingClientRect().height / parseInt(liHeight, 10));
1159
+ return returnExactCount ? pageCount : Math.round(pageCount);
1160
+ }
1161
+ else {
1162
+ return 0;
1163
+ }
1159
1164
  };
1160
1165
  DropDownBase.prototype.updateGroupHeader = function (index, liCollections, target) {
1161
1166
  if (!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.group)) {
@@ -3305,9 +3305,12 @@ var DropDownList = /** @class */ (function (_super) {
3305
3305
  DropDownList.prototype.checkData = function (newProp) {
3306
3306
  if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource)) && this.itemTemplate && this.allowFiltering &&
3307
3307
  !(this.isListSearched && (newProp.dataSource instanceof DataManager))) {
3308
- if (this.list) {
3308
+ if (this.list && !(this.isReact)) {
3309
3309
  this.list.innerHTML = '';
3310
3310
  }
3311
+ else {
3312
+ this.list = null;
3313
+ }
3311
3314
  this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };
3312
3315
  }
3313
3316
  this.isListSearched = false;
@@ -745,6 +745,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
745
745
  render(): void;
746
746
  private hideCheckAll;
747
747
  private renderFilter;
748
+ private filterKeyAction;
748
749
  private filterChangeHandler;
749
750
  private isChildObject;
750
751
  private filterHandler;
@@ -378,6 +378,40 @@ var DropDownTree = /** @class */ (function (_super) {
378
378
  input: this.filterChangeHandler.bind(this)
379
379
  });
380
380
  this.filterObj.appendTo('#' + this.element.id + '_filter');
381
+ this.keyboardModule = new KeyboardEvents(this.filterObj.element, {
382
+ keyAction: this.filterKeyAction.bind(this),
383
+ keyConfigs: this.keyConfigs,
384
+ eventName: 'keydown'
385
+ });
386
+ };
387
+ DropDownTree.prototype.filterKeyAction = function (e) {
388
+ var _this = this;
389
+ var eventArgs = {
390
+ cancel: false,
391
+ event: e
392
+ };
393
+ this.trigger('keyPress', eventArgs, function (observedArgs) {
394
+ if (!observedArgs.cancel) {
395
+ switch (e.action) {
396
+ case 'altUp':
397
+ if (_this.isPopupOpen) {
398
+ _this.hidePopup();
399
+ }
400
+ break;
401
+ case 'shiftTab':
402
+ addClass([_this.inputWrapper], [INPUTFOCUS]);
403
+ break;
404
+ case 'moveDown':
405
+ e.preventDefault();
406
+ _this.filterObj.element.blur();
407
+ var focusedElement = _this.treeObj.element.querySelector('li');
408
+ if (focusedElement) {
409
+ focusedElement.focus();
410
+ }
411
+ break;
412
+ }
413
+ }
414
+ });
381
415
  };
382
416
  DropDownTree.prototype.filterChangeHandler = function (args) {
383
417
  var _this = this;
@@ -896,7 +930,6 @@ var DropDownTree = /** @class */ (function (_super) {
896
930
  }
897
931
  break;
898
932
  case 'shiftTab':
899
- case 'tab':
900
933
  if (_this.isPopupOpen) {
901
934
  _this.hidePopup();
902
935
  }
@@ -1615,13 +1648,16 @@ var DropDownTree = /** @class */ (function (_super) {
1615
1648
  }
1616
1649
  else {
1617
1650
  var oldFocussedNode = _this.treeObj.element.querySelector('.e-node-focus');
1618
- focusedElement = _this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
1651
+ focusedElement = _this.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable):not(.e-prevent)') ||
1652
+ _this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
1619
1653
  if (oldFocussedNode && oldFocussedNode !== focusedElement) {
1620
1654
  oldFocussedNode.setAttribute('tabindex', '-1');
1621
1655
  removeClass([oldFocussedNode], 'e-node-focus');
1622
1656
  }
1623
1657
  }
1624
- focusedElement.focus();
1658
+ if (!_this.allowFiltering) {
1659
+ focusedElement.focus();
1660
+ }
1625
1661
  addClass([focusedElement], ['e-node-focus']);
1626
1662
  }
1627
1663
  if (_this.treeObj.checkedNodes.length > 0) {
@@ -1258,6 +1258,7 @@ var ListBox = /** @class */ (function (_super) {
1258
1258
  }
1259
1259
  this.inputString = this.filterInput.value;
1260
1260
  this.filterWireEvents();
1261
+ this.ulElement.style.setProperty('height', 'calc(100% - ' + (this.filterParent.offsetHeight) + 'px)', 'important');
1261
1262
  return filterInputObj;
1262
1263
  }
1263
1264
  };
@@ -2074,11 +2075,8 @@ var ListBox = /** @class */ (function (_super) {
2074
2075
  };
2075
2076
  ListBox.prototype.resizeHandler = function () {
2076
2077
  if (this.list && !(this.cssClass && this.cssClass.indexOf('e-horizontal-listbox') > -1)) {
2077
- if (this.list.scrollWidth > this.list.offsetWidth) {
2078
- this.list.querySelector('.e-list-parent').style.display = 'inline-block';
2079
- }
2080
- else {
2081
- this.list.querySelector('.e-list-parent').style.display = 'block';
2078
+ if (this.list.getElementsByClassName('e-filter-parent').length > 0 && this.allowFiltering) {
2079
+ this.ulElement.style.setProperty('height', 'calc(100% - ' + (this.filterParent.offsetHeight) + 'px)', 'important');
2082
2080
  }
2083
2081
  }
2084
2082
  };
@@ -2421,7 +2419,9 @@ var ListBox = /** @class */ (function (_super) {
2421
2419
  this.initDraggable();
2422
2420
  }
2423
2421
  else {
2424
- getComponent(this.ulElement, 'sortable').destroy();
2422
+ if (this.ulElement.classList.contains("e-sortable")) {
2423
+ getComponent(this.ulElement, 'sortable').destroy();
2424
+ }
2425
2425
  }
2426
2426
  break;
2427
2427
  case 'allowFiltering':
@@ -5470,8 +5470,10 @@ var MultiSelect = /** @class */ (function (_super) {
5470
5470
  if (e.result.length > 0) {
5471
5471
  listItems_2 = e.result;
5472
5472
  _this.initStatus = false;
5473
- _this.initialValueUpdate(listItems_2, true);
5474
- _this.initialUpdate();
5473
+ setTimeout(function () {
5474
+ _this.initialValueUpdate(listItems_2, true);
5475
+ _this.initialUpdate();
5476
+ }, 100);
5475
5477
  _this.initStatus = true;
5476
5478
  }
5477
5479
  });