@syncfusion/ej2-dropdowns 30.2.5 → 31.1.17

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 (90) 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 +46 -16
  5. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es5.js +46 -16
  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 +8 -8
  12. package/src/combo-box/combo-box.js +8 -5
  13. package/src/drop-down-base/drop-down-base.js +12 -4
  14. package/src/drop-down-list/drop-down-list.d.ts +5 -1
  15. package/src/drop-down-list/drop-down-list.js +7 -0
  16. package/src/drop-down-tree/drop-down-tree.js +16 -4
  17. package/src/multi-select/multi-select.js +3 -3
  18. package/styles/auto-complete/bootstrap4.css +8 -0
  19. package/styles/bds-lite.css +1 -2
  20. package/styles/bds.css +1 -2
  21. package/styles/bootstrap-dark-lite.css +1 -2
  22. package/styles/bootstrap-dark.css +1 -2
  23. package/styles/bootstrap-lite.css +1 -2
  24. package/styles/bootstrap.css +1 -2
  25. package/styles/bootstrap4-lite.css +9 -2
  26. package/styles/bootstrap4.css +11 -4
  27. package/styles/bootstrap5-dark-lite.css +1 -2
  28. package/styles/bootstrap5-dark.css +1 -2
  29. package/styles/bootstrap5-lite.css +1 -2
  30. package/styles/bootstrap5.3-lite.css +1 -2
  31. package/styles/bootstrap5.3.css +2 -3
  32. package/styles/bootstrap5.css +1 -2
  33. package/styles/combo-box/bootstrap4.css +8 -0
  34. package/styles/drop-down-base/_fluent2-definition.scss +2 -2
  35. package/styles/drop-down-base/fluent2.css +4 -4
  36. package/styles/drop-down-list/_bootstrap4-definition.scss +8 -0
  37. package/styles/drop-down-list/bootstrap4.css +8 -0
  38. package/styles/drop-down-tree/_bigger.scss +8 -2
  39. package/styles/drop-down-tree/_layout.scss +19 -2
  40. package/styles/drop-down-tree/bds.css +1 -2
  41. package/styles/drop-down-tree/bootstrap-dark.css +1 -2
  42. package/styles/drop-down-tree/bootstrap.css +1 -2
  43. package/styles/drop-down-tree/bootstrap4.css +1 -2
  44. package/styles/drop-down-tree/bootstrap5-dark.css +1 -2
  45. package/styles/drop-down-tree/bootstrap5.3.css +2 -3
  46. package/styles/drop-down-tree/bootstrap5.css +1 -2
  47. package/styles/drop-down-tree/fabric-dark.css +1 -2
  48. package/styles/drop-down-tree/fabric.css +1 -2
  49. package/styles/drop-down-tree/fluent-dark.css +1 -2
  50. package/styles/drop-down-tree/fluent.css +1 -2
  51. package/styles/drop-down-tree/fluent2.css +3 -3
  52. package/styles/drop-down-tree/highcontrast-light.css +1 -2
  53. package/styles/drop-down-tree/highcontrast.css +1 -2
  54. package/styles/drop-down-tree/material-dark.css +0 -4
  55. package/styles/drop-down-tree/material.css +0 -4
  56. package/styles/drop-down-tree/material3-dark.css +0 -4
  57. package/styles/drop-down-tree/material3.css +0 -4
  58. package/styles/drop-down-tree/tailwind-dark.css +1 -2
  59. package/styles/drop-down-tree/tailwind.css +1 -2
  60. package/styles/drop-down-tree/tailwind3.css +1 -2
  61. package/styles/fabric-dark-lite.css +1 -2
  62. package/styles/fabric-dark.css +1 -2
  63. package/styles/fabric-lite.css +1 -2
  64. package/styles/fabric.css +1 -2
  65. package/styles/fluent-dark-lite.css +1 -2
  66. package/styles/fluent-dark.css +1 -2
  67. package/styles/fluent-lite.css +1 -2
  68. package/styles/fluent.css +1 -2
  69. package/styles/fluent2-lite.css +4 -4
  70. package/styles/fluent2.css +7 -7
  71. package/styles/highcontrast-light-lite.css +1 -2
  72. package/styles/highcontrast-light.css +1 -2
  73. package/styles/highcontrast-lite.css +1 -2
  74. package/styles/highcontrast.css +1 -2
  75. package/styles/material-dark-lite.css +0 -4
  76. package/styles/material-dark.css +0 -4
  77. package/styles/material-lite.css +0 -4
  78. package/styles/material.css +0 -4
  79. package/styles/material3-dark-lite.css +0 -4
  80. package/styles/material3-dark.css +0 -4
  81. package/styles/material3-lite.css +0 -4
  82. package/styles/material3.css +0 -4
  83. package/styles/multi-select/_bigger.scss +2 -2
  84. package/styles/multi-select/bootstrap4.css +2 -2
  85. package/styles/tailwind-dark-lite.css +1 -2
  86. package/styles/tailwind-dark.css +1 -2
  87. package/styles/tailwind-lite.css +1 -2
  88. package/styles/tailwind.css +1 -2
  89. package/styles/tailwind3-lite.css +1 -2
  90. package/styles/tailwind3.css +1 -2
