@syncfusion/ej2-dropdowns 29.2.11 → 30.1.37
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/.eslintrc.json +2 -0
- 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 +37 -32
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +39 -35
- 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/license +1 -1
- package/package.json +8 -8
- package/src/auto-complete/auto-complete.d.ts +1 -1
- package/src/auto-complete/auto-complete.js +22 -22
- package/src/drop-down-list/drop-down-list.js +2 -1
- package/src/drop-down-tree/drop-down-tree.js +1 -1
- package/src/mention/mention.d.ts +0 -1
- package/src/mention/mention.js +13 -10
- package/src/multi-select/multi-select.js +1 -1
|
@@ -5163,6 +5163,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5163
5163
|
}
|
|
5164
5164
|
this.getInitialData = false;
|
|
5165
5165
|
this.isReactTemplateUpdate = true;
|
|
5166
|
+
this.typedString = this.filterInput.value;
|
|
5166
5167
|
this.searchLists(this.filterArgs);
|
|
5167
5168
|
return;
|
|
5168
5169
|
}
|
|
@@ -5437,7 +5438,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5437
5438
|
document.body.appendChild(popupEle);
|
|
5438
5439
|
popupEle.style.top = '0px';
|
|
5439
5440
|
initialPopupHeight = popupEle.clientHeight;
|
|
5440
|
-
if (this.enableVirtualization && this.itemTemplate) {
|
|
5441
|
+
if (this.enableVirtualization && (this.itemTemplate || this.isAngular)) {
|
|
5441
5442
|
const listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
|
|
5442
5443
|
this.listItemHeight = listitems.length > 0 ? Math.ceil(listitems[0].getBoundingClientRect().height) +
|
|
5443
5444
|
parseInt(window.getComputedStyle(listitems[0]).marginBottom, 10) : 0;
|
|
@@ -8028,7 +8029,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8028
8029
|
if (this.isPopupOpen) {
|
|
8029
8030
|
this.hidePopup();
|
|
8030
8031
|
}
|
|
8031
|
-
else {
|
|
8032
|
+
else if (!(e instanceof TouchEvent) && e.button !== 2) {
|
|
8032
8033
|
this.focusIn(e);
|
|
8033
8034
|
this.renderPopup();
|
|
8034
8035
|
}
|
|
@@ -12061,6 +12062,27 @@ let AutoComplete = class AutoComplete extends ComboBox {
|
|
|
12061
12062
|
}
|
|
12062
12063
|
return filterQuery;
|
|
12063
12064
|
}
|
|
12065
|
+
performFiltering(e) {
|
|
12066
|
+
const eventArgs = {
|
|
12067
|
+
preventDefaultAction: false,
|
|
12068
|
+
text: this.filterInput ? this.filterInput.value : null,
|
|
12069
|
+
updateData: (dataSource, query, fields) => {
|
|
12070
|
+
if (eventArgs.cancel) {
|
|
12071
|
+
return;
|
|
12072
|
+
}
|
|
12073
|
+
this.isFiltered = true;
|
|
12074
|
+
this.customFilterQuery = query;
|
|
12075
|
+
this.filterAction(dataSource, query, fields);
|
|
12076
|
+
},
|
|
12077
|
+
cancel: false
|
|
12078
|
+
};
|
|
12079
|
+
this.trigger('filtering', eventArgs, (eventArgs) => {
|
|
12080
|
+
if (!eventArgs.cancel && !this.isFiltered && !eventArgs.preventDefaultAction) {
|
|
12081
|
+
this.searchList = true;
|
|
12082
|
+
this.filterAction(this.dataSource, null, this.fields, e);
|
|
12083
|
+
}
|
|
12084
|
+
});
|
|
12085
|
+
}
|
|
12064
12086
|
searchLists(e) {
|
|
12065
12087
|
this.isTyped = true;
|
|
12066
12088
|
this.isDataFetched = this.isSelectCustom = false;
|
|
@@ -12086,27 +12108,6 @@ let AutoComplete = class AutoComplete extends ComboBox {
|
|
|
12086
12108
|
this.performFiltering(e);
|
|
12087
12109
|
}
|
|
12088
12110
|
}
|
|
12089
|
-
performFiltering(e) {
|
|
12090
|
-
const eventArgs = {
|
|
12091
|
-
preventDefaultAction: false,
|
|
12092
|
-
text: this.filterInput.value,
|
|
12093
|
-
updateData: (dataSource, query, fields) => {
|
|
12094
|
-
if (eventArgs.cancel) {
|
|
12095
|
-
return;
|
|
12096
|
-
}
|
|
12097
|
-
this.isFiltered = true;
|
|
12098
|
-
this.customFilterQuery = query;
|
|
12099
|
-
this.filterAction(dataSource, query, fields);
|
|
12100
|
-
},
|
|
12101
|
-
cancel: false
|
|
12102
|
-
};
|
|
12103
|
-
this.trigger('filtering', eventArgs, (eventArgs) => {
|
|
12104
|
-
if (!eventArgs.cancel && !this.isFiltered && !eventArgs.preventDefaultAction) {
|
|
12105
|
-
this.searchList = true;
|
|
12106
|
-
this.filterAction(this.dataSource, null, this.fields, e);
|
|
12107
|
-
}
|
|
12108
|
-
});
|
|
12109
|
-
}
|
|
12110
12111
|
/**
|
|
12111
12112
|
* To filter the data from given data source by using query
|
|
12112
12113
|
*
|
|
@@ -13118,7 +13119,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13118
13119
|
if (this.mode === 'CheckBox' && this.allowFiltering) {
|
|
13119
13120
|
this.notify('targetElement', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
13120
13121
|
}
|
|
13121
|
-
return this.targetInputElement.value;
|
|
13122
|
+
return this.targetInputElement ? this.targetInputElement.value : null;
|
|
13122
13123
|
}
|
|
13123
13124
|
getForQuery(valuecheck, isCheckbox) {
|
|
13124
13125
|
let predicate;
|
|
@@ -22421,7 +22422,6 @@ let Mention = class Mention extends DropDownBase {
|
|
|
22421
22422
|
*/
|
|
22422
22423
|
constructor(options, element) {
|
|
22423
22424
|
super(options, element);
|
|
22424
|
-
this.debounceTimer = null;
|
|
22425
22425
|
}
|
|
22426
22426
|
/**
|
|
22427
22427
|
* When property value changes happened, then onPropertyChanged method will execute the respective changes in this component.
|
|
@@ -22750,12 +22750,16 @@ let Mention = class Mention extends DropDownBase {
|
|
|
22750
22750
|
const isValid = currentRange && mentionRegex.test(currentRange) ? false : true;
|
|
22751
22751
|
let lastWordRange = this.getLastLetter(currentRange);
|
|
22752
22752
|
const previousChar = currentRange ? currentRange.charAt(Math.max(0, currentRange.indexOf(this.mentionChar) - 1)) : '';
|
|
22753
|
-
if (
|
|
22754
|
-
|
|
22755
|
-
|
|
22756
|
-
|
|
22757
|
-
|
|
22758
|
-
|
|
22753
|
+
if (!this.allowSpaces) {
|
|
22754
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22755
|
+
if (isValid && currentRange && currentRange.includes(this.mentionChar) && currentRange.split(this.mentionChar).pop() !== ''
|
|
22756
|
+
&& (!this.requireLeadingSpace || (this.requireLeadingSpace && (previousChar === ' ' || currentRange.indexOf(this.mentionChar) === 0)))) {
|
|
22757
|
+
lastWordRange = this.mentionChar + currentRange.split(this.mentionChar).pop();
|
|
22758
|
+
}
|
|
22759
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22760
|
+
if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
|
|
22761
|
+
lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
|
|
22762
|
+
}
|
|
22759
22763
|
}
|
|
22760
22764
|
const lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
|
|
22761
22765
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
@@ -22768,7 +22772,8 @@ let Mention = class Mention extends DropDownBase {
|
|
|
22768
22772
|
this.hidePopup();
|
|
22769
22773
|
return;
|
|
22770
22774
|
}
|
|
22771
|
-
|
|
22775
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22776
|
+
if (((!currentRange || !lastWordRange) || (!lastWordRange.includes(this.mentionChar) && !this.requireLeadingSpace && !this.allowSpaces)) || e.code === 'Enter' || e.keyCode === 27 ||
|
|
22772
22777
|
(lastWordRange.match(Regex) && lastWordRange.match(Regex).length > 1) ||
|
|
22773
22778
|
(this.isContentEditable(this.inputElement) && this.range.startContainer &&
|
|
22774
22779
|
this.range.startContainer.previousElementSibling && this.range.startContainer.previousElementSibling.tagName !== 'BR' && this.range.startContainer.textContent.split('').length > 0 &&
|