@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.
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +49 -8
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +49 -8
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/drop-down-list/drop-down-list.js +3 -0
- package/src/list-box/list-box.js +31 -2
- package/src/mention/mention.js +15 -6
- package/aceconfig.js +0 -17
|
@@ -5778,6 +5778,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5778
5778
|
EventHandler.add(this.clearIconElement, 'click', this.clearText, this);
|
|
5779
5779
|
}
|
|
5780
5780
|
}
|
|
5781
|
+
if (this.selectedLI && this.fields.groupBy) {
|
|
5782
|
+
this.setScrollPosition();
|
|
5783
|
+
}
|
|
5781
5784
|
popupEle.style.visibility = 'visible';
|
|
5782
5785
|
addClass([popupEle], 'e-popup-close');
|
|
5783
5786
|
const scrollParentElements = this.popupObj.getScrollableParent(this.inputWrapper.container);
|
|
@@ -20787,12 +20790,38 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20787
20790
|
this.stopTimer();
|
|
20788
20791
|
const items = [];
|
|
20789
20792
|
this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
|
|
20790
|
-
if (this.
|
|
20791
|
-
|
|
20793
|
+
if (this.allowDragAll) {
|
|
20794
|
+
let selectedValues = [];
|
|
20795
|
+
if (this.selectionSettings.showCheckbox && this.allowFiltering) {
|
|
20796
|
+
const visibleSelected = [];
|
|
20797
|
+
const selectedList = this.getSelectedItems();
|
|
20798
|
+
for (let index = 0; index < selectedList.length; index++) {
|
|
20799
|
+
const formattedValue = this.getFormattedValue(selectedList[index].getAttribute('data-value'));
|
|
20800
|
+
visibleSelected.push(formattedValue);
|
|
20801
|
+
}
|
|
20802
|
+
selectedValues = visibleSelected.length ? visibleSelected
|
|
20803
|
+
: ((this.value ? this.value.slice() : []));
|
|
20804
|
+
}
|
|
20805
|
+
else {
|
|
20806
|
+
const selectedList = this.getSelectedItems();
|
|
20807
|
+
for (let index = 0; index < selectedList.length; index++) {
|
|
20808
|
+
const formattedValue = this.getFormattedValue(selectedList[index].getAttribute('data-value'));
|
|
20809
|
+
selectedValues.push(formattedValue);
|
|
20810
|
+
}
|
|
20811
|
+
}
|
|
20812
|
+
if (selectedValues.indexOf(this.dragValue) > -1) {
|
|
20813
|
+
args.items = this.getDataByValues(selectedValues);
|
|
20814
|
+
}
|
|
20815
|
+
else {
|
|
20816
|
+
args.items = this.getDataByValues([this.dragValue]);
|
|
20817
|
+
}
|
|
20792
20818
|
}
|
|
20793
20819
|
else {
|
|
20794
20820
|
args.items = this.getDataByValues([this.dragValue]);
|
|
20795
20821
|
}
|
|
20822
|
+
if (this.allowDragAll) {
|
|
20823
|
+
this.customDraggedItem = args.items;
|
|
20824
|
+
}
|
|
20796
20825
|
extend(items, args.items);
|
|
20797
20826
|
this.trigger('beforeDrop', args);
|
|
20798
20827
|
if (JSON.stringify(args.items) !== JSON.stringify(items)) {
|
|
@@ -20820,6 +20849,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20820
20849
|
if (Browser.isIos) {
|
|
20821
20850
|
this.list.style.overflow = '';
|
|
20822
20851
|
}
|
|
20852
|
+
if (listObj && listObj !== this && !listObj.allowDragAndDrop) {
|
|
20853
|
+
return;
|
|
20854
|
+
}
|
|
20823
20855
|
const targetListObj = this.getComponent(args.target);
|
|
20824
20856
|
if (targetListObj && targetListObj.listData.length === 0) {
|
|
20825
20857
|
const noRecElem = targetListObj.ulElement.childNodes[0];
|
|
@@ -23229,6 +23261,10 @@ let Mention = class Mention extends DropDownBase {
|
|
|
23229
23261
|
this.isUpDownKey = false;
|
|
23230
23262
|
return;
|
|
23231
23263
|
}
|
|
23264
|
+
if (!this.allowSpaces && e.code === 'Space' && this.beforePopupOpen && this.isPopupOpen) {
|
|
23265
|
+
this.hidePopup();
|
|
23266
|
+
return;
|
|
23267
|
+
}
|
|
23232
23268
|
this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
|
|
23233
23269
|
const isRteImage = document.activeElement.parentElement && document.activeElement.parentElement.querySelector('.e-rte-image') ? true : false;
|
|
23234
23270
|
if (document.activeElement !== this.inputElement && !isRteImage) {
|
|
@@ -23256,6 +23292,9 @@ let Mention = class Mention extends DropDownBase {
|
|
|
23256
23292
|
if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
|
|
23257
23293
|
lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
|
|
23258
23294
|
}
|
|
23295
|
+
if (lastWordRange.includes(' ')) {
|
|
23296
|
+
return;
|
|
23297
|
+
}
|
|
23259
23298
|
}
|
|
23260
23299
|
const lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
|
|
23261
23300
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
@@ -23276,8 +23315,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
23276
23315
|
(rangetextContent.length === 1 || rangetextContent[rangetextContent.length - 2].indexOf('') === -1 ||
|
|
23277
23316
|
this.range.startContainer.nodeType === 1))) {
|
|
23278
23317
|
if (isValid && this.isPopupOpen && this.allowSpaces && currentRange && currentRange.trim() !== '' && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1
|
|
23279
|
-
&& !this.isMatchedText() &&
|
|
23280
|
-
(this.list && this.list.querySelectorAll('ul').length > 0) && e.code !== 'Enter') {
|
|
23318
|
+
&& !this.isMatchedText() && this.list && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' && e.code !== 'Enter') {
|
|
23281
23319
|
this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
|
|
23282
23320
|
this.searchLists(e);
|
|
23283
23321
|
}
|
|
@@ -23551,7 +23589,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
23551
23589
|
return '';
|
|
23552
23590
|
}
|
|
23553
23591
|
const textValue = text.indexOf('\u200B') > -1 ? text.replace(/\u200B/g, '').replace(/\u00A0/g, ' ') : text.replace(/\u00A0/g, ' ');
|
|
23554
|
-
const words = textValue.split(/\s+/);
|
|
23592
|
+
const words = this.allowSpaces && this.isPopupOpen ? [textValue] : textValue.split(/\s+/);
|
|
23555
23593
|
const wordCnt = words.length - 1;
|
|
23556
23594
|
return words[wordCnt].trim();
|
|
23557
23595
|
}
|
|
@@ -24239,15 +24277,18 @@ let Mention = class Mention extends DropDownBase {
|
|
|
24239
24277
|
if (!isNullOrUndefined(this.displayTemplate) && !isNullOrUndefined(this.displayTempElement)) {
|
|
24240
24278
|
value = this.displayTempElement.innerHTML;
|
|
24241
24279
|
}
|
|
24280
|
+
const rteRoot = this.inputElement.parentElement ? this.inputElement.parentElement.closest('.e-richtexteditor') : null;
|
|
24242
24281
|
if (this.isContentEditable(this.inputElement)) {
|
|
24282
|
+
const suffix = typeof this.suffixText === 'string' ? this.suffixText : (rteRoot ? '​' : ' ');
|
|
24283
|
+
const chipContent = showChar + value;
|
|
24243
24284
|
if (Browser.isAndroid) {
|
|
24244
|
-
return
|
|
24285
|
+
return `<span contenteditable="true" class="e-mention-chip">${chipContent}</span>${suffix}`;
|
|
24245
24286
|
}
|
|
24246
24287
|
else if (Browser.info.name === 'mozilla') {
|
|
24247
|
-
return
|
|
24288
|
+
return `<span><span contenteditable="false" class="e-mention-chip">${chipContent}</span></span>${suffix}`;
|
|
24248
24289
|
}
|
|
24249
24290
|
else {
|
|
24250
|
-
return
|
|
24291
|
+
return `<span contenteditable="false" class="e-mention-chip">${chipContent}</span>${suffix}`;
|
|
24251
24292
|
}
|
|
24252
24293
|
}
|
|
24253
24294
|
else {
|