@syncfusion/ej2-dropdowns 27.1.48 → 27.1.51
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 +48 -37
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +46 -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/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 +12 -1
- package/src/drop-down-tree/drop-down-tree.js +1 -1
- package/src/list-box/list-box.js +31 -27
- package/src/multi-select/multi-select.js +1 -4
- 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
|
@@ -1844,7 +1844,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
addClass([this.list], dropDownBaseClasses.grouping);
|
|
1846
1846
|
}
|
|
1847
|
-
else {
|
|
1847
|
+
else if (this.getModuleName() !== 'listbox' || (this.getModuleName() === 'listbox' && !this.preventDefActionFilter)) {
|
|
1848
1848
|
dataSource = this.getSortedDataSource(dataSource);
|
|
1849
1849
|
}
|
|
1850
1850
|
const options = this.listOption(dataSource, fields);
|
|
@@ -2391,7 +2391,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
2393
|
const itemsCount = this.getItems().length;
|
|
2394
|
-
|
|
2394
|
+
const isListboxEmpty = itemsCount === 0;
|
|
2395
2395
|
const selectedItemValue = this.list.querySelector('.' + dropDownBaseClasses.selected);
|
|
2396
2396
|
items = (items instanceof Array ? items : [items]);
|
|
2397
2397
|
let index;
|
|
@@ -2441,7 +2441,6 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
2441
2441
|
}
|
|
2442
2442
|
if (this.getModuleName() === 'listbox') {
|
|
2443
2443
|
this.updateActionCompleteData(li, item, isListboxEmpty ? null : index + i);
|
|
2444
|
-
isListboxEmpty = true;
|
|
2445
2444
|
}
|
|
2446
2445
|
else {
|
|
2447
2446
|
this.updateActionCompleteData(li, item, index);
|
|
@@ -3035,12 +3034,20 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3035
3034
|
removeClass([this.inputWrapper.container], dropDownListClasses.disable);
|
|
3036
3035
|
this.inputElement.setAttribute('aria-disabled', 'false');
|
|
3037
3036
|
this.targetElement().setAttribute('tabindex', this.tabIndex);
|
|
3037
|
+
if (this.inputWrapper && this.inputWrapper.container) {
|
|
3038
|
+
this.inputWrapper.container.setAttribute('aria-disabled', 'false');
|
|
3039
|
+
this.inputWrapper.container.removeAttribute('disabled');
|
|
3040
|
+
}
|
|
3038
3041
|
}
|
|
3039
3042
|
else {
|
|
3040
3043
|
this.hidePopup();
|
|
3041
3044
|
addClass([this.inputWrapper.container], dropDownListClasses.disable);
|
|
3042
3045
|
this.inputElement.setAttribute('aria-disabled', 'true');
|
|
3043
3046
|
this.targetElement().tabIndex = -1;
|
|
3047
|
+
if (this.inputWrapper && this.inputWrapper.container) {
|
|
3048
|
+
this.inputWrapper.container.setAttribute('aria-disabled', 'true');
|
|
3049
|
+
this.inputWrapper.container.setAttribute('disabled', '');
|
|
3050
|
+
}
|
|
3044
3051
|
}
|
|
3045
3052
|
}
|
|
3046
3053
|
/**
|
|
@@ -4397,7 +4404,10 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4397
4404
|
}
|
|
4398
4405
|
else {
|
|
4399
4406
|
if (!isNullOrUndefined(this.hiddenElement)) {
|
|
4400
|
-
|
|
4407
|
+
const option = document.createElement('option');
|
|
4408
|
+
option.text = this.text;
|
|
4409
|
+
option.setAttribute('selected', '');
|
|
4410
|
+
this.hiddenElement.appendChild(option);
|
|
4401
4411
|
const selectedElement = this.hiddenElement.querySelector('option');
|
|
4402
4412
|
selectedElement.setAttribute('value', value.toString());
|
|
4403
4413
|
}
|
|
@@ -8542,7 +8552,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8542
8552
|
addClass([focusedElement], ['e-node-focus']);
|
|
8543
8553
|
}
|
|
8544
8554
|
}
|
|
8545
|
-
if (this.treeObj.checkedNodes.length > 0) {
|
|
8555
|
+
if (this.treeObj.checkedNodes.length > 0 && !this.isFilterRestore) {
|
|
8546
8556
|
const nodes = this.treeObj.element.querySelectorAll('li');
|
|
8547
8557
|
const checkedNodes = this.treeObj.element.querySelectorAll('li[aria-checked=true]');
|
|
8548
8558
|
if ((checkedNodes.length === nodes.length || this.checkSelectAll) && this.checkBoxElement) {
|
|
@@ -14439,10 +14449,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
14439
14449
|
this.currentRemoveValue = this.allowObjectBinding ? getValue(((this.fields.value) ?
|
|
14440
14450
|
this.fields.value : ''), value) : value;
|
|
14441
14451
|
this.virtualSelectAll = false;
|
|
14442
|
-
|
|
14443
|
-
if (this.enableVirtualization && isClearAll) {
|
|
14444
|
-
removeVal = [];
|
|
14445
|
-
}
|
|
14452
|
+
const removeVal = this.value.slice(0);
|
|
14446
14453
|
removeVal.splice(index, 1);
|
|
14447
14454
|
if (this.enableVirtualization && this.mode === 'CheckBox') {
|
|
14448
14455
|
this.selectedListData.splice(index, 1);
|
|
@@ -16698,7 +16705,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16698
16705
|
this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
|
|
16699
16706
|
}
|
|
16700
16707
|
this.updateHiddenElement();
|
|
16701
|
-
this.value
|
|
16708
|
+
this.setProperties({ value: [] }, true);
|
|
16702
16709
|
this.virtualSelectAll = false;
|
|
16703
16710
|
if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
|
|
16704
16711
|
this.notify('setCurrentViewDataAsync', {
|
|
@@ -19065,7 +19072,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19065
19072
|
}
|
|
19066
19073
|
filterElem.selectionStart = txtLength;
|
|
19067
19074
|
filterElem.selectionEnd = txtLength;
|
|
19068
|
-
filterElem.
|
|
19075
|
+
if (filterElem.value !== '') {
|
|
19076
|
+
filterElem.focus();
|
|
19077
|
+
}
|
|
19069
19078
|
}
|
|
19070
19079
|
}
|
|
19071
19080
|
if (this.toolbarSettings.items.length && this.scope && this.scope.indexOf('#') > -1 && !isNullOrUndefined(e)) {
|
|
@@ -19509,33 +19518,24 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19509
19518
|
items = (items instanceof Array ? items : [items]);
|
|
19510
19519
|
const fields = this.fields;
|
|
19511
19520
|
let dataValue;
|
|
19512
|
-
|
|
19521
|
+
const objValue = {};
|
|
19513
19522
|
const dupData = [];
|
|
19514
|
-
let itemIdx;
|
|
19515
19523
|
extend(dupData, [], this.jsonData);
|
|
19516
19524
|
const removeIdxes = [];
|
|
19517
19525
|
const removeLiIdxes = [];
|
|
19526
|
+
for (let i = 0; i < dupData.length; i++) {
|
|
19527
|
+
const value = (dupData[i] instanceof Object) ? dupData[i][fields.value] :
|
|
19528
|
+
dupData[i].toString();
|
|
19529
|
+
objValue[value] = i;
|
|
19530
|
+
}
|
|
19518
19531
|
for (let j = 0; j < items.length; j++) {
|
|
19519
|
-
|
|
19520
|
-
|
|
19521
|
-
|
|
19522
|
-
|
|
19523
|
-
|
|
19524
|
-
|
|
19525
|
-
|
|
19526
|
-
if (dupData[i] instanceof Object) {
|
|
19527
|
-
objValue = getValue(fields.value, dupData[i]);
|
|
19528
|
-
}
|
|
19529
|
-
else {
|
|
19530
|
-
objValue = dupData[i].toString();
|
|
19531
|
-
}
|
|
19532
|
-
if (objValue === dataValue) {
|
|
19533
|
-
itemIdx = this.getIndexByValue(dataValue);
|
|
19534
|
-
const idx = itemIdx === i ? itemIdx : i;
|
|
19535
|
-
liCollections.push(liElement[idx]);
|
|
19536
|
-
removeIdxes.push(idx);
|
|
19537
|
-
removeLiIdxes.push(idx);
|
|
19538
|
-
}
|
|
19532
|
+
dataValue = (items[j] instanceof Object) ? items[j][fields.value] :
|
|
19533
|
+
items[j].toString();
|
|
19534
|
+
if (Object.prototype.hasOwnProperty.call(objValue, dataValue)) {
|
|
19535
|
+
const idx = objValue[dataValue];
|
|
19536
|
+
liCollections.push(liElement[idx]);
|
|
19537
|
+
removeIdxes.push(idx);
|
|
19538
|
+
removeLiIdxes.push(idx);
|
|
19539
19539
|
}
|
|
19540
19540
|
}
|
|
19541
19541
|
const validRemoveIdxes = removeIdxes.sort((a, b) => b - a);
|
|
@@ -20354,7 +20354,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20354
20354
|
}
|
|
20355
20355
|
flistboxarray = newFlistboxArray;
|
|
20356
20356
|
moveTo(fListBox.ulElement, tListBox.ulElement, flistboxarray, index);
|
|
20357
|
-
|
|
20357
|
+
fListBox.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
|
|
20358
20358
|
if (isKey) {
|
|
20359
20359
|
this.list.focus();
|
|
20360
20360
|
}
|
|
@@ -20403,8 +20403,8 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20403
20403
|
fListBox.listData = fListBox.sortedData = fListBox.jsonData = tempData;
|
|
20404
20404
|
}
|
|
20405
20405
|
else if (fListBox.allowFiltering) {
|
|
20406
|
+
const disabledData = [];
|
|
20406
20407
|
if (tempLiColl.length > 0) {
|
|
20407
|
-
const disabledData = [];
|
|
20408
20408
|
for (let i = 0; i < tempLiColl.length; i++) {
|
|
20409
20409
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20410
20410
|
disabledData.push(this.getDataByValue(tempLiColl[i].getAttribute('data-value')));
|
|
@@ -20419,7 +20419,13 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20419
20419
|
}
|
|
20420
20420
|
}
|
|
20421
20421
|
}
|
|
20422
|
-
|
|
20422
|
+
if (tempLiColl.length > 0) {
|
|
20423
|
+
fListBox.listData = disabledData;
|
|
20424
|
+
fListBox.sortedData = [];
|
|
20425
|
+
}
|
|
20426
|
+
else {
|
|
20427
|
+
fListBox.listData = fListBox.sortedData = [];
|
|
20428
|
+
}
|
|
20423
20429
|
}
|
|
20424
20430
|
if (isRefresh) {
|
|
20425
20431
|
const sourceElem = tListBox.renderItems(listData, tListBox.fields);
|
|
@@ -20641,7 +20647,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20641
20647
|
}
|
|
20642
20648
|
this.isFiltered = true;
|
|
20643
20649
|
this.remoteFilterAction = true;
|
|
20650
|
+
this.preventDefActionFilter = eventArgsData.preventDefaultAction;
|
|
20644
20651
|
this.dataUpdater(dataSource, query, fields);
|
|
20652
|
+
this.preventDefActionFilter = false;
|
|
20645
20653
|
},
|
|
20646
20654
|
event: e,
|
|
20647
20655
|
cancel: false
|
|
@@ -20651,6 +20659,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20651
20659
|
if (args.cancel || (this.filterInput.value !== '' && this.isFiltered)) {
|
|
20652
20660
|
return;
|
|
20653
20661
|
}
|
|
20662
|
+
this.preventDefActionFilter = false;
|
|
20654
20663
|
if (!args.cancel && !this.isCustomFiltering && !args.preventDefaultAction) {
|
|
20655
20664
|
this.inputString = this.filterInput.value;
|
|
20656
20665
|
this.filteringAction(this.jsonData, new Query(), this.fields);
|
|
@@ -21050,7 +21059,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
21050
21059
|
this.initDraggable();
|
|
21051
21060
|
}
|
|
21052
21061
|
else {
|
|
21053
|
-
|
|
21062
|
+
if (this.ulElement.classList.contains('e-sortable')) {
|
|
21063
|
+
getComponent(this.ulElement, 'sortable').destroy();
|
|
21064
|
+
}
|
|
21054
21065
|
}
|
|
21055
21066
|
break;
|
|
21056
21067
|
case 'allowFiltering':
|