@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
|
@@ -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);
|
|
@@ -4397,7 +4396,10 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4397
4396
|
}
|
|
4398
4397
|
else {
|
|
4399
4398
|
if (!isNullOrUndefined(this.hiddenElement)) {
|
|
4400
|
-
|
|
4399
|
+
const option = document.createElement('option');
|
|
4400
|
+
option.text = this.text;
|
|
4401
|
+
option.setAttribute('selected', '');
|
|
4402
|
+
this.hiddenElement.appendChild(option);
|
|
4401
4403
|
const selectedElement = this.hiddenElement.querySelector('option');
|
|
4402
4404
|
selectedElement.setAttribute('value', value.toString());
|
|
4403
4405
|
}
|
|
@@ -8542,7 +8544,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8542
8544
|
addClass([focusedElement], ['e-node-focus']);
|
|
8543
8545
|
}
|
|
8544
8546
|
}
|
|
8545
|
-
if (this.treeObj.checkedNodes.length > 0) {
|
|
8547
|
+
if (this.treeObj.checkedNodes.length > 0 && !this.isFilterRestore) {
|
|
8546
8548
|
const nodes = this.treeObj.element.querySelectorAll('li');
|
|
8547
8549
|
const checkedNodes = this.treeObj.element.querySelectorAll('li[aria-checked=true]');
|
|
8548
8550
|
if ((checkedNodes.length === nodes.length || this.checkSelectAll) && this.checkBoxElement) {
|
|
@@ -19065,7 +19067,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19065
19067
|
}
|
|
19066
19068
|
filterElem.selectionStart = txtLength;
|
|
19067
19069
|
filterElem.selectionEnd = txtLength;
|
|
19068
|
-
filterElem.
|
|
19070
|
+
if (filterElem.value !== '') {
|
|
19071
|
+
filterElem.focus();
|
|
19072
|
+
}
|
|
19069
19073
|
}
|
|
19070
19074
|
}
|
|
19071
19075
|
if (this.toolbarSettings.items.length && this.scope && this.scope.indexOf('#') > -1 && !isNullOrUndefined(e)) {
|
|
@@ -19509,33 +19513,24 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19509
19513
|
items = (items instanceof Array ? items : [items]);
|
|
19510
19514
|
const fields = this.fields;
|
|
19511
19515
|
let dataValue;
|
|
19512
|
-
|
|
19516
|
+
const objValue = {};
|
|
19513
19517
|
const dupData = [];
|
|
19514
|
-
let itemIdx;
|
|
19515
19518
|
extend(dupData, [], this.jsonData);
|
|
19516
19519
|
const removeIdxes = [];
|
|
19517
19520
|
const removeLiIdxes = [];
|
|
19521
|
+
for (let i = 0; i < dupData.length; i++) {
|
|
19522
|
+
const value = (dupData[i] instanceof Object) ? dupData[i][fields.value] :
|
|
19523
|
+
dupData[i].toString();
|
|
19524
|
+
objValue[value] = i;
|
|
19525
|
+
}
|
|
19518
19526
|
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
|
-
}
|
|
19527
|
+
dataValue = (items[j] instanceof Object) ? items[j][fields.value] :
|
|
19528
|
+
items[j].toString();
|
|
19529
|
+
if (Object.prototype.hasOwnProperty.call(objValue, dataValue)) {
|
|
19530
|
+
const idx = objValue[dataValue];
|
|
19531
|
+
liCollections.push(liElement[idx]);
|
|
19532
|
+
removeIdxes.push(idx);
|
|
19533
|
+
removeLiIdxes.push(idx);
|
|
19539
19534
|
}
|
|
19540
19535
|
}
|
|
19541
19536
|
const validRemoveIdxes = removeIdxes.sort((a, b) => b - a);
|
|
@@ -20354,7 +20349,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20354
20349
|
}
|
|
20355
20350
|
flistboxarray = newFlistboxArray;
|
|
20356
20351
|
moveTo(fListBox.ulElement, tListBox.ulElement, flistboxarray, index);
|
|
20357
|
-
|
|
20352
|
+
fListBox.trigger('actionComplete', { items: tempItems, eventName: this.toolbarAction });
|
|
20358
20353
|
if (isKey) {
|
|
20359
20354
|
this.list.focus();
|
|
20360
20355
|
}
|
|
@@ -20403,8 +20398,8 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20403
20398
|
fListBox.listData = fListBox.sortedData = fListBox.jsonData = tempData;
|
|
20404
20399
|
}
|
|
20405
20400
|
else if (fListBox.allowFiltering) {
|
|
20401
|
+
const disabledData = [];
|
|
20406
20402
|
if (tempLiColl.length > 0) {
|
|
20407
|
-
const disabledData = [];
|
|
20408
20403
|
for (let i = 0; i < tempLiColl.length; i++) {
|
|
20409
20404
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20410
20405
|
disabledData.push(this.getDataByValue(tempLiColl[i].getAttribute('data-value')));
|
|
@@ -20419,7 +20414,13 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20419
20414
|
}
|
|
20420
20415
|
}
|
|
20421
20416
|
}
|
|
20422
|
-
|
|
20417
|
+
if (tempLiColl.length > 0) {
|
|
20418
|
+
fListBox.listData = disabledData;
|
|
20419
|
+
fListBox.sortedData = [];
|
|
20420
|
+
}
|
|
20421
|
+
else {
|
|
20422
|
+
fListBox.listData = fListBox.sortedData = [];
|
|
20423
|
+
}
|
|
20423
20424
|
}
|
|
20424
20425
|
if (isRefresh) {
|
|
20425
20426
|
const sourceElem = tListBox.renderItems(listData, tListBox.fields);
|
|
@@ -20641,7 +20642,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20641
20642
|
}
|
|
20642
20643
|
this.isFiltered = true;
|
|
20643
20644
|
this.remoteFilterAction = true;
|
|
20645
|
+
this.preventDefActionFilter = eventArgsData.preventDefaultAction;
|
|
20644
20646
|
this.dataUpdater(dataSource, query, fields);
|
|
20647
|
+
this.preventDefActionFilter = false;
|
|
20645
20648
|
},
|
|
20646
20649
|
event: e,
|
|
20647
20650
|
cancel: false
|
|
@@ -20651,6 +20654,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20651
20654
|
if (args.cancel || (this.filterInput.value !== '' && this.isFiltered)) {
|
|
20652
20655
|
return;
|
|
20653
20656
|
}
|
|
20657
|
+
this.preventDefActionFilter = false;
|
|
20654
20658
|
if (!args.cancel && !this.isCustomFiltering && !args.preventDefaultAction) {
|
|
20655
20659
|
this.inputString = this.filterInput.value;
|
|
20656
20660
|
this.filteringAction(this.jsonData, new Query(), this.fields);
|
|
@@ -21050,7 +21054,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
21050
21054
|
this.initDraggable();
|
|
21051
21055
|
}
|
|
21052
21056
|
else {
|
|
21053
|
-
|
|
21057
|
+
if (this.ulElement.classList.contains('e-sortable')) {
|
|
21058
|
+
getComponent(this.ulElement, 'sortable').destroy();
|
|
21059
|
+
}
|
|
21054
21060
|
}
|
|
21055
21061
|
break;
|
|
21056
21062
|
case 'allowFiltering':
|