@syncfusion/ej2-dropdowns 33.2.6 → 33.2.8

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 (33) 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 +46 -6
  5. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  6. package/dist/es6/ej2-dropdowns.es5.js +47 -6
  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 +4 -4
  12. package/src/drop-down-base/drop-down-base.js +2 -1
  13. package/src/drop-down-list/drop-down-list.js +3 -0
  14. package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
  15. package/src/drop-down-tree/drop-down-tree.js +13 -0
  16. package/src/mention/mention.js +5 -1
  17. package/src/multi-select/multi-select.d.ts +1 -0
  18. package/src/multi-select/multi-select.js +24 -4
  19. package/styles/bds-lite.css +2 -2
  20. package/styles/bds.css +4 -4
  21. package/styles/drop-down-tree/_bigger.scss +25 -4
  22. package/styles/drop-down-tree/_layout.scss +18 -3
  23. package/styles/drop-down-tree/_material3-dark-definition.scss +2 -0
  24. package/styles/drop-down-tree/_material3-definition.scss +2 -0
  25. package/styles/drop-down-tree/_theme.scss +9 -1
  26. package/styles/drop-down-tree/material3-dark.css +244 -1
  27. package/styles/drop-down-tree/material3.css +244 -1
  28. package/styles/material3-dark-lite.css +106 -1
  29. package/styles/material3-dark.css +244 -1
  30. package/styles/material3-lite.css +106 -1
  31. package/styles/material3.css +244 -1
  32. package/styles/multi-select/_bds-definition.scss +4 -4
  33. package/styles/multi-select/bds.css +4 -4
@@ -3124,7 +3124,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
3124
3124
  else {
3125
3125
  for (var _b = 0, _c = this.listData; _b < _c.length; _b++) {
3126
3126
  var item = _c[_b];
3127
- if (!isNullOrUndefined(item) && getValue((this.fields.value ? this.fields.value : 'value'), item) === value) {
3127
+ if (!isNullOrUndefined(item) && (getValue((this.fields.value ? this.fields.value : 'value'), item) === value
3128
+ || this.getModuleName() === 'multiselect' && this.isVirtualizationEnabled && this.properties.allowCustomValue && getValue((this.fields.value ? this.fields.value : 'value'), item) === value.toString())) {
3128
3129
  return item;
3129
3130
  }
3130
3131
  }
@@ -4863,6 +4864,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
4863
4864
  (this.previousValue != null && this.isObjectInArray(this.previousValue, [this.allowCustom &&
4864
4865
  this.isObjectCustomValue ? this.value ? this.value : dataItem : dataItem.value ?
4865
4866
  this.getDataByValue(dataItem.value) : dataItem])))) {
4867
+ if (this.getModuleName() === 'combobox' && this.autoFill && e && (e.type === 'click' || e.action === 'enter')) {
4868
+ return false;
4869
+ }
4866
4870
  this.isSelected = false;
4867
4871
  return true;
4868
4872
  }
@@ -8276,6 +8280,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8276
8280
  // Specifies if the checkAll method has been called
8277
8281
  _this.isCheckAllCalled = false;
8278
8282
  _this.isFromFilterChange = false;
8283
+ _this.fallbackValue = [];
8279
8284
  return _this;
8280
8285
  }
8281
8286
  /**
@@ -9526,6 +9531,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9526
9531
  };
9527
9532
  DropDownTree.prototype.setTreeValue = function () {
9528
9533
  if (this.value !== null && this.value.length !== 0) {
9534
+ var dataReady = this.treeItems && this.treeItems.length > 0;
9535
+ if (!dataReady && this.fallbackValue.length === 0) {
9536
+ this.fallbackValue = this.value.slice();
9537
+ }
9529
9538
  var data = void 0;
9530
9539
  if (this.showCheckBox || this.allowMultiSelection) {
9531
9540
  for (var i = this.value.length - 1; i >= 0; i--) {
@@ -11179,6 +11188,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
11179
11188
  * @private
11180
11189
  */
