@syncfusion/ej2-dropdowns 27.1.50 → 27.1.52
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 -26
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +55 -25
- 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 +8 -8
- package/src/combo-box/combo-box.js +1 -0
- package/src/drop-down-base/drop-down-base.js +17 -15
- package/src/drop-down-list/drop-down-list.d.ts +2 -1
- package/src/drop-down-list/drop-down-list.js +12 -0
- package/src/drop-down-tree/drop-down-tree.js +2 -2
- package/src/list-box/list-box.js +22 -4
- package/src/multi-select/multi-select.js +1 -4
- package/styles/bootstrap-dark-lite.css +4 -0
- package/styles/bootstrap-dark.css +4 -0
- package/styles/bootstrap-lite.css +4 -0
- package/styles/bootstrap.css +4 -0
- package/styles/bootstrap4-lite.css +4 -0
- package/styles/bootstrap4.css +4 -0
- package/styles/bootstrap5-dark-lite.css +4 -0
- package/styles/bootstrap5-dark.css +4 -0
- package/styles/bootstrap5-lite.css +4 -0
- package/styles/bootstrap5.3-lite.css +4 -0
- package/styles/bootstrap5.3.css +4 -0
- package/styles/bootstrap5.css +4 -0
- package/styles/fabric-dark-lite.css +4 -0
- package/styles/fabric-dark.css +4 -0
- package/styles/fabric-lite.css +4 -0
- package/styles/fabric.css +4 -0
- package/styles/fluent-dark-lite.css +4 -0
- package/styles/fluent-dark.css +4 -0
- package/styles/fluent-lite.css +4 -0
- package/styles/fluent.css +4 -0
- package/styles/fluent2-lite.css +4 -0
- package/styles/fluent2.css +4 -0
- package/styles/highcontrast-light-lite.css +4 -0
- package/styles/highcontrast-light.css +4 -0
- package/styles/highcontrast-lite.css +4 -0
- package/styles/highcontrast.css +4 -0
- package/styles/material-dark-lite.css +4 -0
- package/styles/material-dark.css +4 -0
- package/styles/material-lite.css +4 -0
- package/styles/material.css +4 -0
- package/styles/material3-dark-lite.css +4 -0
- package/styles/material3-dark.css +4 -0
- package/styles/material3-lite.css +4 -0
- package/styles/material3.css +4 -0
- package/styles/multi-select/_layout.scss +4 -0
- package/styles/multi-select/bootstrap-dark.css +4 -0
- package/styles/multi-select/bootstrap.css +4 -0
- package/styles/multi-select/bootstrap4.css +4 -0
- package/styles/multi-select/bootstrap5-dark.css +4 -0
- package/styles/multi-select/bootstrap5.3.css +4 -0
- package/styles/multi-select/bootstrap5.css +4 -0
- package/styles/multi-select/fabric-dark.css +4 -0
- package/styles/multi-select/fabric.css +4 -0
- package/styles/multi-select/fluent-dark.css +4 -0
- package/styles/multi-select/fluent.css +4 -0
- package/styles/multi-select/fluent2.css +4 -0
- package/styles/multi-select/highcontrast-light.css +4 -0
- package/styles/multi-select/highcontrast.css +4 -0
- package/styles/multi-select/material-dark.css +4 -0
- package/styles/multi-select/material.css +4 -0
- package/styles/multi-select/material3-dark.css +4 -0
- package/styles/multi-select/material3.css +4 -0
- package/styles/multi-select/tailwind-dark.css +4 -0
- package/styles/multi-select/tailwind.css +4 -0
- package/styles/tailwind-dark-lite.css +4 -0
- package/styles/tailwind-dark.css +4 -0
- package/styles/tailwind-lite.css +4 -0
- package/styles/tailwind.css +4 -0
- package/.eslintrc.json +0 -261
- package/tslint.json +0 -111
|
@@ -1964,7 +1964,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1964
1964
|
}
|
|
1965
1965
|
dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
|
|
1966
1966
|
}
|
|
1967
|
-
else {
|
|
1967
|
+
else if (this.getModuleName() !== 'listbox' || (this.getModuleName() === 'listbox' && !this.preventDefActionFilter)) {
|
|
1968
1968
|
dataSource = this.getSortedDataSource(dataSource);
|
|
1969
1969
|
}
|
|
1970
1970
|
this.sortedData = dataSource;
|
|
@@ -1972,21 +1972,23 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1972
1972
|
new DataManager(dataSource).executeLocal(new Query().take(100))
|
|
1973
1973
|
: dataSource;
|
|
1974
1974
|
ulElement = this.templateListItem((this.getModuleName() === 'autocomplete') ? spliceData : dataSource, fields);
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
virtualUlElement.
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
this.list.querySelector('.e-virtual-ddl-content').
|
|
1975
|
+
if (this.isVirtualizationEnabled) {
|
|
1976
|
+
const oldUlElement = this.list.querySelector('.e-list-parent');
|
|
1977
|
+
const virtualUlElement = this.list.querySelector('.e-virtual-ddl-content');
|
|
1978
|
+
if ((listData.length >= this.virtualizedItemsCount && oldUlElement && virtualUlElement) || (oldUlElement && virtualUlElement && this.isAllowFiltering) || (oldUlElement && virtualUlElement && this.getModuleName() === 'autocomplete')) {
|
|
1979
|
+
virtualUlElement.replaceChild(ulElement, oldUlElement);
|
|
1980
|
+
const reOrderList = this.list.querySelectorAll('.e-reorder');
|
|
1981
|
+
if (this.list.querySelector('.e-virtual-ddl-content') && reOrderList && reOrderList.length > 0 && !isCheckBoxUpdate) {
|
|
1982
|
+
this.list.querySelector('.e-virtual-ddl-content').removeChild(reOrderList[0]);
|
|
1983
|
+
}
|
|
1984
|
+
this.updateListElements(listData);
|
|
1985
|
+
}
|
|
1986
|
+
else if (!virtualUlElement) {
|
|
1987
|
+
this.list.innerHTML = '';
|
|
1988
|
+
this.createVirtualContent();
|
|
1989
|
+
this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
|
|
1990
|
+
this.updateListElements(listData);
|
|
1982
1991
|
}
|
|
1983
|
-
this.updateListElements(listData);
|
|
1984
|
-
}
|
|
1985
|
-
else if ((!virtualUlElement)) {
|
|
1986
|
-
this.list.innerHTML = '';
|
|
1987
|
-
this.createVirtualContent();
|
|
1988
|
-
this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
|
|
1989
|
-
this.updateListElements(listData);
|
|
1990
1992
|
}
|
|
1991
1993
|
}
|
|
1992
1994
|
else {
|
|
@@ -2764,6 +2766,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2764
2766
|
this.preventChange = false;
|
|
2765
2767
|
this.isTouched = false;
|
|
2766
2768
|
this.isFocused = false;
|
|
2769
|
+
this.autoFill = false;
|
|
2767
2770
|
}
|
|
2768
2771
|
/**
|
|
2769
2772
|
* Initialize the event handler.
|
|
@@ -3034,12 +3037,20 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3034
3037
|
removeClass([this.inputWrapper.container], dropDownListClasses.disable);
|
|
3035
3038
|
this.inputElement.setAttribute('aria-disabled', 'false');
|
|
3036
3039
|
this.targetElement().setAttribute('tabindex', this.tabIndex);
|
|
3040
|
+
if (this.inputWrapper && this.inputWrapper.container) {
|
|
3041
|
+
this.inputWrapper.container.setAttribute('aria-disabled', 'false');
|
|
3042
|
+
this.inputWrapper.container.removeAttribute('disabled');
|
|
3043
|
+
}
|
|
3037
3044
|
}
|
|
3038
3045
|
else {
|
|
3039
3046
|
this.hidePopup();
|
|
3040
3047
|
addClass([this.inputWrapper.container], dropDownListClasses.disable);
|
|
3041
3048
|
this.inputElement.setAttribute('aria-disabled', 'true');
|
|
3042
3049
|
this.targetElement().tabIndex = -1;
|
|
3050
|
+
if (this.inputWrapper && this.inputWrapper.container) {
|
|
3051
|
+
this.inputWrapper.container.setAttribute('aria-disabled', 'true');
|
|
3052
|
+
this.inputWrapper.container.setAttribute('disabled', '');
|
|
3053
|
+
}
|
|
3043
3054
|
}
|
|
3044
3055
|
}
|
|
3045
3056
|
/**
|
|
@@ -4793,6 +4804,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4793
4804
|
}
|
|
4794
4805
|
}
|
|
4795
4806
|
onInput(e) {
|
|
4807
|
+
if (!isNullOrUndefined(e) && !isNullOrUndefined(e.data) && e.data.length > 1 && this.autoFill && (this.getModuleName() === 'combobox' || this.getModuleName() === 'autocomplete')) {
|
|
4808
|
+
this.inputElement.value = e.data;
|
|
4809
|
+
}
|
|
4796
4810
|
this.isValidKey = true;
|
|
4797
4811
|
if (this.getModuleName() === 'combobox') {
|
|
4798
4812
|
this.updateIconState();
|
|
@@ -8530,8 +8544,8 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8530
8544
|
}
|
|
8531
8545
|
else {
|
|
8532
8546
|
const oldFocussedNode = this.treeObj.element.querySelector('.e-node-focus');
|
|
8533
|
-
focusedElement = this.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable)
|
|
8534
|
-
this.treeObj.element.querySelector('li:not(.e-disable)
|
|
8547
|
+
focusedElement = this.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable)') ||
|
|
8548
|
+
this.treeObj.element.querySelector('li:not(.e-disable)');
|
|
8535
8549
|
if (oldFocussedNode && oldFocussedNode !== focusedElement) {
|
|
8536
8550
|
oldFocussedNode.setAttribute('tabindex', '-1');
|
|
8537
8551
|
removeClass([oldFocussedNode], 'e-node-focus');
|
|
@@ -11150,6 +11164,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
11150
11164
|
super.render();
|
|
11151
11165
|
this.setSearchBox();
|
|
11152
11166
|
this.renderComplete();
|
|
11167
|
+
this.autoFill = this.autofill;
|
|
11153
11168
|
}
|
|
11154
11169
|
/**
|
|
11155
11170
|
* Return the module name of this component.
|
|
@@ -14441,10 +14456,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
14441
14456
|
this.currentRemoveValue = this.allowObjectBinding ? getValue(((this.fields.value) ?
|
|
14442
14457
|
this.fields.value : ''), value) : value;
|
|
14443
14458
|
this.virtualSelectAll = false;
|
|
14444
|
-
|
|
14445
|
-
if (this.enableVirtualization && isClearAll) {
|
|
14446
|
-
removeVal = [];
|
|
14447
|
-
}
|
|
14459
|
+
const removeVal = this.value.slice(0);
|
|
14448
14460
|
removeVal.splice(index, 1);
|
|
14449
14461
|
if (this.enableVirtualization && this.mode === 'CheckBox') {
|
|
14450
14462
|
this.selectedListData.splice(index, 1);
|
|
@@ -16700,7 +16712,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16700
16712
|
this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
|
|
16701
16713
|
}
|
|
16702
16714
|
this.updateHiddenElement();
|
|
16703
|
-
this.value
|
|
16715
|
+
this.setProperties({ value: [] }, true);
|
|
16704
16716
|
this.virtualSelectAll = false;
|
|
16705
16717
|
if (!isNullOrUndefined(this.viewPortInfo.startIndex) && !isNullOrUndefined(this.viewPortInfo.endIndex)) {
|
|
16706
16718
|
this.notify('setCurrentViewDataAsync', {
|
|
@@ -19434,6 +19446,17 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
19434
19446
|
li.setAttribute('aria-disabled', 'true');
|
|
19435
19447
|
}
|
|
19436
19448
|
});
|
|
19449
|
+
if (this.allowFiltering && this.filterInput.value !== '' && this.toolbarSettings.items.length > 0) {
|
|
19450
|
+
let canDisable = false;
|
|
19451
|
+
this.liCollections.forEach((li) => { if (!li.classList.contains('e-disabled')) {
|
|
19452
|
+
canDisable = true;
|
|
19453
|
+
} });
|
|
19454
|
+
if (!canDisable) {
|
|
19455
|
+
const wrap = this.list.parentElement.getElementsByClassName('e-listbox-tool')[0];
|
|
19456
|
+
const btn = wrap.querySelector('[data-value="moveAllTo"]');
|
|
19457
|
+
btn.disabled = true;
|
|
19458
|
+
}
|
|
19459
|
+
}
|
|
19437
19460
|
}
|
|
19438
19461
|
/**
|
|
19439
19462
|
* Based on the state parameter, specified list item will be selected/deselected.
|
|
@@ -20279,6 +20302,12 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20279
20302
|
if (fListBox.value.length === 1 && fListBox.getSelectedItems().length) {
|
|
20280
20303
|
fListBox.value[0] = fListBox.getFormattedValue(fListBox.getSelectedItems()[0].getAttribute('data-value'));
|
|
20281
20304
|
}
|
|
20305
|
+
if (fListBox.liCollections.length === fListBox.ulElement.querySelectorAll('.e-disabled').length) {
|
|
20306
|
+
const wrap = this.list.parentElement.getElementsByClassName('e-listbox-tool')[0];
|
|
20307
|
+
const toolbarAction = this.toolbarAction === 'moveFrom' ? 'moveAllFrom' : 'moveAllTo';
|
|
20308
|
+
const btn = wrap.querySelector('[data-value="' + toolbarAction + '"]');
|
|
20309
|
+
btn.disabled = true;
|
|
20310
|
+
}
|
|
20282
20311
|
}
|
|
20283
20312
|
selectNextList(elems, dataLiIdx, dataIdx, inst) {
|
|
20284
20313
|
const childCnt = inst.ulElement.querySelectorAll('.e-list-item').length;
|
|
@@ -20402,7 +20431,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20402
20431
|
if (tempLiColl.length > 0) {
|
|
20403
20432
|
for (let i = 0; i < tempLiColl.length; i++) {
|
|
20404
20433
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20405
|
-
disabledData.push(
|
|
20434
|
+
disabledData.push(fListBox.getDataByValue(tempLiColl[i].getAttribute('data-value')));
|
|
20406
20435
|
}
|
|
20407
20436
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20408
20437
|
fListBox.listData = fListBox.listData.filter((obj1) => !disabledData.some((obj2) => obj1 === obj2));
|
|
@@ -20424,9 +20453,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20424
20453
|
}
|
|
20425
20454
|
if (isRefresh) {
|
|
20426
20455
|
const sourceElem = tListBox.renderItems(listData, tListBox.fields);
|
|
20427
|
-
|
|
20428
|
-
tListBox.updateListItems(sourceElem, tListBox.ulElement);
|
|
20429
|
-
}
|
|
20456
|
+
tListBox.updateListItems(sourceElem, tListBox.ulElement);
|
|
20430
20457
|
}
|
|
20431
20458
|
else {
|
|
20432
20459
|
tListBox.sortedData = listData;
|
|
@@ -20867,6 +20894,9 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
20867
20894
|
}
|
|
20868
20895
|
}
|
|
20869
20896
|
else {
|
|
20897
|
+
if (inst.ulElement.querySelectorAll('.e-disabled').length > 0) {
|
|
20898
|
+
return inst.liCollections.length === inst.ulElement.querySelectorAll('.e-disabled').length;
|
|
20899
|
+
}
|
|
20870
20900
|
return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
|
|
20871
20901
|
}
|
|
20872
20902
|
}
|