@syncfusion/ej2-dropdowns 28.1.36 → 28.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/dist/ej2-dropdowns.min.js +10 -1
- package/dist/ej2-dropdowns.umd.min.js +10 -1
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +68 -56
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +70 -58
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +10 -1
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/package.json +6 -6
- package/src/common/virtual-scroll.js +2 -2
- package/src/drop-down-base/drop-down-base.js +43 -41
- package/src/drop-down-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +10 -5
- package/src/drop-down-tree/drop-down-tree.js +9 -6
- package/src/mention/mention.js +1 -0
- package/src/multi-select/multi-select.js +5 -4
package/dist/global/index.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* filename: index.d.ts
|
|
3
|
+
* version : 28.1.37
|
|
4
|
+
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
|
|
5
|
+
* Use of this code is subject to the terms of our license.
|
|
6
|
+
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
+
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
+
* applicable laws.
|
|
9
|
+
*/
|
|
1
10
|
import * as _dropdowns from '@syncfusion/ej2-dropdowns';
|
|
2
11
|
|
|
3
12
|
export declare namespace ej {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
3
|
"_id": "@syncfusion/ej2-dropdowns@28.1.35",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-bL308Ch9zV+ucVhTJM3P6epXzfnZBPsS/SD+1yysjb3XTMqnd04itZ2ujOdGMkjokSld5qT1K1KKk72JTysDsQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
34
34
|
],
|
|
35
35
|
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-28.1.35.tgz",
|
|
36
|
-
"_shasum": "
|
|
36
|
+
"_shasum": "f81e5c32210ced7ff8fc68210e8fce81054ec4c4",
|
|
37
37
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
38
38
|
"_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
|
|
39
39
|
"author": {
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@syncfusion/ej2-base": "~28.1.33",
|
|
45
45
|
"@syncfusion/ej2-data": "~28.1.33",
|
|
46
|
-
"@syncfusion/ej2-inputs": "~28.1.
|
|
47
|
-
"@syncfusion/ej2-lists": "~28.1.
|
|
48
|
-
"@syncfusion/ej2-navigations": "~28.1.
|
|
46
|
+
"@syncfusion/ej2-inputs": "~28.1.37",
|
|
47
|
+
"@syncfusion/ej2-lists": "~28.1.37",
|
|
48
|
+
"@syncfusion/ej2-navigations": "~28.1.37",
|
|
49
49
|
"@syncfusion/ej2-notifications": "~28.1.33",
|
|
50
50
|
"@syncfusion/ej2-popups": "~28.1.33"
|
|
51
51
|
},
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"module": "./index.js",
|
|
73
73
|
"name": "@syncfusion/ej2-dropdowns",
|
|
74
74
|
"typings": "index.d.ts",
|
|
75
|
-
"version": "28.1.
|
|
75
|
+
"version": "28.1.37",
|
|
76
76
|
"sideEffects": false,
|
|
77
77
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
78
78
|
}
|
|
@@ -285,8 +285,8 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
285
285
|
if (this.parent.hideSelectedItem) {
|
|
286
286
|
var query = this.parent.value && this.parent.value.length > 0 ?
|
|
287
287
|
this.parent.getForQuery(this.parent.value).clone() : new Query;
|
|
288
|
-
if (this.parent.viewPortInfo.endIndex === this.parent.totalItemCount +
|
|
289
|
-
this.parent.hideSelectedItem) {
|
|
288
|
+
if (this.parent.value && (this.parent.viewPortInfo.endIndex === this.parent.totalItemCount +
|
|
289
|
+
this.parent.value.length) && this.parent.hideSelectedItem) {
|
|
290
290
|
query = query.skip(this.parent.totalItemCount - this.parent.itemCount);
|
|
291
291
|
}
|
|
292
292
|
else {
|
|
@@ -193,58 +193,60 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
193
193
|
if (isTextByValue) {
|
|
194
194
|
value = text;
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
var
|
|
202
|
-
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
else {
|
|
207
|
-
if (ignoreCase) {
|
|
208
|
-
if (this.checkIgnoreCase(String(item), text)) {
|
|
209
|
-
value = this.getItemValue(String(item), text, ignoreCase);
|
|
210
|
-
}
|
|
196
|
+
if (!isNullOrUndefined(this.listData)) {
|
|
197
|
+
var dataSource = this.listData;
|
|
198
|
+
var fields_1 = this.fields;
|
|
199
|
+
var type = this.typeOfData(dataSource).typeof;
|
|
200
|
+
if (type === 'string' || type === 'number' || type === 'boolean') {
|
|
201
|
+
for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {
|
|
202
|
+
var item = dataSource_1[_i];
|
|
203
|
+
if (!isNullOrUndefined(item)) {
|
|
204
|
+
if (ignoreAccent) {
|
|
205
|
+
value = this.checkingAccent(String(item), text, ignoreCase);
|
|
211
206
|
}
|
|
212
207
|
else {
|
|
213
|
-
if (
|
|
214
|
-
|
|
208
|
+
if (ignoreCase) {
|
|
209
|
+
if (this.checkIgnoreCase(String(item), text)) {
|
|
210
|
+
value = this.getItemValue(String(item), text, ignoreCase);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
if (this.checkNonIgnoreCase(String(item), text)) {
|
|
215
|
+
value = this.getItemValue(String(item), text, ignoreCase, isTextByValue);
|
|
216
|
+
}
|
|
215
217
|
}
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
221
|
}
|
|
220
|
-
}
|
|
221
|
-
else {
|
|
222
|
-
if (ignoreCase) {
|
|
223
|
-
dataSource.filter(function (item) {
|
|
224
|
-
var itemValue = getValue(fields.value, item);
|
|
225
|
-
if (!isNullOrUndefined(itemValue) && _this.checkIgnoreCase(getValue(fields.text, item).toString(), text)) {
|
|
226
|
-
value = getValue(fields.value, item);
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
222
|
else {
|
|
231
|
-
if (
|
|
232
|
-
var compareValue_1 = null;
|
|
233
|
-
compareValue_1 = value;
|
|
223
|
+
if (ignoreCase) {
|
|
234
224
|
dataSource.filter(function (item) {
|
|
235
|
-
var itemValue = getValue(
|
|
236
|
-
if (!isNullOrUndefined(itemValue) &&
|
|
237
|
-
|
|
238
|
-
value = getValue(fields.text, item);
|
|
225
|
+
var itemValue = getValue(fields_1.value, item);
|
|
226
|
+
if (!isNullOrUndefined(itemValue) && _this.checkIgnoreCase(getValue(fields_1.text, item).toString(), text)) {
|
|
227
|
+
value = getValue(fields_1.value, item);
|
|
239
228
|
}
|
|
240
229
|
});
|
|
241
230
|
}
|
|
242
231
|
else {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
232
|
+
if (isTextByValue) {
|
|
233
|
+
var compareValue_1 = null;
|
|
234
|
+
compareValue_1 = value;
|
|
235
|
+
dataSource.filter(function (item) {
|
|
236
|
+
var itemValue = getValue(fields_1.value, item);
|
|
237
|
+
if (!isNullOrUndefined(itemValue) && !isNullOrUndefined(value) &&
|
|
238
|
+
itemValue.toString() === compareValue_1.toString()) {
|
|
239
|
+
value = getValue(fields_1.text, item);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
dataSource.filter(function (item) {
|
|
245
|
+
if (_this.checkNonIgnoreCase(getValue(fields_1.text, item), text)) {
|
|
246
|
+
value = getValue(fields_1.value, item);
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
}
|
|
248
250
|
}
|
|
249
251
|
}
|
|
250
252
|
}
|
|
@@ -769,7 +771,6 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
769
771
|
_this.isRequested = false;
|
|
770
772
|
_this.bindChildItems(listItems, ulElement, fields, e);
|
|
771
773
|
if (_this.getInitialData) {
|
|
772
|
-
_this.setListData(dataSource, fields, query, event);
|
|
773
774
|
_this.getInitialData = false;
|
|
774
775
|
_this.preventPopupOpen = false;
|
|
775
776
|
return;
|
|
@@ -1164,7 +1165,8 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1164
1165
|
};
|
|
1165
1166
|
DropDownBase.prototype.scrollStop = function (e, isDownkey) {
|
|
1166
1167
|
var target = !isNullOrUndefined(e) ? e.target : this.list;
|
|
1167
|
-
var
|
|
1168
|
+
var computedHeight = getComputedStyle(this.getValidLi(), null).getPropertyValue('height');
|
|
1169
|
+
var liHeight = this.getModuleName() === 'multiselect' ? parseFloat(computedHeight) : parseInt(computedHeight, 10);
|
|
1168
1170
|
var topIndex = Math.round(target.scrollTop / liHeight);
|
|
1169
1171
|
var liCollections = this.list.querySelectorAll('li' + ':not(.e-hide-listitem)');
|
|
1170
1172
|
var virtualListCount = this.list.querySelectorAll('.e-virtual-list').length;
|
|
@@ -120,6 +120,7 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
120
120
|
private resizeWidth;
|
|
121
121
|
private isUpdateHeaderHeight;
|
|
122
122
|
private isUpdateFooterHeight;
|
|
123
|
+
private filterArgs;
|
|
123
124
|
/**
|
|
124
125
|
* Sets CSS classes to the root element of the component that allows customization of appearance.
|
|
125
126
|
*
|
|
@@ -1869,6 +1869,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1869
1869
|
DropDownList.prototype.onFilterUp = function (e) {
|
|
1870
1870
|
if (!(e.ctrlKey && e.keyCode === 86) && (this.isValidKey || e.keyCode === 40 || e.keyCode === 38)) {
|
|
1871
1871
|
this.isValidKey = false;
|
|
1872
|
+
this.filterArgs = e;
|
|
1872
1873
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
1873
1874
|
switch (e.keyCode) {
|
|
1874
1875
|
case 38: //up arrow
|
|
@@ -1922,7 +1923,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1922
1923
|
}
|
|
1923
1924
|
this.typedString = this.filterInput.value;
|
|
1924
1925
|
this.preventAutoFill = false;
|
|
1925
|
-
this.
|
|
1926
|
+
if (!this.getInitialData) {
|
|
1927
|
+
this.searchLists(e);
|
|
1928
|
+
}
|
|
1926
1929
|
if ((this.enableVirtualization && this.getModuleName() !== 'autocomplete') || (this.getModuleName() === 'autocomplete' && !(this.dataSource instanceof DataManager)) || (this.getModuleName() === 'autocomplete' && (this.dataSource instanceof DataManager) && this.totalItemCount !== 0)) {
|
|
1927
1930
|
this.getFilteringSkeletonCount();
|
|
1928
1931
|
}
|
|
@@ -2270,6 +2273,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2270
2273
|
var _this = this;
|
|
2271
2274
|
setTimeout(function () {
|
|
2272
2275
|
_this.typedString = _this.filterInput.value;
|
|
2276
|
+
if (_this.getModuleName() === 'combobox' && _this.isFiltering() && isNullOrUndefined(_this.list)) {
|
|
2277
|
+
_this.renderList();
|
|
2278
|
+
}
|
|
2273
2279
|
_this.searchLists(e);
|
|
2274
2280
|
});
|
|
2275
2281
|
};
|
|
@@ -2295,10 +2301,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2295
2301
|
}
|
|
2296
2302
|
if (this.getInitialData) {
|
|
2297
2303
|
this.updateActionCompleteDataValues(ulElement, list);
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
this.preventPopupOpen = true;
|
|
2304
|
+
this.getInitialData = false;
|
|
2305
|
+
this.searchLists(this.filterArgs);
|
|
2306
|
+
return;
|
|
2302
2307
|
}
|
|
2303
2308
|
var tempItemCount = this.itemCount;
|
|
2304
2309
|
if (this.isActive || !isNullOrUndefined(ulElement)) {
|
|
@@ -791,8 +791,8 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
791
791
|
}
|
|
792
792
|
addClass([this.inputEle], CHIP_INPUT);
|
|
793
793
|
this.updateOverFlowView();
|
|
794
|
-
this.ensurePlaceHolder();
|
|
795
794
|
}
|
|
795
|
+
this.ensurePlaceHolder();
|
|
796
796
|
};
|
|
797
797
|
DropDownTree.prototype.triggerChangeEvent = function (event) {
|
|
798
798
|
var isEqual = this.ddtCompareValues(this.oldValue, this.value);
|
|
@@ -1420,10 +1420,10 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1420
1420
|
if (this.value !== null && this.value.length !== 0) {
|
|
1421
1421
|
var data = void 0;
|
|
1422
1422
|
if (this.showCheckBox || this.allowMultiSelection) {
|
|
1423
|
-
for (var i =
|
|
1423
|
+
for (var i = this.value.length - 1; i >= 0; i--) {
|
|
1424
1424
|
data = this.treeObj.getTreeData(this.value[i])[0];
|
|
1425
1425
|
if (isNOU(data)) {
|
|
1426
|
-
this.value.splice(
|
|
1426
|
+
this.value.splice(i, 1);
|
|
1427
1427
|
}
|
|
1428
1428
|
}
|
|
1429
1429
|
if (this.value.length !== 0) {
|
|
@@ -1480,7 +1480,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
};
|
|
1482
1482
|
DropDownTree.prototype.setSelectedValue = function () {
|
|
1483
|
-
if (this.value
|
|
1483
|
+
if (this.value !== null && !(this.value.length === 0)) {
|
|
1484
1484
|
return;
|
|
1485
1485
|
}
|
|
1486
1486
|
if (!this.isInitialized) {
|
|
@@ -2290,7 +2290,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2290
2290
|
}
|
|
2291
2291
|
};
|
|
2292
2292
|
DropDownTree.prototype.ensurePlaceHolder = function () {
|
|
2293
|
-
if (isNOU(this.value) || (this.value && this.value.length === 0)) {
|
|
2293
|
+
if (isNOU(this.value) || (this.value !== null && this.value.length === 0)) {
|
|
2294
2294
|
removeClass([this.inputEle], CHIP_INPUT);
|
|
2295
2295
|
if (this.chipWrapper) {
|
|
2296
2296
|
addClass([this.chipWrapper], HIDEICON);
|
|
@@ -2593,7 +2593,10 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2593
2593
|
}
|
|
2594
2594
|
};
|
|
2595
2595
|
DropDownTree.prototype.setTagValues = function () {
|
|
2596
|
-
if (this.value === null || this.text == null) {
|
|
2596
|
+
if (this.value === null || this.text == null || this.value.length === 0) {
|
|
2597
|
+
if (this.inputWrapper.contains(this.chipWrapper)) {
|
|
2598
|
+
addClass([this.chipWrapper], HIDEICON);
|
|
2599
|
+
}
|
|
2597
2600
|
return;
|
|
2598
2601
|
}
|
|
2599
2602
|
if (!this.inputWrapper.contains(this.chipWrapper)) {
|
package/src/mention/mention.js
CHANGED
|
@@ -848,6 +848,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
848
848
|
if (this.isFiltered) {
|
|
849
849
|
if ((this.enableVirtualization && !isNullOrUndefined(this.customFilterQuery))) {
|
|
850
850
|
filterQuery = this.customFilterQuery.clone();
|
|
851
|
+
return this.virtualFilterQuery(filterQuery);
|
|
851
852
|
}
|
|
852
853
|
else if (!this.enableVirtualization) {
|
|
853
854
|
return filterQuery;
|
|
@@ -2698,7 +2699,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2698
2699
|
getValue(((this.fields.value) ? this.fields.value : ''), this.value[this.value.length - 1]) :
|
|
2699
2700
|
this.value[this.value.length - 1];
|
|
2700
2701
|
var temp = text;
|
|
2701
|
-
var textValues = this.text != null && this.text !== '' ? this.text +
|
|
2702
|
+
var textValues = this.text != null && this.text !== '' ? this.text + this.delimiterChar + temp : temp;
|
|
2702
2703
|
currentText.push(textValues);
|
|
2703
2704
|
this.setProperties({ text: currentText.toString() }, true);
|
|
2704
2705
|
}
|
|
@@ -3633,7 +3634,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3633
3634
|
}
|
|
3634
3635
|
else {
|
|
3635
3636
|
temp = isInitialVirtualData && delim ? this_1.text : this_1.getTextByValue(value);
|
|
3636
|
-
var textValues = isInitialVirtualData ? this_1.text : (this_1.text && this_1.text !== '' ? this_1.text +
|
|
3637
|
+
var textValues = isInitialVirtualData ? this_1.text : (this_1.text && this_1.text !== '' ? this_1.text + this_1.delimiterChar + temp : temp);
|
|
3637
3638
|
data += temp + delimiterChar + ' ';
|
|
3638
3639
|
text.push(textValues);
|
|
3639
3640
|
hiddenElementContent = this_1.hiddenElement.innerHTML;
|
|
@@ -3801,7 +3802,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3801
3802
|
(this.mode === 'Box' || this.mode === 'Default'))) ||
|
|
3802
3803
|
(this.enableVirtualization && value != null && text != null && !isCustomData)) {
|
|
3803
3804
|
var currentText = [];
|
|
3804
|
-
var textValues = this.text != null && this.text !== '' ? this.text +
|
|
3805
|
+
var textValues = this.text != null && this.text !== '' ? this.text + this.delimiterChar + text : text;
|
|
3805
3806
|
currentText.push(textValues);
|
|
3806
3807
|
this.setProperties({ text: currentText.toString() }, true);
|
|
3807
3808
|
this.addChip(text, value);
|
|
@@ -3837,7 +3838,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3837
3838
|
this.wireListEvents();
|
|
3838
3839
|
}
|
|
3839
3840
|
var currentText = [];
|
|
3840
|
-
var textValues = this.text != null && this.text !== '' ? this.text +
|
|
3841
|
+
var textValues = this.text != null && this.text !== '' ? this.text + this.delimiterChar + text : text;
|
|
3841
3842
|
currentText.push(textValues);
|
|
3842
3843
|
this.setProperties({ text: currentText.toString() }, true);
|
|
3843
3844
|
this.addChip(text, value);
|