@syncfusion/ej2-dropdowns 19.4.38 → 19.4.40

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 (67) hide show
  1. package/README.md +1 -1
  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 +31 -72
  5. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es5.js +31 -73
  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 +7 -6
  12. package/src/combo-box/combo-box.js +2 -2
  13. package/src/common/incremental-search.d.ts +1 -1
  14. package/src/common/incremental-search.js +1 -1
  15. package/src/drop-down-base/drop-down-base.js +1 -13
  16. package/src/list-box/list-box.d.ts +4 -0
  17. package/src/list-box/list-box.js +3 -0
  18. package/src/multi-select/multi-select-model.d.ts +1 -1
  19. package/src/multi-select/multi-select.d.ts +0 -2
  20. package/src/multi-select/multi-select.js +24 -57
  21. package/styles/_all.scss +3 -0
  22. package/styles/auto-complete/bootstrap5-dark.css +1 -0
  23. package/styles/auto-complete/bootstrap5.css +1 -0
  24. package/styles/bootstrap5-dark.css +6 -12
  25. package/styles/bootstrap5.css +6 -12
  26. package/styles/combo-box/bootstrap5-dark.css +1 -0
  27. package/styles/combo-box/bootstrap5.css +1 -0
  28. package/styles/drop-down-list/_bootstrap5-definition.scss +1 -0
  29. package/styles/drop-down-list/bootstrap5-dark.css +1 -0
  30. package/styles/drop-down-list/bootstrap5.css +1 -0
  31. package/styles/drop-down-list/icons/_bootstrap5.scss +1 -0
  32. package/styles/drop-down-tree/_bootstrap5-definition.scss +58 -59
  33. package/styles/drop-down-tree/_layout.scss +4 -12
  34. package/styles/drop-down-tree/_tailwind-definition.scss +0 -1
  35. package/styles/drop-down-tree/bootstrap5-dark.css +4 -11
  36. package/styles/drop-down-tree/bootstrap5.css +4 -11
  37. package/styles/drop-down-tree/icons/_bootstrap5.scss +11 -11
  38. package/styles/drop-down-tree/icons/_tailwind-dark.scss +11 -11
  39. package/styles/drop-down-tree/tailwind-dark.css +0 -1
  40. package/styles/drop-down-tree/tailwind.css +0 -1
  41. package/styles/list-box/_bootstrap5-definition.scss +2 -2
  42. package/styles/list-box/_layout.scss +6 -1
  43. package/styles/list-box/bootstrap5-dark.css +1 -1
  44. package/styles/list-box/bootstrap5.css +1 -1
  45. package/styles/list-box/icons/_tailwind-dark.scss +2 -2
  46. package/styles/list-box/tailwind-dark.css +3 -3
  47. package/styles/list-box/tailwind.css +1 -1
  48. package/styles/material-dark.css +94 -0
  49. package/styles/material.css +94 -0
  50. package/styles/multi-select/_layout.scss +116 -0
  51. package/styles/multi-select/_material-dark-definition.scss +22 -0
  52. package/styles/multi-select/_material-definition.scss +22 -0
  53. package/styles/multi-select/material-dark.css +94 -0
  54. package/styles/multi-select/material.css +94 -0
  55. package/styles/tailwind-dark.css +3 -4
  56. package/styles/tailwind.css +1 -2
  57. package/styles/auto-complete/_fluent-definition.scss +0 -2
  58. package/styles/combo-box/_fluent-definition.scss +0 -2
  59. package/styles/drop-down-base/_fluent-definition.scss +0 -109
  60. package/styles/drop-down-list/_fluent-definition.scss +0 -193
  61. package/styles/drop-down-list/icons/_fluent.scss +0 -14
  62. package/styles/drop-down-tree/_fluent-definition.scss +0 -71
  63. package/styles/drop-down-tree/icons/_fluent.scss +0 -11
  64. package/styles/list-box/_fluent-definition.scss +0 -115
  65. package/styles/list-box/icons/_fluent.scss +0 -25
  66. package/styles/multi-select/_fluent-definition.scss +0 -214
  67. package/styles/multi-select/icons/_fluent.scss +0 -27
