@syncfusion/ej2-dropdowns 27.1.57 → 27.2.2
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/.eslintrc.json +261 -0
- 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 +125 -105
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +125 -105
- 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 -12
- package/src/combo-box/combo-box.js +1 -0
- package/src/drop-down-list/drop-down-list.js +1 -0
- package/src/drop-down-tree/drop-down-tree.js +6 -1
- package/src/multi-select/multi-select.d.ts +2 -0
- package/src/multi-select/multi-select.js +117 -104
- package/styles/material3-dark-lite.css +10 -10
- package/styles/material3-dark.css +13 -22
- package/styles/material3-lite.css +10 -10
- package/styles/material3.css +13 -22
- package/styles/multi-select/_bigger.scss +4 -4
- package/styles/multi-select/_material3-definition.scss +2 -2
- package/styles/multi-select/icons/_material3.scss +8 -8
- package/styles/multi-select/material3-dark.css +13 -22
- package/styles/multi-select/material3.css +13 -22
- package/tslint.json +111 -0
|
@@ -4937,6 +4937,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4937
4937
|
const currentValue = this.allowObjectBinding && !isNullOrUndefined(this.value) ?
|
|
4938
4938
|
getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
4939
4939
|
this.itemData = this.getDataByValue(currentValue);
|
|
4940
|
+
this.selectedLI = this.getElementByValue(currentValue);
|
|
4940
4941
|
this.isDynamicData = false;
|
|
4941
4942
|
}
|
|
4942
4943
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -7820,6 +7821,11 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
7820
7821
|
this.checkAllParent.focus();
|
|
7821
7822
|
}
|
|
7822
7823
|
break;
|
|
7824
|
+
case 'tab':
|
|
7825
|
+
if (!this.isPopupOpen && this.inputFocus) {
|
|
7826
|
+
this.onFocusOut();
|
|
7827
|
+
}
|
|
7828
|
+
break;
|
|
7823
7829
|
}
|
|
7824
7830
|
}
|
|
7825
7831
|
});
|
|
@@ -10125,7 +10131,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
10125
10131
|
this.isPopupOpen = false;
|
|
10126
10132
|
if (this.isReact) {
|
|
10127
10133
|
this.clearTemplate(['headerTemplate', 'footerTemplate', 'itemTemplate', 'actionFailureTemplate',
|
|
10128
|
-
'noRecordsTemplate'
|
|
10134
|
+
'noRecordsTemplate']);
|
|
10129
10135
|
}
|
|
10130
10136
|
if (this.popupObj) {
|
|
10131
10137
|
this.popupObj.destroy();
|
|
@@ -10472,6 +10478,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
10472
10478
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10473
10479
|
setOldValue(value) {
|
|
10474
10480
|
if (this.allowCustom) {
|
|
10481
|
+
this.selectedLI = this.getElementByValue(this.value);
|
|
10475
10482
|
this.valueMuteChange(this.value);
|
|
10476
10483
|
}
|
|
10477
10484
|
else {
|
|
@@ -15272,6 +15279,15 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15272
15279
|
this.previousEndIndex = 0;
|
|
15273
15280
|
}
|
|
15274
15281
|
}
|
|
15282
|
+
this.isClearAllItem = true;
|
|
15283
|
+
EventHandler.add(document, 'mouseup', this.preventSelection, this);
|
|
15284
|
+
}
|
|
15285
|
+
preventSelection(e) {
|
|
15286
|
+
if (this.isClearAllItem) {
|
|
15287
|
+
e.stopPropagation();
|
|
15288
|
+
}
|
|
15289
|
+
this.isClearAllItem = false;
|
|
15290
|
+
EventHandler.remove(document, 'mouseup', this.preventSelection);
|
|
15275
15291
|
}
|
|
15276
15292
|
clearAllCallback(e, isClearAll) {
|
|
15277
15293
|
const tempValues = this.value ? this.value.slice() : [];
|
|
@@ -16024,127 +16040,131 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16024
16040
|
this.updateData(delimChar, e);
|
|
16025
16041
|
}
|
|
16026
16042
|
onMouseClick(e) {
|
|
16027
|
-
this.
|
|
16028
|
-
|
|
16029
|
-
|
|
16030
|
-
|
|
16031
|
-
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
const headerLi = closest(target, '.' + dropDownBaseClasses.group);
|
|
16036
|
-
if (headerLi && this.enableGroupCheckBox && this.mode === 'CheckBox' && this.fields.groupBy) {
|
|
16037
|
-
target = target.classList.contains('e-list-group-item') ? target.firstElementChild.lastElementChild
|
|
16038
|
-
: e.target;
|
|
16039
|
-
if (target.classList.contains('e-check')) {
|
|
16040
|
-
this.selectAllItem(false, e);
|
|
16041
|
-
target.classList.remove('e-check');
|
|
16042
|
-
target.classList.remove('e-stop');
|
|
16043
|
-
closest(target, '.' + 'e-list-group-item').classList.remove('e-active');
|
|
16044
|
-
target.setAttribute('aria-selected', 'false');
|
|
16045
|
-
}
|
|
16046
|
-
else {
|
|
16047
|
-
this.selectAllItem(true, e);
|
|
16048
|
-
target.classList.remove('e-stop');
|
|
16049
|
-
target.classList.add('e-check');
|
|
16050
|
-
closest(target, '.' + 'e-list-group-item').classList.add('e-active');
|
|
16051
|
-
target.setAttribute('aria-selected', 'true');
|
|
16043
|
+
if (!this.isClearAllItem) {
|
|
16044
|
+
this.keyCode = null;
|
|
16045
|
+
this.scrollFocusStatus = false;
|
|
16046
|
+
this.keyboardEvent = null;
|
|
16047
|
+
let target = e.target;
|
|
16048
|
+
const li = closest(target, '.' + dropDownBaseClasses.li);
|
|
16049
|
+
if (this.enableVirtualization && li && li.classList.contains('e-virtual-list')) {
|
|
16050
|
+
return;
|
|
16052
16051
|
}
|
|
16053
|
-
|
|
16054
|
-
this.
|
|
16055
|
-
|
|
16056
|
-
|
|
16057
|
-
|
|
16058
|
-
|
|
16059
|
-
|
|
16060
|
-
|
|
16052
|
+
const headerLi = closest(target, '.' + dropDownBaseClasses.group);
|
|
16053
|
+
if (headerLi && this.enableGroupCheckBox && this.mode === 'CheckBox' && this.fields.groupBy) {
|
|
16054
|
+
target = target.classList.contains('e-list-group-item') ? target.firstElementChild.lastElementChild
|
|
16055
|
+
: e.target;
|
|
16056
|
+
if (target.classList.contains('e-check')) {
|
|
16057
|
+
this.selectAllItem(false, e);
|
|
16058
|
+
target.classList.remove('e-check');
|
|
16059
|
+
target.classList.remove('e-stop');
|
|
16060
|
+
closest(target, '.' + 'e-list-group-item').classList.remove('e-active');
|
|
16061
|
+
target.setAttribute('aria-selected', 'false');
|
|
16061
16062
|
}
|
|
16062
|
-
|
|
16063
|
-
this.
|
|
16064
|
-
|
|
16065
|
-
|
|
16066
|
-
|
|
16067
|
-
|
|
16068
|
-
|
|
16069
|
-
|
|
16070
|
-
|
|
16063
|
+
else {
|
|
16064
|
+
this.selectAllItem(true, e);
|
|
16065
|
+
target.classList.remove('e-stop');
|
|
16066
|
+
target.classList.add('e-check');
|
|
16067
|
+
closest(target, '.' + 'e-list-group-item').classList.add('e-active');
|
|
16068
|
+
target.setAttribute('aria-selected', 'true');
|
|
16069
|
+
}
|
|
16070
|
+
this.refreshSelection();
|
|
16071
|
+
this.checkSelectAll();
|
|
16072
|
+
}
|
|
16073
|
+
else {
|
|
16074
|
+
if (this.isValidLI(li)) {
|
|
16075
|
+
let limit = this.value && this.value.length ? this.value.length : 0;
|
|
16076
|
+
if (li.classList.contains('e-active')) {
|
|
16077
|
+
limit = limit - 1;
|
|
16071
16078
|
}
|
|
16072
|
-
|
|
16073
|
-
this.
|
|
16079
|
+
if (limit < this.maximumSelectionLength) {
|
|
16080
|
+
this.updateListSelection(li, e);
|
|
16081
|
+
this.checkPlaceholderSize();
|
|
16082
|
+
this.addListFocus(li);
|
|
16083
|
+
if ((this.allowCustomValue || this.allowFiltering) && this.mainList && this.listData) {
|
|
16084
|
+
if (this.mode !== 'CheckBox') {
|
|
16085
|
+
this.focusAtLastListItem(li.getAttribute('data-value'));
|
|
16086
|
+
this.refreshSelection();
|
|
16087
|
+
}
|
|
16088
|
+
}
|
|
16089
|
+
else {
|
|
16090
|
+
this.makeTextBoxEmpty();
|
|
16091
|
+
}
|
|
16074
16092
|
}
|
|
16075
|
-
|
|
16076
|
-
|
|
16077
|
-
|
|
16078
|
-
|
|
16079
|
-
|
|
16093
|
+
if (this.mode === 'CheckBox') {
|
|
16094
|
+
this.updateDelimView();
|
|
16095
|
+
if (this.value && this.value.length > 50) {
|
|
16096
|
+
setTimeout(() => {
|
|
16097
|
+
this.updateDelimeter(this.delimiterChar, e);
|
|
16098
|
+
}, 0);
|
|
16099
|
+
}
|
|
16100
|
+
else {
|
|
16080
16101
|
this.updateDelimeter(this.delimiterChar, e);
|
|
16081
|
-
}
|
|
16102
|
+
}
|
|
16103
|
+
this.refreshInputHight();
|
|
16082
16104
|
}
|
|
16083
16105
|
else {
|
|
16084
16106
|
this.updateDelimeter(this.delimiterChar, e);
|
|
16085
16107
|
}
|
|
16086
|
-
this.
|
|
16087
|
-
|
|
16088
|
-
|
|
16089
|
-
|
|
16090
|
-
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
this.
|
|
16108
|
+
this.checkSelectAll();
|
|
16109
|
+
this.refreshPopup();
|
|
16110
|
+
if (this.hideSelectedItem) {
|
|
16111
|
+
this.focusAtFirstListItem();
|
|
16112
|
+
}
|
|
16113
|
+
if (this.closePopupOnSelect) {
|
|
16114
|
+
this.hidePopup(e);
|
|
16115
|
+
}
|
|
16116
|
+
else {
|
|
16117
|
+
e.preventDefault();
|
|
16118
|
+
}
|
|
16119
|
+
const isFilterData = this.targetElement().trim() !== '' ? true : false;
|
|
16120
|
+
this.makeTextBoxEmpty();
|
|
16121
|
+
this.findGroupStart(target);
|
|
16122
|
+
if (this.mode !== 'CheckBox') {
|
|
16123
|
+
this.refreshListItems(isNullOrUndefined(li) ? null : li.textContent, isFilterData);
|
|
16124
|
+
}
|
|
16098
16125
|
}
|
|
16099
16126
|
else {
|
|
16100
16127
|
e.preventDefault();
|
|
16101
16128
|
}
|
|
16102
|
-
|
|
16103
|
-
|
|
16104
|
-
|
|
16105
|
-
|
|
16106
|
-
|
|
16107
|
-
|
|
16108
|
-
|
|
16109
|
-
|
|
16110
|
-
|
|
16111
|
-
|
|
16112
|
-
|
|
16113
|
-
|
|
16114
|
-
|
|
16115
|
-
|
|
16116
|
-
|
|
16117
|
-
|
|
16118
|
-
|
|
16119
|
-
|
|
16120
|
-
|
|
16121
|
-
|
|
16122
|
-
|
|
16123
|
-
|
|
16124
|
-
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
|
|
16133
|
-
|
|
16134
|
-
|
|
16135
|
-
else {
|
|
16136
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16137
|
-
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
16138
|
-
}
|
|
16139
|
-
if (this.list.querySelector('.e-virtual-ddl-content')) {
|
|
16140
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16141
|
-
this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
|
|
16129
|
+
if (this.enableVirtualization && this.hideSelectedItem) {
|
|
16130
|
+
const visibleListElements = this.list.querySelectorAll('li.'
|
|
16131
|
+
+ dropDownBaseClasses.li
|
|
16132
|
+
+ ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)' + ':not(.e-virtual-list)');
|
|
16133
|
+
if (visibleListElements.length) {
|
|
16134
|
+
const actualCount = this.virtualListHeight > 0 ?
|
|
16135
|
+
Math.floor(this.virtualListHeight / this.listItemHeight) : 0;
|
|
16136
|
+
if (visibleListElements.length < (actualCount + 2)) {
|
|
16137
|
+
let query = this.getForQuery(this.value).clone();
|
|
16138
|
+
query = query.skip(this.virtualItemStartIndex);
|
|
16139
|
+
this.resetList(this.dataSource, this.fields, query);
|
|
16140
|
+
this.UpdateSkeleton();
|
|
16141
|
+
this.liCollections = this.list.querySelectorAll('.'
|
|
16142
|
+
+ dropDownBaseClasses.li);
|
|
16143
|
+
this.virtualItemCount = this.itemCount;
|
|
16144
|
+
if (this.mode !== 'CheckBox') {
|
|
16145
|
+
this.totalItemCount = this.value && this.value.length ? this.totalItemCount - this.value.length :
|
|
16146
|
+
this.totalItemCount;
|
|
16147
|
+
}
|
|
16148
|
+
if (!this.list.querySelector('.e-virtual-ddl')) {
|
|
16149
|
+
const virualElement = this.createElement('div', {
|
|
16150
|
+
id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
|
|
16151
|
+
});
|
|
16152
|
+
this.popupWrapper.querySelector('.e-dropdownbase').appendChild(virualElement);
|
|
16153
|
+
}
|
|
16154
|
+
else {
|
|
16155
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16156
|
+
this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
|
|
16157
|
+
}
|
|
16158
|
+
if (this.list.querySelector('.e-virtual-ddl-content')) {
|
|
16159
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16160
|
+
this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
|
|
16161
|
+
}
|
|
16142
16162
|
}
|
|
16143
16163
|
}
|
|
16144
16164
|
}
|
|
16165
|
+
this.refreshPlaceHolder();
|
|
16166
|
+
this.deselectHeader();
|
|
16145
16167
|
}
|
|
16146
|
-
this.refreshPlaceHolder();
|
|
16147
|
-
this.deselectHeader();
|
|
16148
16168
|
}
|
|
16149
16169
|
}
|
|
16150
16170
|
findGroupStart(target) {
|