@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 33.2.
|
|
3
|
+
* version : 33.2.5
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-dropdowns",
|
|
3
|
-
"version": "33.2.
|
|
3
|
+
"version": "33.2.5",
|
|
4
4
|
"description": "Essential JS 2 DropDown Components",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"es2015": "./dist/es6/ej2-dropdowns.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@syncfusion/ej2-base": "~33.2.3",
|
|
12
|
-
"@syncfusion/ej2-data": "~33.2.
|
|
13
|
-
"@syncfusion/ej2-inputs": "~33.2.
|
|
12
|
+
"@syncfusion/ej2-data": "~33.2.5",
|
|
13
|
+
"@syncfusion/ej2-inputs": "~33.2.5",
|
|
14
14
|
"@syncfusion/ej2-lists": "~33.2.3",
|
|
15
15
|
"@syncfusion/ej2-navigations": "~33.2.4",
|
|
16
16
|
"@syncfusion/ej2-notifications": "~33.2.3",
|
|
17
|
-
"@syncfusion/ej2-popups": "~33.2.
|
|
17
|
+
"@syncfusion/ej2-popups": "~33.2.5"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {},
|
|
20
20
|
"keywords": [
|
|
@@ -281,6 +281,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
281
281
|
protected isVirtualTrackHeight: boolean;
|
|
282
282
|
protected virtualSelectAll: boolean;
|
|
283
283
|
protected isVirtualReorder: boolean;
|
|
284
|
+
protected isVirtualOrder: boolean;
|
|
284
285
|
protected incrementalQueryString: string;
|
|
285
286
|
protected incrementalEndIndex: number;
|
|
286
287
|
protected incrementalStartIndex: number;
|
|
@@ -125,6 +125,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
125
125
|
_this.isVirtualTrackHeight = false;
|
|
126
126
|
_this.virtualSelectAll = false;
|
|
127
127
|
_this.isVirtualReorder = false;
|
|
128
|
+
_this.isVirtualOrder = false;
|
|
128
129
|
_this.incrementalQueryString = '';
|
|
129
130
|
_this.incrementalEndIndex = 0;
|
|
130
131
|
_this.incrementalStartIndex = 0;
|
|
@@ -1591,6 +1592,9 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1591
1592
|
if (this.getModuleName() === 'multiselect' && (this.virtualSelectAll && !isClearAll)) {
|
|
1592
1593
|
this.virtualSelectAllData = listData;
|
|
1593
1594
|
listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
|
|
1595
|
+
if (this.virtualSelectAllData.length < (this.itemCount * 2) && this.isCheckBoxSelection && this.isVirtualOrder) {
|
|
1596
|
+
listData = this.virtualSelectAllData;
|
|
1597
|
+
}
|
|
1594
1598
|
}
|
|
1595
1599
|
ulElement = this.createListItems(listData, fields);
|
|
1596
1600
|
if (this.isIncrementalRequest) {
|
|
@@ -1614,6 +1618,12 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1614
1618
|
else {
|
|
1615
1619
|
virtualUlElement.appendChild(ulElement);
|
|
1616
1620
|
}
|
|
1621
|
+
if (this.getModuleName() === 'multiselect' && this.isCheckBoxSelection && !this.appendUncheckList && this.isVirtualOrder) {
|
|
1622
|
+
var selectedUlElement = this.list.querySelector('.e-list-parent' + '.e-reorder');
|
|
1623
|
+
if (!isNullOrUndefined(selectedUlElement)) {
|
|
1624
|
+
virtualUlElement.removeChild(selectedUlElement);
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1617
1627
|
}
|
|
1618
1628
|
this.updateListElements(listData);
|
|
1619
1629
|
}
|
|
@@ -78,6 +78,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
78
78
|
private isFilteringAction;
|
|
79
79
|
private headerTemplateHeight;
|
|
80
80
|
private resizeHandler;
|
|
81
|
+
private scrollEvent;
|
|
81
82
|
/**
|
|
82
83
|
* The `fields` property maps the columns of the data table and binds the data to the component.
|
|
83
84
|
* * text - Maps the text column from data table for each list item.
|
|
@@ -673,6 +674,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
673
674
|
private virtualCustomData;
|
|
674
675
|
private isSelectAllLoop;
|
|
675
676
|
private initialPopupHeight;
|
|
677
|
+
private chipAnnouncerLiveRegion;
|
|
676
678
|
private enableRTL;
|
|
677
679
|
requiredModules(): ModuleDeclaration[];
|
|
678
680
|
private updateHTMLAttribute;
|
|
@@ -820,6 +822,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
820
822
|
private resetValueHandler;
|
|
821
823
|
protected wireEvent(): void;
|
|
822
824
|
private onInput;
|
|
825
|
+
private onWheelScroll;
|
|
823
826
|
private pasteHandler;
|
|
824
827
|
protected performFiltering(e: KeyboardEventArgs | MouseEvent): void;
|
|
825
828
|
protected search(e: KeyboardEventArgs): void;
|
|
@@ -543,7 +543,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
543
543
|
if (isCheckbox) {
|
|
544
544
|
var startindex = this.viewPortInfo.startIndex;
|
|
545
545
|
var endindex = (((startindex + this.viewPortInfo.endIndex) <= (valuecheck.length)) &&
|
|
546
|
-
valuecheck[(startindex + this.viewPortInfo.endIndex)])
|
|
546
|
+
valuecheck[(startindex + this.viewPortInfo.endIndex)]) &&
|
|
547
|
+
(this.dataSource instanceof DataManager && this.totalItemCount !== 0 && this.totalItemCount > (this.itemCount * 2))
|
|
548
|
+
? (startindex + this.viewPortInfo.endIndex)
|
|
547
549
|
: (valuecheck.length);
|
|
548
550
|
for (var i = startindex; i < endindex; i++) {
|
|
549
551
|
var value = this.allowObjectBinding ? getValue((this.fields.value) ?
|
|
@@ -2318,6 +2320,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2318
2320
|
if (!isNullOrUndefined(this.value)) {
|
|
2319
2321
|
this.tempValues = this.allowObjectBinding ? this.value.slice() : this.value.slice();
|
|
2320
2322
|
}
|
|
2323
|
+
var removedChipTitle = selectedElem.getAttribute('title');
|
|
2321
2324
|
temp = selectedElem.nextElementSibling;
|
|
2322
2325
|
if (temp !== null) {
|
|
2323
2326
|
this.removeChipSelection();
|
|
@@ -2329,6 +2332,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2329
2332
|
this.removeValue(currentChip, e);
|
|
2330
2333
|
this.updateDelimeter(this.delimiterChar, e);
|
|
2331
2334
|
this.makeTextBoxEmpty();
|
|
2335
|
+
if (removedChipTitle && this.chipAnnouncerLiveRegion) {
|
|
2336
|
+
var remainingCount = this.value ? this.value.length : 0;
|
|
2337
|
+
var announcement = removedChipTitle + " removed from selection " + remainingCount + " items selected";
|
|
2338
|
+
this.chipAnnouncerLiveRegion.textContent = announcement;
|
|
2339
|
+
}
|
|
2332
2340
|
}
|
|
2333
2341
|
if (this.closePopupOnSelect) {
|
|
2334
2342
|
this.hidePopup(e);
|
|
@@ -2521,6 +2529,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2521
2529
|
var selectedChips = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP + '.' + CHIP_SELECTED);
|
|
2522
2530
|
if (selectedChips && selectedChips.length === 1) {
|
|
2523
2531
|
selectedChips[0].removeAttribute('id');
|
|
2532
|
+
selectedChips[0].removeAttribute('aria-hidden');
|
|
2524
2533
|
if (!isNullOrUndefined(this.inputElement) && this.inputElement.hasAttribute('aria-activedescendant')) {
|
|
2525
2534
|
this.inputElement.removeAttribute('aria-activedescendant');
|
|
2526
2535
|
if (!this.inputElement.hasAttribute('aria-describedby') && this.chipCollectionWrapper.id) {
|
|
@@ -2535,16 +2544,18 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2535
2544
|
addClass([element], CHIP_SELECTED);
|
|
2536
2545
|
if (element) {
|
|
2537
2546
|
element.setAttribute('id', this.element.id + '_chip_item');
|
|
2547
|
+
element.setAttribute('aria-hidden', 'true');
|
|
2548
|
+
var chipTitle = element.getAttribute('title');
|
|
2549
|
+
if (chipTitle && this.chipAnnouncerLiveRegion) {
|
|
2550
|
+
var announcement = chipTitle + " focused. Press Backspace to remove";
|
|
2551
|
+
this.chipAnnouncerLiveRegion.textContent = announcement;
|
|
2552
|
+
}
|
|
2538
2553
|
if (!isNullOrUndefined(this.inputElement) && element.id) {
|
|
2539
2554
|
this.inputElement.setAttribute('aria-activedescendant', element.id);
|
|
2540
2555
|
if (this.inputElement.hasAttribute('aria-describedby')) {
|
|
2541
2556
|
this.inputElement.removeAttribute('aria-describedby');
|
|
2542
2557
|
}
|
|
2543
2558
|
}
|
|
2544
|
-
var chipClose = element.querySelector('span.' + CHIP_CLOSE.split(' ')[0]);
|
|
2545
|
-
if (chipClose) {
|
|
2546
|
-
chipClose.removeAttribute('aria-hidden');
|
|
2547
|
-
}
|
|
2548
2559
|
}
|
|
2549
2560
|
this.trigger('chipSelection', e);
|
|
2550
2561
|
};
|
|
@@ -3031,15 +3042,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3031
3042
|
var closeElements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP_CLOSE.split(' ')[0]);
|
|
3032
3043
|
if (Browser.isDevice) {
|
|
3033
3044
|
for (var index = 0; index < closeElements.length; index++) {
|
|
3034
|
-
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
3035
3045
|
closeElements[index].style.display = 'none';
|
|
3036
3046
|
}
|
|
3037
3047
|
}
|
|
3038
|
-
else {
|
|
3039
|
-
for (var index = 0; index < closeElements.length; index++) {
|
|
3040
|
-
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
3041
|
-
}
|
|
3042
|
-
}
|
|
3043
3048
|
};
|
|
3044
3049
|
MultiSelect.prototype.onMobileChipInteraction = function (e) {
|
|
3045
3050
|
var chipElem = closest(e.target, '.' + CHIP);
|
|
@@ -3080,7 +3085,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3080
3085
|
});
|
|
3081
3086
|
var compiledString;
|
|
3082
3087
|
var chipContent = this.createElement('span', { className: CHIP_CONTENT });
|
|
3083
|
-
var chipClose = this.createElement('span', { className: CHIP_CLOSE, attrs: { 'aria-
|
|
3088
|
+
var chipClose = this.createElement('span', { className: CHIP_CLOSE, attrs: { 'aria-hidden': 'true' } });
|
|
3084
3089
|
if (this.mainData) {
|
|
3085
3090
|
itemData = this.getDataByValue(value);
|
|
3086
3091
|
}
|
|
@@ -3348,6 +3353,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3348
3353
|
}, targetExitViewport: function () {
|
|
3349
3354
|
if (!Browser.isDevice) {
|
|
3350
3355
|
_this.hidePopup();
|
|
3356
|
+
var previousValue = _this.tempValues;
|
|
3357
|
+
if (isNullOrUndefined(previousValue)) {
|
|
3358
|
+
previousValue = [];
|
|
3359
|
+
}
|
|
3360
|
+
_this.updateValueState(_this.scrollEvent, _this.value, previousValue);
|
|
3351
3361
|
}
|
|
3352
3362
|
}
|
|
3353
3363
|
});
|
|
@@ -3628,6 +3638,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3628
3638
|
EventHandler.add(this.componentWrapper, 'mouseout', this.mouseOut, this);
|
|
3629
3639
|
EventHandler.add(this.overAllClear, 'mousedown', this.clearAll, this);
|
|
3630
3640
|
EventHandler.add(this.inputElement, 'paste', this.pasteHandler, this);
|
|
3641
|
+
EventHandler.add(document, 'wheel', this.onWheelScroll, this);
|
|
3642
|
+
EventHandler.add(document, 'scroll', this.onWheelScroll, this);
|
|
3631
3643
|
};
|
|
3632
3644
|
MultiSelect.prototype.onInput = function (e) {
|
|
3633
3645
|
if (this.keyDownStatus) {
|
|
@@ -3642,6 +3654,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3642
3654
|
this.search(e);
|
|
3643
3655
|
}
|
|
3644
3656
|
};
|
|
3657
|
+
MultiSelect.prototype.onWheelScroll = function (e) {
|
|
3658
|
+
this.scrollEvent = e;
|
|
3659
|
+
};
|
|
3645
3660
|
MultiSelect.prototype.pasteHandler = function (event) {
|
|
3646
3661
|
var _this = this;
|
|
3647
3662
|
setTimeout(function () {
|
|
@@ -4138,7 +4153,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
4138
4153
|
else {
|
|
4139
4154
|
this.updateDelimeter(this.delimiterChar, null, isInitialVirtualData);
|
|
4140
4155
|
}
|
|
4141
|
-
if (this.mode === 'CheckBox' && this.showSelectAll && (isNullOrUndefined(this.value) || !this.value.length)) {
|
|
4156
|
+
if (this.mode === 'CheckBox' && this.showSelectAll && (isNullOrUndefined(this.value) || !this.value.length || (this.value.length !== this.listData.length))) {
|
|
4142
4157
|
this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });
|
|
4143
4158
|
}
|
|
4144
4159
|
if (this.mode === 'Box' || (this.mode === 'Default' && this.inputFocus)) {
|
|
@@ -4957,6 +4972,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
4957
4972
|
if (!isNullOrUndefined(this.inputElement)) {
|
|
4958
4973
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
4959
4974
|
}
|
|
4975
|
+
EventHandler.remove(document, 'wheel', this.onWheelScroll);
|
|
4976
|
+
EventHandler.remove(document, 'scroll', this.onWheelScroll);
|
|
4960
4977
|
};
|
|
4961
4978
|
MultiSelect.prototype.resizingWireEvent = function () {
|
|
4962
4979
|
// Mouse events
|
|
@@ -5270,12 +5287,18 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
5270
5287
|
this.virtualSelectAllState = state;
|
|
5271
5288
|
this.virtualSelectAll = true;
|
|
5272
5289
|
this.CurrentEvent = event;
|
|
5290
|
+
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) {
|
|
5291
|
+
this.isVirtualOrder = true;
|
|
5292
|
+
}
|
|
5273
5293
|
if (!this.virtualSelectAllData) {
|
|
5274
5294
|
this.resetList(this.dataSource, this.fields, new Query());
|
|
5275
5295
|
}
|
|
5276
5296
|
if (this.virtualSelectAllData) {
|
|
5277
5297
|
this.virtualSelectionAll(state, li, event);
|
|
5278
5298
|
}
|
|
5299
|
+
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) {
|
|
5300
|
+
this.isVirtualOrder = false;
|
|
5301
|
+
}
|
|
5279
5302
|
}
|
|
5280
5303
|
else {
|
|
5281
5304
|
while (index < length && index <= 50 && index < count) {
|
|
@@ -5574,7 +5597,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
5574
5597
|
if (this.fields.disabled) {
|
|
5575
5598
|
this.removeDisabledItemsValue(this.value);
|
|
5576
5599
|
}
|
|
5577
|
-
this.updateVal(this.value, oldProp.value, 'value');
|
|
5600
|
+
this.updateVal(this.value, oldProp.value, 'value', this.enableVirtualization);
|
|
5578
5601
|
this.addValidInputClass();
|
|
5579
5602
|
if (!this.closePopupOnSelect && this.isPopupOpen()) {
|
|
5580
5603
|
this.refreshPopup();
|
|
@@ -5770,9 +5793,10 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
5770
5793
|
_this.updateActionList(ulElement, list, event);
|
|
5771
5794
|
});
|
|
5772
5795
|
};
|
|
5773
|
-
MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
|
|
5796
|
+
MultiSelect.prototype.updateVal = function (newProp, oldProp, prop, isVirtual) {
|
|
5774
5797
|
var _this = this;
|
|
5775
|
-
if (
|
|
5798
|
+
if (isVirtual === void 0) { isVirtual = false; }
|
|
5799
|
+
if (!this.list || (isVirtual && prop === 'value' && ((isNullOrUndefined(oldProp) && !isNullOrUndefined(newProp)) || (!isNullOrUndefined(oldProp) && isNullOrUndefined(newProp)) || (this.validateValues(newProp, oldProp) && newProp.length > 0)))) {
|
|
5776
5800
|
this.onLoadSelect();
|
|
5777
5801
|
if (this.enableVirtualization) {
|
|
5778
5802
|
this.setProperties({ text: '' }, true);
|
|
@@ -6296,6 +6320,14 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
6296
6320
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
6297
6321
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
6298
6322
|
}
|
|
6323
|
+
if (!this.chipAnnouncerLiveRegion) {
|
|
6324
|
+
this.chipAnnouncerLiveRegion = this.createElement('div', {
|
|
6325
|
+
attrs: { 'aria-live': 'polite', 'aria-atomic': 'true', 'class': 'e-chip-announcer' }
|
|
6326
|
+
});
|
|
6327
|
+
this.chipAnnouncerLiveRegion.style.position = 'absolute';
|
|
6328
|
+
this.chipAnnouncerLiveRegion.style.left = '-10000px';
|
|
6329
|
+
this.componentWrapper.appendChild(this.chipAnnouncerLiveRegion);
|
|
6330
|
+
}
|
|
6299
6331
|
this.renderComplete();
|
|
6300
6332
|
};
|
|
6301
6333
|
MultiSelect.prototype.setResize = function () {
|
|
@@ -6917,6 +6949,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
6917
6949
|
this.mainListCollection = null;
|
|
6918
6950
|
this.footer = null;
|
|
6919
6951
|
this.selectAllEventEle = null;
|
|
6952
|
+
this.chipAnnouncerLiveRegion = null;
|
|
6920
6953
|
_super.prototype.destroy.call(this);
|
|
6921
6954
|
};
|
|
6922
6955
|
__decorate([
|