@@ -91,7 +91,7 @@ function Search(inputVal, items, searchType, ignoreCase) {
91
91
  for (var i = 0, itemsData = listItems; i < itemsData.length; i++) {
92
92
  var item = itemsData[i];
93
93
  var text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, '');
94
- if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr) || (searchType === 'EndsWith' && text.substr(text.length - queryStr.length) === queryStr) || (searchType === 'Contains' && new RegExp(queryStr, "g").test(text))) {
94
+ if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr)) {
95
95
  itemData.item = item;
96
96
  itemData.index = i;
97
97
  return { item: item, index: i };
@@ -660,7 +660,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
660
660
  }
661
661
  _this.bindChildItems(localDataArgs.result, ulElement, fields);
662
662
  setTimeout(function () {
663
- if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
663
+ if (_this.getModuleName() === 'multiselect' && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
664
664
  _this.updateDataList();
665
665
  }
666
666
  });
@@ -795,22 +795,10 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
795
795
  var groupValue = select(this.groupTemplate, document).innerHTML.trim();
796
796
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
797
797
  var tempHeaders = ListBase.renderGroupTemplate(groupValue, dataSource, this.fields.properties, headerItems, option, this);
798
- //EJ2-55168- Group checkbox is not working with group template
799
- if (this.isGroupChecking) {
800
- for (var i = 0; i < tempHeaders.length; i++) {
801
- this.notify('addItem', { module: 'CheckBoxSelection', item: tempHeaders[i] });
802
- }
803
- }
804
798
  }
805
799
  else {
806
800
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
807
801
  var tempHeaders = ListBase.renderGroupTemplate(this.groupTemplate, dataSource, this.fields.properties, headerItems, option, this);
808
- //EJ2-55168- Group checkbox is not working with group template
809
- if (this.isGroupChecking) {
810
- for (var i = 0; i < tempHeaders.length; i++) {
811
- this.notify('addItem', { module: 'CheckBoxSelection', item: tempHeaders[i] });
812
- }
813
- }
814
802
  }
815
803
  this.renderReactTemplates();
816
804
  }
@@ -7564,7 +7552,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
7564
7552
  if ((Browser.isDevice && !this.isDropDownClick || !Browser.isDevice) &&
7565
7553
  !isNullOrUndefined(this.liCollections) && this.liCollections.length > 0) {
7566
7554
  var inputValue = this.inputElement.value;
7567
- var activeItem = Search(inputValue, this.liCollections, this.filterType, true);
7555
+ var activeItem = Search(inputValue, this.liCollections, 'StartsWith', true);
7568
7556
  var activeElement = activeItem.item;
7569
7557
  if (!isNullOrUndefined(activeElement)) {
7570
7558
  var count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
@@ -7721,7 +7709,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
7721
7709
  else {
7722
7710
  this.activeIndex = null;
7723
7711
  this.removeSelection();
7724
- if (this.liCollections && this.liCollections.length > 0 && !this.isCustomFilter) {
7712
+ if (this.liCollections && this.liCollections.length < 0) {
7725
7713
  this.removeFocus();
7726
7714
  }
7727
7715
  }
@@ -9149,7 +9137,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9149
9137
  this.mainData = list;
9150
9138
  this.mainListCollection = this.liCollections;
9151
9139
  }
9152
- else if (isNullOrUndefined(this.mainData) || this.mainData.length === 0) {
9140
+ else if (!isNullOrUndefined(this.mainData) && this.mainData.length === 0) {
9153
9141
  this.mainData = list;
9154
9142
  }
9155
9143
  if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering &&
@@ -11171,9 +11159,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11171
11159
  MultiSelect.prototype.updateActionCompleteData = function (li, item) {
11172
11160
  if (this.value && this.value.indexOf(li.getAttribute('data-value')) > -1) {
11173
11161
  this.mainList = this.ulElement;
11174
- if (this.hideSelectedItem) {
11175
- addClass([li], HIDE_LIST);
11176
- }
11162
+ addClass([li], HIDE_LIST);
11177
11163
  }
11178
11164
  };
11179
11165
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -12237,25 +12223,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12237
12223
  }
12238
12224
  this.renderPopup();
12239
12225
  };
12240
- MultiSelect.prototype.presentItemValue = function (ulElement) {
12241
- var valuecheck = [];
12242
- for (var i = 0; i < this.value.length; i++) {
12243
- var checkEle = this.findListElement(((this.allowFiltering && !isNullOrUndefined(this.mainList)) ? this.mainList : ulElement), 'li', 'data-value', this.value[i]);
12244
- if (!checkEle) {
12245
- valuecheck.push(this.value[i]);
12246
- }
12247
- }
12248
- return valuecheck;
12249
- };
12250
-
12251
- MultiSelect.prototype.addNonPresentItems = function (valuecheck, ulElement, list, event) {
12252
- var _this = this;
12253
- this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function (e) {
12254
- _this.addItem(e.result, list.length);
12255
- _this.updateActionList(ulElement, list, event);
12256
- });
12257
- };
12258
-
12259
12226
  MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
