@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 30.1.37
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/license
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-dropdowns",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "30.1.37",
|
|
4
4
|
"description": "Essential JS 2 DropDown Components",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-dropdowns.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~
|
|
12
|
-
"@syncfusion/ej2-data": "~
|
|
13
|
-
"@syncfusion/ej2-inputs": "~
|
|
14
|
-
"@syncfusion/ej2-lists": "~
|
|
15
|
-
"@syncfusion/ej2-navigations": "~
|
|
16
|
-
"@syncfusion/ej2-notifications": "~
|
|
17
|
-
"@syncfusion/ej2-popups": "~
|
|
11
|
+
"@syncfusion/ej2-base": "~30.1.37",
|
|
12
|
+
"@syncfusion/ej2-data": "~30.1.37",
|
|
13
|
+
"@syncfusion/ej2-inputs": "~30.1.37",
|
|
14
|
+
"@syncfusion/ej2-lists": "~30.1.37",
|
|
15
|
+
"@syncfusion/ej2-navigations": "~30.1.37",
|
|
16
|
+
"@syncfusion/ej2-notifications": "~30.1.37",
|
|
17
|
+
"@syncfusion/ej2-popups": "~30.1.37"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {},
|
|
20
20
|
"keywords": [
|
|
@@ -216,8 +216,8 @@ export declare class AutoComplete extends ComboBox {
|
|
|
216
216
|
protected getLocaleName(): string;
|
|
217
217
|
protected getNgDirective(): string;
|
|
218
218
|
protected getQuery(query: Query): Query;
|
|
219
|
-
protected searchLists(e: KeyboardEventArgs | MouseEvent): void;
|
|
220
219
|
protected performFiltering(e: KeyboardEventArgs | MouseEvent): void;
|
|
220
|
+
protected searchLists(e: KeyboardEventArgs | MouseEvent): void;
|
|
221
221
|
/**
|
|
222
222
|
* To filter the data from given data source by using query
|
|
223
223
|
*
|
|
@@ -162,6 +162,28 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
162
162
|
}
|
|
163
163
|
return filterQuery;
|
|
164
164
|
};
|
|
165
|
+
AutoComplete.prototype.performFiltering = function (e) {
|
|
166
|
+
var _this_1 = this;
|
|
167
|
+
var eventArgs = {
|
|
168
|
+
preventDefaultAction: false,
|
|
169
|
+
text: this.filterInput ? this.filterInput.value : null,
|
|
170
|
+
updateData: function (dataSource, query, fields) {
|
|
171
|
+
if (eventArgs.cancel) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
_this_1.isFiltered = true;
|
|
175
|
+
_this_1.customFilterQuery = query;
|
|
176
|
+
_this_1.filterAction(dataSource, query, fields);
|
|
177
|
+
},
|
|
178
|
+
cancel: false
|
|
179
|
+
};
|
|
180
|
+
this.trigger('filtering', eventArgs, function (eventArgs) {
|
|
181
|
+
if (!eventArgs.cancel && !_this_1.isFiltered && !eventArgs.preventDefaultAction) {
|
|
182
|
+
_this_1.searchList = true;
|
|
183
|
+
_this_1.filterAction(_this_1.dataSource, null, _this_1.fields, e);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
};
|
|
165
187
|
AutoComplete.prototype.searchLists = function (e) {
|
|
166
188
|
this.isTyped = true;
|
|
167
189
|
this.isDataFetched = this.isSelectCustom = false;
|
|
@@ -187,28 +209,6 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
187
209
|
this.performFiltering(e);
|
|
188
210
|
}
|
|
189
211
|
};
|
|
190
|
-
AutoComplete.prototype.performFiltering = function (e) {
|
|
191
|
-
var _this_1 = this;
|
|
192
|
-
var eventArgs = {
|
|
193
|
-
preventDefaultAction: false,
|
|
194
|
-
text: this.filterInput.value,
|
|
195
|
-
updateData: function (dataSource, query, fields) {
|
|
196
|
-
if (eventArgs.cancel) {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
_this_1.isFiltered = true;
|
|
200
|
-
_this_1.customFilterQuery = query;
|
|
201
|
-
_this_1.filterAction(dataSource, query, fields);
|
|
202
|
-
},
|
|
203
|
-
cancel: false
|
|
204
|
-
};
|
|
205
|
-
this.trigger('filtering', eventArgs, function (eventArgs) {
|
|
206
|
-
if (!eventArgs.cancel && !_this_1.isFiltered && !eventArgs.preventDefaultAction) {
|
|
207
|
-
_this_1.searchList = true;
|
|
208
|
-
_this_1.filterAction(_this_1.dataSource, null, _this_1.fields, e);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
};
|
|
212
212
|
/**
|
|
213
213
|
* To filter the data from given data source by using query
|
|
214
214
|
*
|
|
@@ -2328,6 +2328,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2328
2328
|
}
|
|
2329
2329
|
this.getInitialData = false;
|
|
2330
2330
|
this.isReactTemplateUpdate = true;
|
|
2331
|
+
this.typedString = this.filterInput.value;
|
|
2331
2332
|
this.searchLists(this.filterArgs);
|
|
2332
2333
|
return;
|
|
2333
2334
|
}
|
|
@@ -2609,7 +2610,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2609
2610
|
document.body.appendChild(popupEle);
|
|
2610
2611
|
popupEle.style.top = '0px';
|
|
2611
2612
|
initialPopupHeight = popupEle.clientHeight;
|
|
2612
|
-
if (_this.enableVirtualization && _this.itemTemplate) {
|
|
2613
|
+
if (_this.enableVirtualization && (_this.itemTemplate || _this.isAngular)) {
|
|
2613
2614
|
var listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
|
|
2614
2615
|
_this.listItemHeight = listitems.length > 0 ? Math.ceil(listitems[0].getBoundingClientRect().height) +
|
|
2615
2616
|
parseInt(window.getComputedStyle(listitems[0]).marginBottom, 10) : 0;
|
package/src/mention/mention.d.ts
CHANGED
|
@@ -59,7 +59,6 @@ export declare class Mention extends DropDownBase {
|
|
|
59
59
|
private isUpDownKey;
|
|
60
60
|
private isRTE;
|
|
61
61
|
private keyEventName;
|
|
62
|
-
protected debounceTimer: ReturnType<typeof setTimeout> | null;
|
|
63
62
|
/**
|
|
64
63
|
* Defines class/multiple classes separated by a space for the mention component.
|
|
65
64
|
*
|
package/src/mention/mention.js
CHANGED
|
@@ -38,9 +38,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
38
38
|
* @private
|
|
39
39
|
*/
|
|
40
40
|
function Mention(options, element) {
|
|
41
|
-
|
|
42
|
-
_this.debounceTimer = null;
|
|
43
|
-
return _this;
|
|
41
|
+
return _super.call(this, options, element) || this;
|
|
44
42
|
}
|
|
45
43
|
/**
|
|
46
44
|
* When property value changes happened, then onPropertyChanged method will execute the respective changes in this component.
|
|
@@ -370,12 +368,16 @@ var Mention = /** @class */ (function (_super) {
|
|
|
370
368
|
var isValid = currentRange && mentionRegex.test(currentRange) ? false : true;
|
|
371
369
|
var lastWordRange = this.getLastLetter(currentRange);
|
|
372
370
|
var previousChar = currentRange ? currentRange.charAt(Math.max(0, currentRange.indexOf(this.mentionChar) - 1)) : '';
|
|
373
|
-
if (
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
371
|
+
if (!this.allowSpaces) {
|
|
372
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
373
|
+
if (isValid && currentRange && currentRange.includes(this.mentionChar) && currentRange.split(this.mentionChar).pop() !== ''
|
|
374
|
+
&& (!this.requireLeadingSpace || (this.requireLeadingSpace && (previousChar === ' ' || currentRange.indexOf(this.mentionChar) === 0)))) {
|
|
375
|
+
lastWordRange = this.mentionChar + currentRange.split(this.mentionChar).pop();
|
|
376
|
+
}
|
|
377
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
378
|
+
if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
|
|
379
|
+
lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
|
|
380
|
+
}
|
|
379
381
|
}
|
|
380
382
|
var lastTwoLetters = this.mentionChar.toString() + this.mentionChar.toString();
|
|
381
383
|
// eslint-disable-next-line security/detect-non-literal-regexp
|
|
@@ -388,7 +390,8 @@ var Mention = /** @class */ (function (_super) {
|
|
|
388
390
|
this.hidePopup();
|
|
389
391
|
return;
|
|
390
392
|
}
|
|
391
|
-
|
|
393
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
394
|
+
if (((!currentRange || !lastWordRange) || (!lastWordRange.includes(this.mentionChar) && !this.requireLeadingSpace && !this.allowSpaces)) || e.code === 'Enter' || e.keyCode === 27 ||
|
|
392
395
|
(lastWordRange.match(Regex) && lastWordRange.match(Regex).length > 1) ||
|
|
393
396
|
(this.isContentEditable(this.inputElement) && this.range.startContainer &&
|
|
394
397
|
this.range.startContainer.previousElementSibling && this.range.startContainer.previousElementSibling.tagName !== 'BR' && this.range.startContainer.textContent.split('').length > 0 &&
|
|
@@ -515,7 +515,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
515
515
|
if (this.mode === 'CheckBox' && this.allowFiltering) {
|
|
516
516
|
this.notify('targetElement', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
517
517
|
}
|
|
518
|
-
return this.targetInputElement.value;
|
|
518
|
+
return this.targetInputElement ? this.targetInputElement.value : null;
|
|
519
519
|
};
|
|
520
520
|
MultiSelect.prototype.getForQuery = function (valuecheck, isCheckbox) {
|
|
521
521
|
var predicate;
|