11181
11190
  DropDownTree.prototype.onPropertyChanged = function (newProp, oldProp) {
11191
+ var _this = this;
11182
11192
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
11183
11193
  var prop = _a[_i];
11184
11194
  switch (prop) {
@@ -11199,6 +11209,13 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
11199
11209
  break;
11200
11210
  case 'fields':
11201
11211
  this.setFields();
11212
+ setTimeout(function () {
11213
+ if (_this.value.length === 0 && _this.fallbackValue.length > 0) {
11214
+ _this.value = _this.fallbackValue;
11215
+ _this.updateValue(_this.fallbackValue);
11216
+ _this.fallbackValue = [];
11217
+ }
11218
+ }, 1);
11202
11219
  break;
11203
11220
  case 'readonly':
11204
11221
  Input.setReadonly(newProp.readonly, this.inputEle);
@@ -14190,7 +14207,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14190
14207
  else {
14191
14208
  this.updateActionList(ulElement, list, e);
14192
14209
  }
14193
- if (this.dataSource instanceof DataManager && this.allowCustomValue && !this.isCustomRendered &&
14210
+ if (this.dataSource instanceof DataManager && this.allowCustomValue && (!this.isCustomRendered || this.enableVirtualization) &&
14194
14211
  this.inputElement.value && this.inputElement.value !== '') {
14195
14212
  var query = new Query();
14196
14213
  query = this.allowFiltering ? query.where(this.fields.text, 'startswith', this.inputElement.value, this.ignoreCase, this.ignoreAccent) : query;
@@ -14679,8 +14696,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14679
14696
  window.crypto.getRandomValues(array);
14680
14697
  return array[0] / (0xFFFFFFFF + 1);
14681
14698
  };
14699
+ MultiSelect.prototype.isInvalidString = function (value) {
14700
+ return !value || value.trim().length === 0;
14701
+ };
14682
14702
  MultiSelect.prototype.checkForCustomValue = function (query, fields) {
14683
- var dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase);
14703
+ var dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase) &&
14704
+ !this.isInvalidString(this.inputElement.value);
14684
14705
  var field = fields ? fields : this.fields;
14685
14706
  this.isCustomReset = true;
14686
14707
  if (this.allowCustomValue && dataChecks) {
@@ -14714,7 +14735,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14714
14735
  if (this.enableVirtualization) {
14715
14736
  this.virtualCustomData = dataItem_1;
14716
14737
  var tempData = this.dataSource instanceof DataManager ?
14717
- JSON.parse(JSON.stringify(this.listData)) : JSON.parse(JSON.stringify(this.dataSource));
14738
+ JSON.parse(JSON.stringify(this.mainData)) : JSON.parse(JSON.stringify(this.dataSource));
14718
14739
  var totalData = [];
14719
14740
  if (this.virtualCustomSelectData && this.virtualCustomSelectData.length > 0) {
14720
14741
  totalData = tempData.concat(this.virtualCustomSelectData);
@@ -17640,7 +17661,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
17640
17661
  this.allowCustomValue &&
17641
17662
  ((!(this.dataSource instanceof DataManager)) ||
17642
17663
  (this.dataSource instanceof DataManager && isInitialVirtualData)))) {
17643
- var indexItem = this.listData.length;
17664
+ var indexItem = this.dataSource instanceof DataManager ? this.totalItemCount : this.listData.length;
17644
17665
  var newValue = {};
17645
17666
  setValue(this.fields.text, value_2, newValue);
17646
17667
  setValue(this.fields.value, value_2, newValue);
@@ -18357,12 +18378,24 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
18357
18378
  temp = this.viewWrapper.innerHTML;
18358
18379
  this.updateWrapperText(this.viewWrapper, data);
18359
18380
  }
18381
+ var display = void 0;
18382
+ var topElement = void 0;
18383
+ if (this.componentWrapper.offsetWidth === 0 && this.componentWrapper.parentElement) {
18384
+ topElement = this.componentWrapper.parentElement.parentElement;
18385
+ if (!isNullOrUndefined(topElement) && topElement.style.display === 'none') {
18386
+ display = topElement.style.display;
18387
+ topElement.style.display = 'block';
18388
+ }
18389
+ }
18360
18390
  wrapperleng = this.viewWrapper.offsetWidth +
18361
18391
  parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
18362
18392
  parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
18363
18393
  overAllContainer = this.componentWrapper.offsetWidth -
18364
18394
  parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
18365
18395
  parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
18396
+ if (!isNullOrUndefined(display) && display === 'none' && !isNullOrUndefined(topElement)) {
18397
+ topElement.style.display = 'none';
18398
+ }
18366
18399
  if ((wrapperleng + downIconWidth + this.clearIconWidth) > overAllContainer) {
18367
18400
  if (tempData !== undefined && tempData !== '') {
18368
18401
  temp = tempData;
@@ -20119,6 +20152,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
20119
20152
  }, 100);
20120
20153
  _this.initStatus = true;
20121
20154
  }
20155
+ else {
20156
+ _this.initialValueUpdate(_this.value, true, isInitialRender);
20157
+ _this.initialUpdate();
20158
+ }
20122
20159
  });
20123
20160
  }
20124
20161
  else {
@@ -24430,8 +24467,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
24430
24467
  ? lastWordRange.substring(lastWordRange.lastIndexOf(this.mentionChar) + 1).trim()
24431
24468
  : lastWordRange.replace(this.mentionChar, '');
24432
24469
  }
24470
+ if (this.queryString !== '' && e.keyCode === 8 && lastWordRange.includes(this.mentionChar) && !this.isPopupOpen &&
24471
+ ((typeof this.displayTemplate === 'function' ? this.displayTemplate() : this.displayTemplate)).includes(this.mentionChar)) {
24472
+ this.queryString = '';
24473
+ }
24433
24474
  if (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) &&
24434
- this.queryString !== '' && e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8 && !this.lineBreak) {
24475
+ this.queryString !== '' && e.keyCode !== 38 && e.keyCode !== 40 && !this.lineBreak) {
24435
24476
  this.searchLists(e);
24436
24477
  if (!this.isPopupOpen && this.queryString.length >= this.minLength) {
24437
24478
  if (!this.isContentEditable(this.inputElement)) {