@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
|
@@ -928,6 +928,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
928
928
|
this.isVirtualTrackHeight = false;
|
|
929
929
|
this.virtualSelectAll = false;
|
|
930
930
|
this.isVirtualReorder = false;
|
|
931
|
+
this.isVirtualOrder = false;
|
|
931
932
|
this.incrementalQueryString = '';
|
|
932
933
|
this.incrementalEndIndex = 0;
|
|
933
934
|
this.incrementalStartIndex = 0;
|
|
@@ -2376,6 +2377,9 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
2376
2377
|
if (this.getModuleName() === 'multiselect' && (this.virtualSelectAll && !isClearAll)) {
|
|
2377
2378
|
this.virtualSelectAllData = listData;
|
|
2378
2379
|
listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
|
|
2380
|
+
if (this.virtualSelectAllData.length < (this.itemCount * 2) && this.isCheckBoxSelection && this.isVirtualOrder) {
|
|
2381
|
+
listData = this.virtualSelectAllData;
|
|
2382
|
+
}
|
|
2379
2383
|
}
|
|
2380
2384
|
ulElement = this.createListItems(listData, fields);
|
|
2381
2385
|
if (this.isIncrementalRequest) {
|
|
@@ -2399,6 +2403,12 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
2399
2403
|
else {
|
|
2400
2404
|
virtualUlElement.appendChild(ulElement);
|
|
2401
2405
|
}
|
|
2406
|
+
if (this.getModuleName() === 'multiselect' && this.isCheckBoxSelection && !this.appendUncheckList && this.isVirtualOrder) {
|
|
2407
|
+
const selectedUlElement = this.list.querySelector('.e-list-parent' + '.e-reorder');
|
|
2408
|
+
if (!isNullOrUndefined(selectedUlElement)) {
|
|
2409
|
+
virtualUlElement.removeChild(selectedUlElement);
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2402
2412
|
}
|
|
2403
2413
|
this.updateListElements(listData);
|
|
2404
2414
|
}
|
|
@@ -5577,7 +5587,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5577
5587
|
}
|
|
5578
5588
|
else if (this.enableVirtualization && this.getModuleName() !== 'autocomplete' && !this.isFiltering()) {
|
|
5579
5589
|
const value = this.getItemData().value;
|
|
5580
|
-
this.activeIndex = this.getIndexByValue(value);
|
|
5590
|
+
this.activeIndex = !isNullOrUndefined(value) ? this.getIndexByValue(value) : this.activeIndex;
|
|
5581
5591
|
let element = this.findListElement(this.list, 'li', 'data-value', value);
|
|
5582
5592
|
this.selectedLI = element;
|
|
5583
5593
|
element = null;
|
|
@@ -6797,14 +6807,16 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6797
6807
|
if (this.enableVirtualization) {
|
|
6798
6808
|
this.listItemHeight = this.getListHeight();
|
|
6799
6809
|
this.getSkeletonCount();
|
|
6810
|
+
this.skeletonCount = this.totalItemCount < (this.itemCount * 2) && ((!(this.dataSource instanceof DataManager)) ||
|
|
6811
|
+
((this.dataSource instanceof DataManager) && (this.totalItemCount <= this.itemCount))) ? 0 : this.skeletonCount;
|
|
6800
6812
|
this.updateVirtualizationProperties(this.itemCount, this.allowFiltering);
|
|
6801
|
-
if (this.index !== null) {
|
|
6802
|
-
this.activeIndex = this.index + this.skeletonCount;
|
|
6803
|
-
}
|
|
6804
6813
|
}
|
|
6805
6814
|
this.initValue();
|
|
6806
6815
|
this.selectedValueInfo = this.viewPortInfo;
|
|
6807
6816
|
if (this.enableVirtualization) {
|
|
6817
|
+
if (this.index !== null) {
|
|
6818
|
+
this.activeIndex = this.index + this.skeletonCount;
|
|
6819
|
+
}
|
|
6808
6820
|
this.activeIndex = this.activeIndex + this.skeletonCount;
|
|
6809
6821
|
}
|
|
6810
6822
|
}
|
|
@@ -13817,7 +13829,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13817
13829
|
if (isCheckbox) {
|
|
13818
13830
|
const startindex = this.viewPortInfo.startIndex;
|
|
13819
13831
|
const endindex = (((startindex + this.viewPortInfo.endIndex) <= (valuecheck.length)) &&
|
|
13820
|
-
valuecheck[(startindex + this.viewPortInfo.endIndex)])
|
|
13832
|
+
valuecheck[(startindex + this.viewPortInfo.endIndex)]) &&
|
|
13833
|
+
(this.dataSource instanceof DataManager && this.totalItemCount !== 0 && this.totalItemCount > (this.itemCount * 2))
|
|
13834
|
+
? (startindex + this.viewPortInfo.endIndex)
|
|
13821
13835
|
: (valuecheck.length);
|
|
13822
13836
|
for (let i = startindex; i < endindex; i++) {
|
|
13823
13837
|
const value = this.allowObjectBinding ? getValue((this.fields.value) ?
|
|
@@ -15581,6 +15595,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15581
15595
|
if (!isNullOrUndefined(this.value)) {
|
|
15582
15596
|
this.tempValues = this.allowObjectBinding ? this.value.slice() : this.value.slice();
|
|
15583
15597
|
}
|
|
15598
|
+
const removedChipTitle = selectedElem.getAttribute('title');
|
|
15584
15599
|
temp = selectedElem.nextElementSibling;
|
|
15585
15600
|
if (temp !== null) {
|
|
15586
15601
|
this.removeChipSelection();
|
|
@@ -15592,6 +15607,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15592
15607
|
this.removeValue(currentChip, e);
|
|
15593
15608
|
this.updateDelimeter(this.delimiterChar, e);
|
|
15594
15609
|
this.makeTextBoxEmpty();
|
|
15610
|
+
if (removedChipTitle && this.chipAnnouncerLiveRegion) {
|
|
15611
|
+
const remainingCount = this.value ? this.value.length : 0;
|
|
15612
|
+
const announcement = `${removedChipTitle} removed from selection ${remainingCount} items selected`;
|
|
15613
|
+
this.chipAnnouncerLiveRegion.textContent = announcement;
|
|
15614
|
+
}
|
|
15595
15615
|
}
|
|
15596
15616
|
if (this.closePopupOnSelect) {
|
|
15597
15617
|
this.hidePopup(e);
|
|
@@ -15783,6 +15803,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15783
15803
|
const selectedChips = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP$1 + '.' + CHIP_SELECTED);
|
|
15784
15804
|
if (selectedChips && selectedChips.length === 1) {
|
|
15785
15805
|
selectedChips[0].removeAttribute('id');
|
|
15806
|
+
selectedChips[0].removeAttribute('aria-hidden');
|
|
15786
15807
|
if (!isNullOrUndefined(this.inputElement) && this.inputElement.hasAttribute('aria-activedescendant')) {
|
|
15787
15808
|
this.inputElement.removeAttribute('aria-activedescendant');
|
|
15788
15809
|
if (!this.inputElement.hasAttribute('aria-describedby') && this.chipCollectionWrapper.id) {
|
|
@@ -15797,16 +15818,18 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15797
15818
|
addClass([element], CHIP_SELECTED);
|
|
15798
15819
|
if (element) {
|
|
15799
15820
|
element.setAttribute('id', this.element.id + '_chip_item');
|
|
15821
|
+
element.setAttribute('aria-hidden', 'true');
|
|
15822
|
+
const chipTitle = element.getAttribute('title');
|
|
15823
|
+
if (chipTitle && this.chipAnnouncerLiveRegion) {
|
|
15824
|
+
const announcement = `${chipTitle} focused. Press Backspace to remove`;
|
|
15825
|
+
this.chipAnnouncerLiveRegion.textContent = announcement;
|
|
15826
|
+
}
|
|
15800
15827
|
if (!isNullOrUndefined(this.inputElement) && element.id) {
|
|
15801
15828
|
this.inputElement.setAttribute('aria-activedescendant', element.id);
|
|
15802
15829
|
if (this.inputElement.hasAttribute('aria-describedby')) {
|
|
15803
15830
|
this.inputElement.removeAttribute('aria-describedby');
|
|
15804
15831
|
}
|
|
15805
15832
|
}
|
|
15806
|
-
const chipClose = element.querySelector('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
15807
|
-
if (chipClose) {
|
|
15808
|
-
chipClose.removeAttribute('aria-hidden');
|
|
15809
|
-
}
|
|
15810
15833
|
}
|
|
15811
15834
|
this.trigger('chipSelection', e);
|
|
15812
15835
|
}
|
|
@@ -16284,15 +16307,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16284
16307
|
const closeElements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
16285
16308
|
if (Browser.isDevice) {
|
|
16286
16309
|
for (let index = 0; index < closeElements.length; index++) {
|
|
16287
|
-
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
16288
16310
|
closeElements[index].style.display = 'none';
|
|
16289
16311
|
}
|
|
16290
16312
|
}
|
|
16291
|
-
else {
|
|
16292
|
-
for (let index = 0; index < closeElements.length; index++) {
|
|
16293
|
-
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
16294
|
-
}
|
|
16295
|
-
}
|
|
16296
16313
|
}
|
|
16297
16314
|
onMobileChipInteraction(e) {
|
|
16298
16315
|
const chipElem = closest(e.target, '.' + CHIP$1);
|
|
@@ -16332,7 +16349,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16332
16349
|
});
|
|
16333
16350
|
let compiledString;
|
|
16334
16351
|
const chipContent = this.createElement('span', { className: CHIP_CONTENT$1 });
|
|
16335
|
-
const chipClose = this.createElement('span', { className: CHIP_CLOSE$1, attrs: { 'aria-
|
|
16352
|
+
const chipClose = this.createElement('span', { className: CHIP_CLOSE$1, attrs: { 'aria-hidden': 'true' } });
|
|
16336
16353
|
if (this.mainData) {
|
|
16337
16354
|
itemData = this.getDataByValue(value);
|
|
16338
16355
|
}
|
|
@@ -16599,6 +16616,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16599
16616
|
}, targetExitViewport: () => {
|
|
16600
16617
|
if (!Browser.isDevice) {
|
|
16601
16618
|
this.hidePopup();
|
|
16619
|
+
let previousValue = this.tempValues;
|
|
16620
|
+
if (isNullOrUndefined(previousValue)) {
|
|
16621
|
+
previousValue = [];
|
|
16622
|
+
}
|
|
16623
|
+
this.updateValueState(this.scrollEvent, this.value, previousValue);
|
|
16602
16624
|
}
|
|
16603
16625
|
}
|
|
16604
16626
|
});
|
|
@@ -16879,6 +16901,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16879
16901
|
EventHandler.add(this.componentWrapper, 'mouseout', this.mouseOut, this);
|
|
16880
16902
|
EventHandler.add(this.overAllClear, 'mousedown', this.clearAll, this);
|
|
16881
16903
|
EventHandler.add(this.inputElement, 'paste', this.pasteHandler, this);
|
|
16904
|
+
EventHandler.add(document, 'wheel', this.onWheelScroll, this);
|
|
16905
|
+
EventHandler.add(document, 'scroll', this.onWheelScroll, this);
|
|
16882
16906
|
}
|
|
16883
16907
|
onInput(e) {
|
|
16884
16908
|
if (this.keyDownStatus) {
|
|
@@ -16893,6 +16917,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
16893
16917
|
this.search(e);
|
|
16894
16918
|
}
|
|
16895
16919
|
}
|
|
16920
|
+
onWheelScroll(e) {
|
|
16921
|
+
this.scrollEvent = e;
|
|
16922
|
+
}
|
|
16896
16923
|
pasteHandler(event) {
|
|
16897
16924
|
setTimeout(() => {
|
|
16898
16925
|
this.expandTextbox();
|
|
@@ -17378,7 +17405,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
17378
17405
|
else {
|
|
17379
17406
|
this.updateDelimeter(this.delimiterChar, null, isInitialVirtualData);
|
|
17380
17407
|
}
|
|
17381
|
-
if (this.mode === 'CheckBox' && this.showSelectAll && (isNullOrUndefined(this.value) || !this.value.length)) {
|
|
17408
|
+
if (this.mode === 'CheckBox' && this.showSelectAll && (isNullOrUndefined(this.value) || !this.value.length || (this.value.length !== this.listData.length))) {
|
|
17382
17409
|
this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });
|
|
17383
17410
|
}
|
|
17384
17411
|
if (this.mode === 'Box' || (this.mode === 'Default' && this.inputFocus)) {
|
|
@@ -18195,6 +18222,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18195
18222
|
if (!isNullOrUndefined(this.inputElement)) {
|
|
18196
18223
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
18197
18224
|
}
|
|
18225
|
+
EventHandler.remove(document, 'wheel', this.onWheelScroll);
|
|
18226
|
+
EventHandler.remove(document, 'scroll', this.onWheelScroll);
|
|
18198
18227
|
}
|
|
18199
18228
|
resizingWireEvent() {
|
|
18200
18229
|
// Mouse events
|
|
@@ -18506,12 +18535,18 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18506
18535
|
this.virtualSelectAllState = state;
|
|
18507
18536
|
this.virtualSelectAll = true;
|
|
18508
18537
|
this.CurrentEvent = event;
|
|
18538
|
+
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) {
|
|
18539
|
+
this.isVirtualOrder = true;
|
|
18540
|
+
}
|
|
18509
18541
|
if (!this.virtualSelectAllData) {
|
|
18510
18542
|
this.resetList(this.dataSource, this.fields, new Query());
|
|
18511
18543
|
}
|
|
18512
18544
|
if (this.virtualSelectAllData) {
|
|
18513
18545
|
this.virtualSelectionAll(state, li, event);
|
|
18514
18546
|
}
|
|
18547
|
+
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) {
|
|
18548
|
+
this.isVirtualOrder = false;
|
|
18549
|
+
}
|
|
18515
18550
|
}
|
|
18516
18551
|
else {
|
|
18517
18552
|
while (index < length && index <= 50 && index < count) {
|
|
@@ -18807,7 +18842,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18807
18842
|
if (this.fields.disabled) {
|
|
18808
18843
|
this.removeDisabledItemsValue(this.value);
|
|
18809
18844
|
}
|
|
18810
|
-
|
|
18845
|
+
if (this.enableVirtualization && !isNullOrUndefined(oldProp.value) && !isNullOrUndefined(newProp.value)
|
|
18846
|
+
&& !this.validateValues(newProp.value, oldProp.value)) {
|
|
18847
|
+
return;
|
|
18848
|
+
}
|
|
18849
|
+
this.updateVal(this.value, oldProp.value, 'value', this.enableVirtualization);
|
|
18811
18850
|
this.addValidInputClass();
|
|
18812
18851
|
if (!this.closePopupOnSelect && this.isPopupOpen()) {
|
|
18813
18852
|
this.refreshPopup();
|
|
@@ -19002,8 +19041,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
19002
19041
|
this.updateActionList(ulElement, list, event);
|
|
19003
19042
|
});
|
|
19004
19043
|
}
|
|
19005
|
-
updateVal(newProp, oldProp, prop) {
|
|
19006
|
-
if (!this.list) {
|
|
19044
|
+
updateVal(newProp, oldProp, prop, isVirtual = false) {
|
|
19045
|
+
if (!this.list || (isVirtual && prop === 'value' && ((isNullOrUndefined(oldProp) && !isNullOrUndefined(newProp)) || (!isNullOrUndefined(oldProp) && isNullOrUndefined(newProp)) || (this.validateValues(newProp, oldProp) && newProp.length > 0)))) {
|
|
19007
19046
|
this.onLoadSelect();
|
|
19008
19047
|
if (this.enableVirtualization) {
|
|
19009
19048
|
this.setProperties({ text: '' }, true);
|
|
@@ -19523,6 +19562,14 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
19523
19562
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
19524
19563
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
19525
19564
|
}
|
|
19565
|
+
if (!this.chipAnnouncerLiveRegion) {
|
|
19566
|
+
this.chipAnnouncerLiveRegion = this.createElement('div', {
|
|
19567
|
+
attrs: { 'aria-live': 'polite', 'aria-atomic': 'true', 'class': 'e-chip-announcer' }
|
|
19568
|
+
});
|
|
19569
|
+
this.chipAnnouncerLiveRegion.style.position = 'absolute';
|
|
19570
|
+
this.chipAnnouncerLiveRegion.style.left = '-10000px';
|
|
19571
|
+
this.componentWrapper.appendChild(this.chipAnnouncerLiveRegion);
|
|
19572
|
+
}
|
|
19526
19573
|
this.renderComplete();
|
|
19527
19574
|
}
|
|
19528
19575
|
setResize() {
|
|
@@ -20141,6 +20188,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
20141
20188
|
this.mainListCollection = null;
|
|
20142
20189
|
this.footer = null;
|
|
20143
20190
|
this.selectAllEventEle = null;
|
|
20191
|
+
this.chipAnnouncerLiveRegion = null;
|
|
20144
20192
|
super.destroy();
|
|
20145
20193
|
}
|
|
20146
20194
|
};
|
|
@@ -21014,7 +21062,6 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
21014
21062
|
this.list.classList.add('e-wrapper');
|
|
21015
21063
|
this.list.classList.add('e-lib');
|
|
21016
21064
|
if (this.element.tagName === 'EJS-LISTBOX') {
|
|
21017
|
-
this.element.setAttribute('tabindex', '0');
|
|
21018
21065
|
if (this.initLoad) {
|
|
21019
21066
|
this.element.appendChild(this.list);
|
|
21020
21067
|
}
|