@syncfusion/ej2-dropdowns 27.1.48 → 27.1.50
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 +38 -32
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +37 -31
- 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 +12 -13
- package/src/drop-down-base/drop-down-base.d.ts +1 -0
- package/src/drop-down-base/drop-down-base.js +1 -2
- package/src/drop-down-list/drop-down-list.js +4 -1
- package/src/drop-down-tree/drop-down-tree.js +1 -1
- package/src/list-box/list-box.js +31 -27
- package/styles/bootstrap-dark-lite.css +4 -1
- package/styles/bootstrap-dark.css +4 -1
- package/styles/bootstrap-lite.css +4 -1
- package/styles/bootstrap.css +4 -1
- package/styles/bootstrap4-lite.css +3 -1
- package/styles/bootstrap4.css +3 -1
- package/styles/bootstrap5-dark-lite.css +6 -1
- package/styles/bootstrap5-dark.css +6 -1
- package/styles/bootstrap5-lite.css +6 -1
- package/styles/bootstrap5.3-lite.css +6 -1
- package/styles/bootstrap5.3.css +6 -1
- package/styles/bootstrap5.css +6 -1
- package/styles/drop-down-list/_theme.scss +1 -3
- package/styles/drop-down-list/bootstrap-dark.css +1 -0
- package/styles/drop-down-list/bootstrap.css +1 -0
- package/styles/drop-down-list/fabric-dark.css +1 -0
- package/styles/drop-down-list/fabric.css +1 -0
- package/styles/drop-down-list/fluent-dark.css +1 -0
- package/styles/drop-down-list/fluent.css +1 -0
- package/styles/drop-down-list/fluent2.css +1 -0
- package/styles/drop-down-list/highcontrast-light.css +1 -0
- package/styles/drop-down-list/material-dark.css +1 -0
- package/styles/drop-down-list/material.css +1 -0
- package/styles/drop-down-list/material3-dark.css +1 -0
- package/styles/drop-down-list/material3.css +1 -0
- package/styles/drop-down-list/tailwind-dark.css +1 -0
- package/styles/drop-down-list/tailwind.css +1 -0
- package/styles/drop-down-tree/_theme.scss +5 -0
- package/styles/drop-down-tree/bootstrap5-dark.css +3 -0
- package/styles/drop-down-tree/bootstrap5.3.css +3 -0
- package/styles/drop-down-tree/bootstrap5.css +3 -0
- package/styles/fabric-dark-lite.css +4 -1
- package/styles/fabric-dark.css +4 -1
- package/styles/fabric-lite.css +4 -1
- package/styles/fabric.css +4 -1
- package/styles/fluent-dark-lite.css +4 -1
- package/styles/fluent-dark.css +4 -1
- package/styles/fluent-lite.css +4 -1
- package/styles/fluent.css +4 -1
- package/styles/fluent2-lite.css +4 -1
- package/styles/fluent2.css +4 -1
- package/styles/highcontrast-light-lite.css +4 -1
- package/styles/highcontrast-light.css +4 -1
- package/styles/highcontrast-lite.css +3 -1
- package/styles/highcontrast.css +3 -1
- package/styles/list-box/_layout.scss +1 -0
- package/styles/list-box/bootstrap-dark.css +3 -1
- package/styles/list-box/bootstrap.css +3 -1
- package/styles/list-box/bootstrap4.css +3 -1
- package/styles/list-box/bootstrap5-dark.css +3 -1
- package/styles/list-box/bootstrap5.3.css +3 -1
- package/styles/list-box/bootstrap5.css +3 -1
- package/styles/list-box/fabric-dark.css +3 -1
- package/styles/list-box/fabric.css +3 -1
- package/styles/list-box/fluent-dark.css +3 -1
- package/styles/list-box/fluent.css +3 -1
- package/styles/list-box/fluent2.css +3 -1
- package/styles/list-box/highcontrast-light.css +3 -1
- package/styles/list-box/highcontrast.css +3 -1
- package/styles/list-box/material-dark.css +3 -1
- package/styles/list-box/material.css +3 -1
- package/styles/list-box/material3-dark.css +3 -1
- package/styles/list-box/material3.css +3 -1
- package/styles/list-box/tailwind-dark.css +3 -1
- package/styles/list-box/tailwind.css +3 -1
- package/styles/material-dark-lite.css +4 -1
- package/styles/material-dark.css +4 -1
- package/styles/material-lite.css +4 -1
- package/styles/material.css +4 -1
- package/styles/material3-dark-lite.css +4 -1
- package/styles/material3-dark.css +4 -1
- package/styles/material3-lite.css +4 -1
- package/styles/material3.css +4 -1
- package/styles/tailwind-dark-lite.css +4 -1
- package/styles/tailwind-dark.css +4 -1
- package/styles/tailwind-lite.css +4 -1
- package/styles/tailwind.css +4 -1
|
@@ -1928,7 +1928,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1928
1928
|
}
|
|
1929
1929
|
addClass([this.list], dropDownBaseClasses.grouping);
|
|
1930
1930
|
}
|
|
1931
|
-
else {
|
|
1931
|
+
else if (this.getModuleName() !== 'listbox' || (this.getModuleName() === 'listbox' && !this.preventDefActionFilter)) {
|
|
1932
1932
|
dataSource = this.getSortedDataSource(dataSource);
|
|
1933
1933
|
}
|
|
1934
1934
|
var options = this.listOption(dataSource, fields);
|
|
@@ -2526,7 +2526,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2526
2526
|
}
|
|
2527
2527
|
if (this.getModuleName() === 'listbox') {
|
|
2528
2528
|
this.updateActionCompleteData(li, item, isListboxEmpty ? null : index + i);
|
|
2529
|
-
isListboxEmpty = true;
|
|
2530
2529
|
}
|
|
2531
2530
|
else {
|
|
2532
2531
|
this.updateActionCompleteData(li, item, index);
|
|
@@ -4506,7 +4505,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4506
4505
|
}
|
|
4507
4506
|
else {
|
|
4508
4507
|
if (!isNullOrUndefined(this.hiddenElement)) {
|
|
4509
|
-
|
|
4508
|
+
var option = document.createElement('option');
|
|
4509
|
+
option.text = this.text;
|
|
4510
|
+
option.setAttribute('selected', '');
|
|
4511
|
+
this.hiddenElement.appendChild(option);
|
|
4510
4512
|
var selectedElement = this.hiddenElement.querySelector('option');
|
|
4511
4513
|
selectedElement.setAttribute('value', value.toString());
|
|
4512
4514
|
}
|
|
@@ -8726,7 +8728,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8726
8728
|
addClass([focusedElement], ['e-node-focus']);
|
|
8727
8729
|
}
|
|
8728
8730
|
}
|
|
8729
|
-
if (_this.treeObj.checkedNodes.length > 0) {
|
|
8731
|
+
if (_this.treeObj.checkedNodes.length > 0 && !_this.isFilterRestore) {
|
|
8730
8732
|
var nodes = _this.treeObj.element.querySelectorAll('li');
|
|
8731
8733
|
var checkedNodes = _this.treeObj.element.querySelectorAll('li[aria-checked=true]');
|
|
8732
8734
|
if ((checkedNodes.length === nodes.length || _this.checkSelectAll) && _this.checkBoxElement) {
|
|
@@ -19383,7 +19385,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19383
19385
|
}
|
|
19384
19386
|
filterElem.selectionStart = txtLength;
|
|
19385
19387
|
filterElem.selectionEnd = txtLength;
|
|
19386
|
-
filterElem.
|
|
19388
|
+
if (filterElem.value !== '') {
|
|
19389
|
+
filterElem.focus();
|
|
19390
|
+
}
|
|
19387
19391
|
}
|
|
19388
19392
|
}
|
|
19389
19393
|
if (this.toolbarSettings.items.length && this.scope && this.scope.indexOf('#') > -1 && !isNullOrUndefined(e)) {
|
|
@@ -19835,33 +19839,24 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19835
19839
|
items = (items instanceof Array ? items : [items]);
|
|
19836
19840
|
var fields = this.fields;
|
|
19837
19841
|
var dataValue = void 0;
|
|
19838
|
-
var objValue =
|
|
19842
|
+
var objValue = {};
|
|
19839
19843
|
var dupData = [];
|
|
19840
|
-
var itemIdx = void 0;
|
|
19841
19844
|
extend(dupData, [], this.jsonData);
|
|
19842
19845
|
var removeIdxes = [];
|
|
19843
19846
|
var removeLiIdxes = [];
|
|
19847
|
+
for (var i = 0; i < dupData.length; i++) {
|
|
19848
|
+
var value = (dupData[i] instanceof Object) ? dupData[i][fields.value] :
|
|
19849
|
+
dupData[i].toString();
|
|
19850
|
+
objValue[value] = i;
|
|
19851
|
+
}
|
|
19844
19852
|
for (var j = 0; j < items.length; j++) {
|
|
19845
|
-
|
|
19846
|
-
|
|
19847
|
-
|
|
19848
|
-
|
|
19849
|
-
|
|
19850
|
-
|
|
19851
|
-
|
|
19852
|
-
if (dupData[i] instanceof Object) {
|
|
19853
|
-
objValue = getValue(fields.value, dupData[i]);
|
|
19854
|
-
}
|
|
19855
|
-
else {
|
|
19856
|
-
objValue = dupData[i].toString();
|
|
19857
|
-
}
|
|
19858
|
-
if (objValue === dataValue) {
|
|
19859
|
-
itemIdx = this.getIndexByValue(dataValue);
|
|
19860
|
-
var idx = itemIdx === i ? itemIdx : i;
|
|
19861
|
-
liCollections.push(liElement[idx]);
|
|
19862
|
-
removeIdxes.push(idx);
|
|
19863
|
-
removeLiIdxes.push(idx);
|
|
19864
|
-
}
|
|
19853
|
+
dataValue = (items[j] instanceof Object) ? items[j][fields.value] :
|
|
19854
|
+
items[j].toString();
|
|
19855
|
+
if (Object.prototype.hasOwnProperty.call(objValue, dataValue)) {
|
|
19856
|
+
var idx = objValue[dataValue];
|
|
19857
|
+
liCollections.push(liElement[idx]);
|
|
19858
|
+
removeIdxes.push(idx);
|
|
19859
|
+
removeLiIdxes.push(idx);
|
|
19865
19860
|
}
|
|
19866
19861
|
}
|
|
19867
19862
|
var validRemoveIdxes = removeIdxes.sort(function (a, b) { return b - a; });
|
|
@@ -20695,7 +20690,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20695
20690
|
}
|
|
20696
20691
|
flistboxarray = newFlistboxArray;
|
|
20697
20692
|
moveTo(fListBox.ulElement, tListBox.ulElement, flistboxarray, index);
|
|
20698
|
-
|
|
20693
|
+
fListBox.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
|
|
20699
20694
|
if (isKey) {
|
|
20700
20695
|
this.list.focus();
|
|
20701
20696
|
}
|
|
@@ -20744,8 +20739,8 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20744
20739
|
fListBox.listData = fListBox.sortedData = fListBox.jsonData = tempData;
|
|
20745
20740
|
}
|
|
20746
20741
|
else if (fListBox.allowFiltering) {
|
|
20742
|
+
var disabledData_1 = [];
|
|
20747
20743
|
if (tempLiColl.length > 0) {
|
|
20748
|
-
var disabledData_1 = [];
|
|
20749
20744
|
for (var i = 0; i < tempLiColl.length; i++) {
|
|
20750
20745
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20751
20746
|
disabledData_1.push(this.getDataByValue(tempLiColl[i].getAttribute('data-value')));
|
|
@@ -20762,7 +20757,13 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20762
20757
|
}
|
|
20763
20758
|
}
|
|
20764
20759
|
}
|
|
20765
|
-
|
|
20760
|
+
if (tempLiColl.length > 0) {
|
|
20761
|
+
fListBox.listData = disabledData_1;
|
|
20762
|
+
fListBox.sortedData = [];
|
|
20763
|
+
}
|
|
20764
|
+
else {
|
|
20765
|
+
fListBox.listData = fListBox.sortedData = [];
|
|
20766
|
+
}
|
|
20766
20767
|
}
|
|
20767
20768
|
if (isRefresh) {
|
|
20768
20769
|
var sourceElem = tListBox.renderItems(listData, tListBox.fields);
|
|
@@ -20986,7 +20987,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20986
20987
|
}
|
|
20987
20988
|
_this.isFiltered = true;
|
|
20988
20989
|
_this.remoteFilterAction = true;
|
|
20990
|
+
_this.preventDefActionFilter = eventArgsData_1.preventDefaultAction;
|
|
20989
20991
|
_this.dataUpdater(dataSource, query, fields);
|
|
20992
|
+
_this.preventDefActionFilter = false;
|
|
20990
20993
|
},
|
|
20991
20994
|
event: e,
|
|
20992
20995
|
cancel: false
|
|
@@ -20996,6 +20999,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20996
20999
|
if (args.cancel || (_this.filterInput.value !== '' && _this.isFiltered)) {
|
|
20997
21000
|
return;
|
|
20998
21001
|
}
|
|
21002
|
+
_this.preventDefActionFilter = false;
|
|
20999
21003
|
if (!args.cancel && !_this.isCustomFiltering && !args.preventDefaultAction) {
|
|
21000
21004
|
_this.inputString = _this.filterInput.value;
|
|
21001
21005
|
_this.filteringAction(_this.jsonData, new Query(), _this.fields);
|
|
@@ -21405,7 +21409,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
21405
21409
|
this.initDraggable();
|
|
21406
21410
|
}
|
|
21407
21411
|
else {
|
|
21408
|
-
|
|
21412
|
+
if (this.ulElement.classList.contains('e-sortable')) {
|
|
21413
|
+
getComponent(this.ulElement, 'sortable').destroy();
|
|
21414
|
+
}
|
|
21409
21415
|
}
|
|
21410
21416
|
break;
|
|
21411
21417
|
case 'allowFiltering':
|