@syncfusion/ej2-dropdowns 33.2.4 → 33.2.6
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 +68 -21
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +69 -21
- 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 +5 -5
- package/src/drop-down-base/drop-down-base.d.ts +1 -0
- package/src/drop-down-base/drop-down-base.js +10 -0
- package/src/drop-down-list/drop-down-list.js +6 -4
- package/src/list-box/list-box.js +0 -1
- package/src/multi-select/multi-select.d.ts +3 -0
- package/src/multi-select/multi-select.js +53 -16
|
@@ -1006,6 +1006,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1006
1006
|
_this.isVirtualTrackHeight = false;
|
|
1007
1007
|
_this.virtualSelectAll = false;
|
|
1008
1008
|
_this.isVirtualReorder = false;
|
|
1009
|
+
_this.isVirtualOrder = false;
|
|
1009
1010
|
_this.incrementalQueryString = '';
|
|
1010
1011
|
_this.incrementalEndIndex = 0;
|
|
1011
1012
|
_this.incrementalStartIndex = 0;
|
|
@@ -2464,6 +2465,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2464
2465
|
if (this.getModuleName() === 'multiselect' && (this.virtualSelectAll && !isClearAll)) {
|
|
2465
2466
|
this.virtualSelectAllData = listData;
|
|
2466
2467
|
listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
|
|
2468
|
+
if (this.virtualSelectAllData.length < (this.itemCount * 2) && this.isCheckBoxSelection && this.isVirtualOrder) {
|
|
2469
|
+
listData = this.virtualSelectAllData;
|
|
2470
|
+
}
|
|
2467
2471
|
}
|
|
2468
2472
|
ulElement = this.createListItems(listData, fields);
|
|
2469
2473
|
if (this.isIncrementalRequest) {
|
|
@@ -2487,6 +2491,12 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2487
2491
|
else {
|
|
2488
2492
|
virtualUlElement.appendChild(ulElement);
|
|
2489
2493
|
}
|
|
2494
|
+
if (this.getModuleName() === 'multiselect' && this.isCheckBoxSelection && !this.appendUncheckList && this.isVirtualOrder) {
|
|
2495
|
+
var selectedUlElement = this.list.querySelector('.e-list-parent' + '.e-reorder');
|
|
2496
|
+
if (!isNullOrUndefined(selectedUlElement)) {
|
|
2497
|
+
virtualUlElement.removeChild(selectedUlElement);
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2490
2500
|
}
|
|
2491
2501
|
this.updateListElements(listData);
|
|
2492
2502
|
}
|
|
@@ -5694,7 +5704,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5694
5704
|
}
|
|
5695
5705
|
else if (this.enableVirtualization && this.getModuleName() !== 'autocomplete' && !this.isFiltering()) {
|
|
5696
5706
|
var value = this.getItemData().value;
|
|
5697
|
-
this.activeIndex = this.getIndexByValue(value);
|
|
5707
|
+
this.activeIndex = !isNullOrUndefined(value) ? this.getIndexByValue(value) : this.activeIndex;
|
|
5698
5708
|
var element = this.findListElement(this.list, 'li', 'data-value', value);
|
|
5699
5709
|
this.selectedLI = element;
|
|
5700
5710
|
element = null;
|
|
@@ -6932,14 +6942,16 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6932
6942
|
if (this.enableVirtualization) {
|
|
6933
6943
|
this.listItemHeight = this.getListHeight();
|
|
6934
6944
|
this.getSkeletonCount();
|
|
6945
|
+
this.skeletonCount = this.totalItemCount < (this.itemCount * 2) && ((!(this.dataSource instanceof DataManager)) ||
|
|
6946
|
+
((this.dataSource instanceof DataManager) && (this.totalItemCount <= this.itemCount))) ? 0 : this.skeletonCount;
|
|
6935
6947
|
this.updateVirtualizationProperties(this.itemCount, this.allowFiltering);
|
|
6936
|
-
if (this.index !== null) {
|
|
6937
|
-
this.activeIndex = this.index + this.skeletonCount;
|
|
6938
|
-
}
|
|
6939
6948
|
}
|
|
6940
6949
|
this.initValue();
|
|
6941
6950
|
this.selectedValueInfo = this.viewPortInfo;
|
|
6942
6951
|
if (this.enableVirtualization) {
|
|
6952
|
+
if (this.index !== null) {
|
|
6953
|
+
this.activeIndex = this.index + this.skeletonCount;
|
|
6954
|
+
}
|
|
6943
6955
|
this.activeIndex = this.activeIndex + this.skeletonCount;
|
|
6944
6956
|
}
|
|
6945
6957
|
}
|
|
@@ -14075,7 +14087,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14075
14087
|
if (isCheckbox) {
|
|
14076
14088
|
var startindex = this.viewPortInfo.startIndex;
|
|
14077
14089
|
var endindex = (((startindex + this.viewPortInfo.endIndex) <= (valuecheck.length)) &&
|
|
14078
|
-
valuecheck[(startindex + this.viewPortInfo.endIndex)])
|
|
14090
|
+
valuecheck[(startindex + this.viewPortInfo.endIndex)]) &&
|
|
14091
|
+
(this.dataSource instanceof DataManager && this.totalItemCount !== 0 && this.totalItemCount > (this.itemCount * 2))
|
|
14092
|
+
? (startindex + this.viewPortInfo.endIndex)
|
|
14079
14093
|
: (valuecheck.length);
|
|
14080
14094
|
for (var i = startindex; i < endindex; i++) {
|
|
14081
14095
|
var value = this.allowObjectBinding ? getValue((this.fields.value) ?
|
|
@@ -15845,6 +15859,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15845
15859
|
if (!isNullOrUndefined(this.value)) {
|
|
15846
15860
|
this.tempValues = this.allowObjectBinding ? this.value.slice() : this.value.slice();
|
|
15847
15861
|
}
|
|
15862
|
+
var removedChipTitle = selectedElem.getAttribute('title');
|
|
15848
15863
|
temp = selectedElem.nextElementSibling;
|
|
15849
15864
|
if (temp !== null) {
|
|
15850
15865
|
this.removeChipSelection();
|
|
@@ -15856,6 +15871,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15856
15871
|
this.removeValue(currentChip, e);
|
|
15857
15872
|
this.updateDelimeter(this.delimiterChar, e);
|
|
15858
15873
|
this.makeTextBoxEmpty();
|
|
15874
|
+
if (removedChipTitle && this.chipAnnouncerLiveRegion) {
|
|
15875
|
+
var remainingCount = this.value ? this.value.length : 0;
|
|
15876
|
+
var announcement = removedChipTitle + " removed from selection " + remainingCount + " items selected";
|
|
15877
|
+
this.chipAnnouncerLiveRegion.textContent = announcement;
|
|
15878
|
+
}
|
|
15859
15879
|
}
|
|
15860
15880
|
if (this.closePopupOnSelect) {
|
|
15861
15881
|
this.hidePopup(e);
|
|
@@ -16048,6 +16068,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16048
16068
|
var selectedChips = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP$1 + '.' + CHIP_SELECTED);
|
|
16049
16069
|
if (selectedChips && selectedChips.length === 1) {
|
|
16050
16070
|
selectedChips[0].removeAttribute('id');
|
|
16071
|
+
selectedChips[0].removeAttribute('aria-hidden');
|
|
16051
16072
|
if (!isNullOrUndefined(this.inputElement) && this.inputElement.hasAttribute('aria-activedescendant')) {
|
|
16052
16073
|
this.inputElement.removeAttribute('aria-activedescendant');
|
|
16053
16074
|
if (!this.inputElement.hasAttribute('aria-describedby') && this.chipCollectionWrapper.id) {
|
|
@@ -16062,16 +16083,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16062
16083
|
addClass([element], CHIP_SELECTED);
|
|
16063
16084
|
if (element) {
|
|
16064
16085
|
element.setAttribute('id', this.element.id + '_chip_item');
|
|
16086
|
+
element.setAttribute('aria-hidden', 'true');
|
|
16087
|
+
var chipTitle = element.getAttribute('title');
|
|
16088
|
+
if (chipTitle && this.chipAnnouncerLiveRegion) {
|
|
16089
|
+
var announcement = chipTitle + " focused. Press Backspace to remove";
|
|
16090
|
+
this.chipAnnouncerLiveRegion.textContent = announcement;
|
|
16091
|
+
}
|
|
16065
16092
|
if (!isNullOrUndefined(this.inputElement) && element.id) {
|
|
16066
16093
|
this.inputElement.setAttribute('aria-activedescendant', element.id);
|
|
16067
16094
|
if (this.inputElement.hasAttribute('aria-describedby')) {
|
|
16068
16095
|
this.inputElement.removeAttribute('aria-describedby');
|
|
16069
16096
|
}
|
|
16070
16097
|
}
|
|
16071
|
-
var chipClose = element.querySelector('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
16072
|
-
if (chipClose) {
|
|
16073
|
-
chipClose.removeAttribute('aria-hidden');
|
|
16074
|
-
}
|
|
16075
16098
|
}
|
|
16076
16099
|
this.trigger('chipSelection', e);
|
|
16077
16100
|
};
|
|
@@ -16558,15 +16581,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16558
16581
|
var closeElements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
16559
16582
|
if (Browser.isDevice) {
|
|
16560
16583
|
for (var index = 0; index < closeElements.length; index++) {
|
|
16561
|
-
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
16562
16584
|
closeElements[index].style.display = 'none';
|
|
16563
16585
|
}
|
|
16564
16586
|
}
|
|
16565
|
-
else {
|
|
16566
|
-
for (var index = 0; index < closeElements.length; index++) {
|
|
16567
|
-
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
16568
|
-
}
|
|
16569
|
-
}
|
|
16570
16587
|
};
|
|
16571
16588
|
MultiSelect.prototype.onMobileChipInteraction = function (e) {
|
|
16572
16589
|
var chipElem = closest(e.target, '.' + CHIP$1);
|
|
@@ -16607,7 +16624,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16607
16624
|
});
|
|
16608
16625
|
var compiledString;
|
|
16609
16626
|
var chipContent = this.createElement('span', { className: CHIP_CONTENT$1 });
|
|
16610
|
-
var chipClose = this.createElement('span', { className: CHIP_CLOSE$1, attrs: { 'aria-
|
|
16627
|
+
var chipClose = this.createElement('span', { className: CHIP_CLOSE$1, attrs: { 'aria-hidden': 'true' } });
|
|
16611
16628
|
if (this.mainData) {
|
|
16612
16629
|
itemData = this.getDataByValue(value);
|
|
16613
16630
|
}
|
|
@@ -16875,6 +16892,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16875
16892
|
}, targetExitViewport: function () {
|
|
16876
16893
|
if (!Browser.isDevice) {
|
|
16877
16894
|
_this.hidePopup();
|
|
16895
|
+
var previousValue = _this.tempValues;
|
|
16896
|
+
if (isNullOrUndefined(previousValue)) {
|
|
16897
|
+
previousValue = [];
|
|
16898
|
+
}
|
|
16899
|
+
_this.updateValueState(_this.scrollEvent, _this.value, previousValue);
|
|
16878
16900
|
}
|
|
16879
16901
|
}
|
|
16880
16902
|
});
|
|
@@ -17155,6 +17177,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17155
17177
|
EventHandler.add(this.componentWrapper, 'mouseout', this.mouseOut, this);
|
|
17156
17178
|
EventHandler.add(this.overAllClear, 'mousedown', this.clearAll, this);
|
|
17157
17179
|
EventHandler.add(this.inputElement, 'paste', this.pasteHandler, this);
|
|
17180
|
+
EventHandler.add(document, 'wheel', this.onWheelScroll, this);
|
|
17181
|
+
EventHandler.add(document, 'scroll', this.onWheelScroll, this);
|
|
17158
17182
|
};
|
|
17159
17183
|
MultiSelect.prototype.onInput = function (e) {
|
|
17160
17184
|
if (this.keyDownStatus) {
|
|
@@ -17169,6 +17193,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17169
17193
|
this.search(e);
|
|
17170
17194
|
}
|
|
17171
17195
|
};
|
|
17196
|
+
MultiSelect.prototype.onWheelScroll = function (e) {
|
|
17197
|
+
this.scrollEvent = e;
|
|
17198
|
+
};
|
|
17172
17199
|
MultiSelect.prototype.pasteHandler = function (event) {
|
|
17173
17200
|
var _this = this;
|
|
17174
17201
|
setTimeout(function () {
|
|
@@ -17665,7 +17692,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17665
17692
|
else {
|
|
17666
17693
|
this.updateDelimeter(this.delimiterChar, null, isInitialVirtualData);
|
|
17667
17694
|
}
|
|
17668
|
-
if (this.mode === 'CheckBox' && this.showSelectAll && (isNullOrUndefined(this.value) || !this.value.length)) {
|
|
17695
|
+
if (this.mode === 'CheckBox' && this.showSelectAll && (isNullOrUndefined(this.value) || !this.value.length || (this.value.length !== this.listData.length))) {
|
|
17669
17696
|
this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });
|
|
17670
17697
|
}
|
|
17671
17698
|
if (this.mode === 'Box' || (this.mode === 'Default' && this.inputFocus)) {
|
|
@@ -18484,6 +18511,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18484
18511
|
if (!isNullOrUndefined(this.inputElement)) {
|
|
18485
18512
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
18486
18513
|
}
|
|
18514
|
+
EventHandler.remove(document, 'wheel', this.onWheelScroll);
|
|
18515
|
+
EventHandler.remove(document, 'scroll', this.onWheelScroll);
|
|
18487
18516
|
};
|
|
18488
18517
|
MultiSelect.prototype.resizingWireEvent = function () {
|
|
18489
18518
|
// Mouse events
|
|
@@ -18797,12 +18826,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18797
18826
|
this.virtualSelectAllState = state;
|
|
18798
18827
|
this.virtualSelectAll = true;
|
|
18799
18828
|
this.CurrentEvent = event;
|
|
18829
|
+
if (this.mode === 'CheckBox' && this.value && Array.isArray(this.value) && this.value.length > 0 && this.enableSelectionOrder && this.targetElement().trim() === '' && this.viewPortInfo.startIndex < this.value.length) {
|
|
18830
|
+
this.isVirtualOrder = true;
|
|
18831
|
+
}
|
|
18800
18832
|
if (!this.virtualSelectAllData) {
|
|
18801
18833
|
this.resetList(this.dataSource, this.fields, new Query());
|
|
18802
18834
|
}
|
|
18803
18835
|
if (this.virtualSelectAllData) {
|
|
18804
18836
|
this.virtualSelectionAll(state, li, event);
|
|
18805
18837
|
}
|
|
18838
|
+
if (this.mode === 'CheckBox' && this.value && Array.isArray(this.value) && this.value.length > 0 && this.enableSelectionOrder && this.targetElement().trim() === '' && this.viewPortInfo.startIndex < this.value.length) {
|
|
18839
|
+
this.isVirtualOrder = false;
|
|
18840
|
+
}
|
|
18806
18841
|
}
|
|
18807
18842
|
else {
|
|
18808
18843
|
while (index < length && index <= 50 && index < count) {
|
|
@@ -19101,7 +19136,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19101
19136
|
if (this.fields.disabled) {
|
|
19102
19137
|
this.removeDisabledItemsValue(this.value);
|
|
19103
19138
|
}
|
|
19104
|
-
|
|
19139
|
+
if (this.enableVirtualization && !isNullOrUndefined(oldProp.value) && !isNullOrUndefined(newProp.value)
|
|
19140
|
+
&& !this.validateValues(newProp.value, oldProp.value)) {
|
|
19141
|
+
return;
|
|
19142
|
+
}
|
|
19143
|
+
this.updateVal(this.value, oldProp.value, 'value', this.enableVirtualization);
|
|
19105
19144
|
this.addValidInputClass();
|
|
19106
19145
|
if (!this.closePopupOnSelect && this.isPopupOpen()) {
|
|
19107
19146
|
this.refreshPopup();
|
|
@@ -19297,9 +19336,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19297
19336
|
_this.updateActionList(ulElement, list, event);
|
|
19298
19337
|
});
|
|
19299
19338
|
};
|
|
19300
|
-
MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
|
|
19339
|
+
MultiSelect.prototype.updateVal = function (newProp, oldProp, prop, isVirtual) {
|
|
19301
19340
|
var _this = this;
|
|
19302
|
-
if (
|
|
19341
|
+
if (isVirtual === void 0) { isVirtual = false; }
|
|
19342
|
+
if (!this.list || (isVirtual && prop === 'value' && ((isNullOrUndefined(oldProp) && !isNullOrUndefined(newProp)) || (!isNullOrUndefined(oldProp) && isNullOrUndefined(newProp)) || (this.validateValues(newProp, oldProp) && newProp.length > 0)))) {
|
|
19303
19343
|
this.onLoadSelect();
|
|
19304
19344
|
if (this.enableVirtualization) {
|
|
19305
19345
|
this.setProperties({ text: '' }, true);
|
|
@@ -19823,6 +19863,14 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19823
19863
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
19824
19864
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
19825
19865
|
}
|
|
19866
|
+
if (!this.chipAnnouncerLiveRegion) {
|
|
19867
|
+
this.chipAnnouncerLiveRegion = this.createElement('div', {
|
|
19868
|
+
attrs: { 'aria-live': 'polite', 'aria-atomic': 'true', 'class': 'e-chip-announcer' }
|
|
19869
|
+
});
|
|
19870
|
+
this.chipAnnouncerLiveRegion.style.position = 'absolute';
|
|
19871
|
+
this.chipAnnouncerLiveRegion.style.left = '-10000px';
|
|
19872
|
+
this.componentWrapper.appendChild(this.chipAnnouncerLiveRegion);
|
|
19873
|
+
}
|
|
19826
19874
|
this.renderComplete();
|
|
19827
19875
|
};
|
|
19828
19876
|
MultiSelect.prototype.setResize = function () {
|
|
@@ -20444,6 +20492,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
20444
20492
|
this.mainListCollection = null;
|
|
20445
20493
|
this.footer = null;
|
|
20446
20494
|
this.selectAllEventEle = null;
|
|
20495
|
+
this.chipAnnouncerLiveRegion = null;
|
|
20447
20496
|
_super.prototype.destroy.call(this);
|
|
20448
20497
|
};
|
|
20449
20498
|
__decorate$5([
|
|
@@ -21346,7 +21395,6 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
21346
21395
|
this.list.classList.add('e-wrapper');
|
|
21347
21396
|
this.list.classList.add('e-lib');
|
|
21348
21397
|
if (this.element.tagName === 'EJS-LISTBOX') {
|
|
21349
|
-
this.element.setAttribute('tabindex', '0');
|
|
21350
21398
|
if (this.initLoad) {
|
|
21351
21399
|
this.element.appendChild(this.list);
|
|
21352
21400
|
}
|