@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
@@ -1323,11 +1323,13 @@ let DropDownBase = class DropDownBase extends Component {
1323
1323
  else {
1324
1324
  item = this.typeOfData(this.listData);
1325
1325
  }
1326
- if (typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'number' ||
1326
+ if (!isNullOrUndefined(item.item) &&
1327
+ typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'number' ||
1327
1328
  item.typeof === 'number') {
1328
1329
  return parseFloat(value);
1329
1330
  }
1330
- if (typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'boolean' ||
1331
+ if (!isNullOrUndefined(item.item) &&
1332
+ typeof getValue((this.fields.value ? this.fields.value : 'value'), item.item) === 'boolean' ||
1331
1333
  item.typeof === 'boolean') {
1332
1334
  return ((value === 'true') || ('' + value === 'true'));
1333
1335
  }
@@ -2205,7 +2207,7 @@ let DropDownBase = class DropDownBase extends Component {
2205
2207
  this.renderGroupTemplate(this.fixedHeaderElement);
2206
2208
  }
2207
2209
  updateGroupFixedHeader(element, target) {
2208
- if (this.fixedHeaderElement) {
2210
+ if (this.fixedHeaderElement && this.list && this.list.parentElement) {
2209
2211
  if (!isNullOrUndefined(element.innerHTML)) {
2210
2212
  if (this.groupTemplate && this.isAngular && this.getModuleName() === 'multiselect') {
2211
2213
  this.updateFixedGroupTemplateHader(element);
@@ -2952,7 +2954,13 @@ let DropDownBase = class DropDownBase extends Component {
2952
2954
  */
2953
2955
  destroy() {
2954
2956
  if (document) {
2955
- EventHandler.remove(document, 'scroll', this.updateGroupFixedHeader);
2957
+ if (this.fields && this.fields.groupBy) {
2958
+ const elements = this.getScrollableParent();
2959
+ for (let i = 0; i < elements.length; i++) {
2960
+ const ele = elements[i];
2961
+ EventHandler.remove(ele, 'scroll', this.updateGroupFixedHeader);
2962
+ }
2963
+ }
2956
2964
  if (document.body.contains(this.list)) {
2957
2965
  EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
2958
2966
  if (!isNullOrUndefined(this.rippleFun)) {
@@ -5568,6 +5576,13 @@ let DropDownList = class DropDownList extends DropDownBase {
5568
5576
  }
5569
5577
  else {
5570
5578
  this.removeFocus();
5579
+ if (this.allowFiltering && this.actionCompleteData && this.actionCompleteData.ulElement &&
5580
+ this.dataSource instanceof DataManager) {
5581
+ const focus = this.actionCompleteData.ulElement.querySelector('.e-item-focus');
5582
+ if (focus) {
5583
+ removeClass(focus, dropDownListClasses.focus);
5584
+ }
5585
+ }
5571
5586
  this.list.querySelector('.' + dropDownBaseClasses.li).classList.add(dropDownListClasses.focus);
5572
5587
  }
5573
5588
  }
@@ -8206,6 +8221,10 @@ let DropDownTree = class DropDownTree extends Component {
8206
8221
  }
8207
8222
  /* Handles touch events specifically for iOS devices */
8208
8223
  handleIosTouch(e) {
8224
+ const target = e.target;
8225
+ if (target && target.classList.contains('e-clear-icon')) {
8226
+ return;
8227
+ }
8209
8228
  e.preventDefault();
8210
8229
  this.dropDownClick(e);
8211
8230
  }
@@ -9422,11 +9441,15 @@ let DropDownTree = class DropDownTree extends Component {
9422
9441
  }
9423
9442
  }
9424
9443
  restoreFilterSelection() {
9444
+ if (this.treeObj.checkedNodes) {
9445
+ this.treeObj.checkedNodes = [];
9446
+ }
9447
+ const nodeIds = Array.isArray(this.value) ? this.value : [];
9425
9448
  if (this.showCheckBox) {
9426
- this.treeObj.checkedNodes = this.value ? this.value : [];
9449
+ this.treeObj.checkedNodes = nodeIds;
9427
9450
  }
9428
9451
  else {
9429
- this.treeObj.selectedNodes = this.value ? this.value : [];
9452
+ this.treeObj.selectedNodes = nodeIds;
9430
9453
  }
9431
9454
  }
9432
9455
  /* To set cssclass for the dropdowntree */
@@ -9953,12 +9976,16 @@ let DropDownTree = class DropDownTree extends Component {
9953
9976
  if (!this.valueTemplate) {
9954
9977
  return null;
9955
9978
  }
9956
- if (this.valueTemplateContainer) {
9979
+ if (this.isReact && !isNullOrUndefined(this.valueTemplateContainer)) {
9980
+ detach(this.valueTemplateContainer);
9981
+ this.valueTemplateContainer = null;
9982
+ }
9983
+ else if (this.valueTemplateContainer) {
9957
9984
  while (this.valueTemplateContainer.firstChild) {
9958
9985
  this.valueTemplateContainer.removeChild(this.valueTemplateContainer.firstChild);
9959
9986
  }
9960
9987
  }
9961
- else {
9988
+ if (isNullOrUndefined(this.valueTemplateContainer)) {
9962
9989
  this.valueTemplateContainer = this.createElement('span', { className: OVERFLOW_VIEW + ' ' + SHOW_TEXT + ' ' + 'e-input-value' + ' ' + HIDEICON });
9963
9990
  }
9964
9991
  this.inputWrapper.insertBefore(this.valueTemplateContainer, this.inputEle);
@@ -11243,13 +11270,16 @@ let ComboBox = class ComboBox extends DropDownList {
11243
11270
  if (this.dataSource instanceof DataManager) {
11244
11271
  this.dataSource.executeQuery(new Query().where(new Predicate(fields, 'equal', currentValue)))
11245
11272
  .then((e) => {
11246
- if (e.result.length > 0) {
11273
+ if (e && e.result && e.result.length > 0) {
11247
11274
  this.itemData = e.result[0];
11248
11275
  const dataItem = this.getItemData();
11249
11276
  const value = this.allowObjectBinding ?
11250
- this.getDataByValue(dataItem.value) : dataItem.value;
11251
- if ((this.value === dataItem.value && this.text !== dataItem.text.toString()) ||
11252
- (this.value !== dataItem.value && this.text === dataItem.text.toString())) {
11277
+ this.itemData : dataItem.value;
11278
+ const valueFieldValue = this.allowObjectBinding &&
11279
+ !isNullOrUndefined(this.value) ? getValue((this.fields.value) ?
11280
+ this.fields.value : '', this.value) : this.value;
11281
+ if ((valueFieldValue === dataItem.value && this.text !== dataItem.text.toString()) ||
11282
+ (valueFieldValue !== dataItem.value && this.text === dataItem.text.toString())) {
11253
11283
  this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
11254
11284
  }
11255
11285
  }
@@ -11299,7 +11329,7 @@ let ComboBox = class ComboBox extends DropDownList {
11299
11329
  this.customValue();
11300
11330
  }
11301
11331
  }
11302
- else {
11332
+ else if (!isNullOrUndefined(this.activeIndex) && !isNullOrUndefined(this.liCollections[this.activeIndex])) {
11303
11333
  this.setSelection(this.liCollections[this.activeIndex], null);
11304
11334
  }
11305
11335
  this.setHiddenValue();
@@ -13796,7 +13826,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13796
13826
  dataUpdater(dataSource, query, fields) {
13797
13827
  this.isDataFetched = false;
13798
13828
  const isNoData = this.list.classList.contains(dropDownBaseClasses.noData);
13799
- if (this.targetElement().trim() === '') {
13829
+ if (this.targetElement().trim() === '' && (!this.allowCustomValue || this.mode === 'CheckBox' || this.targetElement() === '')) {
13800
13830
  const list = this.enableVirtualization ? this.list.cloneNode(true) : this.mainList.cloneNode ?
13801
13831
  this.mainList.cloneNode(true) : this.mainList;
13802
13832
  if (this.backCommand || (this.enableVirtualization && this.mode === 'CheckBox' && this.value && this.value.length > 0)) {
@@ -15988,7 +16018,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15988
16018
  const ulElement = this.list.querySelector('ul');
15989
16019
  if (ulElement) {
15990
16020
  if (!(this.mode !== 'CheckBox' && (this.allowFiltering || this.allowCustomValue) &&
15991
- this.targetElement().trim() !== '')) {
16021
+ (this.targetElement().trim() !== '' || (this.targetElement() !== '' && this.allowCustomValue)))) {
15992
16022
  this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
15993
16023
  }
15994
16024
  }
@@ -15996,7 +16026,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
15996
16026
  }
15997
16027
  this.popupObj.wireScrollEvents();
15998
16028
  if (!(this.mode !== 'CheckBox' && (this.allowFiltering || this.allowCustomValue) &&
15999
- this.targetElement().trim() !== '') && !this.enableVirtualization) {
16029
+ (this.targetElement().trim() !== '' || (this.targetElement() !== '' && this.allowCustomValue))) && !this.enableVirtualization) {
16000
16030
  this.loadTemplate();
16001
16031
  if (this.enableVirtualization && this.mode === 'CheckBox') {
16002
16032
  this.UpdateSkeleton();