@syncfusion/ej2-dropdowns 33.2.4 → 33.2.5
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 +58 -16
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +59 -16
- 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 +4 -4
- 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/multi-select/multi-select.d.ts +3 -0
- package/src/multi-select/multi-select.js +49 -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
|
}
|
|
@@ -14075,7 +14085,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14075
14085
|
if (isCheckbox) {
|
|
14076
14086
|
var startindex = this.viewPortInfo.startIndex;
|
|
14077
14087
|
var endindex = (((startindex + this.viewPortInfo.endIndex) <= (valuecheck.length)) &&
|
|
14078
|
-
valuecheck[(startindex + this.viewPortInfo.endIndex)])
|
|
14088
|
+
valuecheck[(startindex + this.viewPortInfo.endIndex)]) &&
|
|
14089
|
+
(this.dataSource instanceof DataManager && this.totalItemCount !== 0 && this.totalItemCount > (this.itemCount * 2))
|
|
14090
|
+
? (startindex + this.viewPortInfo.endIndex)
|
|
14079
14091
|
: (valuecheck.length);
|
|
14080
14092
|
for (var i = startindex; i < endindex; i++) {
|
|
14081
14093
|
var value = this.allowObjectBinding ? getValue((this.fields.value) ?
|
|
@@ -15845,6 +15857,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15845
15857
|
if (!isNullOrUndefined(this.value)) {
|
|
15846
15858
|
this.tempValues = this.allowObjectBinding ? this.value.slice() : this.value.slice();
|
|
15847
15859
|
}
|
|
15860
|
+
var removedChipTitle = selectedElem.getAttribute('title');
|
|
15848
15861
|
temp = selectedElem.nextElementSibling;
|
|
15849
15862
|
if (temp !== null) {
|
|
15850
15863
|
this.removeChipSelection();
|
|
@@ -15856,6 +15869,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15856
15869
|
this.removeValue(currentChip, e);
|
|
15857
15870
|
this.updateDelimeter(this.delimiterChar, e);
|
|
15858
15871
|
this.makeTextBoxEmpty();
|
|
15872
|
+
if (removedChipTitle && this.chipAnnouncerLiveRegion) {
|
|
15873
|
+
var remainingCount = this.value ? this.value.length : 0;
|
|
15874
|
+
var announcement = removedChipTitle + " removed from selection " + remainingCount + " items selected";
|
|
15875
|
+
this.chipAnnouncerLiveRegion.textContent = announcement;
|
|
15876
|
+
}
|
|
15859
15877
|
}
|
|
15860
15878
|
if (this.closePopupOnSelect) {
|
|
15861
15879
|
this.hidePopup(e);
|
|
@@ -16048,6 +16066,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16048
16066
|
var selectedChips = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP$1 + '.' + CHIP_SELECTED);
|
|
16049
16067
|
if (selectedChips && selectedChips.length === 1) {
|
|
16050
16068
|
selectedChips[0].removeAttribute('id');
|
|
16069
|
+
selectedChips[0].removeAttribute('aria-hidden');
|
|
16051
16070
|
if (!isNullOrUndefined(this.inputElement) && this.inputElement.hasAttribute('aria-activedescendant')) {
|
|
16052
16071
|
this.inputElement.removeAttribute('aria-activedescendant');
|
|
16053
16072
|
if (!this.inputElement.hasAttribute('aria-describedby') && this.chipCollectionWrapper.id) {
|
|
@@ -16062,16 +16081,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16062
16081
|
addClass([element], CHIP_SELECTED);
|
|
16063
16082
|
if (element) {
|
|
16064
16083
|
element.setAttribute('id', this.element.id + '_chip_item');
|
|
16084
|
+
element.setAttribute('aria-hidden', 'true');
|
|
16085
|
+
var chipTitle = element.getAttribute('title');
|
|
16086
|
+
if (chipTitle && this.chipAnnouncerLiveRegion) {
|
|
16087
|
+
var announcement = chipTitle + " focused. Press Backspace to remove";
|
|
16088
|
+
this.chipAnnouncerLiveRegion.textContent = announcement;
|
|
16089
|
+
}
|
|
16065
16090
|
if (!isNullOrUndefined(this.inputElement) && element.id) {
|
|
16066
16091
|
this.inputElement.setAttribute('aria-activedescendant', element.id);
|
|
16067
16092
|
if (this.inputElement.hasAttribute('aria-describedby')) {
|
|
16068
16093
|
this.inputElement.removeAttribute('aria-describedby');
|
|
16069
16094
|
}
|
|
16070
16095
|
}
|
|
16071
|
-
var chipClose = element.querySelector('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
16072
|
-
if (chipClose) {
|
|
16073
|
-
chipClose.removeAttribute('aria-hidden');
|
|
16074
|
-
}
|
|
16075
16096
|
}
|
|
16076
16097
|
this.trigger('chipSelection', e);
|
|
16077
16098
|
};
|
|
@@ -16558,15 +16579,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16558
16579
|
var closeElements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
16559
16580
|
if (Browser.isDevice) {
|
|
16560
16581
|
for (var index = 0; index < closeElements.length; index++) {
|
|
16561
|
-
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
16562
16582
|
closeElements[index].style.display = 'none';
|
|
16563
16583
|
}
|
|
16564
16584
|
}
|
|
16565
|
-
else {
|
|
16566
|
-
for (var index = 0; index < closeElements.length; index++) {
|
|
16567
|
-
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
16568
|
-
}
|
|
16569
|
-
}
|
|
16570
16585
|
};
|
|
16571
16586
|
MultiSelect.prototype.onMobileChipInteraction = function (e) {
|
|
16572
16587
|
var chipElem = closest(e.target, '.' + CHIP$1);
|
|
@@ -16607,7 +16622,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16607
16622
|
});
|
|
16608
16623
|
var compiledString;
|
|
16609
16624
|
var chipContent = this.createElement('span', { className: CHIP_CONTENT$1 });
|
|
16610
|
-
var chipClose = this.createElement('span', { className: CHIP_CLOSE$1, attrs: { 'aria-
|
|
16625
|
+
var chipClose = this.createElement('span', { className: CHIP_CLOSE$1, attrs: { 'aria-hidden': 'true' } });
|
|
16611
16626
|
if (this.mainData) {
|
|
16612
16627
|
itemData = this.getDataByValue(value);
|
|
16613
16628
|
}
|
|
@@ -16875,6 +16890,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16875
16890
|
}, targetExitViewport: function () {
|
|
16876
16891
|
if (!Browser.isDevice) {
|
|
16877
16892
|
_this.hidePopup();
|
|
16893
|
+
var previousValue = _this.tempValues;
|
|
16894
|
+
if (isNullOrUndefined(previousValue)) {
|
|
16895
|
+
previousValue = [];
|
|
16896
|
+
}
|
|
16897
|
+
_this.updateValueState(_this.scrollEvent, _this.value, previousValue);
|
|
16878
16898
|
}
|
|
16879
16899
|
}
|
|
16880
16900
|
});
|
|
@@ -17155,6 +17175,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17155
17175
|
EventHandler.add(this.componentWrapper, 'mouseout', this.mouseOut, this);
|
|
17156
17176
|
EventHandler.add(this.overAllClear, 'mousedown', this.clearAll, this);
|
|
17157
17177
|
EventHandler.add(this.inputElement, 'paste', this.pasteHandler, this);
|
|
17178
|
+
EventHandler.add(document, 'wheel', this.onWheelScroll, this);
|
|
17179
|
+
EventHandler.add(document, 'scroll', this.onWheelScroll, this);
|
|
17158
17180
|
};
|
|
17159
17181
|
MultiSelect.prototype.onInput = function (e) {
|
|
17160
17182
|
if (this.keyDownStatus) {
|
|
@@ -17169,6 +17191,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17169
17191
|
this.search(e);
|
|
17170
17192
|
}
|
|
17171
17193
|
};
|
|
17194
|
+
MultiSelect.prototype.onWheelScroll = function (e) {
|
|
17195
|
+
this.scrollEvent = e;
|
|
17196
|
+
};
|
|
17172
17197
|
MultiSelect.prototype.pasteHandler = function (event) {
|
|
17173
17198
|
var _this = this;
|
|
17174
17199
|
setTimeout(function () {
|
|
@@ -17665,7 +17690,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17665
17690
|
else {
|
|
17666
17691
|
this.updateDelimeter(this.delimiterChar, null, isInitialVirtualData);
|
|
17667
17692
|
}
|
|
17668
|
-
if (this.mode === 'CheckBox' && this.showSelectAll && (isNullOrUndefined(this.value) || !this.value.length)) {
|
|
17693
|
+
if (this.mode === 'CheckBox' && this.showSelectAll && (isNullOrUndefined(this.value) || !this.value.length || (this.value.length !== this.listData.length))) {
|
|
17669
17694
|
this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });
|
|
17670
17695
|
}
|
|
17671
17696
|
if (this.mode === 'Box' || (this.mode === 'Default' && this.inputFocus)) {
|
|
@@ -18484,6 +18509,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18484
18509
|
if (!isNullOrUndefined(this.inputElement)) {
|
|
18485
18510
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
18486
18511
|
}
|
|
18512
|
+
EventHandler.remove(document, 'wheel', this.onWheelScroll);
|
|
18513
|
+
EventHandler.remove(document, 'scroll', this.onWheelScroll);
|
|
18487
18514
|
};
|
|
18488
18515
|
MultiSelect.prototype.resizingWireEvent = function () {
|
|
18489
18516
|
// Mouse events
|
|
@@ -18797,12 +18824,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18797
18824
|
this.virtualSelectAllState = state;
|
|
18798
18825
|
this.virtualSelectAll = true;
|
|
18799
18826
|
this.CurrentEvent = event;
|
|
18827
|
+
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) {
|
|
18828
|
+
this.isVirtualOrder = true;
|
|
18829
|
+
}
|
|
18800
18830
|
if (!this.virtualSelectAllData) {
|
|
18801
18831
|
this.resetList(this.dataSource, this.fields, new Query());
|
|
18802
18832
|
}
|
|
18803
18833
|
if (this.virtualSelectAllData) {
|
|
18804
18834
|
this.virtualSelectionAll(state, li, event);
|
|
18805
18835
|
}
|
|
18836
|
+
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) {
|
|
18837
|
+
this.isVirtualOrder = false;
|
|
18838
|
+
}
|
|
18806
18839
|
}
|
|
18807
18840
|
else {
|
|
18808
18841
|
while (index < length && index <= 50 && index < count) {
|
|
@@ -19101,7 +19134,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19101
19134
|
if (this.fields.disabled) {
|
|
19102
19135
|
this.removeDisabledItemsValue(this.value);
|
|
19103
19136
|
}
|
|
19104
|
-
this.updateVal(this.value, oldProp.value, 'value');
|
|
19137
|
+
this.updateVal(this.value, oldProp.value, 'value', this.enableVirtualization);
|
|
19105
19138
|
this.addValidInputClass();
|
|
19106
19139
|
if (!this.closePopupOnSelect && this.isPopupOpen()) {
|
|
19107
19140
|
this.refreshPopup();
|
|
@@ -19297,9 +19330,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19297
19330
|
_this.updateActionList(ulElement, list, event);
|
|
19298
19331
|
});
|
|
19299
19332
|
};
|
|
19300
|
-
MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
|
|
19333
|
+
MultiSelect.prototype.updateVal = function (newProp, oldProp, prop, isVirtual) {
|
|
19301
19334
|
var _this = this;
|
|
19302
|
-
if (
|
|
19335
|
+
if (isVirtual === void 0) { isVirtual = false; }
|
|
19336
|
+
if (!this.list || (isVirtual && prop === 'value' && ((isNullOrUndefined(oldProp) && !isNullOrUndefined(newProp)) || (!isNullOrUndefined(oldProp) && isNullOrUndefined(newProp)) || (this.validateValues(newProp, oldProp) && newProp.length > 0)))) {
|
|
19303
19337
|
this.onLoadSelect();
|
|
19304
19338
|
if (this.enableVirtualization) {
|
|
19305
19339
|
this.setProperties({ text: '' }, true);
|
|
@@ -19823,6 +19857,14 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19823
19857
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
19824
19858
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
19825
19859
|
}
|
|
19860
|
+
if (!this.chipAnnouncerLiveRegion) {
|
|
19861
|
+
this.chipAnnouncerLiveRegion = this.createElement('div', {
|
|
19862
|
+
attrs: { 'aria-live': 'polite', 'aria-atomic': 'true', 'class': 'e-chip-announcer' }
|
|
19863
|
+
});
|
|
19864
|
+
this.chipAnnouncerLiveRegion.style.position = 'absolute';
|
|
19865
|
+
this.chipAnnouncerLiveRegion.style.left = '-10000px';
|
|
19866
|
+
this.componentWrapper.appendChild(this.chipAnnouncerLiveRegion);
|
|
19867
|
+
}
|
|
19826
19868
|
this.renderComplete();
|
|
19827
19869
|
};
|
|
19828
19870
|
MultiSelect.prototype.setResize = function () {
|
|
@@ -20444,6 +20486,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
20444
20486
|
this.mainListCollection = null;
|
|
20445
20487
|
this.footer = null;
|
|
20446
20488
|
this.selectAllEventEle = null;
|
|
20489
|
+
this.chipAnnouncerLiveRegion = null;
|
|
20447
20490
|
_super.prototype.destroy.call(this);
|
|
20448
20491
|
};
|
|
20449
20492
|
__decorate$5([
|