12260
12227
  if (!this.list) {
12261
12228
  this.onLoadSelect();
@@ -12264,43 +12231,31 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
12264
12231
  this.onLoadSelect();
12265
12232
  }
12266
12233
  else {
12267
- var valuecheck = [];
12268
- if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
12269
- valuecheck = this.presentItemValue(this.ulElement);
12234
+ if (prop === 'text') {
12235
+ this.initialTextUpdate();
12236
+ newProp = this.value;
12270
12237
  }
12271
- if (prop == 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
12272
- && this.listData != null) {
12273
- this.mainData = null;
12274
- this.setDynValue = true;
12275
- this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
12238
+ if (isNullOrUndefined(this.value) || this.value.length === 0) {
12239
+ this.tempValues = oldProp;
12276
12240
  }
12277
- else {
12278
- if (prop === 'text') {
12279
- this.initialTextUpdate();
12280
- newProp = this.value;
12281
- }
12282
- if (isNullOrUndefined(this.value) || this.value.length === 0) {
12283
- this.tempValues = oldProp;
12284
- }
12285
- // eslint-disable-next-line
12286
- if (this.allowCustomValue && (this.mode === 'Default' || this.mode === 'Box') && this.isReact && this.inputFocus
12287
- && this.isPopupOpen() && this.mainData !== this.listData) {
12288
- var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
12289
- this.onActionComplete(list, this.mainData);
12290
- }
12291
- this.initialValueUpdate();
12292
- if (this.mode !== 'Box' && !this.inputFocus) {
12293
- this.updateDelimView();
12294
- }
12295
- if (!this.inputFocus) {
12296
- this.refreshInputHight();
12297
- }
12298
- this.refreshPlaceHolder();
12299
- if (this.mode !== 'CheckBox' && this.changeOnBlur) {
12300
- this.updateValueState(null, newProp, oldProp);
12301
- }
12302
- this.checkPlaceholderSize();
12241
+ // eslint-disable-next-line
12242
+ if (this.allowCustomValue && (this.mode === 'Default' || this.mode === 'Box') && this.isReact && this.inputFocus
12243
+ && this.isPopupOpen() && this.mainData !== this.listData) {
12244
+ var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
12245
+ this.onActionComplete(list, this.mainData);
12246
+ }
12247
+ this.initialValueUpdate();
12248
+ if (this.mode !== 'Box' && !this.inputFocus) {
12249
+ this.updateDelimView();
12250
+ }
12251
+ if (!this.inputFocus) {
12252
+ this.refreshInputHight();
12303
12253
  }
12254
+ this.refreshPlaceHolder();
12255
+ if (this.mode !== 'CheckBox' && this.changeOnBlur) {
12256
+ this.updateValueState(null, newProp, oldProp);
12257
+ }
12258
+ this.checkPlaceholderSize();
12304
12259
  }
12305
12260
  if (!this.changeOnBlur) {
12306
12261
  this.updateValueState(null, newProp, oldProp);
@@ -13813,6 +13768,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
13813
13768
  args.items = this.getDataByValues([dragValue]);
13814
13769
  }
13815
13770
  this.trigger('beforeDrop', args);
13771
+ if (args.isDragAll !== null) {
13772
+ this.allowDragAll = args.isDragAll;
13773
+ }
13816
13774
  };
13817
13775
  ListBox.prototype.dragEnd = function (args) {
13818
13776
  var _this = this;