@syncfusion/ej2-dropdowns 26.2.10 → 26.2.13

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.
@@ -2786,6 +2786,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2786
2786
  _this.isListSearched = false;
2787
2787
  _this.preventChange = false;
2788
2788
  _this.isTouched = false;
2789
+ _this.isFocused = false;
2789
2790
  _this.IsScrollerAtEnd = function () {
2790
2791
  return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
2791
2792
  };
@@ -3202,6 +3203,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3202
3203
  this.isActive = false;
3203
3204
  this.beforePopupOpen = false;
3204
3205
  }
3206
+ this.isFocused = false;
3205
3207
  };
3206
3208
  DropDownList.prototype.focusOutAction = function (e) {
3207
3209
  this.isInteracted = false;
@@ -3233,6 +3235,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3233
3235
  this.trigger('focus', args);
3234
3236
  }
3235
3237
  this.updateIconState();
3238
+ this.isFocused = true;
3236
3239
  };
3237
3240
  DropDownList.prototype.resetValueHandler = function (e) {
3238
3241
  var formElement = closest(this.inputElement, 'form');
@@ -8269,10 +8272,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8269
8272
  }
8270
8273
  else {
8271
8274
  if (this.showCheckBox) {
8272
- var difference = this.value.filter(function (e) {
8275
+ var difference = this.value.length !== this.treeObj.checkedNodes.length || this.value.filter(function (e) {
8273
8276
  return _this.treeObj.checkedNodes.indexOf(e) === -1;
8274
- });
8275
- if (difference.length > 0 || this.treeSettings.autoCheck) {
8277
+ }).length > 0;
8278
+ if (difference || this.treeSettings.autoCheck) {
8276
8279
  this.treeObj.checkedNodes = this.value.slice();
8277
8280
  this.treeObj.dataBind();
8278
8281
  this.setMultiSelect();
@@ -8288,7 +8291,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8288
8291
  this.currentText = this.text;
8289
8292
  this.currentValue = this.value;
8290
8293
  if (!isNullOrUndefined(this.value) && this.value.length > 0 && !isNullOrUndefined(this.currentText)) {
8291
- this.inputWrapper.setAttribute('aria-label', this.currentText.split(',').join(' '));
8294
+ this.inputWrapper.setAttribute('aria-label', this.currentText.replace(/,/g, ', '));
8292
8295
  }
8293
8296
  if (this.isInitialized) {
8294
8297
  this.triggerChangeEvent();
@@ -9211,7 +9214,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
9211
9214
  this.currentText = this.text;
9212
9215
  this.currentValue = this.value;
9213
9216
  if (!isNullOrUndefined(this.value) && this.value.length > 0 && !isNullOrUndefined(this.currentText)) {
9214
- this.inputWrapper.setAttribute('aria-label', this.currentText.split(',').join(' '));
9217
+ this.inputWrapper.setAttribute('aria-label', this.currentText.replace(/,/g, ', '));
9215
9218
  }
9216
9219
  else {
9217
9220
  this.inputWrapper.setAttribute('aria-label', this.getModuleName());
@@ -10881,7 +10884,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
10881
10884
  }
10882
10885
  }
10883
10886
  }
10884
- else if (this.allowCustom && this.isInteracted) {
10887
+ else if (this.allowCustom && this.isFocused) {
10885
10888
  this.isSelectCustom = true;
10886
10889
  }
10887
10890
  };
@@ -14911,6 +14914,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14911
14914
  if (this.enabled && !this.readonly) {
14912
14915
  var temp = void 0;
14913
14916
  if (this.value && this.value.length > 0) {
14917
+ if (this.allowFiltering) {
14918
+ this.refreshListItems(null);
14919
+ if (this.mode === 'CheckBox' && this.targetInputElement) {
14920
+ this.targetInputElement.value = '';
14921
+ }
14922
+ }
14914
14923
  var liElement = this.list && this.list.querySelectorAll('li.e-list-item');
14915
14924
  if (liElement && liElement.length > 0) {
14916
14925
  this.selectAllItems(false, e);
@@ -14928,6 +14937,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14928
14937
  this.clearAllCallback(e);
14929
14938
  }
14930
14939
  this.checkAndResetCache();
14940
+ Input.createSpanElement(this.overAllWrapper, this.createElement);
14941
+ this.calculateWidth();
14942
+ if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
14943
+ this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
14944
+ }
14931
14945
  if (this.enableVirtualization) {
14932
14946
  this.updateInitialData();
14933
14947
  if (this.chipCollectionWrapper) {
@@ -14996,11 +15010,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
14996
15010
  }
14997
15011
  };
14998
15012
  MultiSelect.prototype.resetValueHandler = function (e) {
14999
- var formElement = closest(this.inputElement, 'form');
15000
- if (formElement && e.target === formElement) {
15001
- var textVal = (this.element.tagName === this.getNgDirective()) ?
15002
- null : this.element.getAttribute('data-initial-value');
15003
- this.text = textVal;
15013
+ if (!isNullOrUndefined(this.inputElement)) {
15014
+ var formElement = closest(this.inputElement, 'form');
15015
+ if (formElement && e.target === formElement) {
15016
+ var textVal = (this.element.tagName === this.getNgDirective()) ?
15017
+ null : this.element.getAttribute('data-initial-value');
15018
+ this.text = textVal;
15019
+ }
15004
15020
  }
15005
15021
  };
15006
15022
  MultiSelect.prototype.wireEvent = function () {
@@ -18126,13 +18142,21 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
18126
18142
  CheckBoxSelection.prototype.setSearchBoxPosition = function () {
18127
18143
  var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
18128
18144
  var selectAllHeight = 0;
18145
+ var footerHeight = 0;
18146
+ var headerHeight = 0;
18129
18147
  if (this.checkAllParent) {
18130
18148
  selectAllHeight = this.checkAllParent.getBoundingClientRect().height;
18131
18149
  }
18150
+ if (this.parent.header) {
18151
+ headerHeight = this.parent.header.getBoundingClientRect().height;
18152
+ }
18153
+ if (this.parent.footer) {
18154
+ footerHeight = this.parent.footer.getBoundingClientRect().height;
18155
+ }
18132
18156
  this.parent.popupObj.element.style.maxHeight = '100%';
18133
18157
  this.parent.popupObj.element.style.width = '100%';
18134
- this.parent.list.style.maxHeight = (window.innerHeight - searchBoxHeight - selectAllHeight) + 'px';
18135
- this.parent.list.style.height = (window.innerHeight - searchBoxHeight - selectAllHeight) + 'px';
18158
+ this.parent.list.style.maxHeight = (window.innerHeight - searchBoxHeight - selectAllHeight - headerHeight - footerHeight) + 'px';
18159
+ this.parent.list.style.height = (window.innerHeight - searchBoxHeight - selectAllHeight - headerHeight - footerHeight) + 'px';
18136
18160
  var clearElement = this.filterInput.parentElement.querySelector('.' + clearIcon);
18137
18161
  detach(this.filterInput);
18138
18162
  clearElement.parentElement.insertBefore(this.filterInput, clearElement);
@@ -21542,7 +21566,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
21542
21566
  if (isNullOrUndefined(text)) {
21543
21567
  return '';
21544
21568
  }
21545
- var textValue = text.replace(/\u00A0/g, ' ');
21569
+ var textValue = text.indexOf('\u200B') > -1 ? text.replace(/\u200B/g, '').replace(/\u00A0/g, ' ') : text.replace(/\u00A0/g, ' ');
21546
21570
  var words = textValue.split(/\s+/);
21547
21571
  var wordCnt = words.length - 1;
21548
21572
  return words[wordCnt].trim();
@@ -22194,7 +22218,13 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
22194
22218
  range.insertNode(frag);
22195
22219
  if (lastNode) {
22196
22220
  range = range.cloneRange();
22197
- range.setStartAfter(lastNode);
22221
+ if (this.isRTE) {
22222
+ range.setStart(lastNode, 0);
22223
+ range.setEnd(lastNode, lastNode.textContent.length);
22224
+ }
22225
+ else {
22226
+ range.setStartAfter(lastNode);
22227
+ }
22198
22228
  range.collapse(true);
22199
22229
  selection.removeAllRanges();
22200
22230
  selection.addRange(range);