@syncfusion/ej2-dropdowns 31.2.15 → 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 +54 -12
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +54 -12
- 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 +4 -4
- package/src/drop-down-list/drop-down-list.js +4 -1
- package/src/list-box/list-box.js +31 -2
- package/src/mention/mention.js +15 -6
- package/src/multi-select/multi-select.js +4 -3
- 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);
|
|
@@ -7137,7 +7140,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
7137
7140
|
const container = this.inputWrapper.container;
|
|
7138
7141
|
const label = container.querySelector('.e-float-text');
|
|
7139
7142
|
const calculateWidth = (container.clientWidth - this.getRightIconsWidth());
|
|
7140
|
-
if (label && calculateWidth) {
|
|
7143
|
+
if (label && calculateWidth && !(this.cssClass && this.cssClass.split(' ').indexOf('e-outline') !== -1)) {
|
|
7141
7144
|
label.style.width = calculateWidth + 'px';
|
|
7142
7145
|
}
|
|
7143
7146
|
}
|
|
@@ -18686,7 +18689,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18686
18689
|
this.renderItems(this.mainData, this.fields);
|
|
18687
18690
|
}
|
|
18688
18691
|
this.virtualCustomData = null;
|
|
18689
|
-
this.isVirtualTrackHeight = false;
|
|
18692
|
+
this.isVirtualTrackHeight = this.totalItemCount > (this.itemCount * 2) ? false : true;
|
|
18690
18693
|
}
|
|
18691
18694
|
});
|
|
18692
18695
|
}
|
|
@@ -18734,7 +18737,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18734
18737
|
if (this.hideSelectedItem && this.value && Array.isArray(this.value) && this.value.length > 0) {
|
|
18735
18738
|
this.totalItemsCount();
|
|
18736
18739
|
}
|
|
18737
|
-
if (!this.preventSetCurrentData &&
|
|
18740
|
+
if (!this.preventSetCurrentData && this.totalItemCount > (this.itemCount * 2) &&
|
|
18741
|
+
!isNullOrUndefined(this.viewPortInfo.startIndex) &&
|
|
18738
18742
|
!isNullOrUndefined(this.viewPortInfo.endIndex)) {
|
|
18739
18743
|
this.notify('setCurrentViewDataAsync', {
|
|
18740
18744
|
component: this.getModuleName(),
|
|
@@ -18802,7 +18806,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18802
18806
|
const container = this.overAllWrapper;
|
|
18803
18807
|
const label = container.querySelector('.e-float-text');
|
|
18804
18808
|
const calculateWidth = (container.clientWidth - this.getRightIconsWidth());
|
|
18805
|
-
if (label && calculateWidth) {
|
|
18809
|
+
if (label && calculateWidth && !(this.cssClass && this.cssClass.split(' ').indexOf('e-outline') !== -1)) {
|
|
18806
18810
|
label.style.width = calculateWidth + 'px';
|
|
18807
18811
|
}
|
|
18808
18812
|
}
|
|
@@ -20786,12 +20790,38 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20786
20790
|
this.stopTimer();
|
|
20787
20791
|
const items = [];
|
|
20788
20792
|
this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
|
|
20789
|
-
if (this.
|
|
20790
|
-
|
|
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
|
+
}
|
|
20791
20818
|
}
|
|
20792
20819
|
else {
|
|
20793
20820
|
args.items = this.getDataByValues([this.dragValue]);
|
|
20794
20821
|
}
|
|
20822
|
+
if (this.allowDragAll) {
|
|
20823
|
+
this.customDraggedItem = args.items;
|
|
20824
|
+
}
|
|
20795
20825
|
extend(items, args.items);
|
|
20796
20826
|
this.trigger('beforeDrop', args);
|
|
20797
20827
|
if (JSON.stringify(args.items) !== JSON.stringify(items)) {
|
|
@@ -20819,6 +20849,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20819
20849
|
if (Browser.isIos) {
|
|
20820
20850
|
this.list.style.overflow = '';
|
|
20821
20851
|
}
|
|
20852
|
+
if (listObj && listObj !== this && !listObj.allowDragAndDrop) {
|
|
20853
|
+
return;
|
|
20854
|
+
}
|
|
20822
20855
|
const targetListObj = this.getComponent(args.target);
|
|
20823
20856
|
if (targetListObj && targetListObj.listData.length === 0) {
|
|
20824
20857
|
const noRecElem = targetListObj.ulElement.childNodes[0];
|
|
@@ -23228,6 +23261,10 @@ let Mention = class Mention extends DropDownBase {
|
|
|
23228
23261
|
this.isUpDownKey = false;
|
|
23229
23262
|
return;
|
|
23230
23263
|
}
|
|
23264
|
+
if (!this.allowSpaces && e.code === 'Space' && this.beforePopupOpen && this.isPopupOpen) {
|
|
23265
|
+
this.hidePopup();
|
|
23266
|
+
return;
|
|
23267
|
+
}
|
|
23231
23268
|
this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
|
|
23232
23269
|
const isRteImage = document.activeElement.parentElement && document.activeElement.parentElement.querySelector('.e-rte-image') ? true : false;
|
|
23233
23270
|
if (document.activeElement !== this.inputElement && !isRteImage) {
|
|
@@ -23255,6 +23292,9 @@ let Mention = class Mention extends DropDownBase {
|
|
|
23255
23292
|
if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
|
|
23256
23293
|
lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
|
|
23257
23294
|
}
|
|
23295
|
+
if (lastWordRange.includes(' ')) {
|
|
23296
|
+
return;
|
|
23297
|
+
}
|
|
23258
23298
|
}
|
|
23259
23299
|
const lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
|
|
23260
23300
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
@@ -23275,8 +23315,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
23275
23315
|
(rangetextContent.length === 1 || rangetextContent[rangetextContent.length - 2].indexOf('') === -1 ||
|
|
23276
23316
|
this.range.startContainer.nodeType === 1))) {
|
|
23277
23317
|
if (isValid && this.isPopupOpen && this.allowSpaces && currentRange && currentRange.trim() !== '' && charRegex.test(currentRange) && currentRange.indexOf(this.mentionChar) !== -1
|
|
23278
|
-
&& !this.isMatchedText() &&
|
|
23279
|
-
(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') {
|
|
23280
23319
|
this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
|
|
23281
23320
|
this.searchLists(e);
|
|
23282
23321
|
}
|
|
@@ -23550,7 +23589,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
23550
23589
|
return '';
|
|
23551
23590
|
}
|
|
23552
23591
|
const textValue = text.indexOf('\u200B') > -1 ? text.replace(/\u200B/g, '').replace(/\u00A0/g, ' ') : text.replace(/\u00A0/g, ' ');
|
|
23553
|
-
const words = textValue.split(/\s+/);
|
|
23592
|
+
const words = this.allowSpaces && this.isPopupOpen ? [textValue] : textValue.split(/\s+/);
|
|
23554
23593
|
const wordCnt = words.length - 1;
|
|
23555
23594
|
return words[wordCnt].trim();
|
|
23556
23595
|
}
|
|
@@ -24238,15 +24277,18 @@ let Mention = class Mention extends DropDownBase {
|
|
|
24238
24277
|
if (!isNullOrUndefined(this.displayTemplate) && !isNullOrUndefined(this.displayTempElement)) {
|
|
24239
24278
|
value = this.displayTempElement.innerHTML;
|
|
24240
24279
|
}
|
|
24280
|
+
const rteRoot = this.inputElement.parentElement ? this.inputElement.parentElement.closest('.e-richtexteditor') : null;
|
|
24241
24281
|
if (this.isContentEditable(this.inputElement)) {
|
|
24282
|
+
const suffix = typeof this.suffixText === 'string' ? this.suffixText : (rteRoot ? '​' : ' ');
|
|
24283
|
+
const chipContent = showChar + value;
|
|
24242
24284
|
if (Browser.isAndroid) {
|
|
24243
|
-
return
|
|
24285
|
+
return `<span contenteditable="true" class="e-mention-chip">${chipContent}</span>${suffix}`;
|
|
24244
24286
|
}
|
|
24245
24287
|
else if (Browser.info.name === 'mozilla') {
|
|
24246
|
-
return
|
|
24288
|
+
return `<span><span contenteditable="false" class="e-mention-chip">${chipContent}</span></span>${suffix}`;
|
|
24247
24289
|
}
|
|
24248
24290
|
else {
|
|
24249
|
-
return
|
|
24291
|
+
return `<span contenteditable="false" class="e-mention-chip">${chipContent}</span>${suffix}`;
|
|
24250
24292
|
}
|
|
24251
24293
|
}
|
|
24252
24294
|
else {
|