@syncfusion/ej2-dropdowns 26.1.40 → 26.1.42
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 +169 -72
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +170 -75
- 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 +10 -10
- package/src/drop-down-list/drop-down-list.js +20 -9
- package/src/drop-down-tree/drop-down-tree.js +5 -3
- package/src/list-box/list-box.js +73 -31
- package/src/mention/mention.js +2 -2
- package/src/multi-select/multi-select.d.ts +1 -0
- package/src/multi-select/multi-select.js +70 -30
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/drop-down-tree/_layout.scss +1 -1
- package/styles/drop-down-tree/bootstrap-dark.css +1 -1
- package/styles/drop-down-tree/bootstrap.css +1 -1
- package/styles/drop-down-tree/bootstrap4.css +1 -1
- package/styles/drop-down-tree/bootstrap5-dark.css +1 -1
- package/styles/drop-down-tree/bootstrap5.css +1 -1
- package/styles/drop-down-tree/fabric-dark.css +1 -1
- package/styles/drop-down-tree/fabric.css +1 -1
- package/styles/drop-down-tree/fluent-dark.css +1 -1
- package/styles/drop-down-tree/fluent.css +1 -1
- package/styles/drop-down-tree/fluent2.css +1 -1
- package/styles/drop-down-tree/highcontrast-light.css +1 -1
- package/styles/drop-down-tree/highcontrast.css +1 -1
- package/styles/drop-down-tree/material-dark.css +1 -1
- package/styles/drop-down-tree/material.css +1 -1
- package/styles/drop-down-tree/material3-dark.css +1 -1
- package/styles/drop-down-tree/material3.css +1 -1
- package/styles/drop-down-tree/tailwind-dark.css +1 -1
- package/styles/drop-down-tree/tailwind.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/fluent2.css +3 -2
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark.css +1 -1
- package/styles/material3.css +1 -1
- package/styles/multi-select/_fluent2-definition.scss +2 -1
- package/styles/multi-select/_theme.scss +3 -0
- package/styles/multi-select/fluent2.css +2 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 26.1.
|
|
3
|
+
* version : 26.1.42
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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@26.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@26.1.41",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-oXyXylub+CZHjdg53nVw1G9cLpYH15SYWNKUSypradjvrRhpt85Wt0YYc+kthaAjlFDkM2x8z1mD0eafZ85yJw==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"/@syncfusion/ej2-spreadsheet",
|
|
36
36
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
37
37
|
],
|
|
38
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-26.1.
|
|
39
|
-
"_shasum": "
|
|
38
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-26.1.41.tgz",
|
|
39
|
+
"_shasum": "68a76e93c7ed742f782843cefdcea6381b4ded71",
|
|
40
40
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
41
41
|
"_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
|
|
42
42
|
"author": {
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
},
|
|
45
45
|
"bundleDependencies": false,
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@syncfusion/ej2-base": "~26.1.
|
|
48
|
-
"@syncfusion/ej2-data": "~26.1.
|
|
49
|
-
"@syncfusion/ej2-inputs": "~26.1.
|
|
47
|
+
"@syncfusion/ej2-base": "~26.1.42",
|
|
48
|
+
"@syncfusion/ej2-data": "~26.1.42",
|
|
49
|
+
"@syncfusion/ej2-inputs": "~26.1.42",
|
|
50
50
|
"@syncfusion/ej2-lists": "~26.1.35",
|
|
51
|
-
"@syncfusion/ej2-navigations": "~26.1.
|
|
51
|
+
"@syncfusion/ej2-navigations": "~26.1.41",
|
|
52
52
|
"@syncfusion/ej2-notifications": "~26.1.35",
|
|
53
|
-
"@syncfusion/ej2-popups": "~26.1.
|
|
53
|
+
"@syncfusion/ej2-popups": "~26.1.42"
|
|
54
54
|
},
|
|
55
55
|
"deprecated": false,
|
|
56
56
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"module": "./index.js",
|
|
76
76
|
"name": "@syncfusion/ej2-dropdowns",
|
|
77
77
|
"typings": "index.d.ts",
|
|
78
|
-
"version": "26.1.
|
|
78
|
+
"version": "26.1.42",
|
|
79
79
|
"sideEffects": false,
|
|
80
80
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
81
81
|
}
|
|
@@ -1334,7 +1334,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1334
1334
|
this.removeSelection();
|
|
1335
1335
|
li.classList.add(dropDownBaseClasses.selected);
|
|
1336
1336
|
this.removeHover();
|
|
1337
|
-
var value = li.getAttribute('data-value') !==
|
|
1337
|
+
var value = li.getAttribute('data-value') !== null ? this.getFormattedValue(li.getAttribute('data-value')) : null;
|
|
1338
1338
|
var selectedData = this.getDataByValue(value);
|
|
1339
1339
|
if (!this.initial && !preventSelect && !isNullOrUndefined(e)) {
|
|
1340
1340
|
var items = this.detachChanges(selectedData);
|
|
@@ -1409,6 +1409,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1409
1409
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1410
1410
|
DropDownList.prototype.setValue = function (e) {
|
|
1411
1411
|
var dataItem = this.getItemData();
|
|
1412
|
+
this.isTouched = !isNullOrUndefined(e);
|
|
1412
1413
|
if (dataItem.value === null) {
|
|
1413
1414
|
Input.setValue(null, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
1414
1415
|
}
|
|
@@ -3304,7 +3305,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3304
3305
|
DropDownList.prototype.checkData = function (newProp) {
|
|
3305
3306
|
if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource)) && this.itemTemplate && this.allowFiltering &&
|
|
3306
3307
|
!(this.isListSearched && (newProp.dataSource instanceof DataManager))) {
|
|
3307
|
-
this.list
|
|
3308
|
+
if (this.list) {
|
|
3309
|
+
this.list.innerHTML = '';
|
|
3310
|
+
}
|
|
3308
3311
|
this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };
|
|
3309
3312
|
}
|
|
3310
3313
|
this.isListSearched = false;
|
|
@@ -3346,7 +3349,13 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3346
3349
|
this.itemData = this.getDataByValue(currentValue);
|
|
3347
3350
|
var dataItem = this.getItemData();
|
|
3348
3351
|
var value = this.allowObjectBinding ? this.itemData : dataItem.value;
|
|
3349
|
-
|
|
3352
|
+
var index = isNullOrUndefined(value) ? null : this.index;
|
|
3353
|
+
if (isNullOrUndefined(index) && (currentValue == value)) {
|
|
3354
|
+
this.setProperties({ 'text': dataItem.text, 'value': value });
|
|
3355
|
+
}
|
|
3356
|
+
else {
|
|
3357
|
+
this.setProperties({ 'text': dataItem.text, 'index': index, 'value': value });
|
|
3358
|
+
}
|
|
3350
3359
|
};
|
|
3351
3360
|
DropDownList.prototype.updateInputFields = function () {
|
|
3352
3361
|
if (this.getModuleName() === 'dropdownlist') {
|
|
@@ -3948,12 +3957,14 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3948
3957
|
Input.setValue('', this.inputElement, this.floatLabelType, this.showClearButton);
|
|
3949
3958
|
}
|
|
3950
3959
|
this.element.style.display = 'block';
|
|
3951
|
-
if (this.inputWrapper.container
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3960
|
+
if (this.inputWrapper.container && this.inputWrapper.container.parentElement) {
|
|
3961
|
+
if (this.inputWrapper.container.parentElement.tagName === this.getNgDirective()) {
|
|
3962
|
+
detach(this.inputWrapper.container);
|
|
3963
|
+
}
|
|
3964
|
+
else {
|
|
3965
|
+
this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);
|
|
3966
|
+
detach(this.inputWrapper.container);
|
|
3967
|
+
}
|
|
3957
3968
|
}
|
|
3958
3969
|
delete this.hiddenElement;
|
|
3959
3970
|
this.filterInput = null;
|
|
@@ -415,6 +415,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
415
415
|
_this.isFilteredData = false;
|
|
416
416
|
_this.isFilterRestore = true;
|
|
417
417
|
fields = _this.cloneFields(_this.fields);
|
|
418
|
+
_this.treeObj.element.classList.remove('e-filtering');
|
|
418
419
|
}
|
|
419
420
|
else if (args.preventDefaultAction) {
|
|
420
421
|
fields = args.fields;
|
|
@@ -435,6 +436,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
435
436
|
fields = _this.nestedFilter(args.text, args.fields);
|
|
436
437
|
}
|
|
437
438
|
}
|
|
439
|
+
_this.treeObj.element.classList.add('e-filtering');
|
|
438
440
|
}
|
|
439
441
|
_this.hideCheckAll(_this.isFilteredData);
|
|
440
442
|
if (flag) {
|
|
@@ -1531,6 +1533,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1531
1533
|
DropDownTree.prototype.renderPopup = function () {
|
|
1532
1534
|
var _this = this;
|
|
1533
1535
|
if (this.isFilteredData) {
|
|
1536
|
+
this.treeObj.element.classList.remove('e-filtering');
|
|
1534
1537
|
this.filterObj.value = '';
|
|
1535
1538
|
this.treeObj.fields = this.getTreeFields(this.fields);
|
|
1536
1539
|
this.isFilterRestore = true;
|
|
@@ -1600,10 +1603,9 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1600
1603
|
_this.popupObj.refreshPosition();
|
|
1601
1604
|
if (!(_this.showCheckBox && _this.showSelectAll) && (!_this.popupDiv.classList.contains(NODATA)
|
|
1602
1605
|
&& _this.treeItems.length > 0)) {
|
|
1603
|
-
var focusedElement =
|
|
1604
|
-
if (
|
|
1606
|
+
var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[0] + '"]') : null;
|
|
1607
|
+
if (focusedElement) {
|
|
1605
1608
|
_this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
|
|
1606
|
-
focusedElement = _this.treeObj.element.querySelector('[data-uid="' + _this.value[0] + '"]');
|
|
1607
1609
|
focusedElement.setAttribute('tabindex', '0');
|
|
1608
1610
|
}
|
|
1609
1611
|
else {
|
package/src/list-box/list-box.js
CHANGED
|
@@ -116,6 +116,9 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
116
116
|
*/
|
|
117
117
|
ListBox.prototype.addItem = function (items, itemIndex) {
|
|
118
118
|
_super.prototype.addItem.call(this, items, itemIndex);
|
|
119
|
+
if (this.allowFiltering && this.filterInput.value !== '') {
|
|
120
|
+
this.filteringAction(this.jsonData, new Query(), this.fields);
|
|
121
|
+
}
|
|
119
122
|
};
|
|
120
123
|
/**
|
|
121
124
|
* Build and render the component.
|
|
@@ -716,11 +719,9 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
716
719
|
}
|
|
717
720
|
};
|
|
718
721
|
ListBox.prototype.updateListItems = function (sourceElem, destElem) {
|
|
719
|
-
var i = 0;
|
|
720
722
|
destElem.innerHTML = '';
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
}
|
|
723
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
724
|
+
destElem.append.apply(destElem, sourceElem.childNodes);
|
|
724
725
|
};
|
|
725
726
|
ListBox.prototype.removeSelected = function (listObj, elems) {
|
|
726
727
|
if (listObj.selectionSettings.showCheckbox) {
|
|
@@ -852,6 +853,9 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
852
853
|
*/
|
|
853
854
|
ListBox.prototype.addItems = function (items, itemIndex) {
|
|
854
855
|
_super.prototype.addItem.call(this, items, itemIndex);
|
|
856
|
+
if (this.allowFiltering && this.filterInput.value !== '') {
|
|
857
|
+
this.filteringAction(this.jsonData, new Query(), this.fields);
|
|
858
|
+
}
|
|
855
859
|
};
|
|
856
860
|
/**
|
|
857
861
|
* Removes a item from the list. By default, removed the last item in the list,
|
|
@@ -1361,8 +1365,13 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1361
1365
|
};
|
|
1362
1366
|
ListBox.prototype.getDataByElems = function (elems) {
|
|
1363
1367
|
var data = [];
|
|
1364
|
-
|
|
1365
|
-
|
|
1368
|
+
var len = elems.length;
|
|
1369
|
+
for (var i = 0; i < len; i++) {
|
|
1370
|
+
var elem = elems[i];
|
|
1371
|
+
var value = elem.getAttribute('data-value');
|
|
1372
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1373
|
+
var formattedValue = this.getFormattedValue(value);
|
|
1374
|
+
data.push(this.getDataByValue(formattedValue));
|
|
1366
1375
|
}
|
|
1367
1376
|
return data;
|
|
1368
1377
|
};
|
|
@@ -1537,16 +1546,39 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1537
1546
|
fListBox.value = [];
|
|
1538
1547
|
if (elems.length) {
|
|
1539
1548
|
this.removeSelected(fListBox, elems);
|
|
1549
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1550
|
+
var ulChildren_1 = Array.prototype.slice.call(fListBox.ulElement.children);
|
|
1551
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1552
|
+
var listItems_1 = Array.prototype.slice.call(fListBox.ulElement.querySelectorAll('.e-list-item'));
|
|
1553
|
+
var lData_1 = fListBox.listData;
|
|
1554
|
+
var sData_1 = fListBox.sortedData;
|
|
1555
|
+
var jData_1 = fListBox.jsonData;
|
|
1556
|
+
var eData_1;
|
|
1557
|
+
var listDataMap_1 = {};
|
|
1558
|
+
if (elems.length > 199) {
|
|
1559
|
+
for (var _i = 0, _a = fListBox.listData; _i < _a.length; _i++) {
|
|
1560
|
+
var item = _a[_i];
|
|
1561
|
+
if (!isNullOrUndefined(item)) {
|
|
1562
|
+
var key = fListBox.getFormattedValue(getValue((fListBox.fields.value ? fListBox.fields.value : 'value'), item));
|
|
1563
|
+
listDataMap_1[key] = item;
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1540
1567
|
elems.forEach(function (ele) {
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1568
|
+
if (elems.length < 200) {
|
|
1569
|
+
eData_1 = fListBox.getDataByElems([ele])[0];
|
|
1570
|
+
}
|
|
1571
|
+
else {
|
|
1572
|
+
var value_1 = ele.getAttribute('data-value');
|
|
1573
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1574
|
+
var formattedValue = fListBox.getFormattedValue(value_1);
|
|
1575
|
+
eData_1 = listDataMap_1[formattedValue];
|
|
1576
|
+
}
|
|
1577
|
+
idx.push(ulChildren_1.indexOf(ele));
|
|
1578
|
+
dataLiIdx.push(listItems_1.indexOf(ele));
|
|
1579
|
+
dataIdx.push(lData_1.indexOf(eData_1));
|
|
1580
|
+
sortIdx.push(sData_1.indexOf(eData_1));
|
|
1581
|
+
jsonIdx.push(jData_1.indexOf(eData_1));
|
|
1550
1582
|
});
|
|
1551
1583
|
if (this.sortOrder !== 'None') {
|
|
1552
1584
|
sortIdx.forEach(function (i) {
|
|
@@ -1685,20 +1717,27 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1685
1717
|
// eslint-disable-next-line prefer-spread
|
|
1686
1718
|
flistboxarray = Array.apply(null, { length: fListBox.ulElement.childElementCount }).map(Number.call, Number);
|
|
1687
1719
|
}
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1720
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1721
|
+
var childNodes = fListBox.ulElement.childNodes;
|
|
1722
|
+
var childElementCount = fListBox.ulElement.childElementCount;
|
|
1723
|
+
var newFlistboxArray = [];
|
|
1724
|
+
for (var i = 0; i < childElementCount; i++) {
|
|
1725
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1726
|
+
var childNode = childNodes[i];
|
|
1727
|
+
if (childNode.classList.contains('e-disabled')) {
|
|
1728
|
+
tempLiColl.push(childNode);
|
|
1693
1729
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1694
1730
|
tempData.push(fListBox.listData[i]);
|
|
1695
1731
|
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1732
|
+
else {
|
|
1733
|
+
newFlistboxArray.push(i);
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
flistboxarray = newFlistboxArray;
|
|
1737
|
+
if (!isRefresh) {
|
|
1738
|
+
moveTo(fListBox.ulElement, tListBox.ulElement, flistboxarray, index);
|
|
1739
|
+
fListBox.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
|
|
1699
1740
|
}
|
|
1700
|
-
moveTo(fListBox.ulElement, tListBox.ulElement, flistboxarray, index);
|
|
1701
|
-
this.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
|
|
1702
1741
|
if (isKey) {
|
|
1703
1742
|
this.list.focus();
|
|
1704
1743
|
}
|
|
@@ -1754,7 +1793,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1754
1793
|
if (isRefresh) {
|
|
1755
1794
|
var sourceElem = tListBox.renderItems(listData, tListBox.fields);
|
|
1756
1795
|
tListBox.updateListItems(sourceElem, tListBox.ulElement);
|
|
1757
|
-
|
|
1796
|
+
fListBox.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
|
|
1758
1797
|
}
|
|
1759
1798
|
else {
|
|
1760
1799
|
tListBox.sortedData = listData;
|
|
@@ -2044,11 +2083,13 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
2044
2083
|
}
|
|
2045
2084
|
};
|
|
2046
2085
|
ListBox.prototype.resizeHandler = function () {
|
|
2047
|
-
if (this.list.
|
|
2048
|
-
this.list.
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2086
|
+
if (this.list && !(this.cssClass && this.cssClass.indexOf('e-horizontal-listbox') > -1)) {
|
|
2087
|
+
if (this.list.scrollWidth > this.list.offsetWidth) {
|
|
2088
|
+
this.list.querySelector('.e-list-parent').style.display = 'inline-block';
|
|
2089
|
+
}
|
|
2090
|
+
else {
|
|
2091
|
+
this.list.querySelector('.e-list-parent').style.display = 'block';
|
|
2092
|
+
}
|
|
2052
2093
|
}
|
|
2053
2094
|
};
|
|
2054
2095
|
ListBox.prototype.getValidIndex = function (cli, index, keyCode) {
|
|
@@ -2192,6 +2233,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
2192
2233
|
};
|
|
2193
2234
|
ListBox.prototype.checkDisabledState = function (inst) {
|
|
2194
2235
|
if (isNullOrUndefined(inst.ulElement)) {
|
|
2236
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2195
2237
|
if (!isNullOrUndefined(this.dataSource) && isNullOrUndefined(this.dataSource.length)) {
|
|
2196
2238
|
return false;
|
|
2197
2239
|
}
|
package/src/mention/mention.js
CHANGED
|
@@ -1308,10 +1308,10 @@ var Mention = /** @class */ (function (_super) {
|
|
|
1308
1308
|
}
|
|
1309
1309
|
if (this.isContentEditable(this.inputElement)) {
|
|
1310
1310
|
if (Browser.isAndroid) {
|
|
1311
|
-
return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
|
|
1311
|
+
return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
|
|
1312
1312
|
}
|
|
1313
1313
|
else {
|
|
1314
|
-
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
|
|
1314
|
+
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : ' ');
|
|
1315
1315
|
}
|
|
1316
1316
|
}
|
|
1317
1317
|
else {
|
|
@@ -779,6 +779,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
779
779
|
private findGroupStart;
|
|
780
780
|
private findGroupAttrtibutes;
|
|
781
781
|
private updateCheckBox;
|
|
782
|
+
private disableGroupHeader;
|
|
782
783
|
private deselectHeader;
|
|
783
784
|
private onMouseOver;
|
|
784
785
|
private onMouseLeave;
|
|
@@ -558,6 +558,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
558
558
|
this.isCustomRendered = true;
|
|
559
559
|
this.remoteCustomValue = this.enableVirtualization ? false : this.remoteCustomValue;
|
|
560
560
|
}
|
|
561
|
+
if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy) && !isNullOrUndefined(this.fields.disabled)) {
|
|
562
|
+
this.disableGroupHeader();
|
|
563
|
+
}
|
|
561
564
|
if (this.dataSource instanceof DataManager && this.mode === 'CheckBox' && this.allowFiltering) {
|
|
562
565
|
this.removeFocus();
|
|
563
566
|
}
|
|
@@ -721,9 +724,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
721
724
|
return (!isNullOrUndefined(liElement) ? liElement : this.liCollections[0]);
|
|
722
725
|
};
|
|
723
726
|
MultiSelect.prototype.checkSelectAll = function () {
|
|
724
|
-
var groupItemLength = this.list.querySelectorAll('li.e-list-group-item.e-active').length;
|
|
727
|
+
var groupItemLength = !isNullOrUndefined(this.fields.disabled) ? this.list.querySelectorAll('li.e-list-group-item.e-active:not(.e-disabled)').length : this.list.querySelectorAll('li.e-list-group-item.e-active').length;
|
|
725
728
|
var listItem = this.list.querySelectorAll('li.e-list-item');
|
|
726
|
-
var searchCount = this.enableVirtualization ? this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)').length : this.list.querySelectorAll('li.' + dropDownBaseClasses.li).length;
|
|
729
|
+
var searchCount = this.enableVirtualization ? this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-virtual-list)').length : !isNullOrUndefined(this.fields.disabled) ? this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-disabled)').length : this.list.querySelectorAll('li.' + dropDownBaseClasses.li).length;
|
|
727
730
|
var searchActiveCount = this.list.querySelectorAll('li.' + dropDownBaseClasses.selected).length;
|
|
728
731
|
if (this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {
|
|
729
732
|
searchActiveCount = searchActiveCount - groupItemLength;
|
|
@@ -2112,7 +2115,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2112
2115
|
}
|
|
2113
2116
|
var focusedLi = this.list ? this.list.querySelector('.e-item-focus') : null;
|
|
2114
2117
|
if (this.isDisabledElement(focusedLi)) {
|
|
2115
|
-
if (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem):not(.e-disabled)').length === 0) {
|
|
2118
|
+
if (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem):not(.e-disabled)').length === 0 || (this.keyCode === 38 && this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy) && focusedLi === this.list.querySelector('li.e-list-group-item'))) {
|
|
2116
2119
|
this.removeFocus();
|
|
2117
2120
|
return;
|
|
2118
2121
|
}
|
|
@@ -2518,9 +2521,17 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2518
2521
|
MultiSelect.prototype.checkMaxSelection = function () {
|
|
2519
2522
|
var limit = this.value && this.value.length ? this.value.length : 0;
|
|
2520
2523
|
if (limit === this.maximumSelectionLength) {
|
|
2521
|
-
var
|
|
2524
|
+
var activeItems = this.list.querySelectorAll('li.'
|
|
2525
|
+
+ dropDownBaseClasses.li + '.e-active');
|
|
2526
|
+
removeClass(activeItems, 'e-disable');
|
|
2527
|
+
var inactiveItems = this.list.querySelectorAll('li.'
|
|
2522
2528
|
+ dropDownBaseClasses.li + ':not(.e-active)');
|
|
2523
|
-
addClass(
|
|
2529
|
+
addClass(inactiveItems, 'e-disable');
|
|
2530
|
+
}
|
|
2531
|
+
if (limit < this.maximumSelectionLength) {
|
|
2532
|
+
var collection = this.list.querySelectorAll('li.'
|
|
2533
|
+
+ dropDownBaseClasses.li);
|
|
2534
|
+
removeClass(collection, 'e-disable');
|
|
2524
2535
|
}
|
|
2525
2536
|
};
|
|
2526
2537
|
MultiSelect.prototype.dispatchSelect = function (value, eve, element, isNotTrigger, length) {
|
|
@@ -3076,7 +3087,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3076
3087
|
if (this.mode === 'CheckBox') {
|
|
3077
3088
|
this.refreshPlaceHolder();
|
|
3078
3089
|
this.refreshInputHight();
|
|
3079
|
-
if (this.changeOnBlur && isClearAll && (isNullOrUndefined(this.value) || this.value.length === 0)) {
|
|
3090
|
+
if (!this.changeOnBlur && isClearAll && (isNullOrUndefined(this.value) || this.value.length === 0)) {
|
|
3080
3091
|
this.updateValueState(e, this.value, this.tempValues);
|
|
3081
3092
|
}
|
|
3082
3093
|
}
|
|
@@ -3897,17 +3908,19 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3897
3908
|
};
|
|
3898
3909
|
MultiSelect.prototype.findGroupAttrtibutes = function (listElement, checked, unChecked, count, position) {
|
|
3899
3910
|
while (!listElement.classList.contains('e-list-group-item')) {
|
|
3900
|
-
if (
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
listElement.classList.contains('e-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3911
|
+
if (!(this.fields.disabled && this.isDisabledElement(listElement))) {
|
|
3912
|
+
if (listElement.classList.contains('e-list-icon')) {
|
|
3913
|
+
listElement = listElement.parentElement;
|
|
3914
|
+
}
|
|
3915
|
+
if (listElement.getElementsByClassName('e-frame')[0].classList.contains('e-check') &&
|
|
3916
|
+
listElement.classList.contains('e-list-item')) {
|
|
3917
|
+
checked++;
|
|
3918
|
+
}
|
|
3919
|
+
else if (listElement.classList.contains('e-list-item')) {
|
|
3920
|
+
unChecked++;
|
|
3921
|
+
}
|
|
3922
|
+
count++;
|
|
3909
3923
|
}
|
|
3910
|
-
count++;
|
|
3911
3924
|
listElement = position ? listElement.nextElementSibling : listElement.previousElementSibling;
|
|
3912
3925
|
if (listElement == null) {
|
|
3913
3926
|
break;
|
|
@@ -3916,7 +3929,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3916
3929
|
return [checked, unChecked, count];
|
|
3917
3930
|
};
|
|
3918
3931
|
MultiSelect.prototype.updateCheckBox = function (groupHeader, checked, unChecked, count) {
|
|
3919
|
-
if (groupHeader === null) {
|
|
3932
|
+
if (groupHeader === null || (!isNullOrUndefined(this.fields.disabled) && count === 0)) {
|
|
3920
3933
|
return;
|
|
3921
3934
|
}
|
|
3922
3935
|
var checkBoxElement = groupHeader.getElementsByClassName('e-frame')[0];
|
|
@@ -3945,6 +3958,28 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3945
3958
|
groupHeader.setAttribute('aria-selected', 'false');
|
|
3946
3959
|
}
|
|
3947
3960
|
};
|
|
3961
|
+
MultiSelect.prototype.disableGroupHeader = function () {
|
|
3962
|
+
var collection = this.list.querySelectorAll('li.e-list-group-item');
|
|
3963
|
+
if (collection) {
|
|
3964
|
+
for (var index = 0; index < collection.length; index++) {
|
|
3965
|
+
var isDisabled = true;
|
|
3966
|
+
var target = collection[index].nextElementSibling;
|
|
3967
|
+
while (!target.classList.contains('e-list-group-item')) {
|
|
3968
|
+
if (!this.isDisabledElement(target)) {
|
|
3969
|
+
isDisabled = false;
|
|
3970
|
+
break;
|
|
3971
|
+
}
|
|
3972
|
+
target = target.nextElementSibling;
|
|
3973
|
+
if (target == null) {
|
|
3974
|
+
break;
|
|
3975
|
+
}
|
|
3976
|
+
}
|
|
3977
|
+
if (isDisabled) {
|
|
3978
|
+
this.disableListItem(collection[index]);
|
|
3979
|
+
}
|
|
3980
|
+
}
|
|
3981
|
+
}
|
|
3982
|
+
};
|
|
3948
3983
|
MultiSelect.prototype.deselectHeader = function () {
|
|
3949
3984
|
var limit = this.value && this.value.length ? this.value.length : 0;
|
|
3950
3985
|
var collection = this.list.querySelectorAll('li.e-list-group-item:not(.e-active)');
|
|
@@ -4318,22 +4353,24 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
4318
4353
|
return;
|
|
4319
4354
|
}
|
|
4320
4355
|
while (listElement.classList.contains('e-list-item')) {
|
|
4321
|
-
if (
|
|
4322
|
-
if (
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4356
|
+
if (!(this.fields.disabled && this.isDisabledElement(listElement))) {
|
|
4357
|
+
if (state) {
|
|
4358
|
+
if (!listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
|
|
4359
|
+
var selectionLimit = this.value && this.value.length ? this.value.length : 0;
|
|
4360
|
+
if (listElement.classList.contains('e-active')) {
|
|
4361
|
+
selectionLimit -= 1;
|
|
4362
|
+
}
|
|
4363
|
+
if (selectionLimit < this.maximumSelectionLength) {
|
|
4364
|
+
this.updateListSelection(listElement, event);
|
|
4365
|
+
}
|
|
4326
4366
|
}
|
|
4327
|
-
|
|
4367
|
+
}
|
|
4368
|
+
else {
|
|
4369
|
+
if (listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
|
|
4328
4370
|
this.updateListSelection(listElement, event);
|
|
4329
4371
|
}
|
|
4330
4372
|
}
|
|
4331
4373
|
}
|
|
4332
|
-
else {
|
|
4333
|
-
if (listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {
|
|
4334
|
-
this.updateListSelection(listElement, event);
|
|
4335
|
-
}
|
|
4336
|
-
}
|
|
4337
4374
|
listElement = listElement.nextElementSibling;
|
|
4338
4375
|
if (listElement == null) {
|
|
4339
4376
|
break;
|
|
@@ -4636,7 +4673,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
4636
4673
|
}
|
|
4637
4674
|
if (this.mode === 'CheckBox') {
|
|
4638
4675
|
this.updateDelimView();
|
|
4639
|
-
if (!(isRemoveAll || this.isSelectAll) && this.isSelectAllTarget) {
|
|
4676
|
+
if ((!(isRemoveAll || this.isSelectAll) && this.isSelectAllTarget) || (this.isSelectAll && this.isSelectAllTarget)) {
|
|
4640
4677
|
this.updateDelimeter(this.delimiterChar, event);
|
|
4641
4678
|
}
|
|
4642
4679
|
this.refreshInputHight();
|
|
@@ -5195,7 +5232,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
5195
5232
|
* @returns {void}
|
|
5196
5233
|
*/
|
|
5197
5234
|
MultiSelect.prototype.render = function () {
|
|
5198
|
-
if (!isNullOrUndefined(this.value)) {
|
|
5235
|
+
if (!isNullOrUndefined(this.value) && this.value.length > 0) {
|
|
5199
5236
|
// eslint-disable-next-line
|
|
5200
5237
|
this.value = this.value.slice();
|
|
5201
5238
|
}
|
|
@@ -5592,6 +5629,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
5592
5629
|
this.removeDisabledItemsValue(this.value);
|
|
5593
5630
|
this.updateVal(this.value, oldValue, 'value');
|
|
5594
5631
|
}
|
|
5632
|
+
if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {
|
|
5633
|
+
this.disableGroupHeader();
|
|
5634
|
+
}
|
|
5595
5635
|
}
|
|
5596
5636
|
}
|
|
5597
5637
|
}
|
package/styles/bootstrap.css
CHANGED
package/styles/bootstrap4.css
CHANGED
|
@@ -1004,7 +1004,7 @@ ejs-dropdownlist {
|
|
|
1004
1004
|
.e-ddt .e-dropdowntree.e-chip-input,
|
|
1005
1005
|
.e-ddt input[readonly].e-input.e-chip-input {
|
|
1006
1006
|
width: 0;
|
|
1007
|
-
|
|
1007
|
+
visibility: hidden;
|
|
1008
1008
|
}
|
|
1009
1009
|
.e-ddt.e-popup {
|
|
1010
1010
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
package/styles/bootstrap5.css
CHANGED