@syncfusion/ej2-dropdowns 31.2.16 → 31.2.18

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.
@@ -5902,6 +5902,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
5902
5902
  EventHandler.add(_this.clearIconElement, 'click', _this.clearText, _this);
5903
5903
  }
5904
5904
  }
5905
+ if (_this.selectedLI && _this.fields.groupBy) {
5906
+ _this.setScrollPosition();
5907
+ }
5905
5908
  popupEle_1.style.visibility = 'visible';
5906
5909
  addClass([popupEle_1], 'e-popup-close');
5907
5910
  var scrollParentElements = _this.popupObj.getScrollableParent(_this.inputWrapper.container);
@@ -21121,12 +21124,38 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
21121
21124
  this.stopTimer();
21122
21125
  var items = [];
21123
21126
  this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
21124
- if (this.value.indexOf(this.dragValue) > -1) {
21125
- args.items = this.getDataByValues(this.value);
21127
+ if (this.allowDragAll) {
21128
+ var selectedValues = [];
21129
+ if (this.selectionSettings.showCheckbox && this.allowFiltering) {
21130
+ var visibleSelected = [];
21131
+ var selectedList = this.getSelectedItems();
21132
+ for (var index = 0; index < selectedList.length; index++) {
21133
+ var formattedValue = this.getFormattedValue(selectedList[index].getAttribute('data-value'));
21134
+ visibleSelected.push(formattedValue);
21135
+ }
21136
+ selectedValues = visibleSelected.length ? visibleSelected
21137
+ : ((this.value ? this.value.slice() : []));
21138
+ }
21139
+ else {
21140
+ var selectedList = this.getSelectedItems();
21141
+ for (var index = 0; index < selectedList.length; index++) {
21142
+ var formattedValue = this.getFormattedValue(selectedList[index].getAttribute('data-value'));
21143
+ selectedValues.push(formattedValue);
21144
+ }
21145
+ }
21146
+ if (selectedValues.indexOf(this.dragValue) > -1) {
21147
+ args.items = this.getDataByValues(selectedValues);
21148
+ }
21149
+ else {
21150
+ args.items = this.getDataByValues([this.dragValue]);
21151
+ }
21126
21152
  }
21127
21153
  else {
21128
21154
  args.items = this.getDataByValues([this.dragValue]);
21129
21155
  }
21156
+ if (this.allowDragAll) {
21157
+ this.customDraggedItem = args.items;
21158
+ }
21130
21159
  extend(items, args.items);
21131
21160
  this.trigger('beforeDrop', args);
21132
21161
  if (JSON.stringify(args.items) !== JSON.stringify(items)) {
@@ -21155,6 +21184,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
21155
21184
  if (Browser.isIos) {
21156
21185
  this.list.style.overflow = '';
21157
21186
  }
21187
+ if (listObj && listObj !== this && !listObj.allowDragAndDrop) {
21188
+ return;
21189
+ }
21158
21190
  var targetListObj = this.getComponent(args.target);
21159
21191
  if (targetListObj && targetListObj.listData.length === 0) {
21160
21192
  var noRecElem = targetListObj.ulElement.childNodes[0];
@@ -23615,6 +23647,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
23615
23647
  this.isUpDownKey = false;
23616
23648
  return;
23617
23649
  }
23650
+ if (!this.allowSpaces && e.code === 'Space' && this.beforePopupOpen && this.isPopupOpen) {
23651
+ this.hidePopup();
23652
+ return;
23653
+ }
23618
23654
  this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
23619
23655
  var isRteImage = document.activeElement.parentElement && document.activeElement.parentElement.querySelector('.e-rte-image') ? true : false;
23620
23656
  if (document.activeElement !== this.inputElement && !isRteImage) {
@@ -23642,6 +23678,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
23642
23678
  if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
23643
23679
  lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
23644
23680
  }
23681
+ if (lastWordRange.includes(' ')) {
23682
+ return;
23683
+ }
23645
23684
  }
23646
23685
  var lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
23647
23686
  // eslint-disable-next-line security/detect-non-literal-regexp
@@ -23662,8 +23701,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
23662
23701
  (rangetextContent.length === 1 || rangetextContent[rangetextContent.length - 2].indexOf('') === -1 ||
23663
23702
  this.range.startContainer.nodeType === 1))) {
23664
23703
  if (isValid && this.isPopupOpen && this.allowSpaces && currentRange && currentRange.trim() !== '' && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1
23665
- && !this.isMatchedText() && (currentRange.length > 1 && currentRange.replace(/\u00A0/g, ' ').charAt(currentRange.length - 2) !== ' ') &&
23666
- (this.list && this.list.querySelectorAll('ul').length > 0) && e.code !== 'Enter') {
23704
+ && !this.isMatchedText() && this.list && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' && e.code !== 'Enter') {
23667
23705
  this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
23668
23706
  this.searchLists(e);
23669
23707
  }
@@ -23939,7 +23977,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
23939
23977
  return '';
23940
23978
  }
23941
23979
  var textValue = text.indexOf('\u200B') > -1 ? text.replace(/\u200B/g, '').replace(/\u00A0/g, ' ') : text.replace(/\u00A0/g, ' ');
23942
- var words = textValue.split(/\s+/);
23980
+ var words = this.allowSpaces && this.isPopupOpen ? [textValue] : textValue.split(/\s+/);
23943
23981
  var wordCnt = words.length - 1;
23944
23982
  return words[wordCnt].trim();
23945
23983
  };
@@ -24631,15 +24669,18 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
24631
24669
  if (!isNullOrUndefined(this.displayTemplate) && !isNullOrUndefined(this.displayTempElement)) {
24632
24670
  value = this.displayTempElement.innerHTML;
24633
24671
  }
24672
+ var rteRoot = this.inputElement.parentElement ? this.inputElement.parentElement.closest('.e-richtexteditor') : null;
24634
24673
  if (this.isContentEditable(this.inputElement)) {
24674
+ var suffix = typeof this.suffixText === 'string' ? this.suffixText : (rteRoot ? '&#8203;' : ' ');
24675
+ var chipContent = showChar + value;
24635
24676
  if (Browser.isAndroid) {
24636
- return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '&#8203;');
24677
+ return "<span contenteditable=\"true\" class=\"e-mention-chip\">" + chipContent + "</span>" + suffix;
24637
24678
  }
24638
24679
  else if (Browser.info.name === 'mozilla') {
24639
- return '<span>&#65279;<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>&#65279;</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '&#8203;');
24680
+ return "<span>&#65279;<span contenteditable=\"false\" class=\"e-mention-chip\">" + chipContent + "</span>&#65279;</span>" + suffix;
24640
24681
  }
24641
24682
  else {
24642
- return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '&#8203;');
24683
+ return "<span contenteditable=\"false\" class=\"e-mention-chip\">" + chipContent + "</span>" + suffix;
24643
24684
  }
24644
24685
  }
24645
24686
  else {