@syncfusion/ej2-dropdowns 29.2.4 → 29.2.5
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 +56 -42
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +63 -47
- 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 +7 -7
- package/src/combo-box/combo-box-model.d.ts +1 -1
- package/src/combo-box/combo-box.js +22 -14
- package/src/drop-down-base/drop-down-base.js +17 -0
- package/src/drop-down-list/drop-down-list.js +10 -16
- package/src/drop-down-tree/drop-down-tree.js +3 -11
- package/src/multi-select/multi-select.js +11 -6
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 29.2.
|
|
3
|
+
* version : 29.2.5
|
|
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/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@29.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@29.2.4",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-2/LXQ3Z+oxZ7gXjg7Byi0b4jeKBHzYa8+17CwtLhfO2nX2RP61lASiEmN0zPvK4J4i8TrY2ZCNoJAALw0V7z/w==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"/@syncfusion/ej2-spreadsheet",
|
|
37
37
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
38
38
|
],
|
|
39
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-29.
|
|
40
|
-
"_shasum": "
|
|
39
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-29.2.4.tgz",
|
|
40
|
+
"_shasum": "4272fdd6205a2045e1a05b3f4045e5e6647853d0",
|
|
41
41
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
42
42
|
"_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
|
|
43
43
|
"author": {
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@syncfusion/ej2-base": "~29.2.4",
|
|
49
49
|
"@syncfusion/ej2-data": "~29.2.4",
|
|
50
|
-
"@syncfusion/ej2-inputs": "~29.2.
|
|
50
|
+
"@syncfusion/ej2-inputs": "~29.2.5",
|
|
51
51
|
"@syncfusion/ej2-lists": "~29.2.4",
|
|
52
|
-
"@syncfusion/ej2-navigations": "~29.2.
|
|
52
|
+
"@syncfusion/ej2-navigations": "~29.2.5",
|
|
53
53
|
"@syncfusion/ej2-notifications": "~29.2.4",
|
|
54
54
|
"@syncfusion/ej2-popups": "~29.2.4"
|
|
55
55
|
},
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"module": "./index.js",
|
|
77
77
|
"name": "@syncfusion/ej2-dropdowns",
|
|
78
78
|
"typings": "index.d.ts",
|
|
79
|
-
"version": "29.2.
|
|
79
|
+
"version": "29.2.5",
|
|
80
80
|
"sideEffects": false,
|
|
81
81
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
82
82
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventHandler, Property, Event, EmitType, addClass, Browser, KeyboardEventArgs, removeClass, detach } from '@syncfusion/ej2-base';import { isNullOrUndefined, NotifyPropertyChanges, getValue, setValue } from '@syncfusion/ej2-base';import { DropDownList, dropDownListClasses } from '../drop-down-list/drop-down-list';import { FilteringEventArgs } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Search } from '../common/incremental-search';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { Input, InputObject, FloatLabelType } from '@syncfusion/ej2-inputs';import { DataManager, DataOptions, Predicate, Query } from '@syncfusion/ej2-data';
|
|
1
|
+
import { EventHandler, Property, Event, EmitType, addClass, Browser, KeyboardEventArgs, removeClass, detach } from '@syncfusion/ej2-base';import { isNullOrUndefined, NotifyPropertyChanges, getValue, setValue } from '@syncfusion/ej2-base';import { DropDownList, dropDownListClasses } from '../drop-down-list/drop-down-list';import { FilteringEventArgs, ResultData } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Search } from '../common/incremental-search';import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { Input, InputObject, FloatLabelType } from '@syncfusion/ej2-inputs';import { DataManager, DataOptions, Predicate, Query } from '@syncfusion/ej2-data';
|
|
2
2
|
import {CustomValueSpecifierEventArgs} from "./combo-box";
|
|
3
3
|
import {DropDownListModel} from "../drop-down-list/drop-down-list-model";
|
|
4
4
|
|
|
@@ -179,6 +179,7 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
181
|
ComboBox.prototype.updateValues = function () {
|
|
182
|
+
var _this = this;
|
|
182
183
|
if (this.fields.disabled) {
|
|
183
184
|
if (this.value != null) {
|
|
184
185
|
this.value = !this.isDisableItemValue(this.value) ? this.value : null;
|
|
@@ -199,19 +200,22 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
199
200
|
var fields = (this.fields.value) ? this.fields.value : '';
|
|
200
201
|
var currentValue_1 = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
201
202
|
if (this.dataSource instanceof DataManager) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
203
|
+
this.dataSource.executeQuery(new Query().where(new Predicate(fields, 'equal', currentValue_1)))
|
|
204
|
+
.then(function (e) {
|
|
205
|
+
if (e.result.length > 0) {
|
|
206
|
+
_this.itemData = e.result[0];
|
|
207
|
+
var dataItem = _this.getItemData();
|
|
208
|
+
var value = _this.allowObjectBinding ?
|
|
209
|
+
_this.getDataByValue(dataItem.value) : dataItem.value;
|
|
210
|
+
if ((_this.value === dataItem.value && _this.text !== dataItem.text) ||
|
|
211
|
+
(_this.value !== dataItem.value && _this.text === dataItem.text)) {
|
|
212
|
+
_this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
213
|
+
}
|
|
213
214
|
}
|
|
214
|
-
|
|
215
|
+
else {
|
|
216
|
+
_this.valueMuteChange(null);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
215
219
|
}
|
|
216
220
|
else {
|
|
217
221
|
var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', currentValue_1)));
|
|
@@ -239,7 +243,8 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
239
243
|
(this.allowCustom && this.enableVirtualization && !doesItemExist)) {
|
|
240
244
|
this.valueMuteChange(this.value);
|
|
241
245
|
}
|
|
242
|
-
else if (!this.enableVirtualization || (this.enableVirtualization && !
|
|
246
|
+
else if (!this.enableVirtualization || (this.enableVirtualization && !(this.dataSource instanceof DataManager)
|
|
247
|
+
&& !doesItemExist)) {
|
|
243
248
|
this.valueMuteChange(null);
|
|
244
249
|
}
|
|
245
250
|
}
|
|
@@ -403,7 +408,10 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
403
408
|
}
|
|
404
409
|
}
|
|
405
410
|
var activeElement = activeItem.item;
|
|
406
|
-
|
|
411
|
+
var dataItem_1 = this.getItemData();
|
|
412
|
+
if ((!isNullOrUndefined(activeElement) && !this.enableVirtualization) || (this.enableVirtualization &&
|
|
413
|
+
this.isTyped && isNullOrUndefined(dataItem_1) && isNullOrUndefined(dataItem_1.value) &&
|
|
414
|
+
dataItem_1.value.toString() === activeElement.getAttribute('data-value').toString())) {
|
|
407
415
|
var count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
|
|
408
416
|
var height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue('height'), 10);
|
|
409
417
|
if (!isNaN(height) && this.getModuleName() !== 'autocomplete') {
|
|
@@ -1016,6 +1016,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1016
1016
|
};
|
|
1017
1017
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1018
1018
|
DropDownBase.prototype.onActionComplete = function (ulElement, list, e) {
|
|
1019
|
+
var _this = this;
|
|
1019
1020
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1020
1021
|
this.listData = list;
|
|
1021
1022
|
if (this.isVirtualizationEnabled && !this.isCustomDataUpdated && !this.virtualSelectAll) {
|
|
@@ -1045,6 +1046,13 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1045
1046
|
}
|
|
1046
1047
|
}
|
|
1047
1048
|
}
|
|
1049
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1050
|
+
var popupHolder = this.list;
|
|
1051
|
+
if (popupHolder) {
|
|
1052
|
+
var prevHeight = popupHolder.offsetHeight + 'px';
|
|
1053
|
+
popupHolder.style.height = prevHeight;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1048
1056
|
if (!isNullOrUndefined(this.list)) {
|
|
1049
1057
|
if (!this.isVirtualizationEnabled) {
|
|
1050
1058
|
this.list.innerHTML = '';
|
|
@@ -1054,6 +1062,15 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1054
1062
|
this.postRender(this.list, list, this.bindEvent);
|
|
1055
1063
|
}
|
|
1056
1064
|
}
|
|
1065
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1066
|
+
var popupHolder_1 = this.list;
|
|
1067
|
+
if (popupHolder_1) {
|
|
1068
|
+
setTimeout(function () {
|
|
1069
|
+
popupHolder_1.style.height = '';
|
|
1070
|
+
_this.refreshPopup();
|
|
1071
|
+
}, 0);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1057
1074
|
};
|
|
1058
1075
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1059
1076
|
DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
|
|
@@ -1461,7 +1461,8 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1461
1461
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
1462
1462
|
var proxy_1 = this;
|
|
1463
1463
|
// eslint-disable-next-line max-len
|
|
1464
|
-
var duration = (this.
|
|
1464
|
+
var duration = ((this.dataSource instanceof DataManager) && this.groupTemplate) ? 700 :
|
|
1465
|
+
(this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
|
|
1465
1466
|
if (!this.isSecondClick) {
|
|
1466
1467
|
setTimeout(function () {
|
|
1467
1468
|
proxy_1.cloneElements();
|
|
@@ -2376,16 +2377,6 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2376
2377
|
if (!_this.enableVirtualization) {
|
|
2377
2378
|
_this.addItem(e.result, list.length);
|
|
2378
2379
|
}
|
|
2379
|
-
else {
|
|
2380
|
-
_this.itemData = e.result[0];
|
|
2381
|
-
var dataItem = _this.getItemData();
|
|
2382
|
-
var value_2 = _this.allowObjectBinding ?
|
|
2383
|
-
_this.getDataByValue(dataItem.value) : dataItem.value;
|
|
2384
|
-
if ((_this.value === dataItem.value && _this.text !== dataItem.text) ||
|
|
2385
|
-
(_this.value !== dataItem.value && _this.text === dataItem.text)) {
|
|
2386
|
-
_this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value_2 });
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
2380
|
_this.updateValues();
|
|
2390
2381
|
}
|
|
2391
2382
|
else {
|
|
@@ -2512,10 +2503,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2512
2503
|
DropDownList.prototype.addNewItem = function (listData, newElement) {
|
|
2513
2504
|
var _this = this;
|
|
2514
2505
|
if (!isNullOrUndefined(this.itemData) && !isNullOrUndefined(newElement)) {
|
|
2515
|
-
var
|
|
2506
|
+
var value_2 = this.getItemData().value;
|
|
2516
2507
|
var isExist = listData.some(function (data) {
|
|
2517
|
-
return (((typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') && data ===
|
|
2518
|
-
(getValue(_this.fields.value, data) ===
|
|
2508
|
+
return (((typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') && data === value_2) ||
|
|
2509
|
+
(getValue(_this.fields.value, data) === value_2));
|
|
2519
2510
|
});
|
|
2520
2511
|
if (!isExist) {
|
|
2521
2512
|
this.addItem(this.itemData);
|
|
@@ -3892,9 +3883,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3892
3883
|
var listLength_2 = this_1.getItems().length;
|
|
3893
3884
|
var checkField = isNullOrUndefined(this_1.fields.value) ? this_1.fields.text : this_1.fields.value;
|
|
3894
3885
|
this_1.typedString = '';
|
|
3895
|
-
var
|
|
3886
|
+
var value_3 = this_1.allowObjectBinding && !isNullOrUndefined(newProp.value) ?
|
|
3896
3887
|
getValue(checkField, newProp.value) : newProp.value;
|
|
3897
|
-
this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, 'equal',
|
|
3888
|
+
this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, 'equal', value_3)))
|
|
3898
3889
|
.then(function (e) {
|
|
3899
3890
|
if (e.result.length > 0) {
|
|
3900
3891
|
_this.addItem(e.result, listLength_2);
|
|
@@ -4083,6 +4074,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
4083
4074
|
if (!this.enabled) {
|
|
4084
4075
|
return;
|
|
4085
4076
|
}
|
|
4077
|
+
if (this.getModuleName() === 'dropdownlist' && this.beforePopupOpen && !this.isPopupOpen) {
|
|
4078
|
+
this.beforePopupOpen = false;
|
|
4079
|
+
}
|
|
4086
4080
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
4087
4081
|
if (this.isReact && this.getModuleName() === 'combobox' && this.itemTemplate && this.isCustomFilter && this.isAddNewItemTemplate) {
|
|
4088
4082
|
this.renderList();
|
|
@@ -1649,7 +1649,8 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1649
1649
|
loadOnDemand: this.treeSettings.loadOnDemand,
|
|
1650
1650
|
nodeSelecting: this.onBeforeSelect.bind(this),
|
|
1651
1651
|
nodeTemplate: this.itemTemplate,
|
|
1652
|
-
checkDisabledChildren: this.treeSettings.checkDisabledChildren
|
|
1652
|
+
checkDisabledChildren: this.treeSettings.checkDisabledChildren,
|
|
1653
|
+
checkOnClick: true
|
|
1653
1654
|
});
|
|
1654
1655
|
this.treeObj.root = this.root ? this.root : this;
|
|
1655
1656
|
this.treeObj.appendTo(this.tree);
|
|
@@ -1730,7 +1731,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1730
1731
|
_this.popupObj.refreshPosition();
|
|
1731
1732
|
if (!(_this.showSelectAll || _this.allowFiltering) && (!_this.popupDiv.classList.contains(NODATA)
|
|
1732
1733
|
&& _this.treeItems.length > 0)) {
|
|
1733
|
-
var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[
|
|
1734
|
+
var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[_this.value.length - 1] + '"]') : null;
|
|
1734
1735
|
if (focusedElement) {
|
|
1735
1736
|
_this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
|
|
1736
1737
|
focusedElement.setAttribute('tabindex', '0');
|
|
@@ -2177,15 +2178,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2177
2178
|
}
|
|
2178
2179
|
var target = args.event.target;
|
|
2179
2180
|
if ((target.classList.contains('e-fullrow') || target.classList.contains('e-list-text')) && this.showCheckBox) {
|
|
2180
|
-
this.isClicked = true;
|
|
2181
|
-
var getNodeDetails = this.treeObj.getNode(args.node);
|
|
2182
|
-
if (getNodeDetails.isChecked === 'true') {
|
|
2183
|
-
this.treeObj.uncheckAll([args.node]);
|
|
2184
|
-
}
|
|
2185
|
-
else {
|
|
2186
|
-
this.treeObj.checkAll([args.node]);
|
|
2187
|
-
}
|
|
2188
|
-
this.isClicked = false;
|
|
2189
2181
|
this.setMultiSelect();
|
|
2190
2182
|
this.ensurePlaceHolder();
|
|
2191
2183
|
}
|
|
@@ -1237,13 +1237,18 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1237
1237
|
this.checkAndScrollParent();
|
|
1238
1238
|
};
|
|
1239
1239
|
MultiSelect.prototype.checkAndScrollParent = function () {
|
|
1240
|
-
var
|
|
1241
|
-
|
|
1242
|
-
var
|
|
1243
|
-
var
|
|
1244
|
-
if (!isNaN(
|
|
1245
|
-
|
|
1240
|
+
var scrollElement = this.overAllWrapper ? this.overAllWrapper.parentElement : null;
|
|
1241
|
+
while (scrollElement) {
|
|
1242
|
+
var scrollElementStyle = getComputedStyle(scrollElement);
|
|
1243
|
+
var scrollElmentHeight = parseFloat(scrollElementStyle.maxHeight) || parseFloat(scrollElementStyle.height);
|
|
1244
|
+
if (!isNaN(scrollElmentHeight)) {
|
|
1245
|
+
var overflowY = scrollElementStyle.overflowY;
|
|
1246
|
+
if (overflowY === 'auto' || overflowY === 'scroll') {
|
|
1247
|
+
scrollElement.scrollTop = scrollElement.scrollHeight;
|
|
1248
|
+
return;
|
|
1249
|
+
}
|
|
1246
1250
|
}
|
|
1251
|
+
scrollElement = scrollElement.parentElement;
|
|
1247
1252
|
}
|
|
1248
1253
|
};
|
|
1249
1254
|
MultiSelect.prototype.enable = function (state) {
|