@@ -1404,11 +1404,13 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1404
1404
  else {
1405
1405
  item = this.typeOfData(this.listData);
1406
1406
  }
1407
- if (typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'number' ||
1407
+ if (!isNullOrUndefined(item.item) &&
1408
+ typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'number' ||
1408
1409
  item.typeof === 'number') {
1409
1410
  return parseFloat(value);
1410
1411
  }
1411
- if (typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'boolean' ||
1412
+ if (!isNullOrUndefined(item.item) &&
1413
+ typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'boolean' ||
1412
1414
  item.typeof === 'boolean') {
1413
1415
  return ((value === 'true') || ('' + value === 'true'));
1414
1416
  }
@@ -2293,7 +2295,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
2293
2295
  this.renderGroupTemplate(this.fixedHeaderElement);
2294
2296
  };
2295
2297
  DropDownBase.prototype.updateGroupFixedHeader = function (element, target) {
2296
- if (this.fixedHeaderElement) {
2298
+ if (this.fixedHeaderElement && this.list && this.list.parentElement) {
2297
2299
  if (!isNullOrUndefined(element.innerHTML)) {
2298
2300
  if (this.groupTemplate && this.isAngular && this.getModuleName() === 'multiselect') {
2299
2301
  this.updateFixedGroupTemplateHader(element);
@@ -3043,7 +3045,13 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
3043
3045
  */
3044
3046
  DropDownBase.prototype.destroy = function () {
3045
3047
  if (document) {
3046
- EventHandler.remove(document, 'scroll', this.updateGroupFixedHeader);
3048
+ if (this.fields && this.fields.groupBy) {
3049
+ var elements = this.getScrollableParent();
3050
+ for (var i = 0; i < elements.length; i++) {
3051
+ var ele = elements[i];
3052
+ EventHandler.remove(ele, 'scroll', this.updateGroupFixedHeader);
3053
+ }
3054
+ }
3047
3055
  if (document.body.contains(this.list)) {
3048
3056
  EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
3049
3057
  if (!isNullOrUndefined(this.rippleFun)) {
@@ -5691,6 +5699,13 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5691
5699
  }
5692
5700
  else {
5693
5701
  this.removeFocus();
5702
+ if (this.allowFiltering && this.actionCompleteData && this.actionCompleteData.ulElement &&
5703
+ this.dataSource instanceof DataManager) {
5704
+ var focus_1 = this.actionCompleteData.ulElement.querySelector('.e-item-focus');
5705
+ if (focus_1) {
5706
+ removeClass(focus_1, dropDownListClasses.focus);
5707
+ }
5708
+ }
5694
5709
  this.list.querySelector('.' + dropDownBaseClasses.li).classList.add(dropDownListClasses.focus);
5695
5710
  }
5696
5711
  };
@@ -8381,6 +8396,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8381
8396
  };
8382
8397
  /* Handles touch events specifically for iOS devices */
8383
8398
  DropDownTree.prototype.handleIosTouch = function (e) {
8399
+ var target = e.target;
8400
+ if (target && target.classList.contains('e-clear-icon')) {
8401
+ return;
8402
+ }
8384
8403
  e.preventDefault();
8385
8404
  this.dropDownClick(e);
8386
8405
  };
@@ -9611,11 +9630,15 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9611
9630
  }
9612
9631
  };
9613
9632
  DropDownTree.prototype.restoreFilterSelection = function () {
9633
+ if (this.treeObj.checkedNodes) {
9634
+ this.treeObj.checkedNodes = [];
9635
+ }
9636
+ var nodeIds = Array.isArray(this.value) ? this.value : [];
9614
9637
  if (this.showCheckBox) {
9615
- this.treeObj.checkedNodes = this.value ? this.value : [];
9638
+ this.treeObj.checkedNodes = nodeIds;
9616
9639
  }
9617
9640
  else {
9618
- this.treeObj.selectedNodes = this.value ? this.value : [];
9641
+ this.treeObj.selectedNodes = nodeIds;
9619
9642
  }
9620
9643
  };
9621
9644
  /* To set cssclass for the dropdowntree */
@@ -10143,12 +10166,16 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
10143
10166
  if (!this.valueTemplate) {
10144
10167
  return null;
10145
10168
  }
10146
- if (this.valueTemplateContainer) {
10169
+ if (this.isReact && !isNullOrUndefined(this.valueTemplateContainer)) {
10170
+ detach(this.valueTemplateContainer);
10171
+ this.valueTemplateContainer = null;
10172
+ }
10173
+ else if (this.valueTemplateContainer) {
10147
10174
  while (this.valueTemplateContainer.firstChild) {
10148
10175
  this.valueTemplateContainer.removeChild(this.valueTemplateContainer.firstChild);
10149
10176
  }
10150
10177
  }
10151
- else {
10178
+ if (isNullOrUndefined(this.valueTemplateContainer)) {
10152
10179
  this.valueTemplateContainer = this.createElement('span', { className: OVERFLOW_VIEW + ' ' + SHOW_TEXT + ' ' + 'e-input-value' + ' ' + HIDEICON });
10153
10180
  }
10154
10181
  this.inputWrapper.insertBefore(this.valueTemplateContainer, this.inputEle);
@@ -11456,13 +11483,16 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
11456
11483
  if (this.dataSource instanceof DataManager) {
11457
11484
  this.dataSource.executeQuery(new Query().where(new Predicate(fields, 'equal', currentValue_1)))
11458
11485
  .then(function (e) {
11459
- if (e.result.length > 0) {
11486
+ if (e && e.result && e.result.length > 0) {
11460
11487
  _this.itemData = e.result[0];
11461
11488
  var dataItem = _this.getItemData();
11462
11489
  var value = _this.allowObjectBinding ?
11463
- _this.getDataByValue(dataItem.value) : dataItem.value;
11464
- if ((_this.value === dataItem.value && _this.text !== dataItem.text.toString()) ||
11465
- (_this.value !== dataItem.value && _this.text === dataItem.text.toString())) {
11490
+ _this.itemData : dataItem.value;
11491
+ var valueFieldValue = _this.allowObjectBinding &&
11492
+ !isNullOrUndefined(_this.value) ? getValue((_this.fields.value) ?
11493
+ _this.fields.value : '', _this.value) : _this.value;
11494
+ if ((valueFieldValue === dataItem.value && _this.text !== dataItem.text.toString()) ||
11495
+ (valueFieldValue !== dataItem.value && _this.text === dataItem.text.toString())) {
11466
11496
  _this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
11467
11497
  }
11468
11498
  }
@@ -11512,7 +11542,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
11512
11542
  this.customValue();
11513
11543
  }
11514
11544
  }
11515
- else {
11545
+ else if (!isNullOrUndefined(this.activeIndex) && !isNullOrUndefined(this.liCollections[this.activeIndex])) {
11516
11546
  this.setSelection(this.liCollections[this.activeIndex], null);
11517
11547
  }
11518
11548
  this.setHiddenValue();
@@ -14052,7 +14082,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14052
14082
  MultiSelect.prototype.dataUpdater = function (dataSource, query, fields) {
14053
14083
  this.isDataFetched = false;
14054
14084
  var isNoData = this.list.classList.contains(dropDownBaseClasses.noData);
14055
- if (this.targetElement().trim() === '') {
14085
+ if (this.targetElement().trim() === '' && (!this.allowCustomValue || this.mode === 'CheckBox' || this.targetElement() === '')) {
14056
14086
  var list = this.enableVirtualization ? this.list.cloneNode(true) : this.mainList.cloneNode ?
14057
14087
  this.mainList.cloneNode(true) : this.mainList;
14058
14088
  if (this.backCommand || (this.enableVirtualization && this.mode === 'CheckBox' && this.value && this.value.length > 0)) {
@@ -16261,7 +16291,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16261
16291
  var ulElement = _this.list.querySelector('ul');
16262
16292
  if (ulElement) {
16263
16293
  if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
16264
- _this.targetElement().trim() !== '')) {
16294
+ (_this.targetElement().trim() !== '' || (_this.targetElement() !== '' && _this.allowCustomValue)))) {
16265
16295
  _this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
16266
16296
  }
16267
16297
  }
@@ -16269,7 +16299,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
16269
16299
  }
16270
16300
  _this.popupObj.wireScrollEvents();
16271
16301
  if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
16272
- _this.targetElement().trim() !== '') && !_this.enableVirtualization) {
16302
+ (_this.targetElement().trim() !== '' || (_this.targetElement() !== '' && _this.allowCustomValue))) && !_this.enableVirtualization) {
16273
16303
  _this.loadTemplate();
16274
16304
  if (_this.enableVirtualization && _this.mode === 'CheckBox') {
16275
16305
  _this.UpdateSkeleton();